Freedom Reborn Archive

Freedom Force Forums => Scripting Forum => Topic started by: seraglio on March 05, 2007, 07:02:46 PM

Title: replacement for ffxcustom.py
Post by: seraglio on March 05, 2007, 07:02:46 PM
Hi all. I have a question that I have asked before, but forgot the answer, as I have been away for ove a year.

I have created some custom attributes. One is based on human top but alows you to customize the explosion. The other is based of blazing glory, but doesnt do damage. Very simple.

In the case of both my problem is this. both work with customizations I put into ffxcustom.py. But as soon as I run ffxedit for something else, the changes get overwriten. Ffxcustom is not "appendable" for lack of a better word, it is completely recreated each run, or its just the 'output' of ffxedit. the attributes still work with the default placed in ffxdefault.py, which defeats the purpose of making them customizable.

i asked this question of dr mike a few years ago and I vaguely remember him mentioning another file I could use, but I never found that file, it didnt exist on my system.

Right now, I simply bypass this problem by pointing to an existing, customizable effect and using its ffxcustom entry, i.e. my cyclone human top copy uses FFX_SPINY_CUSTOM for its explosion effect.

But ultimately I will want to output to my own 'custom file'. I tried to add a new import, just calling it ffxcustom2 following the pattern at the beginning of ffx.py. but theres obviously more to it. How best do I go about creating my own custom input file?
Title: Re: replacement for ffxcustom.py
Post by: catwhowalksbyhimself on March 05, 2007, 07:06:44 PM
FFX 3.2 already has an ffxcustom2, which does as you desire.
Title: Re: replacement for ffxcustom.py
Post by: Epimethee on March 05, 2007, 07:08:08 PM
Hello Seraglio,

The file you want to change is ffxdefault.py. As yuou've noted, ffxcustom.py is re-generated by the FFX CC, using the templates in ffxdefault.py.
Title: Re: replacement for ffxcustom.py
Post by: seraglio on March 06, 2007, 04:21:18 PM
catwhowalksbyhimself

Thats great about ffx3.2. I didnt know that. What would i have to copy to make that usable in FF? I dont like FFvTR. I should have been more clear. :doh:

Nice to see you again Epi. So I can use ffxdefault just like ffxcustom and copy the customizations for each hero into that file? Do I have to change any lines in the script like

cmd=getByTemplate(char,FFX_BLAZINGGLORY_CUSTOM,2)

to


cmd=getByTemplate(char,FFX_BLAZINGGLORY_[b]DEFAULT[/b],2)

or anything or does the old code automatically search both files?

I'm working with the last version of FFX, like 2.6 or something, for FF  :ff:

Title: Re: replacement for ffxcustom.py
Post by: catwhowalksbyhimself on March 06, 2007, 05:50:09 PM
The code doesn't search files at all.  The files just load certain things into memory.  It doesn't matter in what file it is loaded up.

So, yes, use ffxcustom.
Title: Re: replacement for ffxcustom.py
Post by: Epimethee on March 06, 2007, 06:54:16 PM
You don't change the code in ffx.py. ffxdefault.py doesn't contain the customizations for your hero, only the default values used by the FFX CC to display in the app and to create the entries in ffxcustom.py if they don't already exist.

One crucial point I forgot to mention: you need to add your attribute to ffxattribs.py.

If you're doing the attribute only for yourself, though, the simpler solution, though, is to simply put your customization list directly in ffx.py just before your "def intattributename():..." – you lose the ability to edit through the FFX CC, but no need to mess with any external file anymore.