Encounters and Achievements

Hey Folks! Been a bit of a slow day today. I actually had a lot of time to work, but seemingly made little progress.

The main issue I'm encountering is that my old NEO Scavenger encounter editor seems to be dying. I was about to start updating some achievement data, which requires changes to some encounters' condition rewards, but ran into issues saving my work.

For one thing, the old encounter editor binary wasn't working anymore, and I couldn't compile a new one.

The editor uses php and mysql to edit the game's database. (I use the database to manage the game's data before packaging it for release.) However, the last time I compiled the editor was before the website was updated, and uses some out of date code. I had to update a boatload of stuff just to get it to run.

And even then, it was just enough to get my old Flash binary hobbling along. It currently takes something 20 minutes to write the game's data back to the database, while in the past, this was more like 20 seconds. I have no idea why there's a sudden jump in execution time.

I briefly tried updating the editor's code to bypass Flash entirely, since Haxe is now getting pretty stable. But I couldn't get it to launch without crashing due to memory limits. It was up to 1.7GB of memory before it gave up, which is pretty ridiculous. I mean, it's a lot of data. NS is data heavy, if nothing else. But it should maybe be half that in memory.

Anyway, it feels like a lot of wasted time there. I'm actually able to edit stuff slowly this way, or "by hand" by using phpMyAdmin (which is like editing text files in a web editor). But I'm thinking this may be a more serious problem. If I need to do any real encounter editing, this is going to be painful.

Despite all that, I did manage to fix a couple of achievements, so they should now trigger at the right times. And I've sunk at least an hour today reacquainting myself with the way the encounters flow and branch. Been a while since I reviewed that nest of wires!

Anyway, probably more of this tomorrow. Maybe I'll take another crack at the editor, and see if I can bring it into the modern times. Might be a waste of a week due to this and the holiday, but then again, who ever gets anything done on Thanksgiving week?

Comments

matsy

Surprised you didn't just have this tool running locally on your machine.

ra1

Does the NS modding community have anything they use? There are some quite complex mods with encounters that appear to change everything but the kitchen sink. How did they do it?

Alternatively you could release your encounter DB under license with the game and see if modders come up with anything better.

dcfedor

@matsy, it does run locally, but I may have worded it confusingly. I have a webserver running as localhost on my dev machine which I use for both website development and (historically) NEO Scavenger development. The game's data is stored in a database, which gets exported to XML files when packaging for release as a downloadable game.

Remember, NEO Scavenger began life as a Flash-based game, and part of the strategy for avoiding Flash portal piracy (e.g. someone copying the game files and uploading it to other portals) was to make the "guts" of the game live outside the game. Copying the SWF wouldn't work since it tries to load data from my website, and my website denies such requests from off-site.

Fast forward several years and the past the death of Flash, this is sort of redundant. But I keep the DB because it's still fairly handy for rapidly searching/sorting through data during editing. This is the fastest way to edit just about any data in the game besides encounters, which is why I wrote an encounter editor.

The editor, however, has always loaded data from the DB directly instead of from XMLs (since that is where the XMLs come from).

@ra1, I'm not aware of any tools. Last I heard, Kaaven did most of his work via sophisticated text editing and window alt-tabbing, and his is one of the more encounter-heavy mods.

As it stands now, the editor mostly works. The UI and editing parts all work. And even the data loading/saving works, albeit slowly. I think I just need to modernize the way it loads/saves data to be faster.

Re: releasing the DB under license, technically anyone with the XML files already has the DB, as they are literally XML backups of the mySQL DB. Assuming they have the know-how to setup a mySQL server, they can import the XMLs to restore the DB on their machines.

matsy

Thank you for the reply! I was in on neo scavenger a bit after the flash scene but it makes perfect sense for you to do it that way. In my head I thought you had it on say this web server rather than a local host.