Senior Member
Join Date: Aug 2009
Posts: 125
|
Greets everyone!
So I after a whirlwind few months since GenCon (huge work projects all stacked up + my daughter being born), everything settled to the point that I can get back to coding the RotRL NPCs. I see another member has put out the first two book (which is awesome!), but my versions are a lot more detailed so I'm going to continue along with them and still release those... Working on the beast of Xanesha, and am trying to code in the changes for the Lamia Matriarch's Alternate Form racial special. Here's where I am in the description so far: Quote:
Code:
First/20000 ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~ When activated if (field[abilActive].value <> 0) then ~ Abilty scores modified (-8 STR, -4 CON, +2 DEX) hero.child[aSTR].field[Penalty].value -= 8 hero.child[aCON].field[Penalty].value -= 4 hero.child[aDEX].field[Bonus].value += 2 ~ Change base speed to 30ft when active hero.child[Speed].field[tSpeed].value = 30 ~ Remove Climb & Swim ~??????? ~ Change Many/No Legs option from Snaky Body --> None ~??????? ~ Add to size - must come after race and template size set herofield[tSize].value -= 1 ~ Change the size of all our equipment (apart from unarmed ~ strike, which changes automatically) foreach pick in hero from MyGear where "!wCategory.Unarmed" eachpick.field[gSizeMod].value -= 1 nexteach var i as number ~change the size of our natural weapons foreach pick in hero from BaseNatWep where "!Helper.NatSizeDmg" perform eachpick.assign[Helper.DamageDown] nexteach endIf Last edited by djc664; December 7th, 2010 at 01:08 PM. |
|
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Normally, you would assign a climb and swim speed when you added them to the race. Since in this case, you know you want to alter those speeds with a script, add climb and swim, but leave the speeds empty.
There's nothing needed for the remove part of the script, since Swim and Climb will hide themselves if their speed is 0, but at the bottom of this, instead of just using endif, you'll apply the speeds as part of an Else: Code:
else ~swim speed 20 perform hero.childfound[xSwim].assign[Value.20] ~climb speed 30 perform hero.childfound[xClimb].assign[Value.30] endif To find the Quarduper/Snaky/ManyLegs information, make sure that in the Develop menu, "Enable Data File Debugging" is checked. Start a new character for testing. Now, in the develop menu, go to "floating info windows...show hero tags" Now, add a race that's snaky, and look for any tags that appear that look appropriate. Then try a race with 4 legs, and look for the Quadruped tag, and a race with 8 legs and look for the Many legs tag. Then select the human race, and you'll see that 2 legs is the default - there aren't any tags for that. So, you can delete the snaky tag from the race, and they won't be forwarded to the hero: perform delete[Helper.Snaky] Unless you've checked the option yourself in the editor, you don't need to worry about the not humanoid tag - that's automatically assigned to every Snaky, Quadrupedal or Many-legged creature, so getting rid of snaky gets rid of that. Note that this will need to go in a separate script from the rest - Snaky is forwarded to the hero at First/650, so I'd recommend First/625 in order to change it in time. |
#2 |
Senior Member
Join Date: Aug 2009
Posts: 125
|
Understood on both. Thank you for explaining the thought process + code. That really helped, overall.
Just to confirm my understanding of what you wrote... So the reason one doesn't use the Racial Special Eval Script to remove the two movements instead of adding them on with else (like a double negative, of sorts) is because it can't assign a value of 0 through the script... but if it *starts* at 0, you can modify to a positive integer. Is that correct? Also, the perform.delete did not remove the snaky helper. I tried wrapping it like this: Code:
if (field[abilActive].value <> 0) then ~ Delete the snake bits! perform delete[Helper.Snaky] endIf Also the ImnTrip under Basics doesn't change (which is the only thing I've found that even lets you know there's something going on with that helper). Speaking of which, shouldn't something like Snaky Body, which confers a bonus to things in addition to being untrippable show up as an item in the Special Abilities tab? |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Actually, the reason to add, and not delete is - what if you had cast a spell on yourself to grant Climb 20' - if the script deletes the climb speed, it will delete all Value.20 tags, both the tag added by the spell and the tag added by the race.
I'll take a closer look at what's happening with Helper.Snaky. The reason it's not a special is that I'm just guessing at what it means - while adding Bestiary material, I noticed a common pattern of bonuses to trip CMDs that seemed to match up with the number of legs a thing had (but the pattern's not even consistent - you can trip a squid or a shark, but not an octopus). |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
Quote:
I found this thread looking for a way to suppress Climb/Swim/Burrow, but only if from a race. If I delete all tags, I end up killing spells in effect granting a speed. How do I script only removing it if it was added by a race? Last edited by risner; February 20th, 2011 at 08:04 PM. |
||
#5 |
|
|