Thread: Kelrugem's extensions
-
May 4th, 2025, 01:32 #1221Patriarch
- Join Date
- Nov 2019
- Posts
- 434
So strange thing with FORTIF.
I have the following two effects on a character.
Legendary Moderate Fortification Bracers of Armor; AC: 1 armor; FORTIF: 50 critical; FORTIF: 50 precision
Deliquescent Gloves; DMG: 1d6 acid,melee
If the character does critical damage to itself the fortification roll is rolled twice.
If the gloves effect is turned off then it only rolls once. It looks like it's rolling once for the weapon and once for the effect for the gloves. I don't really want to have to put the acid damage on each weapon the character might use.
Screenshot 2025-05-03 202135.png
-
May 4th, 2025, 11:47 #1222
Thanks for the report

Yeah, that was always like this, fortification is rolled independently for each separate source of damage. I actually think this is how the rules work, right? I remember that I was thinking a long time about that and the rules themselves sadly do not really clarify what happens in that case. However, for example if one has a crit and a sneak attack at the same time, then I think the fortif roll is also rolled separately and this is why I coded it like that. I hope this is how the rules should work
There is also a note about that on the forge page
(I think)
Coding-wise: The current solution was the easiest one, otherwise it might get tricky because I have to collect all damage dice which are affected by fortif, then only roll fortif once. (which is okay) Once there is a crit and a sneak attack it becomes extra tricky if fortif has to be rolled separately. Even more so if the fortif effects for different damage dice have different percentage numbers; at latest then I have to roll separate fortif rolls
However: The problem only really arises because FORTIF right now accepts all damage types and arbitrary numbers; for supporting effects I am not aware of, but also for supporting homebrew. So, I could adjust it, but I certainly would need to think about how to do that, certainly needs some further if-clauses checking whether some damage die of the same type is already registered for Fortif (if yes, then group them, otherwise set up a separate fortif roll). Alternatively I could stick very closely to the rules and only allow FORTIF: X critical; FORTIF: X precision (so, only critical and precision damage for the same percentage X), because then I can just manually handle the small number of possible situations
But it is also years ago that I coded that, so I would need read the code again
My extensions for 3.5e and Pathfinder
Bug reports please here
-
May 4th, 2025, 14:18 #1223
as far as I know (in 3.5) critical and precision in Fortification are considered pretty much the same: if you crit a sneak attack you roll the % once for both and go for either all or nothing, but "as long as it works I can easily 'homebrew' things to work out separately" :P
-
May 4th, 2025, 17:15 #1224My extensions for 3.5e and Pathfinder
Bug reports please here
-
May 4th, 2025, 18:22 #1225Templar
- Join Date
- Nov 2017
- Location
- Near Chicago, Illinois
- Posts
- 120
Hello Kel, just dropping my 2 cents here. couple of thoughts here. 1) make an option in the menu to use either option? a PER/ALL button to determine how FORTIF is applied. 2) can we get it to ignore anything that doesnt have at least a crit multipler of 2? because in the above example, the gloves should not have rolled against FORTIF at all since the damage from the gloves cant be multiplied by the crit. just thoughts.
-
May 4th, 2025, 19:25 #1226Patriarch
- Join Date
- Nov 2019
- Posts
- 434
From what I see in Pathfinder there are a several different fortifications, but they all use the same basic rules.
Armor/shield Fortification
This suit of armor or shield produces a magical force that protects vital areas of the wearer more effectively. When a critical hit or sneak attack is scored on the wearer, there is a chance that the critical hit or sneak attack is negated and damage is instead rolled normally. The chance is 25% for light fortification, 50% for moderate fortification, and 75% for heavy fortification.
Legendary Fortification
When a critical hit or sneak attack is scored against a creature wearing an item with this ability, the wearer can expend one use of legendary power to negate the critical hit or sneak attack and instead take normal damage.
All of the other ways of getting fortification generally say that it works like the armor fortification.
So there is a fortification that costs a point, but does a complete stop and then there is one that does it on a set type of percentage.
I also found this on just this topic, https://paizo.com/threads/rzs2mn8i?C...-Fortification
I think the check should probably go before the dice are even rolled not after. If the fortification roll is a success then you roll damage as if no critical and/or sneak attack happened.
The coding for this would be more complex, as you would have to abort part of the damage roll that is passed right at the top, but it's probably cleaner in play.
Player rolls to hit and gets a critical.
Player clicks damage roll. All damage dice and modifiers are collected on one place.
Now it needs to look to see if there is critical and/or precision damage and if there is, then look at the target of the damage and see if the target has fortification.
If the target of the damage has fortification then roll once for their fortification.
If the fortification roll is a success then a new dice table is created with just the base damage (dice plus modifiers), this means the critical and sneak attack are effectively being removed.
Once we have that out of the way it then rolls the damage dice as it currently does.
-
May 4th, 2025, 19:30 #1227
Thanks

Oooooh, I didn't even think about the fact that the effect should not be touched by the crit! I am pretty sure that I didn't touch how crits are handled and effects should not have a crit mod of x2! And indeed, check the screenshot: The crit "damage" of the glove is 0! I just checked, the effects accidentally "crit" with 0 damage. So, the fortification roll in that case is even useless...
That is at least easy to fix: I simply do not let fortif roll if there is 0 damage already (and I thought I already did that)
However, I wondered: Why does FG actually add a critical "damage" for the effects which are actually not affected? So, I now tested FG without any extension, and tadaa: FG started to add "0-crit damage" stuff to effects! My fortif code sees everything with "critical" as damage type and thus the second roll. So, rmilmine, you actually found what I would not necessarily call a bug but unneeded clustering of the chat message. Do you want to report that to Smiteworks? If Smiteworks removes the unneeded crit "0-die" for effects which are not affected by crits, then at least at your situation you will not see the second fortif roll anymore because the fortif effect will certainly not get triggered anymore
(But I will still add a handle that fortif effects are ignored for "0-damage". This would also fix your situation, but the 0-damage chat text is still unnecessary and I do not know why that got added; maybe accidentally)
About the option: Thanks for the suggestions, Phixation
I will see whether I will revisit that part that soon; the fortif code is a bit lengthy and I would need to take some time to get into it
Last edited by Kelrugem; May 4th, 2025 at 19:35.
My extensions for 3.5e and Pathfinder
Bug reports please here
-
May 4th, 2025, 21:53 #1228Patriarch
- Join Date
- Nov 2019
- Posts
- 434
-
May 4th, 2025, 22:33 #1229Patriarch
- Join Date
- Nov 2019
- Posts
- 434
Bug sent see what they say,
-
May 4th, 2025, 22:38 #1230My extensions for 3.5e and Pathfinder
Bug reports please here
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)

Reply With Quote



Bookmarks