Closed Eneocho closed 1 year ago
being that the new formats are JSON, refactoring shouldn't be too hard, but what do I know, I haven't written much code in a while.
While not impossible to update, there is functionality that is heavily dependent on particular quirks of how the old save format (and the old flash engine itself) worked that would have to be heavily refactored, particularly around inventory management. It is not a simple update.
Understandable. Please keep us all updated if you do go forward with a rework.
An idea could be a tool that turns the JSON save files back into the flash save files, edit the flash style files then turn them back into JSON (using the external savefile converter baked into the game). No idea if it would save time however.
I feel like the biggest hurdle to coding a save editor for the latest versions of the game would be figuring out what the flags do. Changing this current editor to be able to handle the JSON as well could be a hassle, but creating a new one is entirely possible.
figuring out what the flags do
What flags are you referring to, here?
An idea could be a tool that turns the JSON save files back into the flash save files, edit the flash style files then turn them back into JSON (using the external savefile converter baked into the game). No idea if it would save time however.
One of the things that won't quite work with a simple port is that the flash engine handled inventory slots that were empty with "empty/blank" placeholders, but the javascript one does not do so. (Though the flash engine didn't do so with the ship inventories. That's why the ship editing was not finished.) The javascript verison also serializes all properties of the items rather than just the important bits, which would make inventory editing a nonstarter unless I built a complete inventory database with all the proper values. In some testing I've done there might be some things I can do there, but nothing certain unless I could see how the game engine actually handles certain situations.
Why not try working with the development team to make an official Editor? It'd probably make it a lot easier to find out what things do, and to keep it up-to-date.
figuring out what the flags do
What flags are you referring to, here?
I took a look into the JSON save file using a text editor and noticed that there's a lot of flags for character details and the like in a Flags array. I noticed the base save file I used (just a freshly started save) had flags 2 14 and some others. As far as I saw there was no way to see what those flags referred to.
Dunno if there's a way to find those flags and I'm just blind, or if it's just a case of trial and error to see what each one does.
Dunno if there's a way to find those flags and I'm just blind, or if it's just a case of trial and error to see what each one does.
I imagine it'd be a mix of T&E and direct correlation. I'm not a coder by any means, so feel free to correct my assumption here, but: Flags from F.TiTS do carry over to J.TiTS (F = Flash, J = Java), so to me it seems like old flags from F.TiTS should be easier to locate and figure out than new flags, that are exclusive to J.TiTS (Like Dizzy). So to me it looks like it'd be easier to find out what flags do what if you correlate certain values from F.TiTS flags to flags from J.TiTS.
Okay first, Java != JavaScript. Similar name but that's where the similarities end.
Second this program is a terrible place to start a editor for the JS version of TiTs. Very few things will line up since the editing is so closely linked to the save file in it. I did consider adding a proper model system to it, but I deemed it unnecessarily complicated for the desired ends at the time.
If I was to make an editor for the new version of TiTs, I would likely either use Java or HTML/JS for it (again Java is not JavaScript). The reason this exists was because it was based on the original CoCEd.
Yeye, I was going to look into perhaps coding up a JS version editor myself, but the whole flags thing is annoying, hence my mention of it. I can code in PHP, HTML, CSS, JS, the only issues I'd encounter is trying to parse the JSON (mainly in terms of figuring out what parts of the file need to be changed and what each part actually means. Editing JSON is rather simple otherwise, objects ftw) and hosting the thing, though there are options for the latter.
If what Hiro said is true and that the flags do carry over, then I'd have to look at the code in this repo for what flags there are and double-check to see if they do in fact carry over (issue with that being I don't know this language and thus can't find where the parsing code is, let alone try to read it)
....Oh and I'd have to look into code for uploading and downloading the files, because I've never actually fully worked with that stuff before, at least not in this sense.
Edit: Before anyone mentions downloads for it as a program-type thing instead of hosting it; quite a few functions in JS don’t play nice when being hosted from the file system, due to browser restrictions, and turning the whole thing into an application is a hassle
There is already atleast one being worked on https://github.com/start-5/TiTS.JS-Save-Editor
There is already atleast one being worked on https://github.com/start-5/TiTS.JS-Save-Editor
It appears that that project is dead. It has gone months without any updates or activity from the owner.
I forked that project and made a change that fixes the load error: https://github.com/algoRhythm99/TiTS.JS-Save-Editor
I haven't tested it really though FYI :)
Chase also has his state editor (not really a save editor): https://forum.fenoxo.com/threads/titsedjs-a-game-state-editor-for-javascript-version.32419/
I'll be closing this as Won't Fix
The javascript version just got a downloadable release. Is there a chance for an update to the editor?