Liberating "enemy" systems

You can talk about anything. (please read forum rules before posting)

Moderator: thunderchero

User avatar
Robbs
Cadet 3rd Year
Cadet 3rd Year
Posts: 10
Joined: Mon May 21, 2012 5:14 am

Liberating "enemy" systems

Post by Robbs »

I tend to play quite a bit of ECM (5.0), and I recently noticed that when attacking enemy systems, I would end up "liberating" them. That's to say I got the liberation moral bonus, but the system was retained by the enemy empire. (Meaning I had to attack the system again.) I even had a case where I attacked a non-subjugated enemy minor, liberated it, but it still showed up in the diplomacy screen as a member of the enemy empire, and reverted to enemy control a few turns later.

I haven't played vanilla in a bit, but I seem to recall that if the enemy system's moral was low enough, I could wind up "liberating" it, and it would become a non-aligned system (as if it had revolted on its own.) Is it possible that disabling system specific random events for the AI could be having some impact here?

Just curious because the issue didn't seem to pop up in Vanilla or earlier ECM versions. (Or perhaps it has, and just never really happened to me :)
User avatar
slickrcbd
Lieutenant-Commander
Lieutenant-Commander
Posts: 199
Joined: Tue Sep 08, 2015 9:22 pm
Location: in front of a computer

Re: Liberating "enemy" systems

Post by slickrcbd »

I was playing Vanilla recently, and I had something similar. I was playing the Feds and was at war with the Klingons and the Romulans. I found a Klingon planet with Romulans on it, and when I attacked it I got the option to liberate it.
When I did, the planet promptly got assigned to the Romulan Star Empire, and I had to attack it again to add it's dilithium population to my own.
Of course, the next turn the Ferengi promptly declared war on me even though we had a peace treaty plus their happiness bar was at 80% and ambushed my newly built troop ship reinforcements that were being produced on a planet on the other side of the galaxy and had to be sent to the front.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Liberating "enemy" systems

Post by Spocks-cuddly-tribble »

Robbs wrote: Wed Feb 23, 2022 1:31 amI tend to play quite a bit of ECM (5.0), and I recently noticed that when attacking enemy systems, I would end up "liberating" them. That's to say I got the liberation moral bonus, but the system was retained by the enemy empire. (Meaning I had to attack the system again.)
It would be a bug if this happens despite of having selected the standard conquer option (an ECM 5 quick test didn't indicate this problem).

As slickrcbd says, liberating conquered "enemy" systems is a vanilla default feature.


ECM has just two small deviations in this matter (not changed in ECM 5):

- option enabled even for enemy home systems viewtopic.php?p=17433#p17433
- morale table bug fixed viewtopic.php?p=17170#p17170

Robbs wrote: Wed Feb 23, 2022 1:31 amI even had a case where I attacked a non-subjugated enemy minor, liberated it, but it still showed up in the diplomacy screen as a member of the enemy empire, and reverted to enemy control a few turns later.
This sounds really strange. For non-subjugated systems there should be no liberate option (and again a quick test didn't show this bug).

On the other hand, after liberations of minor races, diplomacy status data bugs and rejoining another empire a few turns after a liberation is common for minor races in BotF.

Robbs wrote: Wed Feb 23, 2022 1:31 amI haven't played vanilla in a bit, but I seem to recall that if the enemy system's moral was low enough, I could wind up "liberating" it, and it would become a non-aligned system (as if it had revolted on its own.) Is it possible that disabling system specific random events for the AI could be having some impact here?
You can still lose low morale systems via rebellions (resulting in this behavior), but the named patch makes rebellions in AI controlled systems far less frequent.

Conquered systems of a destroyed empire still can rebel in ECM (i.e. become non-aligned like own rebel systems), in vanilla this isn't possible (rebellions disabled once source empire gone).


I think I'll add below patch for the next update the disable any rebellions for AI owned systems.

here is how to turn off the penalty events (e.g. terrorism) for low morale (rebellious/defiant) AI systems (not to be confused with the system-specific Random Events):

Code: Select all

trek.exe at 0x3EFDE
replace: (31 bytes)
8B 5C 24 2C 8B 96 F4 02 00 00 8D 86 98 02 00 00 83 C2 32 89 44 24 28 89 96 F4 02 00 00 39 D9
with:
83 7E 04 01 74 1B 8D 86 98 02 00 00 89 44 24 28 83 86 F4 02 00 00 32 90 90 90 90 90 90 3B CA
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Robbs
Cadet 3rd Year
Cadet 3rd Year
Posts: 10
Joined: Mon May 21, 2012 5:14 am

Re: Liberating "enemy" systems

Post by Robbs »

Spocks-cuddly-tribble wrote: Thu Feb 24, 2022 1:35 pm
It would be a bug if this happens despite of having selected the standard conquer option (an ECM 5 quick test didn't indicate this problem).

As slickrcbd says, liberating conquered "enemy" systems is a vanilla default feature.
Just to be clear, there was no liberate option to select. I was attacking an enemy native system/member in order to conquer them, no liberate option popped up. (Thus my surprise when I wound up liberating them!)

This is separate from when I liberate a 3rd party's native system (As Fed I liberate a Klingon system that was under Romulan occupation.) In that case the player is given an option to liberate, and the system goes back to the original owner. (I enjoy playing the Federation, and supporting a nearly conquered empire get it's colonies back is a great way to get your moral sky high.)

My memory of earlier versions/vanilla was that the unexpected liberation while conquering thing resulted in the system becoming a non-empire controlled system (in the same way as if it had rebelled.) It is only recently where the original owner retained control. In any event, it's not a super common occurrence. I'll have to retain a save game file next time it happens. (Unless there is a better way for me to provide you all with debugging data)

(And for the record, I do like keeping he option open for AI systems to rebel if you are successfully hammering their moral.)
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Liberating "enemy" systems

Post by Spocks-cuddly-tribble »

Robbs wrote: Sat Mar 12, 2022 9:12 amI'll have to retain a save game file next time it happens. (Unless there is a better way for me to provide you all with debugging data)
A save game one turn before the glitch would be best (i.e. just ending turn triggers the issue).

The first post mentions the 'liberation moral bonus', is this certain (i.e. not 'conquer')?

I'm asking because subjugation and rebellion of a just taken system at the same turn would be a possible explanation (AI morale hammering with said AI random events disabled increases the likelihood).

You can test the theory using your saved game while disabling any rebellions:

Code: Select all

disable system specific random events (including two rebellion events)

44BF30 53 push ebx -> C3 (retn) // 0x4B330 change 53 to -> C3


disable rebellions in low morale penalty code

0043FD6E   jl  short 43FD9F // 0x3F16E (7C) -> EB
Robbs wrote: Sat Mar 12, 2022 9:12 am(And for the record, I do like keeping he option open for AI systems to rebel if you are successfully hammering their moral.)
Rebellions in BotF are confusing since the main code is mistakenly part of the random events (even for AI in vanilla). Furthermore the random events on/off button in the options menu has a strange bug (see random events).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Robbs
Cadet 3rd Year
Cadet 3rd Year
Posts: 10
Joined: Mon May 21, 2012 5:14 am

Re: Liberating "enemy" systems

Post by Robbs »

Spocks-cuddly-tribble wrote: Sun Mar 13, 2022 11:20 am
A save game one turn before the glitch would be best (i.e. just ending turn triggers the issue).

The first post mentions the 'liberation moral bonus', is this certain (i.e. not 'conquer')?

I'm asking because subjugation and rebellion of a just taken system at the same turn would be a possible explanation (AI morale hammering with said AI random events disabled increases the likelihood).

Rebellions in BotF are confusing since the main code is mistakenly part of the random events (even for AI in vanilla). Furthermore the random events on/off button in the options menu has a strange bug (see random events).
I'm going to have to get in the habit of saving each time before I attack a system! I am certain it's a liberation glitch. When it happens, the event log is clear the system was liberated (population celebrating message etc. with moral bonus) I even get the diplomatic thank you message from the enemy empire.

I just played around in the UE a bit to try to recreate conditions (an enemy system with low moral), and when I ran the test turn over and over, things conquered normally. (Of course) I will say that in game play the glitch seems to happen after 100 turns or so, so I don't know if there is some cumulative error issue happening.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Liberating "enemy" systems

Post by Spocks-cuddly-tribble »

Robbs wrote: Sat Apr 02, 2022 5:44 amI am certain it's a liberation glitch. When it happens, the event log is clear the system was liberated (population celebrating message etc. with moral bonus) I even get the diplomatic thank you message from the enemy empire.
Interesting, I've never seen this happening or heard of this bug before (in any mod or with any patch).

And I can't see any ECM5 change interfering with the system attack feature ('AI power up all/more OBs' can't cause this).


But it might be a save game corruption in GTForceList. Some time back I talked to Flocke about a strange double usage in this file:

[GTForceList+30h] = 'MissionData' (e.g. for TT system attack = 1-conquer ; 2-liberate) AND/OR 'Move Dest' (if not -1) via sector.lst
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Robbs
Cadet 3rd Year
Cadet 3rd Year
Posts: 10
Joined: Mon May 21, 2012 5:14 am

Re: Liberating "enemy" systems

Post by Robbs »

HA HA Finally I had it happen and managed to save the game. ECM from the last official installer (2023). I am playing as FED, ant war with the Romulans (who are doing very well so far.) I attack Romulus and it is "liberated." I get a liberated moral bonus and the system stays in Romulan hands. Game 0.sav is the turn before, Game 1 is the turn after, with the liberated message.

I re-ran game 0 a few times and it kept having the same result.
Attachments
game1.sav
(160.02 KiB) Downloaded 37 times
game0.sav
(160.02 KiB) Downloaded 34 times
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Liberating "enemy" systems

Post by Spocks-cuddly-tribble »

Thank you, funny thing is I got the same glitch in my last test game.

I think it's a corruption in [GTForceList+30h] -> MissionData (e.g. for TT system attack) & Move Dest (if not -1) via sector.lst

The data can get corrupted after the attack order via re-deploying or redirecting (i.e. just clicking) task forces or other save game scumming.

Any value other than 1 will trigger liberation. Liberation code key is 2.

To reduce the bug frequency due to data corruption we can change the code switch to check for 2 instead of 1: :idea:

Code: Select all

NAME: Reduce false liberations - Hotfix

>> 0x66D5E 01 0F 84
<< 0x66D5E 02 0F 85

#0046795C     83FD 02        CMP EBP,2
#0046795F     0F85 4F030000  JNZ 467CB4


My patch 'Bonus to Success Chance of Invasion when Freeing Systems' uses the same code switch: viewtopic.php?p=56533#p56533

Code: Select all

00467370     837A 48 01         CMP DWORD [EDX+48],1 [esp+3E0h]  MissionData 1 conquer or 2 liberate
00467374     74 09              JE SHORT 46737F

Here is above test patch for your game:

false_liberations_fix.patch
(166 Bytes) Downloaded 68 times
EDIT: Tested and works for the save game. :wink:

Plus here is 'Bonus to Success Chance of Invasion when Freeing Systems' updated with the same workaround (plus main post updated).

Code: Select all

NAME: Bonus to Success Chance of Invasion when Freeing Systems - Updated
DESC: The resistance lowers the defending systems ground combat value by -25%. A missing feature from the game manual.
AUTHOR: Spocks-cuddly-tribble
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?p=56533#p56533

>> 0x66761 DD 9C 24 20 03 00 00 E8 83 F5 FD FF 89 84 24 10 04 00 00 DB 84 24 10 04 00 00 DC C8 DC 84 24 20 03 00 00 DC BC 24 20 03 00 00
<< 0x66761 8D 94 24 98 03 00 00 DD 5A 88 E8 80 F5 FD FF 83 7A 48 02 75 09 8B C8 C1 E9 02 90 90 2B C1 89 02 DB 02 D8 C8 DC 42 88 DC 7A 88

#00467361     8D9424 98030000    LEA EDX,[ESP+398]
#00467368     DD5A 88            FSTP QWORD [EDX-78] [esp+320h] (squared TF race tech value) * empire %-bonus // now emps squared
#0046736B     E8 80F5FDFF        CALL 4468F0 GetGroundDefense__systemID_eax
#00467370     837A 48 02         CMP DWORD [EDX+48],2 [esp+3E0h]  MissionData 1 conquer or 2 liberate
#00467374     75 09              JNE SHORT 46737F
#00467376     8BC8               MOV ECX,EAX ground defense strength of defending system
#00467378     C1E9 02            SHR ECX,2
#0046737B     90                 NOP
#0046737C     90                 NOP
#0046737D     2BC1               SUB EAX,ECX
#0046737F     8902               MOV [EDX],EAX
#00467381     DB02               FILD DWORD [EDX] ground defense strength of defending system to FPU
#00467383     D8C8               FMUL ST,ST  // square ground defense strength of defending system
#00467385     DC42 88            FADD QWORD [EDX-78] [esp+320h] // FPU + TTs value
#00467388     DC7A 88            FDIVR QWORD [EDX-78] [esp+320h] // success chance of invasion (TTs value/both)
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Liberating "enemy" systems

Post by Flocke »

@SCT: Did you mess with the planet bonus values? For above game0.sav UE reports a few invalid population (growth) bonus values, given that they are mapped to the bonus labels 'few', 'moderate', 'much'. What are the valid values for ECM and how should they be mapped?
systinfo planet entry @ 0x42-0x43
invalid-pop-bonus.jpg
invalid-pop-bonus.jpg (46.5 KiB) Viewed 224 times
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Liberating "enemy" systems

Post by Spocks-cuddly-tribble »

Flocke wrote: Fri Mar 08, 2024 5:07 amDid you mess with the planet bonus values?
No, all values should be plain vanilla. And I didn't notice obvious deviations in any test game.

Wiki: population bonus (few = 00 00, normal = 36 01, much = 6C02, else = normal)

Persists this issue in other/current ECM games? If so I suspect an error in the stbof.res source file (planet.pst?).

Only thing changed were wrong Romulus/Cardassia home system planet numbers (to my knowledge).


OT: I recall you updated the intelInfo data. Just curious if you figured out this strange intel GUI glitch: viewtopic.php?p=57053#p57053

Sum of Total Percentage(s) 81% (3 empires gone with 19% Intel locked in hidden sliders)
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Liberating "enemy" systems

Post by Flocke »

Spocks-cuddly-tribble wrote: Fri Mar 08, 2024 10:55 am No, all values should be plain vanilla. And I didn't notice obvious deviations in any test game.
All planets affected are asteroid gas giants:
asteroid-gas-giants.jpg
asteroid-gas-giants.jpg (32.42 KiB) Viewed 181 times
Spocks-cuddly-tribble wrote: Fri Mar 08, 2024 10:55 am Persists this issue in other/current ECM games? If so I suspect an error in the stbof.res source file (planet.pst?).
I didn't check other save games, but I checked planet.pst and there all values are correct, not a single deviation.
Other planet values in systInfo look fine as well.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Liberating "enemy" systems

Post by Flocke »

Spocks-cuddly-tribble wrote: Sat May 27, 2023 11:20 am I think it's a corruption in [GTForceList+30h] -> MissionData (e.g. for TT system attack) & Move Dest (if not -1) via sector.lst

The data can get corrupted after the attack order via re-deploying or redirecting (i.e. just clicking) task forces or other save game scumming.

Any value other than 1 will trigger liberation. Liberation code key is 2.
Confirmed, except that GWTForce got corrupted, not GTForceList.
broken-sys-attack.jpg
broken-sys-attack.jpg (76.53 KiB) Viewed 173 times
When you load the savegame, store it again unchanged, then re-assign the attack system order and store it to another savegame, you'll find that the mission data of that task force is the only data that got changed. The only other data binary changed is the stored file name. All data pointers are same. :wink:

Even though it can be fixed easily be reassigning the task, I added another integrity check.

No idea how it's been caused. The task forces match GTForceList, so re-deployment has not been the cause.
Simply clicking the task force and aborting redirection doesn't cause this either. At least in none of my tests.
Spocks-cuddly-tribble wrote: Sat May 27, 2023 11:20 am OT: I recall you updated the intelInfo data. Just curious if you figured out this strange intel GUI glitch: viewtopic.php?p=57053#p57053
Thanks for the pointer, I'll check on it next.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Liberating "enemy" systems

Post by Spocks-cuddly-tribble »

Flocke wrote: Sat Mar 09, 2024 2:00 amAll planets affected are asteroid gas giants:
Thank you. Just ignore this side effect of the Planet killer (and ECM Borg) exploit code for now: viewtopic.php?p=46143#p46143

Sub_43E180 Change_Planet_entry_eax_to_edx needs an update for gas giants, confused AIs even try to colonize those max pop 0 systems and BotF removes their colony ships with no effect: viewtopic.php?p=59309#p59309

But I'd need advice what planet arry value(s) to change in loc_43E1AE case3_gas_giant_and _invalid to fix both issues?

Flocke wrote: Sat Mar 09, 2024 4:51 amSimply clicking the task force and aborting redirection doesn't cause this either. At least in none of my tests.
Perhaps some special condition like moving cursor out of the sector (so it shows waypoints) and aborting?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Liberating "enemy" systems

Post by Flocke »

Spocks-cuddly-tribble wrote: Sat Mar 09, 2024 12:35 pm But I'd need advice what planet arry value(s) to change in loc_43E1AE case3_gas_giant_and _invalid to fix both issues?
The only value you might need to change beside the planet type is the atmosphere type:
planetEntry.jpg
planetEntry.jpg (98.82 KiB) Viewed 152 times
However, be aware that already ordered task forces keep their mission. So when a colony ship is underway, you need to cancel the ordInfo order.
reset-mission.jpg
reset-mission.jpg (85.58 KiB) Viewed 152 times
You might test this by using the cleanup options in UE map view.
(forget about the military order id, I still need to clean this up)

Flocke wrote: Sat Mar 09, 2024 4:51 am Perhaps some special condition like moving cursor out of the sector (so it shows waypoints) and aborting?
That's what I tried, but ofc there might be some other special condition. For sure there is.
Post Reply

Return to “General Chat”