Thread: 3.5E/PFRPG - Size Changes
-
April 25th, 2022, 03:16 #21
MeAndUnique beat me to it :P
I also haven't tested what happens if you use the two together.
-
May 13th, 2022, 00:50 #22
- Join Date
- Jul 2020
- Posts
- 52
I created an effect for the Animal Growth spell (3.5e):
Animal Growth; IF: TYPE(animal); SIZE: 1, melee; STR: 8 size; CON: 4 size; DEX: -2 size; AC: 2; DR: 10 magic; SAVE: 4 resistance
It works fine, except when I try it on a Medium sized creature, then I get an error: Handler error: [string "scripts/size change space.lua"]:52 attempt to index field '?' (a nil value). Works fine on others (Diminutive, Small, Large, Huge are the ones I tried).The effect still seems to get applied, and the icon changes size correctly - it just throws that error.
I'm also running the Aura Effects, BCE, Effect Builder and Extended Automation extensions (they were all installed the same day, so all the latest versions). However, I turned off all the other extension and still get the error. Any thoughts?
-
May 13th, 2022, 20:07 #23
-
May 13th, 2022, 20:10 #24
- Join Date
- Jul 2020
- Posts
- 52
I was following this example from the Forge page:
Enlarge Person; SIZE: 1 size, melee; STR: 2 size; DEX: -2 size
Edit: Did some testing, and as I suspected the melee variable means that the size bonus is only added to melee attacks and not ranged. Suppose I didn't need that since I don't know any animals with a ranged attack. Still, I took it out and tested and still get the error.Last edited by timberbeast; May 13th, 2022 at 20:25.
-
May 13th, 2022, 20:30 #25
- Join Date
- Jul 2020
- Posts
- 52
I was able to get rid of the error. Changed the IF to an IFT, so the final effect looks like this:
Animal Growth; IFT: TYPE(animal); SIZE: 1; STR: 8 size; CON: 4 size; DEX: -2 size; AC: 2; DR: 10 magic; SAVE: 4 resistance
Edit: Never mind, that didn't work either - now the effect doesn't get applied (it gets added to the animal's list of effects, but none of the effects get applied. I guess it has to be an IF to get applied.Last edited by timberbeast; May 13th, 2022 at 20:34.
-
May 13th, 2022, 22:18 #26
Yeah, IFT can loosely be thought of in terms of "When attacking or dealing damage, if the target is [conditional], do everything else in this effect", which is especially odd to conceptualize for SIZE effects. Note: There are other scenarios than attacking or dealing damage, those are just the most common and easiest to describe, though the same principle generally holds.
My Forge creations: https://forge.fantasygrounds.com/crafter/9/view-profile
My GitHub: https://github.com/MeAndUnique
Buy me a coffee: https://ko-fi.com/meandunique
Discord: MeAndUnique#6805
-
May 17th, 2022, 18:42 #27
-
May 17th, 2022, 18:47 #28
Sorry I meant to look at this over the weekend but ended up busy. I honestly didn't test SIZE with IF statements though as I think all size changes in 3.5/PFRPG are just applied, not conditional based on your target. There may be some Effective Size Changes which are conditional however. For Animal Growth I would just drop the IF: TYPE(animal); since by the spell description you cannot cast it on non-animals anyway, and as a GM just tell them if they try and cast on a person or other non-animal that its not a valid target.
That does give me an idea for an extension though where spells could have targeting criteria that is programmatically enforced by the ruleset. I think may target criteria in 3.5/PFRPG can get esoteric though.
Edit:
I got a chance to look into this and I think whatever you're running into might be creature specific. What monster are you trying to make bigger? I did some testing with wolves which are medium animals and it seems to work on my end. The bit of code that's throwing an error is where I check if the creature has a bonus to its CMD vs trip, which indicates that the creature has more than 2 legs allowing me to assume its a "long" rather than "tall" creature which as you saw is mostly only important for detecting Medium -> Large size changesLast edited by SoxMax; May 17th, 2022 at 19:44.
-
May 17th, 2022, 20:02 #29
I think I found the problem, I forgot to test my leg detection code in 3.5 and it blows up against those kinds of creatures. I've added a flag to check for PFRPG before checking how many legs a creature has. This of course does mean that Long creature detection in 3.5 is worse but I don't see anything I can latch on to like CMD bonus vs trip in Pathfinder.
I'll push the release shortly. Expect to see the fix in version 1.5.3, and sorry about that.
I'd still recommend not using conditionals with sizes, especially IFT but I do have rudimentary support for them.
-
November 6th, 2022, 13:43 #30
Bug report - and fix - for negative sizes
Hello SoxMax,
We were encountering a bug with your Size Changes extension when negative sizes (tiny = -2, or smaller) are applied. The token remains at 5 ft. size, but the health bar grows and the threatening range bumps up:
Screenshot 2022-11-06 141127.jpg
This is caused by setting the actual token size to 0 in scripts/size_change_data.lua (which is well documented and explained in the comments):
Code:-- 3.5/PF space occupied based on size, FG doesn't support sizes below 5, so set to 0 sizeSpace = { [-4]=0, [-3]=0, [-2]=0, [-1]=5, [0]=5, [1]=10, [2]=15, [3]=20, [4]=30 }
Code:-- 3.5/PF space occupied based on size, FG now supports sizes below 5 - do not set to 0 anymore sizeSpace = { [-4]=0.5, [-3]=1, [-2]=2.5, [-1]=5, [0]=5, [1]=10, [2]=15, [3]=20, [4]=30 }
Screenshot 2022-11-06 142108.jpg
Most important, the threat range remains 0 (following the rules) without further code changes required.
For comparison, a "normal" M sized token would threaten the adjusted boxes (like in the following example):
Screenshot 2022-11-06 142347.jpg
Please test if there are any other side effects from my code change (which I might have missed) and update your code accordingly. Many thanks!
Thread Information
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
Bookmarks