News:

Rings of Reznor!

Main Menu

spontaneous attributes

Started by bearded, December 30, 2008, 07:51:48 AM

Previous topic - Next topic

bearded

is there a way to grant a hero or a villian an attribute in mission.py for just that mission?
if the ingame ones won't work for this, what about the ffx ones?

catwhowalksbyhimself

You can only do that for ffx or ffx copies of built ins, but is easy enough to do for those.

Simply call up the function used for said attribute, which follows the pattern initattribueeditorname('heroname')

So if you have Goo in a mission and want to give him Body Armor, for example.

initbodyarmor('goo')

Be aware that mission selected heros' names won't match their template names, so if you weren't forced to use goo, or selected him for a rumble room session, then goo won't be his scripting handle.

Some attributes are also removable, but if you just want it to persist until the end of the mission, you won't need to worry about that.  It won't persist between missions anyway.
I am the cat that walks by himself, all ways are alike to me.

bearded

thanks!  i have a dream of using marvel ultimate alliance type teamup powers.
like, storm and colossus gives colossus charged attacks.
and this will work for  :ff: ?

catwhowalksbyhimself

What I have just described to you is the foundation behind the entire ffx system.  When a mission starts, Dr. Mike's code grabs the error reports for attributes the game does recognize, which also kindly tells the name of the character it is on, and uses that information to run the init functions for every such attribute on every such character.

That's really just a very long way of saying yes.

As for teamup powers, Dr. Mike did this in a rather different way in The Strangers.
I am the cat that walks by himself, all ways are alike to me.

bearded

i come close to understanding what you are saying.  that's a good thing.
so, i take it i can
initbodyarmor('hero1')
wherein hero1 or any other variable used to spawn a hero or bad guy will work?
thanks for your help!
i've got to wonder how this would work for attributes that have customizations.  like with utility belt, or nemisis.
like, if i have private army as the fifth attribute with doombots as the type, but only 4 attributes activated, would i then be able to init and doombots pop in?  or, what if i set the attribute, chose the customs then used ffedit to remove the attribute.  when i init it, would it default to the old selected customs for that character?

catwhowalksbyhimself

As long as the customizations for that characters are present in the proper .py file, then yes, they would work, although I'm not sure how FFXedit would react to setting them then removing the attribute, although I think it would do nothing, allowing your plan to work.
I am the cat that walks by himself, all ways are alike to me.

Epimethee

Actually, when adding an attribute manually, you should not use init_attribute_name() directly. You should instead use addFFXAttrib(char, attrib) so the attribute can be registered properly and to get additional error checks. FFX 3.2+ only.
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

catwhowalksbyhimself

I am the cat that walks by himself, all ways are alike to me.