#Looking for a way to modify lower hud for a specified unit

1 messages · Page 1 of 1 (latest)

plucky wave
#

Hello.
I mostly am looking for a way to modify lower hud (stats branch) for certain unit name. I just don't know how to select the element in JavaScript for specified unit name the rest I have no issue with.

vital nimbus
#

Press F6 while in workshop mode, this will open the Panorama Debugger.

Click on the button that says "Inspect" to enter inspect mode.

During inspect mode, click on the UI part you want to adjust. This will take you to where it is located, its panel tree and its current CSS.

plucky wave
tawdry hill
#

You get a selected unit and then check its name

#
const selected_unit_index = Players.GetLocalPlayerPortraitUnit();
const name = Entities.GetUnitName(selected_unit_index);
#

something like this

#

if multiple stuff are selected you may want to use GetSelectedEntities. You need to experiment with it yourself.