I am sorry to say with the saved game storing the file name in "gameinfo" file as 12 byte limit, It is making this project not worth the effort.
Plus I did a quick test moving saves to folder without changing limit using shorter folder/file name and was unable to load file from load screen even though they displayed file names and descriptions.
Here is my patch for turn by turn saving to folder with format of "race name"_"turn#".sav
Warning!!
Relocation patch is required before installing if not all ready installed.
"Saves" folder must be present or file will write as archive.tmp to install path
Notes;
these saves must be renamed and moved to install path to be loaded into game.
these files are small but will add up (200 files = 35mb)
if file present with same name and turn in saves folder it is deleted before new file is moved
checks turn 1 and 2 (turn 1 vanilla last.sav bug)
if turn 1 jump to 0043865A (create auto.sav, on turn 1 last.sav would be from different game)
if turn 2 jump to 0068C48A (auto.sav -> last.sav, create auto.sav)
else (last.sav -> new.sav, auto.sav -> last.sav, create auto.sav)
so current turn (auto) and turn before (last) would be in install path as before
saves folder.patch
Code: Select all
NAME: Add "Saves" folder and saves each turn by race and turn #
AUTHOR: thunderchero
DESC: This patch uses the last.sav and renames and moves to new folder "Saves"
DESC: with the race and turn number as file name.
DESC: Warning!! "Saves" folder must be present or file will write as archive.tmp to install path
DESC: patch file name: saves folder.patch
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?p=60473#p60473
TAG:
# >> = vanilla/original value
# << = new value
>> 0x00037a41 b8 00 83 57
>> 0x0003c30e 89 e0
>> 0x0003c334 00 00 00 00 00 00 00 00 00 00 00 00
>> 0x0019f7a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 0x001a1850 00 00 00 00
>> 0x001a1855 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 0x001a186b 00
>> 0x001a186d 00 00 00 00 00 00 00 00
>> 0x001a1876 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 0x001a1891 00 00
>> 0x001a1894 00 00 00 00 00 00 00 00 00
>> 0x001a189f 00 00 00
>> 0x001a18a3 00 00
>> 0x001a18a6 00 00 00 00 00
<< 0x00037a41 e9 0a 3e 25
<< 0x0003c30e eb 24
<< 0x0003c334 8b c4 89 10 89 50 04 89 50 08 eb d0
<< 0x0019f7a0 53 61 76 65 73 2f 25 73 5f 25 64 2e 73 61 76
<< 0x001a1850 a1 18 29 5a
<< 0x001a1855 83 f8 01 0f 84 fc c1 da ff 83 f8 02 74 3e 48 50 36 a0 2a 2b 5a
<< 0x001a186b e8
<< 0x001a186d e9 da ff 50 68 a0 a3 68
<< 0x001a1876 8d 44 24 0c 50 e8 19 79 e8 ff 83 c4 10 8b f4 56 8b c6 8b d6 e8 dc 13 e9 ff b8
<< 0x001a1891 83 57
<< 0x001a1894 90 e8 ec 13 e9 ff ba 02 01
<< 0x001a189f 8b e6 b8
<< 0x001a18a3 83 57
<< 0x001a18a6 e9 9b c1 da ff
here is assembly notes
00438641 E9 0A 3E 25 00 jmp loc_68C450 //jump point to new code
0068C450 loc_68C450: ; CODE XREF: sub_438630+11j
0068C450 A1 18 29 5A 00 mov eax, ds:dword_5A2918 //get current turn
0068C455 83 F8 01 cmp eax, 1 //if turn 1 jmp 43865A
0068C458 0F 84 FC C1 DA FF jz loc_43865A
0068C45E 83 F8 02 cmp eax, 2 //if turn 2 jmp 68C4A1
0068C461 74 3E jz short loc_68C4A1
0068C463 48 dec eax //decrease turn by 1 to match in-game display
0068C464 50 push eax
0068C465 36 A0 2A 2B 5A 00 mov al, ss:byte_5A2B2A // get player race id
0068C46B E8 00 E9 DA FF call sub_43AD70 // call jump_lex_monster_majors
0068C470 50 push eax
0068C471 68 A0 A3 68 00 push offset aSavesS_D_sav ; "Saves/%s_%d.sav"
0068C476 8D 44 24 0C lea eax, [esp+9Ch+var_90]
0068C47A 50 push eax
0068C47B E8 19 79 E8 FF call sprintf_ //call sprintf__compose_string
0068C480 83 C4 10 add esp, 10h //align esp to string start
0068C483 8B F4 mov esi, esp //move string to ESI
0068C485 56 push esi
0068C486 8B C6 mov eax, esi //move (esi) string to EAX
0068C488 8B D6 mov edx, esi //move (esi) string to EDX
0068C48A E8 DC 13 E9 FF call sub_51D86B //call delete_file_eax__last_sav
0068C48F B8 00 83 57 00 mov eax, offset aLast_sav ; "last.sav"
0068C494 90 nop
0068C495 E8 EC 13 E9 FF call sub_51D886 //call move_file_eax__last_sav
0068C49A BA 02 01 00 00 mov edx, 102h //reset edx
0068C49F 8B E6 mov esp, esi //reset esp
0068C4A1
0068C4A1 loc_68C4A1: ; CODE XREF: sub_438630+253E31j
0068C4A1 B8 00 83 57 00 mov eax, offset aLast_sav ; "last.sav" //over written jump code
0068C4A6 E9 9B C1 DA FF jmp loc_438646 //return to start point 438646
0068A3A0 53 61 76 65 73 2F 25 73 5F 25 64 2E 73 61 76 00 aSavesS_D_sav db 'Saves/%s_%d.sav',0 //new string offset
//first 0xC bytes in gameInfo set to 0 when saving
0043CF0E EB 24 JMP SHORT 43CF34
0043CF34 8BC4 MOV EAX,ESP
0043CF36 8910 MOV [EAX],EDX
0043CF38 8950 04 MOV [EAX+4],EDX
0043CF3B 8950 08 MOV [EAX+8],EDX
0043CF3E ^EB D0 JMP SHORT 43CF10
You do not have the required permissions to view the files attached to this post.