ValaraukarU
Well-known member
I am trying to add support for the Curse of the Crimson Throne Harrow Points for use in a game. I was looking at Hero Points as a base since they are similar abilities. I began by cloning the Hero Points mechanic and ability.
I added a Mechanic:
Harrow Points (mechUHarro)
The mechanic links to a new ability Harrow Points (abUHarrow)
I cannot get a box similar to the hero points box on the in-play tab. I believe it might be related to the scripts but I am not sure where to go next. I noticed use of herofield[tUseHeroP] in the hero points scripts and [Hero.HasHeroP] but I don't really understand what to do yo make them Harrow Points specific.
Also Ideally this would show a pick drop down selector for Abilities so one can select which ability they points are for, but using the Hero Points mechanism as a base doesn't give that option. I know I can create an adjustment with this in it, but adjustments won't print on the character sheet so it would have limits on usefulness.
Does anyone have any suggestions on this?
I added a Mechanic:
Harrow Points (mechUHarro)
Code:
<thing id="mechUHarro" name="Harrow Points" compset="Mechanics">
<usesource source="PathCurse"/>
<usesource source="UCotCTHarr" parent="UserParent" name="Curse of the Crimson Throne Harrow Points"/>
<bootstrap thing="abUHarrow"></bootstrap>
</thing>
The mechanic links to a new ability Harrow Points (abUHarrow)
Code:
<thing id="abUHarrow" name="Harrow Points" description="Harrow points can be spent at any time and do not require an action to use (although the actions they modify consume part of your character’s turn as normal). Whenever a harrow point is spent, it can have any one of the following effects.\n\nStrength\n\nDexterity\nConstitution\nIntelligence\nWisdom\nCharisma\n\n{b}Note{/b}: Harrow points gained must be added manually." compset="Ability" summary="Harrow Points can be spent at any time to grant a variety of bonuses.">
<fieldval field="trkUser" value="1"/>
<fieldval field="trkMax" value="3"/>
<usesource source="UCotCTHarr"/>
<usesource source="PathCurse"/>
<tag group="User" tag="Tracker" name="Tracker" abbrev="Tracker"/>
<tag group="Helper" tag="NoReset" name="NoReset" abbrev="NoReset"/>
<tag group="Helper" tag="ShowSpec" name="ShowSpec" abbrev="ShowSpec"/>
<tag group="Custom" tag="HarrowPoin" name="Harrow Points Table"/>
<containerreq phase="First" priority="500">!source.SocChar</containerreq>
<eval phase="First" priority="30000" index="4">
if (tagis[Hide.Tracker] = 0) then
perform hero.assign[Hero.HasHeroP]
endif</eval>
<eval phase="First" priority="20000"><![CDATA[
~if we're not a PC, set our maximum hero points to 0
~(by subtracting the default points)
if (hero.tagis[CharType.typHero] = 0) then
field[trkMax].value -= 3
~do the same if we're a minion (familiars, companions, etc.)
elseif (this.isminion <> 0) then
field[trkMax].value -= 3
endif
~if we're at or below 0 maximum Hero Points, hide us
if (field[trkMax].value <= 0) then
perform assign[Hide.Special]
perform assign[Hide.Tracker]
perform assign[Hide.Activation]
~and add a tag that keeps HL from complaining that the default 1
~hero point exceeds this maximum
perform assign[Helper.NoMaxBound]
endif]]></eval>
<eval phase="Render" priority="20000" index="2"><![CDATA[
~add our HP left to our name
if (herofield[tUseHeroP].value = 0) then
field[livename].text = field[thingname].text & " (" & field[trkUser].value & ")"
endif]]></eval>
<eval phase="First" priority="20000" index="3"><![CDATA[
~if we've chosen to be an anithero, we don't receive hero points
if (herofield[tUseHeroP].value <> 0) then
field[trkMax].value = 0
perform assign[Helper.NoMaxBound]
perform assign[Hide.Special]
perform assign[Hide.Tracker]
~and grant us +1 feat slot
#resmax[resFeat] += 1
endif]]></eval>
</thing>
I cannot get a box similar to the hero points box on the in-play tab. I believe it might be related to the scripts but I am not sure where to go next. I noticed use of herofield[tUseHeroP] in the hero points scripts and [Hero.HasHeroP] but I don't really understand what to do yo make them Harrow Points specific.
Also Ideally this would show a pick drop down selector for Abilities so one can select which ability they points are for, but using the Hero Points mechanism as a base doesn't give that option. I know I can create an adjustment with this in it, but adjustments won't print on the character sheet so it would have limits on usefulness.
Does anyone have any suggestions on this?