PDA

View Full Version : PFRPG Ability Drain and Permanent Bonuses



bmos
September 1st, 2020, 01:43
This extension provides a more rules-compliant way to track permanent ability bonuses and ability drain in Pathfinder 1e without modifying the character's base ability score.

Please note that the bonus types chosen in the list are only used for stacking against other permanent bonuses. The bonuses applied by effects do not check for permanent typed bonuses, so you must be aware of their types when applying effects (just like in FG usually with Pathfinder when you apply them to the ability scores -- but then you don't even have a visual reference).

Extension Homepage, README, and Codebase (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses)
FantasyGrounds Forge (https://forge.fantasygrounds.com/shop/items/49/view)
Ext Files and Changelog (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/releases)
License Information (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/blob/master/LICENSE.md)
Bug Tracker and Suggestions (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/issues)

To avoid my threads taking over the PF1e subforum, I publish most updates in my combo thread (https://www.fantasygrounds.com/forums/showthread.php?60308-bmos-extensions) (with only major updates in this individual thread which is primarily for discussion and bug reports). To ensure you're kept informed of future updates, either subscribe to that thread (for updates to all my extensions) or create a GitHub account and follow the specific repository of each extension you use. Or just check the releases linked in the first post of the thread periodically.

Kelrugem
September 1st, 2020, 08:11
This extension provides a rules-compliant way to track permanent ability bonuses and ability drain in Pathfinder 1e without modifying the character's base ability score.
For more information, see the readme.

Extension Homepage and Readme (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses)
Download (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/releases)
License Information (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/blob/master/LICENSE.md)
Bug Tracker and Suggestions (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/issues)

If you find this extension of value and would like to contribute to my work, please consider joining my Patreon (https://www.patreon.com/bmos).

Cool :)

I just looked at it because for 3.5e it might be also nice (just in aesthetical sense; in functional sense one can completely use effects in 3.5e) :) Looks nice :)

What I have found: Some types do stack by rules (dodge or untyped for example), this is at the moment not happening (though there is the easy workaround to just add them in one box :) ). And, assuming I do not misunderstand the PF1 rules, the stacking rules are not checked with respect to effects. I mean when you have for example a permanent enhancement bonus of +4 and a temporary enhancement bonus of +2 then the total extra mod is +3 with your extension but it should be +2, isn't it? (because the permanent one should overwrite the temporary one; I do not think that they stack, isn't it? :) )

bmos
September 1st, 2020, 12:31
Cool :)

I just looked at it because for 3.5e it might be also nice (just in aesthetical sense; in functional sense one can completely use effects in 3.5e) :) Looks nice :)

What I have found: Some types do stack by rules (dodge or untyped for example), this is at the moment not happening (though there is the easy workaround to just add them in one box :) ). And, assuming I do not misunderstand the PF1 rules, the stacking rules are not checked with respect to effects. I mean when you have for example a permanent enhancement bonus of +4 and a temporary enhancement bonus of +2 then the total extra mod is +3 with your extension but it should be +2, isn't it? (because the permanent one should overwrite the temporary one; I do not think that they stack, isn't it? :) )Ah, forgot to mention that in the readme. You are correct that I have not implemented dodge and circumstance allowing stacking. I do plan to do this, but I didn't think it was a priority since I don't know of any permanent bonuses that use those types.

Also, good catch about the permanent/temporary stacking behavior, I made an assumption about the rules there which was incorrect. I'll see about correcting this oversight this week :)

If this is useful for 3.5E I can add the ruleset tag also, I assumed it would be redundant since effects already work for both types in 3.5E.

Kelrugem
September 1st, 2020, 13:28
Ah, forgot to mention that in the readme. You are correct that I have not implemented dodge and circumstance allowing stacking. I do plan to do this, but I didn't think it was a priority since I don't know of any permanent bonuses that use those types.

Also, good catch about the permanent/temporary stacking behavior, I made an assumption about the rules there which was incorrect. I'll see about correcting this oversight this week :)

If this is useful for 3.5E I can add the ruleset tag also, I assumed it would be redundant since effects already work for both types in 3.5E.

I completely understand, and yes the first thing is indeed not so important :D

Yes, it can be useful for 3.5e when one prefers to track permanent things in the sheet, but, indeed, that would be something just aesthetical since we gladly do not have this effect stuff problem :D

Thank you :)

darrenan
September 1st, 2020, 17:42
Using this extension in conjunction with the Strain/Injury extensions causes the following script errors upon opening a character sheet:



Script Error: [string "campaign/scripts/char_main.lua"]:51: attempt to index global 'nonlethal' (a nil value)
Script Error: [string "campaign/scripts/char_main.lua"]:51: attempt to index global 'nonlethal' (a nil value)


@Kelrugem: Perhaps instead of removing the nonlethal control in the S/I extensions, you could instead just hide it and make it zero size? Kind of depends on why this extension is referencing that control I guess.

Kelrugem
September 1st, 2020, 17:59
Using this extension in conjunction with the Strain/Injury extensions causes the following script errors upon opening a character sheet:



Script Error: [string "campaign/scripts/char_main.lua"]:51: attempt to index global 'nonlethal' (a nil value)
Script Error: [string "campaign/scripts/char_main.lua"]:51: attempt to index global 'nonlethal' (a nil value)


@Kelrugem: Perhaps instead of removing the nonlethal control in the S/I extensions, you could instead just hide it and make it zero size? Kind of depends on why this extension is referencing that control I guess.

Ah, I see, interesting :) Thanks for the suggestion :)

@bmos: Do you somewhere reference nonlethal in this extension? Maybe in the xml? Is it possible that this is avoided by using merge=join rules somehow? (I looked into your code, but I couldn't see the culprit immediately. You also don't overwrite char_main.lua, so, that may not be the problem) :)

I can add a "secret nonlethal box", but I also get this error sometimes when attacking, so I am afraid that the code tries to add damage to a nonlethal box then (which is not there anymore in the strainInjury version). Thence, an invisible nonlethal box might cause other issues which are not immediately visible because there would be then no error message :) So, I want to understand first what exactly is going on here :)

(when only StrainInury loaded, then everything works fine. So somehow the nonlethal reference comes back when using both :) )

bmos
September 1st, 2020, 19:02
@bmos: Do you somewhere reference nonlethal in this extension? Maybe in the xml?
Nope, I just did a search using Notepad++ and got no results for nonlethal.
I've been using the <invisible /> tag on anything I want to 'delete' to avoid this sort of issue.

The line in the error is referring to the code within OnHealthChanged() (which is triggered by a few things) that changes the color of the nonlethal box


Using this extension in conjunction with the Strain/Injury extensions causes the following script errors upon opening a character sheet:



Script Error: [string "campaign/scripts/char_main.lua"]:51: attempt to index global 'nonlethal' (a nil value)
Script Error: [string "campaign/scripts/char_main.lua"]:51: attempt to index global 'nonlethal' (a nil value)


@Kelrugem: Perhaps instead of removing the nonlethal control in the S/I extensions, you could instead just hide it and make it zero size? Kind of depends on why this extension is referencing that control I guess.Do you only have those two extensions loaded? I can't imagine why this would be triggering health stuff unless Live Hitpoints were loaded.

darrenan
September 1st, 2020, 19:29
Strain/Injury with Full Package only: No Error
S/I with Live HP: No Error
S/I with Drain and Permanent Bonuses: Error
S/I with both Live HP and Drain and Permanent Bonuses: No Error!!

In all four cases above I just opened the campaign, opened the Characters window, and opened an existing character. Note that no error occurs when using both of your extensions, only when using just this one with S/I. Hope that helps.

Kelrugem
September 1st, 2020, 19:46
Strain/Injury with Full Package only: No Error
S/I with Live HP: No Error
S/I with Drain and Permanent Bonuses: Error
S/I with both Live HP and Drain and Permanent Bonuses: No Error!!

In all four cases above I just opened the campaign, opened the Characters window, and opened an existing character. Note that no error occurs when using both of your extensions, only when using just this one with S/I. Hope that helps.

Ah, oki, the Live HP extension has the nonlethal wound box in its xml which you probably do not see because my load order is higher such that it gets deleted again, but seemingly leading to a vanishing error? Interesting :) I take a look at the live hp extension when I have time, too :) (also to see whether the nonlethal code there might lead to other invisible issues with StrainInjury :) )

(although this error behaviour is still somewhat strange, I hope I can find the culprit, surely interesting :D)

bmos
September 1st, 2020, 20:37
EDIT; desregard

darrenan
September 7th, 2020, 19:10
The 'inherent' bonus type needs to be added to the drop-down. This is the bonus type granted by wishes and tomes.

bmos
September 7th, 2020, 20:09
The 'inherent' bonus type needs to be added to the drop-down. This is the bonus type granted by wishes and tomes.Excellent suggestion; I just used the table of bonus types that was built into the ruleset. Some of them are obviously absurd for permanent bonuses (such as circumstance).
I've added that to the queue for tomorrow's update.

Svandal
September 11th, 2020, 13:01
Would it be possible to add fields for armor, shield, natural armor, deflection, and saves also?

That way it is easier to add buff effects on other pcs.

bmos
September 11th, 2020, 20:28
Would it be possible to add fields for armor, shield, natural armor, deflection, and saves also?

That way it is easier to add buff effects on other pcs.Effects work properly for those, so I don't see a need. If you're referring to the buff effects of spells, I highly recommend PFRPG Spellbook (https://www.fantasygrounds.com/forums/showthread.php?58962-PFRPG-Spellbook) as it has ALL the Pathfinder srd spells and automated effects pre-written when possible which makes all that stuff incredibly easy.

Kelrugem
September 25th, 2020, 13:37
Strain/Injury with Full Package only: No Error
S/I with Live HP: No Error
S/I with Drain and Permanent Bonuses: Error
S/I with both Live HP and Drain and Permanent Bonuses: No Error!!

In all four cases above I just opened the campaign, opened the Characters window, and opened an existing character. Note that no error occurs when using both of your extensions, only when using just this one with S/I. Hope that helps.

Out of curiosity, did this get resolved for you darrenan? :) I can try to look into this incompatibility, but not sure when :) (I am just making my round to collect all the issues with other extensions before I completely forget them :) )

PS: I hope I have soon way more free time again, or at least some free time at all :( :D

darrenan
September 25th, 2020, 17:03
still seeing the error with just S/I+this extension, but as mentioned before if I also load Live Hit Points the error goes away.

bmos
September 25th, 2020, 17:14
if I also load Live Hit Points the error goes away.
That's probably because Live Hitpoints has a loadorder of 60. I assume that it's replacing something that S/I has removed.

Blahness98
September 29th, 2020, 04:18
Does this no longer stack with Live Hitpoints? Thought it worked at one point, but I no longer am able to have them both only loaded and have the hitpoints updated live.

bmos
September 29th, 2020, 11:50
Does this no longer stack with Live Hitpoints? Thought it worked at one point, but I no longer am able to have them both only loaded and have the hitpoints updated live.I'm not seeing this behavior, but I have some little changes to Ability Drain + Permanent Bonuses that I hadn't published yet but now have (https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/releases/tag/v1.0.2). Maybe I have fixed it unintentionally!
Were you testing with just those two extensions or were there others in the mix?

Blahness98
September 29th, 2020, 13:20
Fresh campaign, just those two enabled using FGC and FGU to back check. The ability field never updated with the change. Perhaps there is an issue with the campaign, so I will create a new one and test again.

Blahness98
September 29th, 2020, 13:21
:excuse the double post:

bmos
September 29th, 2020, 13:32
Fresh campaign, just those two enabled using FGC and FGU to back check. The ability field never updated with the change. Perhaps there is an issue with the campaign, so I will create a new one and test again.If the new campaign fixes it, zip the old one and send it to me; I might be able to find what went wrong.

tahl_liadon
September 29th, 2020, 16:28
.
thx for serving this up... a propos for my recent session where party fought wraiths.

a couple things:

1) i have both this and the live hp one that you did loaded, and it seems to work... including "dmg" and "perm" stacking.

2) adjusting "perm" needs to use the magnif glass and entering - or + number, then a type needs to be chosen. i get that. but what if it's, e.g., from an attack that drains con? the type would not be needed and would not apply here -- so should type be default to blank or "untyped?"

or what am i missing?

bmos
September 29th, 2020, 17:39
adjusting "perm" needs to use the magnif glass and entering - or + number, then a type needs to be chosen. i get that. but what if it's, e.g., from an attack that drains con? the type would not be needed and would not apply here -- so should type be default to blank or "untyped?"

or what am i missing?Type is ignored for drain (regardless of what you pick). It's also optional (you can leave it blank for untyped).
I will add a literal "untyped" type that allows stacking to make this more obvious :)

damage and drain stacks fine (because it all is supposed to stack). the part that isn't handled by the rules is permanent / temporary bonuses.
For example: An effect "STR: 4 enhancement" and a permanent strength enhancement bonus of 4 (from an item worn for more than 24 hours) will be stacked (you have to adjust accordingly just like with the normal FG system).
This extension just makes it easier to keep track of the bonuses and drain so you can remove them again when the causes are no longer relevant.

Sudain
October 27th, 2020, 01:35
Another amazing mod, thank you!

Is there a quick and easy way to do level drain or is it simply adding a -2 on each ability score (assuming 2 negative levels)?

Svandal
October 27th, 2020, 07:20
Another amazing mod, thank you!

Is there a quick and easy way to do level drain or is it simply adding a -2 on each ability score (assuming 2 negative levels)?

Level drain does not decrease your ability scires at all. It adds -1 on most d20 rolls per negative level

https://www.d20pfsrd.com/gamemastering/special-abilities#TOC-Energy-Drain-and-Negative-Levels


And there is an effect for it in fantasy grounds
Nlvl: x
X is amount of negative levels, so if you have three negative levels the effect is
NLVL: 3

bmos
October 27th, 2020, 11:51
Level drain does not decrease your ability scires at all. It adds -1 on most d20 rolls per negative level

https://www.d20pfsrd.com/gamemastering/special-abilities#TOC-Energy-Drain-and-Negative-Levels


And there is an effect for it in fantasy grounds
Nlvl: x
X is amount of negative levels, so if you have three negative levels the effect is
NLVL: 3Exactly :)
Also, if you use my Live Hitpoints (https://www.fantasygrounds.com/forums/showthread.php?59500-PFRPG-Live-Hitpoints-from-Constitution-Extension) extension, it will remove the hitpoints that go along with the negative level (5/level). That extension isn't compatible with this one in Classic though, just Unity.

Ckorik
May 5th, 2021, 00:09
when adding a new bonus to an ability there is an error:

[5/4/2021 6:05:36 PM] [ERROR] Script execution error: [string "common/scripts/list_text.lua"]:46: attempt to index field '?' (a nil value)

The add on works otherwise - just get an error when adding to the list.

bmos
May 5th, 2021, 13:02
when adding a new bonus to an ability there is an error:

[5/4/2021 6:05:36 PM] [ERROR] Script execution error: [string "common/scripts/list_text.lua"]:46: attempt to index field '?' (a nil value)

The add on works otherwise - just get an error when adding to the list.Can you re-test with all other extensions disabled? I'm not seeing this issue.

Ckorik
May 6th, 2021, 03:46
Can you re-test with all other extensions disabled? I'm not seeing this issue.

Found it - moduleplus - I'll just run without it. Sorry for that.

swbuza
May 15th, 2022, 16:19
I love the extension, but it doesn't interact well with the Mythic Adventures book because the Pathfinder ruleset treats a mythic tier as a level, and this extension appears to count the levels for calculating CON bonus, which you cannot edit. That's not really the fault of this extension; just the result of treating the mythic tier as a level.

bmos
May 15th, 2022, 22:08
I love the extension, but it doesn't interact well with the Mythic Adventures book because the Pathfinder ruleset treats a mythic tier as a level, and this extension appears to count the levels for calculating CON bonus, which you cannot edit. That's not really the fault of this extension; just the result of treating the mythic tier as a level.

Can you just go to the list of classes and set the mythic level to 0 and add the tier to the name?

swbuza
May 22nd, 2022, 17:43
Can you just go to the list of classes and set the mythic level to 0 and add the tier to the name?

If I set the name to "Champion 2" and the level value to 0, then Champion 2 does not appear at all on the main tab of the character sheet. Really, this is more of an issue with the LiveHP extension than this one.

bmos
May 22nd, 2022, 21:14
If I set the name to "Champion 2" and the level value to 0, then Champion 2 does not appear at all on the main tab of the character sheet. Really, this is more of an issue with the LiveHP extension than this one.Darn, I don't see any easy workaround for that.

swbuza
May 24th, 2022, 16:51
I hacked 3.5E\scripts\manger_char.lua to fix that.



function calcLevel(nodeChar)
local nLevel = 0;

for _,nodeChild in pairs(DB.getChildren(nodeChar, "classes")) do
local sClass = DB.getValue(nodeChild, "name", "");
if (sClass ~= "Archmage" and sClass ~= "Champion" and sClass ~= "Guardian" and sClass ~= "Hierophant" and sClass ~= "Marshal" and sClass ~= "Trickster") then
nLevel = nLevel + DB.getValue(nodeChild, "level", 0);
end
end

DB.setValue(nodeChar, "level", "number", nLevel);
end

bmos
May 24th, 2022, 17:46
I hacked 3.5E\scripts\manger_char.lua to fix that.That's fair! Probably worth making an extension for it or suggesting that it be included in the ruleset (although for that you'd also want to check if the ruleset is running in PFRPG mode or not).

DCrumb
May 25th, 2022, 07:20
Because of what Mythic does, shouldn't it be a module and an extension on its own? That way, if you aren't playing with it, it shouldn't affect normal play.

swbuza
May 25th, 2022, 08:28
Because of what Mythic does, shouldn't it be a module and an extension on its own? That way, if you aren't playing with it, it shouldn't affect normal play.

Well, it began with a couple of bmos' extensions getting broken by Mythic Adventures, which is why I raised the issue here originally. It's way beyond the scope of these extensions, which are not at fault.

DCrumb
May 25th, 2022, 16:02
So one of the workarounds in the official module bug thread (https://www.fantasygrounds.com/forums/showthread.php?38100-Official-Pathfinder-Modules-Bug-Report-Thread&p=537124&viewfull=1#post537124), is to make a copy of them in the class sidebar tab and then remove the extra material. This should workaround the levels, hit points, skills, BAB, etc. That may alleviate some of the breaking of extensions.

swbuza
May 25th, 2022, 16:20
So one of the workarounds in the official module bug thread (https://www.fantasygrounds.com/forums/showthread.php?38100-Official-Pathfinder-Modules-Bug-Report-Thread&p=537124&viewfull=1#post537124), is to make a copy of them in the class sidebar tab and then remove the extra material. This should workaround the levels, hit points, skills, BAB, etc. That may alleviate some of the breaking of extensions.

Yeah, that's what I did. It's pretty disappointing to see this was from two years ago and it still isn't fixed. I actually just created my own module.

bmos
May 25th, 2022, 19:08
Yeah, that's what I did. It's pretty disappointing to see this was from two years ago and it still isn't fixed. I actually just created my own module.
There actually is a community module for it also. Not sure if it has that issue fixed or not.
https://www.fantasygrounds.com/forums/showthread.php?40737-PFRPG-Mythic-Adventures-(module)

The Judge
October 19th, 2022, 04:10
FGU: v4.3.0 ULTIMATE (2022-10-18)

Errors on Load

Notified
https://www.fantasygrounds.com/forums/showthread.php?50895-Kelrugem-s-extensions&p=665863#post665863
https://www.fantasygrounds.com/forums/showthread.php?71704-PF-Effect-Removal-Extension/page2

[10/18/2022 7:45:14 PM] [WARNING] windowclass: Window class (ability_action) defined with merge attribute, but asset name does not match existing asset. [PF Remove Effect Tag] [extension.xml]
[10/18/2022 7:45:15 PM] [WARNING] template: Template (button_abilperms) defined with merge attribute, but asset name does not match existing asset. [FG-PFRPG-Drain-and-Permanent-Bonuses] [campaign/record_char_main.xml]
[10/18/2022 7:45:15 PM] [WARNING] template: Template (combobox_bonus_types) defined with merge attribute, but asset name does not match existing asset. [FG-PFRPG-Drain-and-Permanent-Bonuses] [campaign/record_char_main.xml]
[10/18/2022 7:45:15 PM] [ERROR] template: Unrecognized merge attribute (replace) for template (number_charwounds), skipped. [Full OverlayPackage with alternative icons] [campaign/template_char.xml]

bmos
October 19th, 2022, 13:11
Thanks.
Since the console messages from mine are just WARNINGs, I have queued up the changes and will include them in the next release.

darrenan
October 19th, 2022, 17:14
We also weren't seeing the magnifying glass next to each ability score in our game last night. I wasn't the GM, so I'm not sure which combination of extensions were running, but at a minimum we were using Strain/Injury, Mirror Image (mine), NPC Actions, this extension. That's probably not very helpful I know. Hopefully your next round of changes, and other extension developer fixes will remedy this. Seems like yesterday's update was quite seismic, I haven't seen so many error messages and broken UI in quite some time.

bmos
October 19th, 2022, 19:28
My guess would be Strain/Injury as the details button is definitely there with no other extensions loaded

darrenan
October 19th, 2022, 20:50
That is not what I'm seeing:

5477454775

I get this extension via The Forge, so this should be the most current version?

Zarestia
October 20th, 2022, 00:06
That is not what I'm seeing:

5477454775

I get this extension via The Forge, so this should be the most current version?

Probably because of the merge attribute which was fixed in GitHub but not put live in Forge (or Forge is having hiccups again)?

https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/commit/b982e82ecbd9f60472ee0cfbef2ace662c8c3757

bmos
October 20th, 2022, 00:13
Probably because of the merge attribute which was fixed in GitHub but not put live in Forge (or Forge is having hiccups again)?

https://github.com/bmos/FG-PFRPG-Drain-and-Permanent-Bonuses/commit/b982e82ecbd9f60472ee0cfbef2ace662c8c3757

Thanks for that reminder. I have pushed those now.

YamiVegeta
July 16th, 2023, 01:54
Hi, I'm having an issue when using this extention.
I have a character that has a form change, so I am trying to write an effect that can make the correct adjustments to ability scores.
Base STR 9, With the form change this changes to STR 18. The problem I am having is he is also wearing a belt that gives an enchanment bonus of 2 to STR.
I cannot find a way to make it so when I add 9 to STR in the effect it doesn't stack with the 2 from the belt that is in the part given with this extention.
No matter what type I change the belt of the effect bonus to seems to make a difference. I Roll ability checks to make sure but with both the effect and the belt
it only makes the bonus +4 when it should be +5 from a STR 20. What am I doing wrong here? I'm using PFRPG if that helps?

bmos
July 16th, 2023, 13:57
I cannot find a way to make it so when I add 9 to STR in the effect it doesn't stack with the 2 from the belt that is in the part given with this extention.


Please note that the bonus types chosen in the list are only used for stacking against other permanent bonuses. The bonuses applied by effects do not check for permanent typed bonuses, so you must be aware of their types when applying effects (just like in FG usually with Pathfinder when you apply them to the ability scores -- but then you don't even have a visual reference).You aren't missing anything (other than the first post). There is no logic included to handle stacking of perm/temp bonuses (as is the case in the PFRPG ruleset without this extension).
If someone wants to work on implementing that I would love to see a pull request, but unfortunately I don't have much development time available for FG these days.