Member
Join Date: Apr 2015
Posts: 63
|
I'm working on a new construct modification, for a custom, sentient construct race in a home game, to add extra legs. *note: The price and crafting reqs here are place holders for now, those details are not yet worked out.
The custom race is your standard "humanoid" shape, and the limbs are coded up as alternate race traits, the same as the other construct modifications. The intent is that a character could get these installed later in game either by having Craft Construct and meeting the other reqs and doing it themselves, or having someone else do the upgrade. I've gotten 95% of my end-goal completed. Limit 2, doesn't allow "Increase Movement Speed" modification using an EXPREQ to prohibit the combination (flavor text will justify this somehow when it's updated), but each leg increases speed by 5 feet. However, adding two legs does not increase the carry capacity for being a quadruped. I've tried a few script combinations, and my latest doesn't generate any errors, but still does not apply the effects. I'm using a total of 3 scripts: Code:
<thing id="raConsXtraLimbLeg" name="Extra Limb (Leg)" description="The construct gains a new leg (left or right) on his torso. The leg is fully under his control and cannot be concealed except with magic or bulky clothing. The leg adds 5 feet to the constructs speed, and increases it's CMD against trip attacks by +1. Further, if the construct has two extra legs, it's carrying capacity increases due to being a quadruped. The leg has its own "foot" magic item slot (though the construct can still only wear two foot magic items at a time). A construct may only have two extra legs added to it's body.\n\n{b}Modification Requirements{/b} Craft Construct; {b}Cost{/b} 1,200 gp" compset="AltRaceTrt" maxlimit="2"> <tag group="AllowRCust" tag="tpConst" name="Construct" abbrev="Construct"/> <eval phase="PostLevel" priority="10000">~ only run the rest for the first copy doneif (tagis[Helper.FirstCopy] = 0) hero.child[Speed].field[tSpeed].value += field[abValue].value</eval> <eval phase="PostLevel" priority="11000" index="2"><![CDATA[ ~ If we're disabled, do nothing doneif (tagis[Helper.SpcDisable] <> 0) herofield[tNumLegs].value += 1 if (herofield[tNumLegs].value > 3) then perform hero.findchild[BaseRace].setfocus perform focus.assign[Helper.Quadruped] perform focus.assign[Helper.Undersized] endif]]></eval> <eval phase="PostLevel" priority="11000" index="3">~ This procedure declares one copy the first (assigning Helper.FirstCopy) ~ and sets the quickadd to the same copy. All others redirect to this first ~ copy and add some value to it (defined by the incrval variable). The ~ final combined value will be in the abValue field of the first copy (if ~ setval1 = 1) or in the trkMax field of the same (if setval1 = 0). var incrval as number var setval1 as number incrval = 5 setval1 = 1 perform delete[Helper.FirstCopy] call combocopy field[abValue2].value = hero.child[Speed].field[tSpeed].value</eval> <exprreq message="Cannot combine with Increased Movement Speed"><![CDATA[#hasability[raConMoveIncSpd] < 1]]></exprreq> </thing> Any help/guidance is appreciated. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Hero.Quadruped and Hero.Undersized need to be on the hero, not the race, in order to affect the character. An early script on races copies them from the race to the hero, which is how races that are always quadrupedal work, but you're assigning it pretty late - too late for that racial script.
|
#2 |
Member
Join Date: Apr 2015
Posts: 63
|
Thanks Mathias. I did try
Code:
perform hero.assign[Helper.Quadruped] perform hero.assign[Helper.Undersized] Thank you again!! |
#3 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 468
|
I have a similar problem. I have a special feat allowing a character to change shape to a hybrid elk-centaur. This feat assigns Helper.Quadruped to the hero at First/100, yet nothing seems to happen (adjustments to CMD, in particular) though I can see that the tag is indeed on the hero. Is First/100 still too late, or should I apply the tag to the race so it is then applied to the hero? Or some other solution?
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Nothing should ever be done before First/500 unless there's a specific reason for it - the early clutter in HL is a real problem and you should always avoid adding to it. The racial script that copies the tag from race to hero works at First/650.
There must be something else going on if your feat isn't working, because that sounds fine for the tag. |
#5 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 468
|
Quote:
Is there another hidden process that would be triggered when the tag is copied from the race to the hero, but not if the tag is directly assigned to the hero from a script on a feat? |
|
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
The overrun and trip maneuvers check herofield[tNumLegs].value - if that's greater than 2, it triggers the bonuses to those materials. The only relation those have to Helper.Quadruped is that if Helper.Quadruped is on the race at First/600, then rNumLegs is set to 4 (if the initial value was 0 - that way, it saves data entry on races), and later, rNumLegs's value is copied over to tNumLegs on the hero.
The rules for those maneuvers say if you have 3+ legs you get a bonus on those, so not just quadrupeds. |
#7 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 468
|
That's probably where my script is failing: as the tag is added directly to the hero by the feat, it's never on the race itself, so it does not trigger those modifications. I'll adjust the script to assign the tag to the original race. Thanks!
Last edited by Lord Magus; April 4th, 2023 at 05:18 PM. |
#8 |
|
|