Is there a way to find out where any data that you know exists for the object in question?
Example: An abilitys Tooltip information. Some abilitys hold this tooltip in the tooltip of a button entry, while others have a link of Abil/EditorDescription/##id## and others like Zealot Charge I still have not found?
Is there any easy way to be linked to this data or do you just have to know where to look for each ability type? OR is this seeming lack of links between data entrys due to the fact this is a beta editor and so not all links in the data we have been given is the same as in game ?
I see you found a fix, but I was thinking you could just remove the New Summon buff and ALSO remove the effect the Hero Summon has and instead place a create x units for the player using the ability. This way you have fewer dummy effects and buffs going off and on. Not sure if this is important just something I personally would try.
Ok it seems as if when I go to post a question on how to do something or how some function is ment to be used I end up figuring out to some degree how to Solve my problem. This post was orginally a Question on "How to get the Icon data for an abilitys button". But as I was asking it I started to realize what I was doing wrong. So I edited the post to explain what im doing now to grab this data.
<sub>Sorry to any who have seen some of my other post where I ask a question then end up posting an answer to it a few mins later</sub>
Ok this post will show you how to find any ability Icon from any given unit type. Also I will provide the code from the triggers I have made as well.
I will be using Catalog Field Value Count and Catalog Field Value Get
Geting the number of Abilitys a Unit Type has and any given Ability of a Unit Type
So first we need to find out how many abilitys a unit type has and then get each one. So I created a Funtion that returns the number of abilitys a Unit Type has, then I created a Funtion that returns a single ability from a given index. You dont have to if you dont want but I did since this is code that will be repeated alot for the map im messing around with.
Using these two functions you can make a simple for each/while loop to get each ability.
The Unit Ability Count is pretty much as is. It will tell you the number of abilitys a given unit type has. So Marine will return 4
The Unit Ability function has more going on. If you look at the line with the Catalog Field Value Get, you will see Im combining strings to make a full string that points the the Ability Link we want.
("AbilArray["+((String(AbilityIndex))+"].Link"))
What that is really sending is "AbilArray[AbilityIndex].Link"
Example: Protoss Carrier Raw data View
Note that the AbilityIndex is not 6 its 5, the AbilArray (and as far as I know all arrays in galaxy are 0 based. Meaning they start at an index of 0)
This also brings up the point that after u get the Count for Abilitys you have to remember that it will return an amount that is 1 more then the highest index value.
Ability Icons
Now you might have see one of the abilitys for the Carrier was "##id##Hangar" anytime you see ##id## that is a refence to that objects id (Unit, Abiltiy, Actor, etc). Which can be seen in the data editor when you view is set to show Raw data
The reason I point that out is some abiltiys are different then others. The difference Im going to talk about has to do with where you fine there Button Icons. Abilitys have a Default Button Icon or Face for them. Most have this data located in an entry named CmdButtonArray, other abilitys have this Default Button Face located in InfoArray.
Ok this is where I have to admit I only know how to find the icon for the CmdButtonArray (I am still trying to get the Icon for abiltiys which use the InfoArray)
Heres how you find the Default Button Face for MOST abilitys. First I will show you the code for the funtion I created that returns an Image variable for the Ability Icon using the CmdButtonArray.
So you can see we first find this DefaultButtonFace Value for the given Abiltiy, then we use that value to grab the value of the Icon for the abiltys DefaultButtonFace. I am sure you can use these functions to also grab other states for the buttons. I dont know how to do this and the map im working on does not (as far I know really need to do this)
A temp fix for Abilitys with InfoArrays
I have not found a way to get to the defualtbuttonface with the infoarray BUT you can link to the unit and it should return a string that is usable within the buttons catalog (I have seen some dont have the icons. I think the Broodling Icon is missing not sure thou)
Now to check if an ability has the InfoArry, as far as I can tell you have to just know for that ability type. I am just using an If Then Else action.
Ok I am still learning this so if anyone has any added info or commits feel free to post a reply. I will be trying to edit this to show how I am going to get the Icons for abilitys that store there DefaultButtonFace data in the InfoArray (and any other ones I find)
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)
Side note I did do a forum search for CUnit_AbilArray_Link but it didnt return anything, thats why I made a post asking. Then I went to Google and it sent me a link back to THIS site lol
So its better to do a search using this sits FULL search then just a forum search since I guess the Forum search does not real look at posts only titles
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
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
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
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)
Might not be a big deal to most.
The bug or typo has to do with the SoundLink function. The Queens sound link is not "Queen_Ready" it is "QueenReady". I posted it here since well I would think it should follow the same format as other units
I dont know how to take a unit type and find the correct location or if it has a sound link. I am working on a hero/unit selection screen. Doing so I want it to play the units ready sound. So far the only way I have found to do this on the fly with only knowing the unit type is with a custom script which basicly takes the unitID and combines it with the "_Ready". Which will work fine for me since when heros are made for the map I will make sure that this sound link works for them. I would perfer my function for returning a sound link would check to see if the sound link is there and if not just return some defaulted sound link but not sure how.
I might be wrong but I thought that Banks were created at runtime, like if you have RPGMap1 and RPGMap2 any data in Banks for RPGMap2 is not created until that map is loaded and Ran. Is this correct?
And as I was typing this I thought Well if the game allows a Coop multi player Campains (spelling i know) then you could make RPGMap1 be the loading map that then jumps right into loading RPGMap2
But most likly I am not understanding what you are wanting to do OR how to use Banks since I have not used them yet LOL
Some real nice looking maps (the desert on is a bit brown tends to blend the map objects together, I have a hard time seeing objects in pictures. Im prolly just going blind lol)
But a few questions. You said you had like 1000+ objects in the map. (I have yet to focus on the terrain)
How or what effect do those objects have on FPS for the average players?
When the map is ment to be a 3rd person view what is its effect?
Does the game have any built in objects for effecting what is drawn and what is not, like the oclusion objects for Far Cry 2?
So the Catalog Field Value Get returns the path to the field you are wanting, and the Field Path parameter is acually the Field name the Path is located, on top of that the path has a id so the Entry parameter is accually that id.
So to me Catalog Field Value Get SHOULD be set like this
Catalog = This points to the table or data type you are wanting to look at buttons/abilitys/units etc Entry = ObjectID - The ID of the Object Field Path = Field Name - Its not a path like Button/Tooltip its the Name of the Field that HOLDS the path
Theres a problem thou NOT all Fields in the data editor hold paths some hold to the data itself. So I guess that the other Catalog funtions help determine if the Field Path is a path or real data. Any ways this confuses the heck out of me but at least I now understand how this function.
So I created a Function of my own that returns the Tooltip for a Unit. I am going to be making more for other data as i find a need for them.
Here is the GUI Funtion For grabing a Units Tooltip (Copyed as Text)
0
Is there a way to find out where any data that you know exists for the object in question?
Example: An abilitys Tooltip information. Some abilitys hold this tooltip in the tooltip of a button entry, while others have a link of
Abil/EditorDescription/##id##
and others like Zealot Charge I still have not found?Is there any easy way to be linked to this data or do you just have to know where to look for each ability type? OR is this seeming lack of links between data entrys due to the fact this is a beta editor and so not all links in the data we have been given is the same as in game ?
0
I see you found a fix, but I was thinking you could just remove the New Summon buff and ALSO remove the effect the Hero Summon has and instead place a create x units for the player using the ability. This way you have fewer dummy effects and buffs going off and on. Not sure if this is important just something I personally would try.
GL with the map thou
0
Not sure if this would help you but i seen this post. http://forums.sc2mapster.com/development/map-development/1117-giving-a-unit-an-ability-using-a-trigger/#p2
I have not done anything with editing units yet myself.
0
Ok it seems as if when I go to post a question on how to do something or how some function is ment to be used I end up figuring out to some degree how to Solve my problem. This post was orginally a Question on "How to get the Icon data for an abilitys button". But as I was asking it I started to realize what I was doing wrong. So I edited the post to explain what im doing now to grab this data. <sub>Sorry to any who have seen some of my other post where I ask a question then end up posting an answer to it a few mins later</sub>
Ok this post will show you how to find any ability Icon from any given unit type. Also I will provide the code from the triggers I have made as well.
I will be using Catalog Field Value Count and Catalog Field Value Get
Geting the number of Abilitys a Unit Type has and any given Ability of a Unit Type
So first we need to find out how many abilitys a unit type has and then get each one. So I created a Funtion that returns the number of abilitys a Unit Type has, then I created a Funtion that returns a single ability from a given index. You dont have to if you dont want but I did since this is code that will be repeated alot for the map im messing around with.
Heres the to Funtions
Using these two functions you can make a simple for each/while loop to get each ability.
The Unit Ability Count is pretty much as is. It will tell you the number of abilitys a given unit type has. So Marine will return 4
The Unit Ability function has more going on. If you look at the line with the Catalog Field Value Get, you will see Im combining strings to make a full string that points the the Ability Link we want.
What that is really sending is "AbilArray[AbilityIndex].Link" Example: Protoss Carrier Raw data View
So if we wanted the 6th ability icon "Warpable" we would do this...
Note that the AbilityIndex is not 6 its 5, the AbilArray (and as far as I know all arrays in galaxy are 0 based. Meaning they start at an index of 0) This also brings up the point that after u get the Count for Abilitys you have to remember that it will return an amount that is 1 more then the highest index value.
Ability Icons
Now you might have see one of the abilitys for the Carrier was
"##id##Hangar" anytime you see ##id##
that is a refence to that objects id (Unit, Abiltiy, Actor, etc). Which can be seen in the data editor when you view is set to show Raw dataThe reason I point that out is some abiltiys are different then others. The difference Im going to talk about has to do with where you fine there Button Icons. Abilitys have a Default Button Icon or Face for them. Most have this data located in an entry named CmdButtonArray, other abilitys have this Default Button Face located in InfoArray.
Ok this is where I have to admit I only know how to find the icon for the CmdButtonArray (I am still trying to get the Icon for abiltiys which use the InfoArray)Heres how you find the Default Button Face for MOST abilitys. First I will show you the code for the funtion I created that returns an Image variable for the Ability Icon using the CmdButtonArray.
So you can see we first find this DefaultButtonFace Value for the given Abiltiy, then we use that value to grab the value of the Icon for the abiltys DefaultButtonFace. I am sure you can use these functions to also grab other states for the buttons. I dont know how to do this and the map im working on does not (as far I know really need to do this)
A temp fix for Abilitys with InfoArrays
I have not found a way to get to the defualtbuttonface with the infoarray BUT you can link to the unit and it should return a string that is usable within the buttons catalog (I have seen some dont have the icons. I think the Broodling Icon is missing not sure thou)
Now to check if an ability has the InfoArry, as far as I can tell you have to just know for that ability type. I am just using an If Then Else action.
Ok I am still learning this so if anyone has any added info or commits feel free to post a reply. I will be trying to edit this to show how I am going to get the Icons for abilitys that store there DefaultButtonFace data in the InfoArray (and any other ones I find)
0
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)
0
http://forums.sc2mapster.com/development/tutorials/1250-triggers-catalog-field-value-get-set/
This post explains how.
Side note I did do a forum search for CUnit_AbilArray_Link but it didnt return anything, thats why I made a post asking. Then I went to Google and it sent me a link back to THIS site lol
So its better to do a search using this sits FULL search then just a forum search since I guess the Forum search does not real look at posts only titles
0
Field Infestor (Infestor (Spellcaster))
CUnit_AbilArray_Link (stop|move|Burrow
id
Down|NeuralParasite|FungalGrowth|Frenzy)Thats the location in the data editor. I was wanting to grab it and was assuming it would be done the same way as a Description.
But when I try and set the following I get and error "Catalog field XX could not be read (Core: a required object could not be found)"
http://www.sc2mapster.com/api-docs/game-files/xml/unit-data-xml/
That says it should be AbilArray but it also says its a link not a value so.............. HOW do I grab the data for it?
0
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
0
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.
0
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
0
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)
0
Might not be a big deal to most. The bug or typo has to do with the SoundLink function. The Queens sound link is not "Queen_Ready" it is "QueenReady". I posted it here since well I would think it should follow the same format as other units
I dont know how to take a unit type and find the correct location or if it has a sound link. I am working on a hero/unit selection screen. Doing so I want it to play the units ready sound. So far the only way I have found to do this on the fly with only knowing the unit type is with a custom script which basicly takes the unitID and combines it with the "_Ready". Which will work fine for me since when heros are made for the map I will make sure that this sound link works for them. I would perfer my function for returning a sound link would check to see if the sound link is there and if not just return some defaulted sound link but not sure how.
0
I might be wrong but I thought that Banks were created at runtime, like if you have RPGMap1 and RPGMap2 any data in Banks for RPGMap2 is not created until that map is loaded and Ran. Is this correct?
And as I was typing this I thought Well if the game allows a Coop multi player Campains (spelling i know) then you could make RPGMap1 be the loading map that then jumps right into loading RPGMap2
But most likly I am not understanding what you are wanting to do OR how to use Banks since I have not used them yet LOL
0
Some real nice looking maps (the desert on is a bit brown tends to blend the map objects together, I have a hard time seeing objects in pictures. Im prolly just going blind lol)
But a few questions. You said you had like 1000+ objects in the map. (I have yet to focus on the terrain)
How or what effect do those objects have on FPS for the average players?
When the map is ment to be a 3rd person view what is its effect?
Does the game have any built in objects for effecting what is drawn and what is not, like the oclusion objects for Far Cry 2?
0
So the Catalog Field Value Get returns the path to the field you are wanting, and the Field Path parameter is acually the Field name the Path is located, on top of that the path has a
id
so the Entry parameter is accually that id.So to me Catalog Field Value Get SHOULD be set like this
Catalog = This points to the table or data type you are wanting to look at buttons/abilitys/units etc
Entry = ObjectID - The ID of the Object
Field Path = Field Name - Its not a path like Button/Tooltip its the Name of the Field that HOLDS the path
Theres a problem thou NOT all Fields in the data editor hold paths some hold to the data itself. So I guess that the other Catalog funtions help determine if the Field Path is a path or real data. Any ways this confuses the heck out of me but at least I now understand how this function.
So I created a Function of my own that returns the Tooltip for a Unit. I am going to be making more for other data as i find a need for them.
Here is the GUI Funtion For grabing a Units Tooltip (Copyed as Text)
Here is the Script behind it