Ok I am wanting to take a unit type and then find that unit types abilitys and add each abiltys Icon to the Dialog and then display the abilitys tooltip as the player hovers over different ability icons. Thats all I dont want anything else in connection to that. I alreay know how to make and manage dialogs and dialog items. I just dont know how to get to the data I need from the unit types with out resorting to adding them in manually for each and every unit of that type.
Basicly I want to make a function that will return an array of all the abilitys a Unit Type has
my_array = Unit_Abilitys(UnitType);
I would think I should be able to use the Catalog Field Value Get function BUT I dont know for sure or if I can what type of an array it will return or how exactly to do this (It took me like 3 days to figure out how to find a units types Name and Tooltip!!!!!!!!!!)
Also after I get the abilitys to show I want to find a way to see what upgrades that unit type is effected by (but first I want to get the abilitys to show lol)
But it only shows the game string link, not the actual tooltip. I'm not sure how to convert the link into the tooltip. I don't even know where exactly it's saved.
No idea how to retrieve all abilities of a unit or all upgrades, as these are arrays within the XML files.
About the abilitys from unit types, I think I would use the same function Catalog Value Field Get but im still looking into how to get every thing converted. I dont understand fully how the data in the data editor works but it is all xml i guess so might have to go look up some info on that maybe it will get me on the right line of thought so I can see how these funtions can be used to get the data I need.
hehe i need to sleep but i dont have to work tonight so i sorta want to keep working on this but im sooooo tired im not sure if its a good idea lol
Well I use the GUI for making my triggers. BUT I am now geting to the point where what I want to do is not allowed in the GUI.
Example:
SoundLink("Marine_Ready", -1)
The GUI editor has no functions for sending a String for that function!!!!!!!!!!!! Thankfully I have been randomly looking over the script that the GUI creates and seen that I could use a string for that funtion.
But ya I am gonna try and run a few tests on
Catalog Entry Get
Catalog Entry Parent
Catalog Entry Scope
Catalog Field Get
Catalog Field Entry
Catalog Field Value Get
But apart from CatalogFieldValueGet I never tinkered around with them.
So you dont happen to know how to tell if an index value is to high with out causing an error or do the 2 functions that take an index value check that for you so u cant go to high?
lol or is the index like and index for an array where it will cause an error lol
I have a problem thou. The return value is a string for UnitAbility() and when I want to I can convert it to text and it will have the Abilitys name (move, attack, Charge, etc) BUT when I want to grab the Icon for the ability It is not always finding it.
I think it might be due to some abilitys are accually arrays of multiple abilitys. Like I know move includes Move, MovePatrol, MoveHoldPosition, AcquireMove, and Turn I need to make a funtion that returns the number of elements for the ability and if its more then 1 ... I will prolly just show the first icon for the first element.
(DAM I feel like they need to add some built in dialog actions/functions that will create a fake command card!!! Or is there a way to fake it now LOL)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ok I am wanting to take a unit type and then find that unit types abilitys and add each abiltys Icon to the Dialog and then display the abilitys tooltip as the player hovers over different ability icons. Thats all I dont want anything else in connection to that. I alreay know how to make and manage dialogs and dialog items. I just dont know how to get to the data I need from the unit types with out resorting to adding them in manually for each and every unit of that type.
Basicly I want to make a function that will return an array of all the abilitys a Unit Type has
my_array = Unit_Abilitys(UnitType);
I would think I should be able to use the Catalog Field Value Get function BUT I dont know for sure or if I can what type of an array it will return or how exactly to do this (It took me like 3 days to figure out how to find a units types Name and Tooltip!!!!!!!!!!)
Also after I get the abilitys to show I want to find a way to see what upgrades that unit type is effected by (but first I want to get the abilitys to show lol)
Do you know exactly how to do it now? That might help you with this too.
Well, let's see I know how to get the icon path of an ability:
And this way you can get the tooltip:
But it only shows the game string link, not the actual tooltip. I'm not sure how to convert the link into the tooltip. I don't even know where exactly it's saved.
No idea how to retrieve all abilities of a unit or all upgrades, as these are arrays within the XML files.
Well theres a funtion for converting a game link to text.
Here is a link to a post I made then sort of figured out.... It has to do with the catalogs or what ever they are.
http://forums.sc2mapster.com/development/map-development/2307-resolved-sort-of-how-to-get-tooltip-description-info/?unread
About the abilitys from unit types, I think I would use the same function Catalog Value Field Get but im still looking into how to get every thing converted. I dont understand fully how the data in the data editor works but it is all xml i guess so might have to go look up some info on that maybe it will get me on the right line of thought so I can see how these funtions can be used to get the data I need.
hehe i need to sleep but i dont have to work tonight so i sorta want to keep working on this but im sooooo tired im not sure if its a good idea lol
Aaaah, StringExternal(), obviously! Haha, yea, good find there, didn't think of although I've been annoying by this function so many times :P
Well I use the GUI for making my triggers. BUT I am now geting to the point where what I want to do is not allowed in the GUI.
Example:
SoundLink("Marine_Ready", -1)
The GUI editor has no functions for sending a String for that function!!!!!!!!!!!! Thankfully I have been randomly looking over the script that the GUI creates and seen that I could use a string for that funtion.
But ya I am gonna try and run a few tests on
Catalog Entry Get
Catalog Entry Parent
Catalog Entry Scope
Catalog Field Get
Catalog Field Entry
Catalog Field Value Get
I dont know there script funtion names.
CatalogEntryGet(catalog, index);
CatalogEntryParent(catalog, entry);
CatalogEntryScope(catalog, entry);
CatalogFieldGet(scope, index);
CatalogFieldType("scope", field);
CatalogFieldValueGet(catalog, entry, field path, c_playerAny);
But apart from CatalogFieldValueGet I never tinkered around with them.
So you dont happen to know how to tell if an index value is to high with out causing an error or do the 2 functions that take an index value check that for you so u cant go to high?
lol or is the index like and index for an array where it will cause an error lol
@soulzjd: Go
No idea. But it seems you have made some progress in the accessing of abil arrays.
Ok I have 2 functions that allow me to see all the abilitys of a unit.
I have a problem thou. The return value is a string for UnitAbility() and when I want to I can convert it to text and it will have the Abilitys name (move, attack, Charge, etc) BUT when I want to grab the Icon for the ability It is not always finding it.
I think it might be due to some abilitys are accually arrays of multiple abilitys. Like I know move includes Move, MovePatrol, MoveHoldPosition, AcquireMove, and Turn I need to make a funtion that returns the number of elements for the ability and if its more then 1 ... I will prolly just show the first icon for the first element.
(DAM I feel like they need to add some built in dialog actions/functions that will create a fake command card!!! Or is there a way to fake it now LOL)