Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Advancing monsters has always been something I've done and was disappointed with the lack of it in d20 HeroLab. I'd had several failed attempts at creating a system with hit dice additions (much like the bonus HD on companions), as well as class, monster class, and racial scripting attempts. I'd given up on it about 2 months ago, and apparently it was still percolating in my head, because I just hit on a solution today that solved the problem nicely.
The difficulty was in my approach, trying to include all the things necessary in one approach (a class, a race, bonus HD, etc.). I was able to solve the entire problem with two simple adjustments in the Adjustment Tab, one that tracks the size increases (if they occur for HD advancement) and one that just advances the Hit Dice on the monsters (by type, of course). I've yet to work out Animals and Elementals (Elementals will be easy, just didn't get around to it yet), since they have varying Good saves. Everything else is working like a charm. The end result is, I don't have to make any special cases for monsters in the game. With the two adjustments, I have everything coming together in just a few minutes. And the main reason I wanted to do this, is that I wanted to advance Dragons through their age categories by Hit Dice without having the make a special case for each Dragon age, size, etc. I have a True Dragon Type special ability that hands the dragons the appropriate damages, ranges, etc. based on the size, but I've scripted each individual Dragon Type (blue, green, white, red, gold, etc.) with what they have based purely on the Hit Dice advancement through their age categories. I was able to knock all the Dragons out in about 2 hours, sans any of their abilities (I was just testing the age advancements, damages, ability scores, and so forth). Tomorrow I plan to knock them out completely and thoroughly test them. Anyways, I'd be willing to share the monster advancement adjustments I made if anyone is interested in them. Elemental will get done before the end of next week, Animal I'm still mulling over how to handle, so might be end of next week as well as long as I don't run into an HL stumbling block. Last edited by Kendall-DM; September 22nd, 2011 at 09:13 PM. |
#1 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Congradulations on the break through. I am sure I am not the only one who would like to have this added to the community data files.
|
#2 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
After a night of sleep, easily knocked out both Elemental and Animal, when I realized I could condense the code by eliminating type. Things came out much cleaner than yesterday's implementation. Here is the code for the Hit Dice adjustment.
Code:
<<First (Users) 100>> ~ If we're not enabled, get out now. doneif (field[pIsOn].value = 0) ~ Change our HD, BAB, saves. foreach pick in hero from BaseRace where "thingid.r?" var good as number var medium as number var poor as number good = round(eachpick.field[rHitDice].value / 2, 0, -1) + 2 medium = round(eachpick.field[rHitDice].value * 0.75, 0, -1) poor = round(eachpick.field[rHitDice].value * 0.5, 0, -1) eachpick.field[rHitDice].value += field[pAdjust].value if (eachpick.field[rAttack].value = medium) then eachpick.field[rAttack].value = round(eachpick.field[rHitDice].value * 0.75, 0, -1) elseif (eachpick.field[rAttack].value = poor) then eachpick.field[rAttack].value = round(eachpick.field[rHitDice].value * 0.5, 0, -1) else eachpick.field[rAttack].value = eachpick.field[rHitDice].value endif if (eachpick.field[rFort].value = good) then eachpick.field[rFort].value = round(eachpick.field[rHitDice].value / 2, 0, -1) + 2 else eachpick.field[rFort].value = round(eachpick.field[rHitDice].value / 3, 0, -1) endif if (eachpick.field[rRef].value = good) then eachpick.field[rRef].value = round(eachpick.field[rHitDice].value / 2, 0, -1) + 2 else eachpick.field[rRef].value = round(eachpick.field[rHitDice].value / 3, 0, -1) endif if (eachpick.field[rWill].value = good) then eachpick.field[rWill].value = round(eachpick.field[rHitDice].value / 2, 0, -1) + 2 else eachpick.field[rWill].value = round(eachpick.field[rHitDice].value / 3, 0, -1) endif nexteach |
#3 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Monster advancement by size category. Incrementer set to min value of 0 and a max value of 8, this assumes you are sizing up and not down. Anything falling outside that range reverts back to the original creature size.
Code:
<<First 20000>> ~ If we're not enabled, get out now. doneif (field[pIsOn].value = 0) ~ Add to size - must come after race and template size set. var origsize as number origsize = herofield[tSize].value herofield[tSize].value += field[pAdjust].value ~ Increase the size of all our equipment by 1 (apart from unarmed ~ strike, which changes automatically). No, it doesn't, fixed. foreach pick in hero from MyGear ~ where "!wCategory.Unarmed" removed to include unarmed. eachpick.field[gSizeMod].value += field[pAdjust].value nexteach foreach pick in hero from BaseNatWep var x as number for x = 1 to field[pAdjust].value perform eachpick.assign[Helper.DamageUp] next nexteach ~ Determine changes to our abilities based on size difference. var diff as number diff = herofield[tSize].value - origsize if (origsize = -4) then if (diff = 8) then ~ +42 str, -12 dex, +18 con, +14 nat hero.child[aSTR].field[aStartMod].value += 42 hero.child[aDEX].field[aStartMod].value -= 12 hero.child[aCON].field[aStartMod].value += 18 hero.child[ArmorClass].field[tACNatural].value += 14 elseif (diff = 7) then ~ +34 str, -12 dex, +14 con, +9 nat hero.child[aSTR].field[aStartMod].value += 34 hero.child[aDEX].field[aStartMod].value -= 12 hero.child[aCON].field[aStartMod].value += 14 hero.child[ArmorClass].field[tACNatural].value += 9 elseif (diff = 6) then ~ +26 str, -12 dex, +10 con, +5 nat hero.child[aSTR].field[aStartMod].value += 26 hero.child[aDEX].field[aStartMod].value -= 12 hero.child[aCON].field[aStartMod].value += 10 hero.child[ArmorClass].field[tACNatural].value += 5 elseif (diff = 5) then ~ +18 str, -10 dex, +6 con, +2 nat hero.child[aSTR].field[aStartMod].value += 18 hero.child[aDEX].field[aStartMod].value -= 10 hero.child[aCON].field[aStartMod].value += 6 hero.child[ArmorClass].field[tACNatural].value += 2 elseif (diff = 4) then ~ +10 str, -8 dex, +2 con hero.child[aSTR].field[aStartMod].value += 10 hero.child[aDEX].field[aStartMod].value -= 8 hero.child[aCON].field[aStartMod].value += 2 elseif (diff = 3) then ~ +6 str, -6 dex hero.child[aSTR].field[aStartMod].value += 6 hero.child[aDEX].field[aStartMod].value -= 6 elseif (diff = 2) then ~ +2 str, -4 dex hero.child[aSTR].field[aStartMod].value += 2 hero.child[aDEX].field[aStartMod].value -= 4 elseif (diff = 1) then ~ -2 dex hero.child[aDEX].field[aStartMod].value -= 2 endif elseif (origsize = -3) then if (diff = 7) then ~ +42 str, -10 dex, +18 con, +14 nat hero.child[aSTR].field[aStartMod].value += 42 hero.child[aDEX].field[aStartMod].value -= 10 hero.child[aCON].field[aStartMod].value += 18 hero.child[ArmorClass].field[tACNatural].value += 14 elseif (diff = 6) then ~ +34 str, -10 dex, +14 con, +9 nat hero.child[aSTR].field[aStartMod].value += 34 hero.child[aDEX].field[aStartMod].value -= 10 hero.child[aCON].field[aStartMod].value += 14 hero.child[ArmorClass].field[tACNatural].value += 9 elseif (diff = 5) then ~ +26 str, -10 dex, +10 con, +5 nat hero.child[aSTR].field[aStartMod].value += 26 hero.child[aDEX].field[aStartMod].value -= 10 hero.child[aCON].field[aStartMod].value += 10 hero.child[ArmorClass].field[tACNatural].value += 5 elseif (diff = 4) then ~ +18 str, -8 dex, +6 con, +2 nat hero.child[aSTR].field[aStartMod].value += 18 hero.child[aDEX].field[aStartMod].value -= 8 hero.child[aCON].field[aStartMod].value += 6 hero.child[ArmorClass].field[tACNatural].value += 2 elseif (diff = 3) then ~ +10 str, -6 dex, +2 con hero.child[aSTR].field[aStartMod].value += 10 hero.child[aDEX].field[aStartMod].value -= 6 hero.child[aCON].field[aStartMod].value += 2 elseif (diff = 2) then ~ +6 str, -4 dex hero.child[aSTR].field[aStartMod].value += 6 hero.child[aDEX].field[aStartMod].value -= 4 elseif (diff = 1) then ~ +2 str, -2 dex hero.child[aSTR].field[aStartMod].value += 2 hero.child[aDEX].field[aStartMod].value -= 2 endif elseif (origsize = -2) then if (diff = 6) then ~ +40 str, -8 dex, +18 con, +14 nat hero.child[aSTR].field[aStartMod].value += 40 hero.child[aDEX].field[aStartMod].value -= 8 hero.child[aCON].field[aStartMod].value += 18 hero.child[ArmorClass].field[tACNatural].value += 14 elseif (diff = 5) then ~ +32 str, -8 dex, +14 con, +9 nat hero.child[aSTR].field[aStartMod].value += 32 hero.child[aDEX].field[aStartMod].value -= 8 hero.child[aCON].field[aStartMod].value += 14 hero.child[ArmorClass].field[tACNatural].value += 9 elseif (diff = 4) then ~ +24 str, -8 dex, +10 con, +5 nat hero.child[aSTR].field[aStartMod].value += 24 hero.child[aDEX].field[aStartMod].value -= 8 hero.child[aCON].field[aStartMod].value += 10 hero.child[ArmorClass].field[tACNatural].value += 5 elseif (diff = 3) then ~ +16 str, -6 dex, +6 con, +2 nat hero.child[aSTR].field[aStartMod].value += 16 hero.child[aDEX].field[aStartMod].value -= 6 hero.child[aCON].field[aStartMod].value += 6 hero.child[ArmorClass].field[tACNatural].value += 2 elseif (diff = 2) then ~ +8 str, -4 dex, +2 con hero.child[aSTR].field[aStartMod].value += 8 hero.child[aDEX].field[aStartMod].value -= 4 hero.child[aCON].field[aStartMod].value += 2 elseif (diff = 1) then ~ +4 str, -2 dex hero.child[aSTR].field[aStartMod].value += 4 hero.child[aDEX].field[aStartMod].value -= 2 endif elseif (origsize = -1) then if (diff = 5) then ~ +36 str, -6 dex, +18 con, +14 nat hero.child[aSTR].field[aStartMod].value += 36 hero.child[aDEX].field[aStartMod].value -= 6 hero.child[aCON].field[aStartMod].value += 18 hero.child[ArmorClass].field[tACNatural].value += 14 elseif (diff = 4) then ~ +28 str, -6 dex, +14 con, +9 nat hero.child[aSTR].field[aStartMod].value += 28 hero.child[aDEX].field[aStartMod].value -= 6 hero.child[aCON].field[aStartMod].value += 14 hero.child[ArmorClass].field[tACNatural].value += 9 elseif (diff = 3) then ~ +20 str, -6 dex, +10 con, +5 nat hero.child[aSTR].field[aStartMod].value += 20 hero.child[aDEX].field[aStartMod].value -= 6 hero.child[aCON].field[aStartMod].value += 10 hero.child[ArmorClass].field[tACNatural].value += 5 elseif (diff = 2) then ~ +12 str, -4 dex, +6 con, +2 nat hero.child[aSTR].field[aStartMod].value += 12 hero.child[aDEX].field[aStartMod].value -= 4 hero.child[aCON].field[aStartMod].value += 6 hero.child[ArmorClass].field[tACNatural].value += 2 elseif (diff = 1) then ~ +4 str, -2 dex, +2 con hero.child[aSTR].field[aStartMod].value += 4 hero.child[aDEX].field[aStartMod].value -= 2 hero.child[aCON].field[aStartMod].value += 2 endif elseif (origsize = 0) then if (diff = 4) then ~ +32 str, -4 dex, +16 con, +14 nat hero.child[aSTR].field[aStartMod].value += 32 hero.child[aDEX].field[aStartMod].value -= 4 hero.child[aCON].field[aStartMod].value += 16 hero.child[ArmorClass].field[tACNatural].value += 14 elseif (diff = 3) then ~ +24 str, -4 dex, +12 con, +9 nat hero.child[aSTR].field[aStartMod].value += 24 hero.child[aDEX].field[aStartMod].value -= 4 hero.child[aCON].field[aStartMod].value += 12 hero.child[ArmorClass].field[tACNatural].value += 9 elseif (diff = 2) then ~ +16 str, -4 dex, +8 con, +5 nat hero.child[aSTR].field[aStartMod].value += 16 hero.child[aDEX].field[aStartMod].value -= 4 hero.child[aCON].field[aStartMod].value += 8 hero.child[ArmorClass].field[tACNatural].value += 5 elseif (diff = 1) then ~ +8 str, -2 dex, +4 con, +2 nat hero.child[aSTR].field[aStartMod].value += 8 hero.child[aDEX].field[aStartMod].value -= 2 hero.child[aCON].field[aStartMod].value += 4 hero.child[ArmorClass].field[tACNatural].value += 2 endif elseif (origsize = 1) then if (diff = 3) then ~ +24 str, -2 dex, +12 con, +12 nat hero.child[aSTR].field[aStartMod].value += 24 hero.child[aDEX].field[aStartMod].value -= 2 hero.child[aCON].field[aStartMod].value += 12 hero.child[ArmorClass].field[tACNatural].value += 12 elseif (diff = 2) then ~ +16 str, -2 dex, +8 con, +7 nat hero.child[aSTR].field[aStartMod].value += 16 hero.child[aDEX].field[aStartMod].value -= 2 hero.child[aCON].field[aStartMod].value += 8 hero.child[ArmorClass].field[tACNatural].value += 7 elseif (diff = 1) then ~ +8 str, -2 dex, +4 con, +3 nat hero.child[aSTR].field[aStartMod].value += 8 hero.child[aDEX].field[aStartMod].value -= 2 hero.child[aCON].field[aStartMod].value += 4 hero.child[ArmorClass].field[tACNatural].value += 3 endif elseif (origsize = 2) then if (diff = 2) then ~ +16 str, +8 con, +9 nat hero.child[aSTR].field[aStartMod].value += 16 hero.child[aCON].field[aStartMod].value += 8 hero.child[ArmorClass].field[tACNatural].value += 9 elseif (diff = 1) then ~ +8 str, +4 con, +4 nat hero.child[aSTR].field[aStartMod].value += 8 hero.child[aCON].field[aStartMod].value += 4 hero.child[ArmorClass].field[tACNatural].value += 4 endif elseif (origsize = 3) then if (diff = 1) then ~ +8 str, +4 con, +5 nat hero.child[aSTR].field[aStartMod].value += 8 hero.child[aCON].field[aStartMod].value += 4 hero.child[ArmorClass].field[tACNatural].value += 5 endif endif |
#4 |
|
|