Peter1981 wrote:I'd like to include a race id test for 02 ferengi (TOS MOD Tholians) so that affiliation treaties with this race would have locked boarders. ie 02 territory is locked but 02 ships can enter affiliate's territory
Most of your assumptions are correct. Sub_45EF70 is for treaty label 3 i.e. not for Alliance. There is no info on the "treaty" savegame file, but looking at the code 1=Friendship and 2=Affiliation should be right.
See ->BotF Wiki -> savegame files -> empsInfo
Offset 0x0110 to 0x0123 (5empires * 4bytes) = treaty label: 0=Neutral, 1=War, 2=Alliance, 3=Peace
Offset 0x0124 to 0x0137 (5empires * 4bytes) = territory accessible: 0=No, 1=Yes
Offset 0x0138 to 0x014B (5empires * 4bytes) = trade allowed: 0=No, 1=Yes
For the Tholian special feature you could try this: (Note: Disables the ferengi free trade to majors for non-aggression!)
Code: Select all
0045F14B 75 73 JNZ SHORT 0045F1C0
0045F14D 90 NOP
0045F14E 90 NOP
0045F14F 90 NOP
0045F150 90 NOP
0045F15E C78483 24010000 01000000 MOV DWORD PTR DS:[EBX+EAX*4+124],1
0045F16F C78481 24010000 00000000 MOV DWORD PTR DS:[ECX+EAX*4+124],0
0045F181 ^E9 DFFEFFFF JMP 0045F065
0045F18E ^75 F1 JNZ SHORT 0045F181
0045F195 C78483 24010000 00000000 MOV DWORD PTR DS:[EBX+EAX*4+124],0
0045F1A6 C78481 24010000 01000000 MOV DWORD PTR DS:[ECX+EAX*4+124],1
0045F1BB ^E9 A5FEFFFF JMP 0045F065
Race ID:
0045F151 cmp word ptr [esi+34h], 2
0045F18A cmp di, 2
EDIT: Corrected mistake [empsInfo+110h -> +124h]
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.