1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome to the new Hive! Be advised that we're still working on the site. There are still many rough edges, so please bear with us.
    Dismiss Notice
  3. The 14th Icon Contest is still in progress (and may be extended). You can still make it in time.
    Dismiss Notice
  4. The 25th Texturing Contest has started! Contestants are to create a skin representing a dark elf person/being or any construct related to it using the vanilla models or the custom ones found on the site.
    Dismiss Notice
  5. The poll for Terraining Contest #18 is finally up! Play through the maps and cast your vote on your favourite.
    Dismiss Notice
  6. Buy it, use it, break it, fix it, trash it, change it, mail - upgrade it. Join (Optionally) Paired Techtree Contest #11 - Techno Magic now!
    Dismiss Notice
  7. Voting squad, line up! Cast your vote on the poll for Modeling Contest #29 - Squads!
    Dismiss Notice
  8. Hero Contest #8 is up and running! This time it's a joint contest between artists and coders. Go here for team matchmaking.
    Dismiss Notice
  9. The poll for the theme of our StarCraft II Terraining Contest is up. Cast your note now!
    Dismiss Notice
  10. The ninth Concept Art Contest has launched. Enter now!
    Dismiss Notice
  11. The member Kam is making HIVE coasters. Take a look. For every coaster you buy, Hive gets $1.
    Dismiss Notice

Hero Icon not showing?

Discussion in 'GEHZ Solved Problems' started by Undead0dd, Apr 11, 2012.

  1. Undead0dd

    Undead0dd
    Joined:
    Dec 13, 2008
    Messages:
    139
    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: Apr 11, 2012
  2. Dr Super Good

    Dr Super Good
    Joined:
    Jan 18, 2005
    Messages:
    21,151
    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.

    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.
     
  3. Undead0dd

    Undead0dd
    Joined:
    Dec 13, 2008
    Messages:
    139
    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
     

    Attached Files:

  4. MGCǂSpectre

    MGCǂSpectre
    Joined:
    Feb 4, 2005
    Messages:
    2,997
    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.
     
  5. Dr Super Good

    Dr Super Good
    Joined:
    Jan 18, 2005
    Messages:
    21,151
    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).
     

    Attached Files:

    Last edited: Apr 12, 2012
  6. Undead0dd

    Undead0dd
    Joined:
    Dec 13, 2008
    Messages:
    139
    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?
     
  7. Dr Super Good

    Dr Super Good
    Joined:
    Jan 18, 2005
    Messages:
    21,151
    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.

    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.
     
  8. Undead0dd

    Undead0dd
    Joined:
    Dec 13, 2008
    Messages:
    139
    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".
     
  9. Dr Super Good

    Dr Super Good
    Joined:
    Jan 18, 2005
    Messages:
    21,151
    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).
     
  10. Undead0dd

    Undead0dd
    Joined:
    Dec 13, 2008
    Messages:
    139
    Alright, I have it all down. Thank you for the help!