• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Adding fields to things?

Teiwaz

Member
I'm looking for a way to discretely store some data on heroes which I can use to calculate other things.

Basically, I have some custom feats which add to a value which in turn affects the save DC of a monster ability. I'd rather have a value calculated by a script on the feats which can then be used by the scripts on the monster ability to calculate the DC, rather than have to look for every possible feat in every monster ability.

It seems like mechanics are ideal for this, but they don't have any "general use" fields on them, and none of the fields I might be able to re/mis-use are derived fields, so the compiler complains.

Does anyone know of a way for me to stash data like this away? I was thinking I could use a Simple bootstrapped on to a Mechanic, as it seems like this the sort of thing that Simples are for, but I can't find any way to see what fields are available on them. (Or if they have any.)
 
Why do you need to store the value somewhere before adding it? Why not just have each feat add the correct amount to the DC?

(If the answer involves limits to the number that can add their bonus, or a decreasing/increasing bonus depending on the number of feats added, those are problems that can be solved without storing any numbers elsewhere).
 
The relationship is many-to-many.

If I have an intermediary value to store the DC modification, then I just need to have N feats modify that DC, and M abilities use the DC to modify their DC.

If I don't, then I have to have each of the M abilities look for and add the effects of N feats to their DC.

So it's N+M vs N*M script operations.

I'd rather have nice little broken up scripts that increase in quantity/complexity linearly rather than geometrically. (To be clear, it's not performance I'm worried about, but rather the number of scripts I'd have to write and maintain. Just my first crack at this subsystem has 9 feats and 22 abilities, so that's either ~30 lines or ~200. If I want to add a new feat, it's the difference between one new script for the feat, or 22 since I'd have to change every ability affected by it.)

Additionally, the stored number affects other calculations such as duration of the abilities. It's basically a new character stat which applies only to creatures with a certain template, so just storing it somewhere makes a lot of sense.
 
Are you adding the same amount to each of the abilities with a DC? If so, that can be handled with a search. Isn't that just 9 scripts total, one for each feat?

Please give me more information about the overall project you're trying to implement so that I'm not just guessing when I try to offer suggestions.
 
The villains in my campaign are psionic.

Because this is an NPC-only thing, and because I don't want to have to track all the stuff associated with a full psionic system, and because my campaign world has a more limited definition of psionics (strictly mind affecting) than regular D&D/Pathfinder, I'm implementing psionic powers as supernatural creature abilities which are added by a template.

A fair number of these abilities are based on spells, but since there's no caster level, and no spell level, I need things like duration and save DC to be tied to the "psionic level" of the creature with the power. Psionic level would be added by a bonus feat.

If there's no way to store arbitrary data, I'm thinking the best way of doing it is to make a Simple which is bootstrapped by all abilities, and calculates Psionic Level based on the appropriate bonus feats, and apply the DC and such to its parent. That way I'd just have the one script on the simple to build and maintain, and all abilities could share it.
 
Okay, if you're calculating both duration and save DC, that's two separate things, and it'll make for more complex scripts in a search.

Use the Ability tab, rather than the Simple tab. On the Ability tab, there's a field named abValue (and abValue2, abValue3, and abValue4) that can be used to store numbers. Things created on the Simple tab are very simple, and have no built-in behaviors (for example, no fields).
 
Yeah, I was hoping there'd be some sort of thing that had generic fields for various data types which I could use to store arbitrary data. It'd be really useful for things like this.

I'll add a generic "has psionic powers" ability which just has a configurable field for psionic level which in turn has conditional bootstraps that add the abilities for that psionic level, rather than having a separate feat for each power level that need a common place to store the value.

Thanks for the input.
 
Back
Top