Unlocking Empire Borders for all Treaties

Unlocking Empire Borders for all Treaties; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Unlocking Empire Borders for all Treaties

Post by Spocks-cuddly-tribble »

Tethys wrote:could you find a way to keep empire borders unlocked after signing a non aggression treaty?
That's easy via empsInfo or sector.lst. Code locations are known from ferengi trade route code & territorial claims -projects.

This should work for non aggression & friendship:

Code: Select all

45F031                 jnz     45F103 // remove this
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Standard Trek.exe IDA Database

Post by Tethys »

Thank you SCT this seems to allow entry regardless of treaty status. Interestingly enough the AI does not send any messages regarding my intrusion, but the sympathy toward me does go down 1 bar per 2 turns my ship is in their territory. :D
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Standard Trek.exe IDA Database

Post by thunderchero »

Spocks-cuddly-tribble wrote:

Code: Select all

45F031                 jnz     45F103 // remove this
he is suggesting this

at 0x5e431

0F 85 CC 00 00 00

to

90 90 90 90 90 90

thunderchero
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Unlocking Empire Borders Options

Post by Peter1981 »

Code: Select all

In trek.exe:
0045F02D                 cmp     dword ptr [esi+64h], 2   // compare treaty type
0045F031                 jnz     loc_45F103                     // jump if not affiliation

:roll: Sorry to ask what I'm sure is a very noobish (pakled) asm question but here goes:

:arrow: AFAICT this is the test for treaty type that has locked boarders, in this case both non-aggression and friendship have locked boarders.

Am I correct in assuming that:
  • 00 = Non-Aggresion
    01 = Friendship
    02 = Affiliation
EDIT:
  • 03 = Alliance (?)
So as i understand it changing 02 to 00 would lock the boarders for friendship and affiliation trieties.
changing the jnz (0F 85) to a jz (0F 84) and would make the locked boarders only for affiliation trieaties I think.

Further: 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 -- this would certainly be more in character for the tholians in the TOS MOD. Sadly there seems to be very little space to put the code in; so i'm guessing mor of a re-write job and that where i fall down as i'm not competent to make that kind of change.
Last edited by Peter1981 on Tue Mar 20, 2012 5:47 pm, edited 2 times in total.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Unlocking Empire Borders for all Treaties

Post by Tethys »

I would also like to report that if you are bombing a system you are at war with and sign a non agression, your ships co0ntinue to bomb the system and also it DOES kill population. Goes without saying that the ships do not return to friendly space once treeaty is signed.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: Unlocking Empire Borders for all Treaties

Post by Peter1981 »

interesting -> has anyone ever managed to test being at war and then getting an affiliation treaty in vanilla; is this even posible?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Unlocking Empire Borders Options

Post by Spocks-cuddly-tribble »

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.
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: Unlocking Empire Borders for all Treaties

Post by Peter1981 »

thanks SCT This is going in the TOS MOD :D

P.S. saw the post in the AI topic literally my jaw droped to the floor so many thing to test :)
User avatar
Dewbacca
Lieutenant-Commander
Lieutenant-Commander
Posts: 212
Joined: Sat Nov 14, 2009 3:00 am

Re: Unlocking Empire Borders for all Treaties

Post by Dewbacca »

I am looking at this and wondering... is there a BOTF patcher script for this?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Unlocking Empire Borders for all Treaties

Post by thunderchero »

Dewbacca wrote:I am looking at this and wondering... is there a BOTF patcher script for this?
it is a simple one that I already had for UDM

just copy code below to a notepad and save as "Unlocking_Borders .patch" then add file to patch folder of BOTF patcher

Code: Select all

NAME: Unlocking Empire Borders for all Treaties
AUTHOR: Spocks-cuddly-tribble
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?f=123&t=2200
TAG: fix
 
>> 0x0005e431  0F 85 CC 00 00 00
<< 0x0005e431  90 90 90 90 90 90
User avatar
Dewbacca
Lieutenant-Commander
Lieutenant-Commander
Posts: 212
Joined: Sat Nov 14, 2009 3:00 am

Re: Unlocking Empire Borders for all Treaties

Post by Dewbacca »

Thank you sir.
User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: Unlocking Empire Borders for all Treaties

Post by EnPhreg »

is it also possible to prevent that signing a non-aggression pact shows the whole empire territory?
searched forum, found nothing, only this unlocking borders thread.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Unlocking Empire Borders for all Treaties

Post by thunderchero »

I don't know of any posted code change like that.

but this change might cause problems since it displays those systems so trade routes can be established.
User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: Unlocking Empire Borders for all Treaties

Post by EnPhreg »

simple non-aggression pacts didn't show the star names, only the whole territory. so maybe this won't be a potential conflict.
only ferengi getting the system names with the simple non-aggression pact, but this code has already discovered.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Unlocking Empire Borders for all Treaties

Post by thunderchero »

Hi Everyone,

I wanted to test a little, I am looking to always keep normal ship range.
non-aggression (un-changed, sometimes range is limited)
peace (no increase in range, range is still calculated by your systems/bases)
alliance (no increase in range, range is still calculated by your systems/bases)
war (un-changed, range is still calculated by your systems/bases)

what I am think is when AI signs peace or alliance and ship range increase turn processing quadruples.

any idea on code changes?
Post Reply

Return to “Unlocking Empire Borders for all Treaties”