Freedom Reborn

Freedom Force Forums => Scripting Forum => Topic started by: Trelau on February 06, 2010, 04:56:00 PM

Title: Beginner to scripting: making "real" attribute
Post by: Trelau on February 06, 2010, 04:56:00 PM
Ok so here i go: after toying around in a lots of mods and in FFX3.3 in particular, i'm attempting to finally make "my" version of the characters i like best.
So with no knowledge of "real" scripting at all, i'd like to attempt to scale the game with new attributes.
I already know how to make multis, that was my first attempt at opening data files from the game actually (making basically a multi attribute for each character so that they can pack anything i want...). I also know how to tune attributes like driver/vehicule or private army, but that's it.

Now what i'd like to be able to do is duplicate basic attribute (or ffx3 attribute) and tune them differently.
Exemple: "resilient" add a fixed number of hit point to the character. i'd like to find where is that attribute, duplicate it and rename it "resilient 2" and up the bonus (the same way "body armor" has different level or "invulnerability")

Furthermore, and i think it's possible, i'd like to learn how to create (or modify from existing attribute, you get the idea) an attribute that boost or decrease or set to numerical value every character "traits" (strength, speed, agility, energy,...) possible.
From existing attribute i'm guessing we already know how to modify:
_lifting strength (heavy lifter, clumsy)
_"hitting with a wielded object" strength (heavy hitter)
_flying speed (fast flier, human rocket )
_walking speed (slow moving and even armored reduce walking speed if i'm not wrong)
_agility (nimble)
_endurance (resilient)

So maybe it's a little ambitious (meaning: crazy difficult to do for a beginner) or irrealistic (no technicaly doable), i don't know.
But if it is possible it would really allow us (or just me if noboby's interested) to completly rescale the game.
We could effectively have superman with 20 strengh and flash with 15 running speed.
With existing attribute we can make a slow-walking character that fly fast, with a few more new attribute we could make a slow flying character that runs fast too.
More interesting: we could have a generic brawler with 7 strengh, but lifting strength of 4 .Instead of giving him clumsy so that he wouldn't be able to lift anything, we'll give him "puny lifter" so that he'd still be able to lift a trash can or a bench, but not a car. We could even had a "non-wielder" attribute so that he'd have a wielding strengh of 1 and couldn't cary a streetlight.

I don't know if it's already been done, or tried, but i do know a lot of people have tried to entirely rescale the game as they see fit, so maybe there's already someone that did it in a better way than the one i'm trying. I won't lie, it's basically just the "human rocket" attribute that made think of trying this (it sets flying speed to a given value) because i though we could set all other character traits too.

So, here it is, my first post in the scripting forum, hope i didn't made a fool of myself.
Title: Re: Beginner to scripting: making "real" attribute
Post by: stumpy on February 08, 2010, 12:05:16 PM
Adding scripted attributes can be a bit tricky, especially if you want them to modify character stats. There is a fair amount of bookkeeping to be done, to make sure the attributes work with others and so on. But, you can always start out by looking at already-scripted attributes in ffx.py (see the simpler ones like Nimble) to get an idea of how it's done. I would classify it as difficult for a beginner.

Rescaling the game would be a real task. This topic comes up from time to time, but the game is very much balanced for the 1-10 scale that the stats are currently limited to (with a couple exceptions). Going outside that range can make things very unbalanced in a hurry, and that's not much fun. It sometimes seems like it would be cool to have a Superman who reflects the comic version better, but I don't think it works out to be more fun, especially when it would be a monumental task to re-make all the baddies so that they are something of a challenge for him.

Also, keep in mind that many of the in-game effects of some stats are hard coded. So, for example, having an energy or endurance stat over 10 will just cause trouble because the game won't know what to do with it.

On the specific example of an attribute that takes a character with a high strength and lowers what he can lift or wield, I don't know of a good way to do that. It's certainly possible to check when a character has picked up an object and nerf his strength until he is no longer holding the object (sort of the opposite of what Heavy Lifter does). The problem is that all the heavier objects will still appear to be liftable for him (the hand will appear over them and he'll be able to lift them). So, he will still be able to lift a heavy rock, but he won't be able to throw it any distance. A better approach for this kind of character (a strong brawler who has a lower lifting or wielding strength) might be to just bump the damage on his melee attacks to reflect his brawling strength.
Title: Re: Beginner to scripting: making "real" attribute
Post by: Trelau on February 08, 2010, 04:11:13 PM
Thanks or answering. So it seems i won't be able to modify every stat, and from what you say and what i see, i guess i'll only be able to scale some stat and not other. I didn't know the trouble with breaking the limit of 10 for endurance and energy for example, so that's good to know.
It still might work for a partial scaling (mainly speed so that i can have a real array of speedster and not every flash/quicksilver at 10), so i'm gonna try to duplicate scripted attribute like nimble and see how far i can go without losing my mind to scripting  :rolleyes:
So thanks for telling me what basically can and can't be done, if i get some good result i'll let you know ; but to be fair i'm mostly doing it for myself, so it's probably not gonna correspond to what everybody has in mind in term of scaling
Title: Re: Beginner to scripting: making "real" attribute
Post by: Epimethee on February 09, 2010, 02:12:55 AM
Quote"resilient" add a fixed number of hit point to the character. i'd like to find where is that attribute
It's in ffx.py; search it (see the editor suggestions on Freedom Reborn Wiki) for "def initffqresilient". My very first attribute!  ^_^


Some suggested resources:

1. The FF Scripting.doc which comes with FFEdit, since it covers grossso modo all the base scripting possibilities (except for some FFX additions such as Stumpy's DATfiles).

2. The scripting pages on the Freedom Reborn Wiki (http://frworld.wikispaces.com/).

3. The FFX manual (http://ffx.freedomforceforever.com/manual.htm), under Mod-Making

4. This scripting thread.

Creating FFX attributes etc. can be quite frustrating a process at times, but the joy of success more than offsets it. Have fun!
Title: Re: Beginner to scripting: making "real" attribute
Post by: Trelau on February 11, 2010, 08:42:25 PM
Thanks a lot for all the ressource!