PDA

View Full Version : help with new 5e class unarmored defense



pico
January 27th, 2019, 17:34
I have a custom 5e class which has the Unarmored Defense feature exactly like the barbarian class.
When adding the class to a character, the AC calculation does not add CON to the calculation like the barbarian does.

I've noticed in manager_char.lua it seems to specify monk and barbarian for this feature. As best I can read how the lua code is working here.

This assumption would seem to be confirmed when I change the character class name to "Barbarian" it works just fine even though the rest of the custom class stayed the same.

If this is the case, can I extend the lua class function or do I have to replace it? I'm still very new to this so the help is appreciated.

Zacchaeus
January 27th, 2019, 18:04
Yes, I think you are correct in that Unarmoured Defence is specifically coded for only the Barbarian and Monk classes.

I don't know anything about scripting so I can't advise with that. But logically it would seem that you'd need to create an extension to allow that feature to be used by another class.

pico
January 27th, 2019, 19:03
Yes, I think you are correct in that Unarmoured Defence is specifically coded for only the Barbarian and Monk classes.

I don't know anything about scripting so I can't advise with that. But logically it would seem that you'd need to create an extension to allow that feature to be used by another class.

Thanks. Yes, my custom ruleset on top of 5e has already got an extension, so that's no big deal. I just don't know enough about how something like this works, I've only been replacing strings and look-ups. The script function seems like a fairly long one, so just copying and modifying it leaves me open to maintenance problems. Plus, I'm not familiar with how to replace an existing function in the base code, or if something could be extended and my code just added to the class' function.

LordEntrails
January 27th, 2019, 22:37
I'd have to ask how often you are going to be creating characters of this class. I mean if you are only going to create half a dozen or so of these characters, then wouldn't it just be easier to manually modify the AC field and add CON to it rather than create and maintain an extension?
26132

damned
January 27th, 2019, 23:53
Thanks. Yes, my custom ruleset on top of 5e has already got an extension, so that's no big deal. I just don't know enough about how something like this works, I've only been replacing strings and look-ups. The script function seems like a fairly long one, so just copying and modifying it leaves me open to maintenance problems. Plus, I'm not familiar with how to replace an existing function in the base code, or if something could be extended and my code just added to the class' function.

Yes you would copy the whole function and yes it does create a maintenance challenge...

LordEntrails suggestion is good too.

pico
January 28th, 2019, 01:58
Ok. Just trying to learn new stuff. Giving up on something isn't my strongest attribute.
I wish my manager would assign my projects and stories based on that reasoning :)

damned
January 28th, 2019, 02:13
Ok. Just trying to learn new stuff. Giving up on something isn't my strongest attribute.
I wish my manager would assign my projects and stories based on that reasoning :)

Go the coding route!