"Eliminate Empire" morale issues & unremoved stations fix

Eliminate Empire morale issues + unremoved stations fix; 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

"Eliminate Empire" morale issues & unremoved stations fix

Post by Spocks-cuddly-tribble »

Let's look into a subject of great interest for those BotF players whose anger-management courses weren't working: eliminating empires.


A fix mainly dedicated to the not-so-dovish players:

"Eliminate Empire" via Bombing - Morale Omission Fix (wipe out an empire's last system instead of conquering it)

Code: Select all

>> 0x00066cf1 34 03
<< 0x00066cf1 7b 07

and trek.exe at 0x67493-0x674D8 replace 0x46 bytes with:

8B 48 4C 0F BF 00 8B D8 8A 15 50 2B 5A 00 E8 DA 86 FD FF 32 15 50 2B 5A 00 C0 E2 03 84 D2 0F 84 12 FD FF FF 8A 84 24 14 04 00 00 33 D2 E8 CB 1E FD FF E9 FF FC FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

New code:

004678EF     0F84 7B070000     JE 468070  // if a task force with TTs kills a system 

00468093     8B48 4C           MOV ECX, [EAX+4C]
00468096     0FBF00            MOVSX EAX, WORD [EAX]
00468099     8BD8              MOV EBX, EAX
0046809B     8A15 502B5A00     MOV DL, [5A2B50]
004680A1     E8 DA86FDFF       CALL 440780
004680A6     3215 502B5A00     XOR DL, [5A2B50]
004680AC     C0E2 03           SHL DL, 3
004680AF     84D2              TEST DL, DL
004680B1    ^0F84 12FDFFFF     JE 467DC9
004680B7     8A8424 14040000   MOV AL, [ESP+414]
004680BE     33D2              XOR EDX, EDX
004680C0     E8 CB1EFDFF       CALL 439F90
004680C5    ^E9 FFFCFFFF       JMP 467DC9
004680CA     00 (...)

The "Eliminate Empire" morale bonus (default 50) +10 = 60 is also used as morale penalty for the last taken system of a just eliminated empire (native only):

Code: Select all

00467F20            xor     edx, edx     // morale table line 0 -> kill empire

Static bypass option in order to skip the morale table link:

00467F2E     B2 3C         MOV DL, 3C    // start morale penalty (60)
00467F30     90            NOP

-> i.e. at 0x6732E enter B2 XX 90 with XX being the penalty

Sub_43B1D0 cleans up files when an empire gets effaced. Aside of other things (like the obligatory bugs, see below), it lessens the morale on all remaining native systems:

Code: Select all

-> inhabitant morale -30 if source empire dies:
0043B2CE             mov     esi, 1Eh  //   i.e. at 0x3A6CF
Thus, unmodded, morale +20 (+50 -30) for the killing empire.



Due to a bias wrt [5A36C0=number of stations] BotF sometimes fails to remove all remaining space stations of beaten empires, resulting in a crash when a ship/monster crosses the station's sector. To prevent the curse of the defeated:


Unremoved Stations of Dead Empires - Fix

Code: Select all

trek.exe at 0x3A380
replace: (0x29 bytes)
31 C0 66 A1 C0 36 5A 00 39 C7 7D 62 8B 0D D0 36 5A 00 31 C0 01 E9 31 D2 8A 04 24 66 8B 51 28 39 C2 74 06 83 C5 5C 47 EB D7
with:
0F B7 1D C0 36 5A 00 90 3B FB 7D 62 8B 0D D0 36 5A 00 31 C0 01 E9 31 D2 8A 04 24 66 8B 51 28 39 C2 74 06 83 C5 5C 47 EB DF

code changes:

0043AF80     0FB71D C0365A00  MOVZX EBX,WORD [5A36C0]
0043AF87     90               NOP
0043AF88     3BFB             CMP EDI, EBX

0043AFA7    ^EB DF            JMP SHORT 43AF88
Last edited by Spocks-cuddly-tribble on Sat Oct 07, 2023 2:18 pm, edited 2 times in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
ruthlessferengi
Multiple Tournament Champion
Multiple Tournament Champion
Posts: 880
Joined: Sat Apr 26, 2008 2:00 am
Location: GMT- 5

Re: "Eliminate Empire" morale issues & unremoved stations fi

Post by ruthlessferengi »

ok, so in plainspeak, what happens with morale with this fix now? i am not quite following, sorry:) also, once empire is eliminated, is there a way for the victor to assume ownership of the hard assets i.e. outposts, starbases, etc? thanks!
rf
Spocks-cuddly-tribble wrote:1.) "Eliminate Empire" via Bombing - Morale Omission Fix
=> You get the morale bonus, even when you wipe out an empire's last system instead of conquering it.

2.) Transfering outposts could be easy (IIRC), ships more work. But the problem is (like for the morale bonus): After one player killed almost the whole empire, the other bugger just kills the last 15 pop system and gets all resources. That can't be, so we'd need f.e. checks for most conquered systems(work...). I considered transfering residual resources to an ally (if one is present), but there're too many other things to do...
Relevance is a post hoc phenomenon

На безптичье и жопа воробей...
Ancient Klingon Battlecry
User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: "Eliminate Empire" morale issues & unremoved stations fix

Post by EnPhreg »

SCT wrote:
The "Eliminate Empire" morale bonus (default 50) is also used as start morale penalty for conquered home systems:
the penalty effects only a last held home system that's conquered and also any other system that's a last held and than conquered -> means empire elimination.
Post Reply

Return to “Eliminate Empire morale issues + unremoved stations fix”