FG Spreadshirt Swag
Page 3 of 5 First 12345 Last
  1. #21
    SoxMax's Avatar
    Join Date
    Mar 2021
    Location
    Massachusetts, USA
    Posts
    154
    MeAndUnique beat me to it :P

    I also haven't tested what happens if you use the two together.

  2. #22
    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?

  3. #23
    what's the "melee" on size for?

  4. #24
    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.

  5. #25
    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.

  6. #26
    Quote Originally Posted by timberbeast View Post
    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.
    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

  7. #27
    SoxMax's Avatar
    Join Date
    Mar 2021
    Location
    Massachusetts, USA
    Posts
    154
    Quote Originally Posted by Asgurgolas View Post
    what's the "melee" on size for?
    Melee & Ranged are to control if the size bonus affects melee damage, ranged damage, or both if not specified. Pathfinder has some very odd handling with enlarge/reduce person and their interaction with ranged damage.

  8. #28
    SoxMax's Avatar
    Join Date
    Mar 2021
    Location
    Massachusetts, USA
    Posts
    154
    Quote Originally Posted by timberbeast View Post
    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?
    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 changes
    Last edited by SoxMax; May 17th, 2022 at 19:44.

  9. #29
    SoxMax's Avatar
    Join Date
    Mar 2021
    Location
    Massachusetts, USA
    Posts
    154
    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.

  10. #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
    }
    While the comment is right (no support for tokens with a size below 5 ft., smaller creatures are placed with token size of 5 ft. as well) - a zero does not fix it. Interestingly, FGU does (in the meantime?) cope with sizes smaller than 5 ft. so I changed the sizes to the ones documented in the ruleset, see Big and Little Creatures in Combat.
    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
    }
    With this change, the token will remain 5 ft. size (like for all tiny and smaller creatures), but the health bar and threatening rage behave normally:
    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 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in