Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
4) This:
~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) Will never change anything, because Helper.FtDisable will never exist outside of a feat, so this test will always find that it is not there, and therefore nothing will change because of that line. The next two sections are critical - that's where it actually adds the HP bonus to the character. |
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Unless you post your code, I can't help you figure out what's not working.
|
#12 |
Senior Member
Join Date: Jan 2014
Posts: 262
|
Fair point. Here they are but I'm still working on them just very busy with things till next Monday.
I have in Eval scripts 1 field[livename].text = "Mighty" (Working) 2 ~ If we are using the wounds and vigor variant we need to adjust for that if (hero.tagis[source.UCWound] <> 0) then var hitpointstoadd as number hitpointstoadd += herofield[tHitDice].value else ~ our bonus is our hit dice or 3, whichever is higher var hitpointstoadd as number hitpointstoadd += (herofield[tHitDice].value, 50) endif (Template adds 10 hp per level minimum 50. I think my issue here is I don't have an amount of hp to add just that it needs to do so. I also suspect I need to change hero.tagis to something else just haven't had time look through the tutorials yet.) 3) ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) ~ If we are using the wounds and vigor variant we need to adjust for that if (hero.tagis[source.UCWound] <> 0) then ~ add that bonus to our wounds total container.child[Wounds].field[wndFeat].value += field[abValue].value else ~ add that bonus to our hit points container.child[Totals].field[tBonusHP].value += field[abValue].value endif (Going by the response to my question I can delete the first two lines. Again I probably need to change source.ucwoun to something else. Though I can probably delete all these as the wounds variant isn't being used). I also need to figure out how to add some other things. The templates from the genius guide to simple monster templates. Mighty +10 bonus hit points per Hit Die (minimum +50) (Currently working on this) +5 dodge bonus to AC +5 bonus to initiative, all saving throws, damage, ability checks, and skill checks. It also gains a +30-foot bonus to its speed (to a maximum of double), +10 to all attack rolls and CMB +15 to CMD. The saving throw DC for any ability or spell of a mighty creature is increased by 7. It gains DR 1/— for every three full Hit Dice it possesses. This overlaps (does not stack with) any other DR the base creature might have. Immunities: A mighty creature is immune to mind-affecting abilities, sleep, and paralysis. SR is equal to the base creature’s CR +12. CR +5 Very powerful but useful for creating a challenging variant of a weak monster to challenge higher level players. |
#13 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Unlike a field that stores a value (the field[abValue].value part), a variable can't persist from script to script, so you can't have script #2 calculate the right value for the variable, and then script #3 try to make use of it (oh, and script #3 isn't currently trying to make use of it - it's still referencing field[abValue].value, where it should be using hitpointstoadd.
You'll have to put both of those pieces of code into the same script for this to work in a template, where you don't have access to the value fields like abValue. |
#14 |
Senior Member
Join Date: Jan 2014
Posts: 262
|
Ah thanks.
|
#15 |
|
|