I'm trying to display on-screen the name of a research/upgrade when a player initiates one. For example, when a player researches Stimpack ability, I want to put up a text message saying "Player 1 - research Stimpack". I am using the event "Any Unit research progress is Started" and (Triggering progress upgrade) to return the upgrade, which comes back as <Game Link - Upgrade> type. How can I extract the name of the upgrade from this?
Okay thanks that gets me closer. Apparently I need to grab the "CUpgrade Name" of the game link, but my attempts to do so result in Trigger Errors when reaching the Catalog lookup line. Attached is a screenshot of my code. Any ideas where I'm going wrong here?
The error I'm getting is: Catalog field 'CUpgrade Name' could not be read (Core: a required object could not be found)
Ok, i will explain it but i forgot that it displays the raw text value of the tooltip or whatever value you get.
EDIT: it just deleted all of my explanation D:
1) Click Display Raw Data
2) Input whatever Data Type you are using in the "Catalog:" parameter
3) Input the entry id into the "Entry:" parameter
4) Input whatever field path you need but exclude the parent name and the "_" so if you are using CButton_Tooltip it would just be Tooltip, if you were using CButton_Name it would just be Name.
5) That is the information the game will output, so you will need to pick part of that string so you would start at the 13th character and end at whatever character, in order to get just the name of the research.
Okay that gets me a step closer. Now I'm getting back what is apparently the "id" of the Game Link (see attached line of code). What I really want is the human-readable version, which is what I was expecting to get back. See screenshot of my editor...I want "Protoss Air Amor Level 1" instead of "Upgrade/Name/ProtossAirArmorsLevel1", which is what I'm getting now. Thanks much for your help!
Just copy and paste the actual Name into the Text Key field.
edit: im not sure if there is any way you can get the actual name
edit2: you could add a certain character to where there should be a space for example in Upgrade/Name/ProtossAirArmorsLevel1 change it to Upgrade/Name/Protoss_Air_Armors_Level_1 then pick out the substring and do a search and replace to remove the "_" and replace it with a space
I'm trying to display on-screen the name of a research/upgrade when a player initiates one. For example, when a player researches Stimpack ability, I want to put up a text message saying "Player 1 - research Stimpack". I am using the event "Any Unit research progress is Started" and (Triggering progress upgrade) to return the upgrade, which comes back as <Game Link - Upgrade> type. How can I extract the name of the upgrade from this?
@jcraigk: Go
Catalog field value get action they are complicated and i don't feel like explaining so here http://forums.sc2mapster.com/resources/tutorials/9941-tutorial-catalog-field-value-get-and-you/
@Usernameisntworkingright: Go
Okay thanks that gets me closer. Apparently I need to grab the "CUpgrade Name" of the game link, but my attempts to do so result in Trigger Errors when reaching the Catalog lookup line. Attached is a screenshot of my code. Any ideas where I'm going wrong here?
The error I'm getting is: Catalog field 'CUpgrade Name' could not be read (Core: a required object could not be found)
@jcraigk: Go
Ok, i will explain it but i forgot that it displays the raw text value of the tooltip or whatever value you get.
EDIT: it just deleted all of my explanation D:
1) Click Display Raw Data
2) Input whatever Data Type you are using in the "Catalog:" parameter
3) Input the entry id into the "Entry:" parameter
4) Input whatever field path you need but exclude the parent name and the "_" so if you are using CButton_Tooltip it would just be Tooltip, if you were using CButton_Name it would just be Name.
5) That is the information the game will output, so you will need to pick part of that string so you would start at the 13th character and end at whatever character, in order to get just the name of the research.
@Usernameisntworkingright: Go
Okay that gets me a step closer. Now I'm getting back what is apparently the "
id
" of the Game Link (see attached line of code). What I really want is the human-readable version, which is what I was expecting to get back. See screenshot of my editor...I want "Protoss Air Amor Level 1" instead of "Upgrade/Name/ProtossAirArmorsLevel1", which is what I'm getting now. Thanks much for your help!@jcraigk: Go
Just copy and paste the actual Name into the Text Key field.
edit: im not sure if there is any way you can get the actual name
edit2: you could add a certain character to where there should be a space for example in Upgrade/Name/ProtossAirArmorsLevel1 change it to Upgrade/Name/Protoss_Air_Armors_Level_1 then pick out the substring and do a search and replace to remove the "_" and replace it with a space
@Usernameisntworkingright: Go
Really...? There's got to be a way to get at that info...anyone?