Originally posted by Thunder
Let me see if I'm with you on this - each modification mean't to be appended to a table file could be required to start with the line:
"Append_to: ships.tbl"
Or whatever, where the .tbl file specified is what that file is added to. Thus the original files can remain un-changed but when a mod is started the text files for tables are loaded with the game (at a small overhead on loading time depending on how many there are). Starting the game without a mod specified would not load any modifications in txt files...
Is that right? I like that idea...
I'm actually thinking of a seperate program to append / delete ship entries, rather than altering the Fs2 code...
i.e. "java tblShuffler ships.tbl hercMk3.txt a"*
(a denotes append)
would add the contents of hercMk3 to the ships.tbl in the specified species slot.
an 'r', or similar, would remove it (probably by searching for a set of tokens matching the start & entry of the entry).
You could probably add a C version of this to FS2's parser code...I'm not sure how that works, (as I said, my C is very limited and my c++ worse) - I'm thinking of a standalone program at present
*(simple command line thing... stuff like a proper GUI and more robust error checking would be for later)
The idea of this is that it's independent of the code changes, providing tbl's are being used....
I've been toying with the idea of coding a few things in Java (I mainly study Java at Uni, so I'm reasonably able to do this sort of stuff), like tbl entry generators for ships, etc. the problem is that I've never compiled a java program intended to work as a standalone (need to check that). also I'm very busy, and still recovering from the utter nightmare of me airline-graph-coding-project-thing for uni last semester.
BTw, I'd imagine the parser methods are only called once upon startup / creation of a new player.... for simple reasons of avoiding unnecssarry recalculation.... I'v enot looked yet.