Member
Join Date: Aug 2008
Posts: 74
|
I have a custom ability that is shown in the tracked resources list. I have it setup as a mechanic so that it gets added to every character using my user file.
I want to have the number of uses of this ability get adjusted if a character takes a feat or something similar. So far, whenever i try to update the tracker (after verifying the feat is on the character) it tells me that it cannot find the tracker. i was trying to do something like: herofield[trkLALuckPts].value += 2 |
#1 |
Senior Member
Join Date: May 2013
Posts: 240
|
Try this:
Code:
#trkmax[trkALuckPts] += 2 |
#2 |
Member
Join Date: Aug 2008
Posts: 74
|
that macro works great.
is there one that lets you change the value before the slash (the uses vs the max)? I was not finding a reference to that anywher. |
#3 |
Senior Member
Join Date: May 2013
Posts: 240
|
Eh? Wouldn't that ordinarily be changed by the user clicking the little arrow next to the tracker on the In-Play tab?
I guess I'm not sure why you would need to script that. |
#4 |
Member
Join Date: Aug 2008
Posts: 74
|
yes, it would be. I am really bastardizing things to be honest. I have overrides in place for the Trait/flaw mechanic. You "earn" points by taking flaws. then spend the points on traits. I am using a tracker to keep track of the points gained/spent. Right now the user needs to have a positive number or zero. It will go negative if they have spent more points than they earned. but i thought it would be cleaner if it was 9/9 points spent.
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
It sounds like you should be creating an item in the Resource component, not tracker. Then you can record the changes to the maximum and the spending each as normal field values, not trying to hack the user-controlled "amount used" on a tracker to become a spending record.
And if you're overriding traits/flaws, why create a new thing? There's already a resource for trait selections - just overwrite the maximum there. |
#6 |
Member
Join Date: Aug 2008
Posts: 74
|
Quote:
Quote:
Unless there is some other mechanism here I am unaware of? |
||
#7 |
Member
Join Date: Aug 2008
Posts: 74
|
You say it is a Resource Type i should be creating - but i do not see that as one of the "tabs" in any of the sections of the editor.
|
#8 |
|
|