News:

Happy 20th, FFvT3R!

Main Menu

FF-related coding project roundup

Started by stumpy, May 15, 2009, 08:48:07 PM

Previous topic - Next topic

stumpy

Okay, for my 3333rd FR post, I thought to post a roundup of some of the FF-related coding projects that I have been working on lately, on and off. The hope for this thread is that others who might have some projects sitting around might post summaries of theirs, too, and maybe the thread and some feedback will spur others on and give us all a little push to finish some of these up.  :lol:

I know that, personally, I have a pile of projects at various stages of chaos at any given time and it's tough to get them out the door. As with any creative work, I go in with a full head of steam when the concept occurs to me and there is some challenging problem to figure out or some cool feature to create, or some new way to do something we already do. (As the owner of a slow PC where I play FF, I am especially a fan of code that runs faster and causes fewer game delays!) But, once I get the tough part done and I have satisfied myself that it works at a basic level, I sort of lose the will to polish it up and make it available for others, which can take more time than overcoming the conceptually interesting challenge that motivated me in the first place.

So, I will post some of my FF-related projects and maybe get some feedback. And, I hope others will feel free to add to the roundup with your coding projects here. The sorts of things I have in mind are

  • New FFX attributes
  • Utilities for the game (or for other scripters)
  • Interesting mission scripting ideas
  • Just goofy things you had fun doing or want to do (I have plenty of these! :P)
  • Et cetera
I am not thinking so much in terms of posting code, but more of summarizing the project and maybe what's interesting or challenging about it. And asking for concept help here is totally cool, as long as it's not too basic. It's perfectly fine to say "I had this idea and I got this far and now I'm stuck. Does anyone have an idea of how to tackle this?" But, let's not post "This cut-scene isn't working right. Help!" stuff. (Not that there is anything wrong with those threads; I like and encourage them, but that isn't what this thread is about.) And, if one wants to post code and get direct help, it's always fine to start a thread.

I'll start out with some of mine, categorized as coding projects that are basically done (released or about ready for release), in progress / sketched out (the concept is hammered out and some code is written, but they aren't close to done yet), and back burner / to-do list neverland (ideas that may or may not have some work done on them, but somehow got lost in the shuffle or didn't keep my interest enough to finish).


DONE


  • Twiddled with some code just to do something fun with plasma sculptors. It's just a curiosity, but I had fun with it. Tested it in Strangers in FF, but I think the code either will work for or can easily be adapted to FFvT3R. I always thought someone who could summon stalagmites like Chaos Girl should be able to use that power to make walls to block enemies' paths. But, in practice, placing the objects in a way that the baddies couldn't just walk through them was tedious and often didn't work anyway. It's just one of those things that a character with powers would be able to do, but it ends up being no fun to do in the game. Well, I wrote a little bit of code allows a character to track the movements of another character who walks the path where the objects are to be placed. Then the plasma sculptor summons the objects along that path. It was pretty cool to see her summoning a jagged line of stalagmites to block a tunnel and then seeing the baddies stuck behind them (until the flying characters showed up!). Maybe I can make a video of this...

    Anyway, this was mostly a curiosity for me, so I don't know that it's worth releasing, even though it's pretty much done.

  • Improved GROUP TELEPORTER code in FFX 2.6. For some reason, this attribute was always flaky when I used it, sometimes teleporting foes or allies properly and sometimes playing the FX, but not teleporting the other characters. Part of the problem is that the original FF allows scripted teleportation to markers, but you can't spawn or move a marker during the game. So, FF group teleportation essentially gives invisibility and ultra-speed to the other group members and tells them to move to the destination and then re-normalizes them. It sometimes works and sometimes doesn't. As an alternative, I tried spawning an invisible object at the destination and then calling an instantaneous teleport power using Trigger_Power() with the object as the target. It works and I think the method is a little more foolproof.

    BTW, I still think we should allow some sort of "saving throw" for foes. In other words, trigger an area power with some primary or secondary effect and only teleport those foes who didn't resist the attack. It ends up being a huge advantage to be able to just teleport foes away from a fight - often through walls or outside attack range - and then leave them there.

    Anyway, I don't think any new releases of FFX 2.6 are planned, but if someone wants the code for this, I can post it.

  • For FFvT3R (though maybeit would work for FF, too), I wrote STRONG GRIP attribute. It has always bugged me that a character strong enough to pick up and throw a car or wield a big tree could have it knocked out of his hands so easily. (The very reasonable change to the minForce attributes that we added to FFX - making minForce proportional to mass - helped to some extent.) It also bugged that those picked-up or wielded objects get torn to smithereens so easily. So, here comes the STRONG GRIP attribute, perfect accompaniment to some characters with HEAVY LIFTER or HEAVY HITTER. It makes it more difficult (though still not impossible) to knock a picked-up or wielded object out of the hands of someone with the attribute and it gives the carried objects limited invulnerability, so that they last a little longer while held. This will be in the next version of FFX.

  • I added wield detection sinks to mlogreader. I did this as part of the development of STRONG GRIP, but I was hoping that knowing when a character has wielded a pole might find some use in AI code as well. This will be in the next version of FFX.

IN PROGRESS / SKETCHED OUT


  • Testing power-use-detection via heuristic in mlogreader with a new section of FX watching code. This may be a pipe dream, but I am hoping for at least semi-reliable detection of powers by combining information about animations (by having mlogreader detect power animations in addition to flight/dodge/idle/etc. animations) with information about the power's FX starting. Obviously, this can't be foolproof (a character with more than one power that each uses the same animation and the same FX wouldn't be distinguishable. And, there would be no benefit to using this for powers that are already subject to event sink 21 detection (melee, beams, projectiles and cones) or the damage detection already in mlogreader. But, certain powers may best be detected via this route. I started this thinking about detecting when active defenses and special powers (e.g. sprint, etc.) activated. (I was a little frustrated by the lack of a real POWER NULL for AI-controlled ADs.)

  • Probably the most important project in my roundup, I am writing a filterobjects module to allow quick filtering of the object tuples returned by Mission_GetObjects() and Mission_GetDynamicObjects(). What? Why? Well, efficiency, doggone it! :lol: Lots of FFX code (and some mission scripting) has timer sinks that trawl through these often very large lists fairly frequently (like every second or two). Usually, we want to discard the vast majority of the objects because we are really only interested in alive (health>0), physical, objects within 40 game units of a character with the 'throwable' attribute set or something like that. We can potentially speed up this kind of coding dramatically by using this compiled module. The module is likely to have a big impact on keeping FFX running acceptably fast, especially on older machines. Of course, most people will never directly notice it, since it will mostly be used by the folks who code for FFX, the AI, a few other modules, and maybe for some specialized mission scripting. But, ultimately, fast code is playable code and keeping code fast is the goal with this project. I hope to have this ready for the next release of FFX and I already have it done enough that I have sped up a few FFX attributes.

  • I have written a little program to make the code separation of attributes out of the main FFX code more automatic and less error-prone. Right now, we need to move code out of ffx.py in order to expand FFX because the big file is at the size limit of what the game's python interpreter will accept. And, leaving the basic FFX code in the module while moving some of the specific attribute code outside is a perfectly reasonable approach. But doing so in a way that avoid module import circularity problems is both tedious and error-prone. I have a serious concern that doing this by hand will introduce many bugs that we won't have time to test for. So, a little program to automate the process substantially could really save some big headaches.

    I think I have the basic code down, but I have been wavering on a couple of design decisions. I just recently posted this to the FFX developer's group, who I assume would be the primary users. But, if it looks like it is helpful there, I may post it generally. Anyone developing even a simple FFX attribute will want to have it as a separate attribute module, so as not to crowd ffx.py, but it's much easier to write and debug that sort of code inside ffx.py. This way, they can write the code in ffx.py and then move it to its own module fairly painlessly.

BACK BURNER / TO-DO LIST NEVERLAND


  • I started writing a GUI for setting FFvT3R power energy use to the levels available in FF (trace, minor, etc.). This may be useful to a handful of people, though I have posted the method for changing the power levels at the game console for the hardcore folks. Basically, I hate writing GUIs, even though I know lots of nice little utilities will never be used if they lack a GUI. If I ever bother finishing this trivial project, I hope to use it as a template for other GUI utilities.

 
Anyway, I'm glad to have that off my chest. Please post comments and your own project summaries so we can all see what people have been working on.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

GogglesPizanno

Ive been sorta burned out recently, but in the last week I started revisiting a few smaller FFX plug ins I was toying with


  • Team Characters - This was an idea where you could define arrays of teams made up of characters, then create a single character named like "Justice League" that you could select when playing the game, which would then be swapped out for all the team members when the game started. if the team was made up of more than 4 characters, the player would control 4 of them and the rest would be AI controlled. Currently it mostly sorta kinda works with a few limitations (mostly AI quirks).


  • Team power Bonuses - This one actually started as something else, but a recent idea in the general forums about doing an MUA style team bonus got me revisiting it. Its actually almost completely working right now. Basically you define groups of characters that when played together give group bonuses to all of them. So you supply an array of characters, bonus values (either as fixed amounts of percentages), and the min/max number of characters (for squads of less than 4 that can still get bonuses like Batman and Robin or Hawk and Dove). And if a player selects that combination of characters, it applies all the bonuses to the characters. The bonuses are just a python dictionary so each group can have their own unique set of bonuses.


  • Comic Book Substory - This one has been stalled for a while, but it basically was a plug in that would randomly choose a comic book "event" of sorts that would get thrown into missions or rumble room sessions to simulate all those annoying complications that heroes faced. So randomly there might be a car crash where someone had to be rescued before the gas tank exploded, or a building caught fire and the hero had to save the people while still fighting the villain, or child wanders into the middle of a fight and has to be returned to their mother without getting hurt  etc... It was really just a way to randomize and liven up missions.


As for non plug Ins..


  • The Dynamic Campaign Generator - Its basically a system built off of EZScript using templates and libraries to build up a campaign based around "arcs" (world domination, revenge, build the ultimate weapon etc...). The templates could be as general (Fight) or specific (Villain steals Heroes third cousin for scientific research) as people wanted to make so that over time as people wrote their own EZScript encounters (using the template format) there could be a ginat library of events and Created arcs. It works in a sort of impressive alpha/almost beta capacity, but I got hung up on creating the encounters... I revisit it every month or so and then move on...


  • The Web Based Interior Map Maker - This started as a concept to recreate Nethack for Freedom Force. It's a web based grid editor allowing you to create interior maps "lego style" out of blocks. Once these blocks are added to the assets directory, and the dats are updated, the web interface spits the map out in the form of a level layout file that can then be imported into FFEdit. The maps have a generic square quality to them, due to the methodology of getting pieces and walls to line up, but its a quick and easy way to get interior maps created. The main sticky point on this guy right now is the lack of block variety (given my frustration with 3D, and lack of skinning talent).


So that's my list of maybe might finish someday projects...