Freedom Reborn

Freedom Force Forums => Mods => Topic started by: yell0w_lantern on March 07, 2010, 08:28:48 PM

Title: Active Defense Duration
Post by: yell0w_lantern on March 07, 2010, 08:28:48 PM
 :wacko:
Tried searching the forum for this one but I can't find it. From what I recall it has to be done from the console. What code do need to type in to alter Active Defense duration?
Title: Re: Active Defense Duration
Post by: Epimethee on March 07, 2010, 09:04:14 PM
In FFvsTTR, IG removed the FFEdit interface for setting the duration. However, changing the attribute rests the duration to short IIRC; it certainly took me a long while to figure what was going on with Alchemiss' illusion casting?

Instructions are available in the FFX manual:

Under Mod-Making > Powers.dat, read the entries for Utility Functions, i.e., ShowAllActiveDefenceDurations(FileName='') and Campaign_ChangeActiveDefenceDuration(stringPower, intDuration, FileName='', ForceRead=0).
Title: Re: Active Defense Duration
Post by: yell0w_lantern on March 07, 2010, 09:45:17 PM
Thanks, Epimethee. I found the bit in the manual now.

I gave it a couple of tries and I'm getting syntax errors. Can you give me an example so I can see where I'm going wrong?
Title: Re: Active Defense Duration
Post by: Epimethee on March 08, 2010, 05:00:01 AM
Actually, I have yet to reinstall Windows (I know, I know), so my script-fu is a bit more limited than usual? So, from memory and a quick look at the source code:

From the in-game console:
>>> import datfiles
>>> print datfiles.ShowAllActiveDefenceDurations()

(This displays a list of defence powers and durations)

>>> datfiles.Campaign_ChangeActiveDefenceDuration('my defence power', #)

where # is 0 to 3.

Once you restart the mission, the new duration should be in effect.

I suggest backing up your powers.dat first, of course.

If it doesn't work, please post your script.log. :)
Title: Re: Active Defense Duration
Post by: yell0w_lantern on March 08, 2010, 03:53:32 PM
Ok, got it working. Thanks, Epimethee.

Campaign_ChangeActiveDefenceDuration('power name',X,FileName='',ForceRead=0)
Where X is the duration. 0=short, 1=medium, 2=long and 3=infinite