
Hello,
I was working on a script that manages various spell effects, and some of them change one or more attributes on the character sheet that the affected token represents.
While this is not a problem when it happens to a player (that typically has only one character sheet), it is when it gets down to the NPCs, that normally share the same character sheet. In fact, in my Campaigns I normally create one character sheet that is my "archetype" for a particular foe, than I create one token that I link to that sheet (linking the three bars as well), copy it the number of times I need, and lastly I unlink their bars.
The problem in this case is that as soon as I change some attributes of one of the tokens, they change for them all. In order to overcome this, I thought of writing a function that checks whether the affected token shares the character with some other token, and if it does, it simply creates another character, copies the contents of the original one, and then assigns the newly created character to the affected token.
This is of course impossible since the last step requires the "represents" attribute of the token object to be writable.
Could it be rendered writable? Is there a particular reason it is read only? I mean, you can change it using the interface, why not from the API?
Thanks
P.S.
It would also allow some nice "effects" like polymorph, lycantrophy and the like
EDIT: Nevermind, I wrote the script and I realized it changes the "represent" argument. Sorry, then you need only to update the Wiki.
I was working on a script that manages various spell effects, and some of them change one or more attributes on the character sheet that the affected token represents.
While this is not a problem when it happens to a player (that typically has only one character sheet), it is when it gets down to the NPCs, that normally share the same character sheet. In fact, in my Campaigns I normally create one character sheet that is my "archetype" for a particular foe, than I create one token that I link to that sheet (linking the three bars as well), copy it the number of times I need, and lastly I unlink their bars.
The problem in this case is that as soon as I change some attributes of one of the tokens, they change for them all. In order to overcome this, I thought of writing a function that checks whether the affected token shares the character with some other token, and if it does, it simply creates another character, copies the contents of the original one, and then assigns the newly created character to the affected token.
This is of course impossible since the last step requires the "represents" attribute of the token object to be writable.
Could it be rendered writable? Is there a particular reason it is read only? I mean, you can change it using the interface, why not from the API?
Thanks
P.S.
It would also allow some nice "effects" like polymorph, lycantrophy and the like
EDIT: Nevermind, I wrote the script and I realized it changes the "represent" argument. Sorry, then you need only to update the Wiki.