Thread:ヌヌハラ/@comment-46261745-20200811184042/@comment-44256294-20200812005941

You're right, AinDecompiler doesn't seem to allow editing the "2" function. It should be possible to do the same thing with my tools. Here's how you'd do it.

First, dump the code using the aindump tool:

aindump -c -o out.jam Rance7.ain

Then open the file "out.jam" in a text editor and search for "void tagBattleStatus@2". You should find the following code:

; void tagBattleStatus@2(void) FUNC 0x1ada PUSHSTRUCTPAGE PUSH 0 PUSH 5 PUSH 1 A_ALLOC RETURN ENDFUNC tagBattleStatus@2

Change the "5" to a "6" and then save the file. Next, rebuild the .ain file using the ainedit tool:

ainedit -c out.jam -o out.ain Rance7.ain

Then if you open the file "out.ain" in AinDecompiler, the tagBattleStatus@2 function should look this this:

void tagBattleStatus::2 {       this.m_aspSp.Alloc(6); }

Then of course you need to replace the original Rance7.ain with the modified out.ain. Let me know if you need any further assistance with this.