ATTRIBUTE CUSTOMISATION THROUGHT THE FFX CONTROL CENTRE

A number of FFX attributes can be customised throught the FFX Control Centre. The customisation fields fall into three categories: user functions (see below), æsthetical customisation (see entry) and attribute-specific customisation fields (such as the list of states in MAD, BLESSED or CURSED).

 

FFX USER FUNCTIONS

The condition and/or the effect of certain FFX attributes are easily customizable through the FFX Control Centre; these options (taken from the ffxdefault.py file) are in fact independant chunks of Python code (i.e., functions) from ffx.py.

For information on each user function, please consult the categories listed to the left.

 

Advanced Customisation

You can roll your own script functions to customise these abilities and put them in ffxextras.py for safe keeping if you like.

"Type" functions, to see if a target objects counts for synergising must be of the form:
def isMyType(obj,char=''):

and return non-zero if the object is of interest. The obj argument is the object being tested, and char argument is the character with the ability. The second argument is completely ignored in many cases.

If used as a trigger test for shapeshifting, then the character is the obj parameter.

"Effect" functions take the form:
def doMyThing(char,targets,array,flip=0):

The char parameter is the character being boosted, targets is a list of suitable objects found to boost with (so len(targets) gives you the amount of boost to give typically), and array is the customisation array (eg FFX_ABSORPTION_CUSTOM) in case you want to access the right FX parameters and only play them in special cases. The flip parameter is set to 1 for the DEPENDENCY attribute since the absence of objects triggers the effect then.

In the case of detrimental effects used by VULNERABILITY and DEPENDENCY attributes, use the function getVDPower(targets,flip). This will return a 'degree of badness' appropriate to both dependency and vulnerability attributes.

"Metabolic" functions take the character as the first argument and the bonus value from -2 to 2 as the second argument.

 

As a final example, say we're designing a character who can clone themselves and want them and the clones to gain some power the more there are of them - lets say they get a damage aura as there are more of them (which they can be made resistant to via a passive defence).

The new target function, lets call it isCloneOf basically just needs to check for matching templates. (This will also make the character quite powerful if brought in as a NPC multiple times in the Dangerroom)

def isCloneOf(obj,char):
    return Object_GetTemplate(obj)==Object_GetTemplate(char)

The damage aura effect, lets call it gainDamageAura. We want it to trigger an explosion, (lets say generic electrical explosion) at variable intensity depending on how many clones there are. One clone nearby causes a weaker explosion (at -1 intensity, equivalent to underpowering), whereas three does normal intensity, and 5 does one level overpowering.

def gainDamageAura(char,targets,array):
    if len(targets)>0:
        intensity=(len(targets)-3)*0.5
        Trigger_Explosion(char,'generic electrical explosion',intensity)

To apply this to a character, just type gainDamageAura into the drop box for their 'Effect' in FFXEdit and this function will be called.

And, yes, these two have now been added to FFX for testing the code displayed here. Go roll your own…