Closed SupremeJUMBO closed 8 months ago
To do this with alice-tools, you can dump the ain file to JSON format, edit the structure and file names in the JSON file, and then rebuild the ain file with the modified JSON. For example,
alice ain dump -j -o out.json Rance7.ain
<edit out.json in your text editor>
alice ain edit -j out.json -o out.ain Rance7.ain
Then you should be able to use out.ain in place of Rance7.ain (in theory--I have not actually tried this but I don't see any reason why it wouldn't work*).
HOWEVER, there is currently a bug present in the latest windows releases which causes the ain edit
command to fail with an error. You can use an older version (0.7.0 should work) or build from the current git master branch to avoid this error.
[*] One caveat to this is function names. There is a mechanism in System 4 to call functions by name using a string at runtime. If you change the name of a function in JSON, and it gets called using this mechanism, the game will probably crash at that point.
I see, so file names and array names can be changed after all. That's great! Thank you for the help!
Hello! I've been studying C++ and System4 for a few weeks now, still getting used to it. I want to mod some System4 games, but I noticed that I can't seem to edit file names, class names, or array names. In System3x, I could change pretty much everything, allowing me to rename ADV files, arrays, and all variables. This made working with the games (Kichikuou Rance, for example) significantly easier and faster for me, since everything is easier to identify for someone who can't read japanese. However, I get errors when attempting to do this in System4 games. When I rename a jaf file, along with all references to it, and the main.inc file, I get compile errors. As for classes and arrays, I've tried translating their names several times, but even with all references changed, I get errors (variable assignment errors or unable to resolve function errors). I've tried doing this with aindecompiler and with alice tools, but no luck with either one. Are some parts of the code just not changeable? Or maybe I'm missing some important step? I appreciate any insight you can give on this.