So I've been fiddling around with the CatalogFieldValueSet function, and while everything works as intended for most fields, I have run across a presumably unsolvable issue. I have a button with Id 'UseItemAbility'.
results in the ominous "ErrorCatalogFieldNotWritten" error message when the command fires. Same with other fields, like "TintRacially". Can be read without problems, while setting it to anything results in error.
Other fields, like "name" can be set just fine.
Anyone encountered this problem or knows how to fix it? This is really bugging me =/
Yes, I've encountered this.
It seems there are certain values that just can't be set by this action. Proabably to ensure we're not fking up something in the game.
So apparently there is no way to dynamically change the buttons in a unit's command card. Trying to change the command card directly results in the same error. Meh. There goes my custom inventory system with usable items.
What I wanted to do is dynamically change the middle row of the command card to the abilities associated with the items in your inventory, which is 5x1 slots. So if you had a medipack in the very left inventory slot, the ability in the corresponding command card field would change to some kind of "Use item - medi pack" ability, with the correct icon and such.
A brute-force method to make this work would be to create an ability for EACH item, for EACH inventory slot (thus each column in the command card). Then showing/hiding them via triggers, corresponding to the items in your quick slot. Of course this would quickly become overwhelming, so having only 5 buttons and changing their icon, tooltip and associated ability dynamically would have been much simpler.
Our Team has been working on the same thing. and while it seems the Get command can pull most values just fine the Set command seems far more limited. I'm crossing my fingers and hoping that its maybe because blizzard hasn't implemented every aspect of the editor yet, but who knows maybe there's a reason it so limited. Regardless if anyone has any updates on this subject please let us know. I can't tell you how badly we would love to have dynamic CC as well as a bunch of other stuff.
There seems to be a connection between what upgrades can modify and what values return an error for this set function, which is logical since the upgrades likely just call the function.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I've been fiddling around with the CatalogFieldValueSet function, and while everything works as intended for most fields, I have run across a presumably unsolvable issue. I have a button with Id 'UseItemAbility'.
While
works like a charm, trying to set the exact same field via
results in the ominous "ErrorCatalogFieldNotWritten" error message when the command fires. Same with other fields, like "TintRacially". Can be read without problems, while setting it to anything results in error.
Other fields, like "name" can be set just fine.
Anyone encountered this problem or knows how to fix it? This is really bugging me =/
Yes, I've encountered this.
It seems there are certain values that just can't be set by this action. Proabably to ensure we're not fking up something in the game.
Aw =(
So apparently there is no way to dynamically change the buttons in a unit's command card. Trying to change the command card directly results in the same error. Meh. There goes my custom inventory system with usable items.
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.
Thanks, but unfortunately this won't help.
What I wanted to do is dynamically change the middle row of the command card to the abilities associated with the items in your inventory, which is 5x1 slots. So if you had a medipack in the very left inventory slot, the ability in the corresponding command card field would change to some kind of "Use item - medi pack" ability, with the correct icon and such.
A brute-force method to make this work would be to create an ability for EACH item, for EACH inventory slot (thus each column in the command card). Then showing/hiding them via triggers, corresponding to the items in your quick slot. Of course this would quickly become overwhelming, so having only 5 buttons and changing their icon, tooltip and associated ability dynamically would have been much simpler.
Same error, but I can't change ANY value through CatalogFieldValueSet().
Here is how example from http://forums.sc2mapster.com/development/tutorials/1250-triggers-catalog-field-value-get-set/ works for me
What do I do wrong?
Our Team has been working on the same thing. and while it seems the Get command can pull most values just fine the Set command seems far more limited. I'm crossing my fingers and hoping that its maybe because blizzard hasn't implemented every aspect of the editor yet, but who knows maybe there's a reason it so limited. Regardless if anyone has any updates on this subject please let us know. I can't tell you how badly we would love to have dynamic CC as well as a bunch of other stuff.
There seems to be a connection between what upgrades can modify and what values return an error for this set function, which is logical since the upgrades likely just call the function.