• Welcome to Freedom Reborn Archive.
 

new attribute idea

Started by bearded, December 08, 2008, 05:46:25 AM

Previous topic - Next topic

bearded

i need help!
i know how to code, but i don't know how to make a new attribute from custom powers.
my idea is an attribute that makes a bad guy into a hero, but only if a certain hero is there.
like, black cat and spider-man, or catwoman and batman, or sons of batman and batman.
i would need to be able to use control center to implement it best i think.
what should this potential attribute be called?
and is it possible to make a new attribute in ffx using the control center to customize it?

Epimethee

What so you mean by "make a new attribute from custom powers"?

Especially if you want to do it for a specific character in a mod, instead of creating a new attribute, you could simply add a target type and a detrimental effect functions to Vulnerable. Add both functions to ffx.py, add their names in the corresponding lists in ffxdefault.py and they'll appear in the FFXCC.

If you want to make the attribute easily customizable (short of asking to edit the functon in ffx.py or of making some future-FFX-incompatible hack), you won't be able to use the existing FFXCC UI, as it has reached the maximum possible number of entries for customizable attributes. You'd then create a new FFX attribute (say, "antihero") in FFEdit, ffx.py (I'd use a check on initialization and a regCharacterInitialized()* for spawned characters) and add the customization list to ffxcustom2.py.

*regCharacterInitialized() should actually not use the objectClass parameter, since you'll want to make a general-purpose attribute, which will require something like isEnemy() for detecting heroes, allies and civilians on the one hand and villains and minions on the other.