PDA

View Full Version : DR bypass extension



Phixation
January 10th, 2020, 15:12
Been using Fantasy Grounds for a little over 2 years. I tend to use mythic rules and I couldn't find a extension that could bypass DR and felt odd using spell as a damage type for smite, etc. So I have been poking around and trying my hand at coding. Managed to make a DR bypass extension. Figured I would share what I did. However, it wont be compatible with things like Kel's advanced effect extension.

Anywho, all that's required beyond the extension is the word "bypass" in any DMGTYPE field or effects line. Simple as that! Hope this can be of use to someone. Enjoy!

EDIT!!!! This now works thru immunity and resists! Just add bypass in addition to other damage types. But no longer works with some other extensions. Also added the "mythic" subtype to creature types.

Kelrugem
January 10th, 2020, 16:45
Been using Fantasy Grounds for a little over 2 years. I tend to use mythic rules and I couldn't find a extension that could bypass DR and felt odd using spell as a damage type for smite, etc. So I have been poking around and trying my hand at coding. Managed to make a DR bypass extension. Figured I would share what I did. However i'm pretty sure it wont be compatible with things like Kel's extensions. Not sure how to fix that.


Anywho, all that's required beyond the extension is the word "bypass" in any DMGTYPE field or effects line. Simple as that! Hope this can be of use to someone. Enjoy!

Nice work :)

if you and others want I can include that into my extensions to make them compatible with my extensions :) Would this be okay for you? :) I would say of course that this comes from you :)

(but could take some while, I am writing on my PhD thesis at the moment and still try to get into the mood for that such that I have to avoid too much distraction :D)

Kelrugem
January 10th, 2020, 19:42
I edited your extension, can you check whether it still works? In that way it should be also compatible with my extensions and (very likely) you do not have to maintain it when new updates come since you do not have to change ActionDamage anymore :)

What I did: I just kept your changes to data_common and I added bypass also to energytypes and specialdmgtypes :) The former only is important when it is about whether one can overcome DR which is what you want to do, so this table is about dmgtypes which overcome DR (and only this); the latter makes this damage type to a damage type as precision and so on in the behaviour about how it gets added to existing damage types when used in effects :) I.e., DMG: d6 bypass on an axe would lead to a damage die d6 with types slashing and bypass, just in case there are rules where you make extra damage which should overcome DR, then the resistances on existing damage types besides DR should still be accounted :) (okay, there is also some part of the code which affects the NPC parsing for adding NPCs to the CT but this should not affect anything since bypass is not used in such a context)

But I didn't have time to test it, so, please tell me when I oversee something :) (it is some while ago that I did a lot with this damagetype stuff)

EDIT: I also renamed data_common2 to data_common3 to avoid it overwriting my data_common2 :) (DataCommon2 to DataCommon3, too)

Phixation
January 11th, 2020, 06:32
<face palms> Can't believe that's all it took to make the ext work. MUCH simpler that way. Works so far so good. and if you want... feel free to add to yours. I just need to see the bypass condition personally when using mythic or smites. Much thanks for the help!

Kelrugem
January 11th, 2020, 14:35
<face palms> Can't believe that's all it took to make the ext work. MUCH simpler that way. Works so far so good. and if you want... feel free to add to yours. I just need to see the bypass condition personally when using mythic or smites. Much thanks for the help!

hehe, you're welcome :)

mozmonar
April 25th, 2020, 03:26
Does something similar to this exist for RESIST or IMMUNE?

Trying to plug in the Mythic Version of Scorching Ray
"Each ray's damage increases to 6d6 points of fire damage. The first ray bypasses fire resistance and immunity."

I mean I can put in "6d6 bypass" but it would be nice to have it as "6d6 fire,bypass" for any situation where the target creature is vulnerable to fire.

Kelrugem
April 25th, 2020, 03:43
Does something similar to this exist for RESIST or IMMUNE?

Trying to plug in the Mythic Version of Scorching Ray
"Each ray's damage increases to 6d6 points of fire damage. The first ray bypasses fire resistance and immunity."

I mean I can put in "6d6 bypass" but it would be nice to have it as "6d6 fire,bypass" for any situation where the target creature is vulnerable to fire.

No, is not possible at the moment :) One would have to rewrite the code of IMMUNE and RESIST a bit, or one codes a general effect IGNORE: [blah] or something like this :)

mozmonar
April 25th, 2020, 03:49
Kind of what I figured. Didn't hurt to ask. Thanks for the reply!

Kelrugem
April 25th, 2020, 04:00
Kind of what I figured. Didn't hurt to ask. Thanks for the reply!

But you can manually turn off immunity and resistance of course for the first ray :) (put them on Skip such that they turn automatically on again for the next rays :) )

mozmonar
April 25th, 2020, 04:30
Yeah, not really a big deal. Was just curious if such a thing existed.

Phixation
April 25th, 2020, 08:57
Challenged accepted! And already fixed! Tho before it was compatible with Kel's stuff, it is not anymore unfortunately. Hopefully I can collab with Kel and we can get this all working together. Also this ext also adds the mythic subtype to creature types so you can check for mythic ;) file is updated on first post.

Kelrugem
April 25th, 2020, 14:42
Challenged accepted! And already fixed! Tho before it was compatible with Kel's stuff, it is not anymore unfortunately. Hopefully I can collab with Kel and we can get this all working together. Also this ext also adds the mythic subtype to creature types so you can check for mythic ;) file is updated on first post.

Cool, thank you :) I see what I can do, but I have a bit less time at the moment, and my damage stuff has a bit different structure of the code due to fortification such that I can't simply copy&paste :D But I try to implement them somehow soon :)

mozmonar
April 25th, 2020, 16:54
Challenged accepted! And already fixed! Tho before it was compatible with Kel's stuff, it is not anymore unfortunately. Hopefully I can collab with Kel and we can get this all working together. Also this ext also adds the mythic subtype to creature types so you can check for mythic ;) file is updated on first post.

Oh sweet. I appreciate this. I will have to wait until it's compatible with Kel's extensions before I can use it. But it's awesome that you did this!

Phixation
April 26th, 2020, 11:28
Kel here something to look at... works as far as i can tell on testing. didnt do alot of testing but no errors were thrown when i ran the mythic spell in question in action. to search for my assisted changes.... just search nBypass

For everyone else... I hope that between Kel and me that we can get this working for you... currently in experimental phase ;)

Kelrugem
April 26th, 2020, 15:41
Kel here something to look at... works as far as i can tell on testing. didnt do alot of testing but no errors were thrown when i ran the mythic spell in question in action. to search for my assisted changes.... just search nBypass

For everyone else... I hope that between Kel and me that we can get this working for you... currently in experimental phase ;)

Cool, thank you very much, I will look into that :) Probably I will adjust it a bit because I may also want "damage types" which only overcome specific effects and not all at once :D (just in case for that one excpetional ability somewhere hiding in a supplementary book)

But it can take a while since I also have to update all other packages then, too, and I am fully involved in writing my thesis at the moment :D

Kelrugem
April 29th, 2020, 00:03
As a follow up, is it okay when I add this in the next bigger release? :) Due to all the packages it is always a bit tedious to update all extensions, and then I rather wait until I added/have to add a bit more features, but then it takes a while until I have done that :) (I already have some features which I want to add next, just small ones due to time issues for bigger projects (I hope I can ever finish my opposed skill check stuff) :) at least comaptibility things with 3.3.11 or FGU, whatever comes first :) )

Phixation
April 29th, 2020, 00:07
well dont worry about me... i just wanted to add the functionality since someone asked. ;) you do great work for the community so keep on with it!

Kelrugem
April 29th, 2020, 00:26
well dont worry about me... i just wanted to add the functionality since someone asked. ;) you do great work for the community so keep on with it!

hehe, oki :) thanks, too :D

Kelrugem
May 14th, 2020, 00:45
Kel here something to look at... works as far as i can tell on testing. didnt do alot of testing but no errors were thrown when i ran the mythic spell in question in action. to search for my assisted changes.... just search nBypass

For everyone else... I hope that between Kel and me that we can get this working for you... currently in experimental phase ;)

Hi :)

Just a short check: You seemingly do not need to update the other version due to the hotfix yesterday :) since you do not overwrite manager_actions.lua :)

(but you may want to clarify that you mean my extensions about the incompatibility :) and maybe link your post about the compatible version :) I hope I do not forget to implement your extension when I have time :) (I have to do a lot of presentations at the university at the moment, urghs... :D)

Phixation
May 14th, 2020, 00:52
first version did not account for vuln/resist and bypass. this version does.... so it somehow you get a white dragon with resist fire... if you have bypass it wont count the vuln right... so its not currently compatiable if functionality is is applied right.... :/

Kelrugem
May 14th, 2020, 00:59
first version did not account for vuln/resist and bypass. this version does.... so it somehow you get a white dragon with resist fire... if you have bypass it wont count the vuln right... so its not currently compatiable if functionality is is applied right.... :/

ah, you mean the test extension for compatibility isn't actually compatible? What is the loadorder of the compatible extension? Put that to 50 maybe, it "might" fix it but maybe on the cost of other features I have added. I certainly try to implement your extension at some point such that you do not have to worry about that :)

(oh, and actually I see that you wrote in your first post that it isn't compatible with my extensions :D)

Kelrugem
May 21st, 2020, 05:12
Ah, by the way, what I just recall, in the advanced extension I have added the damage type bleed which also only has the purpose of overcoming the DR :) So, at least that part already exists in my extension :D (but that part of the code is probably compatible already because the initial extension was compatible)

Phixation
May 21st, 2020, 14:55
the incompatible part is where it asks in the dmg code for bypass in the resist and vuln sections. otherwise it would be fine ;)

Kelrugem
May 21st, 2020, 22:02
the incompatible part is where it asks in the dmg code for bypass in the resist and vuln sections. otherwise it would be fine ;)

Yeah, I thought so :D

eporrini
December 11th, 2020, 18:57
Any thought of making this available for the 5e ruleset?

I am also interested in a way to tier weapon based magic resistance. Currently in 5e it's all or nothing, I would love to see it be configurable based on something like weapon rarity. An an example being higher level monsters still being resistant to weapons under a certain level, like common and uncommon magic weapons.

Phixation
December 24th, 2020, 03:57
Sorry for the late reply eporrini.... I might be able to make this compatible for 5e but do you really bypass damage so much? i dont play 5th so i couldnt really tell you what you need

eporrini
December 24th, 2020, 18:29
I’m not a developer so I don’t know the effort involved in making this available in a different rule set. Currently there is no way to bypass immunities or resistances in 5e FGU that I am aware of so I feel there is a need. I would 100% use it, but I would not want you to put in a lot of time just for me to have it.

Phixation
December 24th, 2020, 18:40
I dont know 5e at all.... do you really encounter the need to bypass these? if so i could prolly poke my nose around and make a really simple one to fix it.

eporrini
December 24th, 2020, 23:51
If you could that would be great.