• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hero Icon not showing?

Status
Not open for further replies.
Level 5
Joined
Dec 13, 2008
Messages
141
Hero Icon & Dialog Button

Alrighty, so I've made 6 heroes.
2 For Terran, 2 For Protoss, and 2 For Zerg.

Terran and Protoss icons are showing just fine.

The zerg however are not. I just have a blue icon/button in the bottom right corner of my screen. I've checked the actor data for my zerg heroes and the icons are correctly set to a zergling/hydralisk. Is there anything I'm missing in the actor data for this to happen?

The Dialog Button.
I have my four menus, each one creates their own buttons. Problem is one button is created and is in the top left corner of the Research and Hero menus, but I can't find which one it is.

For the Research Menu, I thought it happened because of the two separate racial skill buttons I have in it (2 Buttons that will apply 1 upgrade specific to the player's race) Like this:

  • General - If (Conditions) then do (Actions) else do (Actions)
    • If
      • (Race of player (Triggering player)) == Protoss
    • Then
      • Dialog - Create a Button for dialog ResearchMenu
      • Variable - Set ResearchButton[0] = (Last created dialog item)
      • Dialog - Set ResearchButton[0] size to (300, 50) for PlayerClickedReasearhc
      • Dialog - Set ResearchButton[0] text to "Racial Upgrade #1" for PlayerClickedReasearhc
      • Dialog - Set ResearchButton[0] tooltip to "Recieve one of the three upgrades: ..." for PlayerClickedReasearhc
      • Dialog - Move ResearchButton[0] to (50, 50) relative to Top Left of dialog for PlayerClickedReasearhc
    • Else
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Race of player (Triggering player)) == Zerg
        • Then
          • Dialog - Create a Button for dialog ResearchMenu
          • Variable - Set ResearchButton[0] = (Last created dialog item)
          • Dialog - Set ResearchButton[0] size to (300, 50) for PlayerClickedReasearhc
          • Dialog - Set ResearchButton[0] text to "Racial Upgrade #1" for PlayerClickedReasearhc
          • Dialog - Set ResearchButton[0] tooltip to "Recieve one of the three upgrades: ..." for PlayerClickedReasearhc
          • Dialog - Move ResearchButton[0] to (50, 50) relative to Top Left of dialog for PlayerClickedReasearhc
        • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Race of player (Triggering player)) == Terran
            • Then
              • Dialog - Create a Button for dialog ResearchMenu
              • Variable - Set ResearchButton[0] = (Last created dialog item)
              • Dialog - Set ResearchButton[0] size to (300, 50) for PlayerClickedReasearhc
              • Dialog - Set ResearchButton[0] text to "Racial Upgrade #1" for PlayerClickedReasearhc
              • Dialog - Set ResearchButton[0] tooltip to "Recieve one of the three upgrades: ..." for PlayerClickedReasearhc
              • Dialog - Move ResearchButton[0] to (50, 50) relative to Top Left of dialog for PlayerClickedReasearhc
            • Else
For the Hero Menu, I thought I fixed it by separating the hero menus into different arrays but it still happens.

I have my trigger for creating buttons for the hero menu like this(i cut off the zerg and protoss parts, because its the same thing):
  • General - If (Conditions) then do (Actions) else do (Actions)
    • If
      • (Race of player (Triggering player)) == Terran
    • Then
      • Dialog - Create a Button for dialog HeroMenu[0]
      • Dialog - Set (Last created dialog item) size to (80, 80) for PlayerClickedButtonGroupPlayer
      • Dialog - Set (Last created dialog item) tooltip to "Marine - Stronger Stimpack. Better ..." for PlayerClickedButtonGroupPlayer
      • Dialog - Move (Last created dialog item) to (50, 0) relative to Left of dialog for PlayerClickedButtonGroupPlayer
      • Variable - Set HeroButtonArray[0] = (Last created dialog item)
      • Dialog - Create an image for dialog HeroMenu[0] with the dimensions (76, 76) anchored to Left with an offset of (50, 0) setting the tooltip to "" using the image Assets\Textures\btn-unit-terran-marine.dds as a Normal type with tiled set to True tint color White and blend mode Normal
      • Dialog - Create a Button for dialog HeroMenu[0]
      • Dialog - Set (Last created dialog item) size to (80, 80) for PlayerClickedButtonGroupPlayer
      • Dialog - Set (Last created dialog item) tooltip to "Spectre - Your strongest sniper." for PlayerClickedButtonGroupPlayer
      • Dialog - Move (Last created dialog item) to (50, 0) relative to Right of dialog for PlayerClickedButtonGroupPlayer
      • Variable - Set HeroButtonArray[1] = (Last created dialog item)
      • Dialog - Create an image for dialog HeroMenu[0] with the dimensions (76, 76) anchored to Right with an offset of (50, 0) setting the tooltip to "" using the image Assets\Textures\btn-unit-terran-spectre.dds as a Normal type with tiled set to True tint color White and blend mode Normal
      • Dialog - Show HeroMenu[0] for PlayerClickedButtonGroupPlayer
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The zerg however are not. I just have a blue icon/button in the bottom right corner of my screen. I've checked the actor data for my zerg heroes and the icons are correctly set to a zergling/hydralisk. Is there anything I'm missing in the actor data for this to happen?
Firstly select the "Units" catalog. Then choose the unit's entry (its unit data). Then open the "Flags" field. Turn on the "Hero" flag. The unit will now show the hero icon at the lower right of the screen. Of course you will have to set its actor with the appropriate art.

The Dialog Button.
I have my four menus, each one creates their own buttons. Problem is one button is created and is in the top left corner of the Research and Hero menus, but I can't find which one it is.
Try identifying which button is the rouge button. Make it print it's handle integer when pressed. Paired with printing all handle integers for all buttons as they are created, you will be able to find which button is going rogue and being placed there.

If you want someone else to have a go at fixing it you will need to post the map.
 
Level 5
Joined
Dec 13, 2008
Messages
141
I already had the hero flag checked, but it still has the blue icon for bot of my zerg heroes.

As for the dialog, I can't really figure out which one it is by looking through the triggers for hours.

I've attached my map to this post, I'd like to find out where the problem would be stemming from besides having someone find it and fix it
 

Attachments

  • The Art of Defending.SC2Map
    398.1 KB · Views: 61
Level 22
Joined
Feb 4, 2005
Messages
3,971
Did you go to Data editor, actor's data, UI tab having enabled 'Advanced' fields and there you need to add the hero icon, preferrably in the same format with alpha around the icon as the rest of the heroes. Copy some other char Icon - Nova, Raynor and see their hero icon which field uses the hero icon in Actor>UI tab. Do the same field for yours. Do you use the right format? I would recommend using the same dimensions as the usual Hero icons you see of Raynor. Nova.. or just copy yours over one of them the same size and leaving alpha around it, then save as dds, any dimensions work but safer to be the same.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Ok from a rough test I have noticed these problems.

1. The hero icons for Zerg heroes are only not showing properly for the Zerg race and show fine for Terran.
2. I am not too sure what is wrong with your dialogs as some work and others do not (I cannot find any that problem you described but only a dozen different ones).
3. Your map is US localized so edits I make cause all text to go funny.

Once I had sorted problem 3 I will look into problem 1 and then 2.

So far I believe problem 2 is the result of you abusing generic events. Try and reduce the scope of events to be more specific as StarCraft II only offers a very small number of generic event sockets that will cause event bindings to not work after they are depleted (the trigger will not execute). Specificly I am talking about the "any button pressed by any player" events as you use a lot of them (probably more that StarCraft II allows).

Edit

The problem with the Zerg hero icons is due to the Zerg race interface not having a frame for Hero icons.

The solution to this seems to be to import a modifieid Assets.txt file which conatins some image linkings for the Zerg hero icon borders at the path Base.SC2Data/GameData. I have attached such an Assets.txt which relinks the Zerg hero icon border to that of the terrans (as they are missing such art).
 

Attachments

  • Assets.txt
    93.8 KB · Views: 110
Last edited:
Level 5
Joined
Dec 13, 2008
Messages
141
So I'm going to have to reduce the amount of triggers I used with generic events? I didn't know Starcraft 2 would act like that, haven't mapped for a few years and I only touched the editor once back then(and of course like everyone else, got really, really confused).

So the zerg are just missing their border? I'm going to guess that its because they aren't playable in the campaign(if I remember correctly, Terran and Protoss are the only races you play in campaign. Not sure about getting the hero icon borders though.)

But you say you find different problems with the dialogs, what are they?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
So the zerg are just missing their border? I'm going to guess that its because they aren't playable in the campaign(if I remember correctly, Terran and Protoss are the only races you play in campaign. Not sure about getting the hero icon borders though.)
By the looks of it the art was never created. There were attempts made with one of the patches but that links to a missing file as well. Importing the file I provided at the path mentioned will fix the problem by instructing the Zerg UI to use the Terran hero icon border. Might mismatch the style but is better than nothing.

But you say you find different problems with the dialogs, what are they?
Clicking on options I do not have enough resources for causes the main menu to come up and the other menu to remain open. Especially with the Hero hire dialog this is a problem as there is no "Exit" button.

Consider if all the dialog choices are nescescary. It might be better to implement some of the features on ingame units instead of via dialog.
 
Level 5
Joined
Dec 13, 2008
Messages
141
Alright, I've imported the file, but what do I have to change on the actor? Redirect the path? I quick tested for the icon and it remained blue.

I just added an exit button for the hero menu(I thought it already closes, just click on one of the two heroes. Figured it wouldn't need an exit button.)As for the Main Menu staying open, I didn't know how to make a dialog button that isn't on a menu, unless that is "Display Screen Button".
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Alright, I've imported the file, but what do I have to change on the actor? Redirect the path? I quick tested for the icon and it remained blue.
You need to import it to the correct path and save. If you test before saving the import gets lost.

The correct path is "Base.SC2Data/GameData" so the file should be at "Base.SC2Data/GameData/Assets.txt". The path is case sensitive and should be exactly as mentioned.

Buttons can be placed anywhere as long as there is a dialog. Nothing forces you to make the dialog have any visible visual (fully transparent).
 
Status
Not open for further replies.
Top