PDA

View Full Version : Non-energy typed modifiers? (5e ruleset)



celestian
August 17th, 2017, 00:01
What is a non-energy typed modifiers? These seem to be the only ones that use a set value (don't add up modifiers).

This bit of code is from manager_effect5E.lua.



-- COMBINE BONUSES AND PENALTIES FOR NON-ENERGY TYPED MODIFIERS
for k2,v2 in pairs(bonuses) do
if results[k2] then
results[k2].mod = results[k2].mod + v2;
else
results[k2] = {dice = {}, mod = v2, remainder = {}};
end
end
for k2,v2 in pairs(penalties) do
if results[k2] then
results[k2].mod = results[k2].mod + v2;
else
results[k2] = {dice = {}, mod = v2, remainder = {}};
end
end


I've got an effect I'd like to use that needs the best value and not incremental and would like to figure out how to use this bit.

Moon Wizard
August 18th, 2017, 01:31
That code is left over from borrowing code from 3.5E ruleset, in case it was needed.

Basically, the tag must be included in DataCommon.bonustypes, and then any bonuses/penalties with the same tag will be merged. If the tag also in DataCommon.stackablebonustypes, then the bonuses are additive; otherwise, the only the maximum bonus is used.

In 5E, both DataCommon.bonustypes and DataCommon.stackablebonustypes are empty, because there are no typed bonuses. Try looking in 3.5E ruleset for example with types.

Regards,
JPG

celestian
August 18th, 2017, 01:59
That code is left over from borrowing code from 3.5E ruleset, in case it was needed.

Basically, the tag must be included in DataCommon.bonustypes, and then any bonuses/penalties with the same tag will be merged. If the tag also in DataCommon.stackablebonustypes, then the bonuses are additive; otherwise, the only the maximum bonus is used.

In 5E, both DataCommon.bonustypes and DataCommon.stackablebonustypes are empty, because there are no typed bonuses. Try looking in 3.5E ruleset for example with types.

Regards,
JPG

I was just about to follow up explaining what I had found and it was nothing used it ;)

I did end up creating my own basetypes = {}; with the names I needed and worked perfectly using that bit of code.

What I was trying to do was make it so I could put in BSTR, BDEX, BINT/etc and the value given would be the BASE score (not a modifer) for effects.

Doing this because I've added a feature to items that will apply effects when equipped. Gauntlets of ogre power (18/100 str) and the like. It'll actually just apply any effect string you've placed on a item when equipped.

Trying to re-purpose the effects to handle it w/o re-writing so much like I did previously (just tossed what I did and started over). Few minor tweaks to the pre-3.3.2 stuff and it's working now. The one caveat is that they need to be in the Combat-tracker. Once 3.3.2 goes live I'll back port the last few updates you've had so that it's "CoreRPG/5e" effects with the few tweaks.

Once all that's done perhaps I can make it an extension or submit diffs for it (minus AD&D specific stuff). I've been really happy with how it works.