• Welcome to Freedom Reborn Archive.
 

Generating Language Files

Started by GogglesPizanno, November 18, 2007, 11:23:22 AM

Previous topic - Next topic

GogglesPizanno

OK heres a weird one for all the hard core coders.
Is there a way to regenerate the Language Files in-game?
Basically something akin to what M25's utility does, but as a script that can be run say at the end of a mission?

stumpy

It could be probably be done. But, it's of limited use since I think the game only reads the strings.dat file on startup. So, it's not like you could recompile at the end of a mission and then have the new strings show up in the next mission. You can test it out by pausing at the end of a mission and recompiling using FFEdit and then see if the changes appear in the next mission.

GogglesPizanno

You cant regenerate the files because the dat files are locked by the game.
However I did generate a second strings.dat file (named it "strings.dat.new") and wrote a quick little python script to read in the new dat, and then write out to the old dat at mission end.

I tried again with a second little script to try writing changes directly to the DAT file rather than swapping out whole content between two different ones.

The good news is that at the next mission, it is in fact reading the values from the updated DAT file (in both instances).
The bad news is that any changes you make have to be the same number of characters (ie. renaming "minute man" works fine provided the replacement name is the same length -- 10 characters) as it looks like its caching the the structure of the original DATsomewhere.

So while its a little limiting, you CAN apparently make minimal kinds of changes to the strings.dat file and have the changes get loaded in-game.

For what its worth...   :P