Hi folks,
I've been figuring out how to create custom item properties and saving throws effects for a sub-system I'm trying to implement, and could use some suggestions on how to make this system more efficient.
I know what I want to achieve but it is rapidly becoming more and more complicated and would appreciate some insights from those of you who have tackled similar systems.
I appologize if this is unnecessarily long, I wanted to explain what I'm trying to do and what I have so far to make it easier to make suggestions. I am not looking for actual code here, just some tips or suggestions to streamline things. I have probably overlooked some nifty functions, for example.
What I'm doing,
I'll be defining all spells as having a magic source, basically where the magic comes from. One example is infernal.
The goal is make modifiers (+/-) vs a source affect all save rolls in addition to standard saving throw mechanics.
So +1 vs infernal would give a player +1 on any save they might have to make, provided the source is infernal magic. A fear save, divine damage save, whatever.
What I have so far,
1) I have a custom function in each spell that replaces OEI's MySavingThrow, which is in place to raise or lower the spell DC, instead of re-writing FortitudeSave(), WillSave() and ReflexSave().
2) I have a custom item property that is working, I can retrieve +3 save vs magic source: infernal, for example. I do this by looping through item properties and picking out my custom one and basically totaling the net modifier for each source subtype (infernal for ex).
3) I have modified saveelements.2da to include a 'save vs nSource=infernal' for each magic source. I then use EffectSavingThrowIncrease/Decrease to place custom effects on players via persistent feats (say +2 vs infernal magic).
4) To save processing when saves are actually needed, I have 'shadowed' both the item and effect implementation with local integers stored on the player.
For persistent feats, each feat script increments/decrements an integer for each magic source type.
For items, module (un)acquire & (un)equip events check the item for the property and again increment/decrement an integer for each source type.
I then total these two integers, and use it's value to modify a spell's DC before calling the OEI save functions.
For example, the player might have a ring with -1 vs infernal, and a feat that gives +2 vs infernal. This is a net bonus of +1. If the spell DC was 17, I would pass 16 instead for the save.
I am not entirely sure the above is necessary, I was hoping to make this system work with the default save calls, but so far I can't get that to work. Still testing.
This all seems to work fine, but I can't help but feel it's a bit clunky the way it's implemented.
Suggestions and comments appreciated!
best regards, Erithol
Looking for a few suggestions re: custom saving throws and item properties
Débuté par
Erithol
, sept. 28 2010 12:47
#1
Posté 28 septembre 2010 - 12:47





Retour en haut






