Well, this is interesting...

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
Post Reply
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Well, this is interesting...

Post by thunderchero »

here is info I got on discord
angosia.jpg
angosia.jpg (47.13 KiB) Viewed 1158 times
Angosia is my affiliate, and I had a peace treaty with the Ferengi when they declared war on the Angosians. Eventually I declared war and liberated Angosia with one troop transport since the starbase was still there to ward off the Ferengi. Sadly, the starbase vanished after liberation. I'm guessing that's because the relationship status fully reset, though you would think that would happen right when the system was conquered.
I was the Cardassians, Fergs are AI
I think most would have expected when the affiliation treaty was dissolved (by ferg subjugation of Angosia) the starbase would have been removed.
note; cards had non-aggression with ferengi (no combat with starbase by assaulting fleet)

I do have saved game turn before subjugation
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Well, this is interesting...

Post by Spocks-cuddly-tribble »

This funny bug is well known. sub_440BC0 change_system_owner loc_440F24 remove_stations is used only if the ex-owner was an empire.
If you conquer the system your own station remains (new system owner = station owner).
Funny thing is the code for rebellions has an unused special case to keep certain stations.

To fix issue we'd need another patch for remove stations checks:

sub_45E180 minor_affiliation_break_end (so bribing into ending affiliation will also remove stations)

Means write new relocation sub and call it twice:

4B6B70 systInfo_78_position_to_esi
43DAB0 get_Sector_lst_entry__coordinates_eax
check station ID Sector_lst+8
44B000 remove_station__ID_eax


Here is how to keep stations.

Code: Select all

00440F2D   jz    440C1F              ; keep stations -> jmp 0x4032D 0F 84 -> 90 E9

Btw this is not the strangest case. Players can finish stations under construction when AI colonizes the same sector.
Sometimes this pisses the AI off to the point it breaks lucrative treaties....
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: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Well, this is interesting...

Post by Tethys »

I've had this happen before when a friendly AI goes in to colonize a system that I am currently building a station. Pretty funny when the timing it just right and the station completes as the system is colonized.

About the patch: This patch only allows stations to remain for minors which have been bribed away? Or for uncompleted stations as well? Wouldn't it be neat to be able to pick back up on an uncompleted base ;)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Well, this is interesting...

Post by Flocke »

Why should the starbase change ownership by some misbehaving criminals that subjugated the system? The sector should become contested to my opinion! :lol:
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Well, this is interesting...

Post by Spocks-cuddly-tribble »

Tethys wrote: Thu Sep 21, 2023 1:11 amAbout the patch: This patch only allows stations to remain for minors which have been bribed away? Or for uncompleted stations as well? Wouldn't it be neat to be able to pick back up on an uncompleted base ;)
No, it keeps all space stations, no matter how the system owner changed. Involving more cases would be more work.

But preserving all stations when changing ownership of a star system might confuse the AI, since some AI codes are not prepared for this case?

Preserving progress of unfinished stations would be very complicated and doesn't fit to the game concept. They are build from the substance of a troop transport i.e.consume one ship. The insta abort option is the confusing/unlogic part.

Flocke wrote: Thu Sep 21, 2023 4:08 amWhy should the starbase change ownership by some misbehaving criminals that subjugated the system?
The discussed features are only about auto-removing stations from the game. But your comment gives me the idea to edit above mentioned strange rebellion code to change ownership of stations in this special case. I.e. if inhabitants empire still alive it gets the station?

But this would also require the above keep stations patch with possible AI issues.
Last edited by Spocks-cuddly-tribble on Thu Sep 21, 2023 2:12 pm, edited 1 time 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
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Well, this is interesting...

Post by Tethys »

SCT you know I have a few unfinished projects involving starbases and outposts. I will soon be revisiting old projects. I still have: planet types to add, ship types to add, and a third station type. That third station might be tricky but I think if I can find the Starbase code I can adapt that into the reloc table and make an upgrade for Starbase type station. Was thinking something like: Listening post (very cheap, no weapons, for expansion only), Outpost (stock), Starbase (stock). I would shift labeling. Outpost would become listening post, Starbase will become Outpost, and the new station type will be the Starbase. Really running late for work now, I will let you know what I come up with
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions

Post by Spocks-cuddly-tribble »

I tested my above idea and it seems to work with no issues (so far). :cool:

Conquered Klingon and Cardassian systems rejoined their source empires after rebellions and took the Federation space stations with them
(these fought in tactical combat fine for their new owners):

Stations_Transferred_via_Rebellion.png
Stations_Transferred_via_Rebellion.png (495.8 KiB) Viewed 734 times

Code: Select all

NAME: Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions
DESC: See link and ASM notes.
AUTHOR: Spocks-cuddly-tribble
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?p=60191#p60191


>> 0x0003f932 66 8b 50 28 31 c0 8a 84 24 80 00 00 00
>> 0x0004032d 0f 84

<< 0x0003f932 8a 55 4c 80 fa 05 73 14 88 50 28 eb 0f
<< 0x0004032d 90 e9


# Rebellion -> if inhabitants empire still alive change station owner

#00440532     8A55 4C       MOV DL, [EBP+4C]
#00440535     80FA 05       CMP DL,5
#00440538     73 14         JNB SHORT 44054E  // new owner no empire -> skip
#0044053A     8850 28       MOV BYTE [EAX+28],DL  // set new station owner
#0044053D     EB 0F         JMP SHORT 44054E

# don't remove space stations when system owner changes (unless old owner empire just killed)

#00440F2D     90            NOP
#00440F2E    ^E9 ECFCFFFF   JMP 440C1F

Image
Angosia is my affiliate, and I had a peace treaty with the Ferengi when they declared war on the Angosians. Eventually I declared war and liberated Angosia with one troop transport since the starbase was still there to ward off the Ferengi. Sadly, the starbase vanished after liberation.
With this patch the cardassian Starbase would persist (but all other stations as well). :wink:

Note if minor races rebel (or end memberships in any other way) the station ownership won't change since minor races can't own stations (yet).
The same goes for independent rebel system fractions (native systems or source empire gone).

---

The patch could be modified to change station ownerships also for minors joining by membership and in event of any system takeover via invasion.
But this would mean the above Cardassian starbase gets transferred to the Ferengi. :evil:
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: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions

Post by Flocke »

Spocks-cuddly-tribble wrote: Fri Sep 22, 2023 9:17 pm Conquered Klingon and Cardassian systems rejoined their source empires after rebellions and took the Federation space stations with them
(these fought in tactical combat fine for their new owners):
Well, I possibly should have kept the idea to transfer ownership for myself. :lol:
My point was that the ownership should NOT change without fight in any case, and ofc starbases should not be removed either.

Some conquer starbase option would be neat! :mrgreen:
Spocks-cuddly-tribble wrote: Fri Sep 22, 2023 9:17 pm Note if minor races rebel (or end memberships in any other way) the station ownership won't change since minor races can't own stations (yet).
The same goes for independent rebel system fractions (native systems or source empire gone).
Nonetheless, thinking of the Bajorans, it could transfer to their strongest ally if any.
That would make it at least a somewhat canon event. :idea:
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions

Post by Tethys »

Flocke wrote: Fri Sep 22, 2023 10:58 pm
Spocks-cuddly-tribble wrote: Fri Sep 22, 2023 9:17 pm Conquered Klingon and Cardassian systems rejoined their source empires after rebellions and took the Federation space stations with them
(these fought in tactical combat fine for their new owners):
Well, I possibly should have kept the idea to transfer ownership for myself. :lol:
My point was that the ownership should NOT change without fight in any case, and ofc starbases should not be removed either.

Some conquer starbase option would be neat! :mrgreen:
Spocks-cuddly-tribble wrote: Fri Sep 22, 2023 9:17 pm Note if minor races rebel (or end memberships in any other way) the station ownership won't change since minor races can't own stations (yet).
The same goes for independent rebel system fractions (native systems or source empire gone).
Nonetheless, thinking of the Bajorans, it could transfer to their strongest ally if any.
That would make it at least a somewhat canon event. :idea:
I wonder if membership with Bajor would remove the station? Lets say I sign membership with Trill, and build an Outpost there. Lets say the Ferengi bribe them away. Does outpost persist in this case as well? How about when the Ferengi member Trill? Things to eventually look into?
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions

Post by Spocks-cuddly-tribble »

Flocke wrote: Fri Sep 22, 2023 10:58 pmWell, I possibly should have kept the idea to transfer ownership for myself. :lol:
My point was that the ownership should NOT change without fight in any case
I heard you: https://getyarn.io/yarn-clip/43bd6fc1-f ... 75b4f00faa

But a system wide rebellion indicates coordinated underground movement, so this exception case seems fitting for the special feature. :wink:

Flocke wrote: Fri Sep 22, 2023 10:58 pmSome conquer starbase option would be neat! :mrgreen:
UE -> save game editor -> [starbaseInfo+28h] -> set new owner = done starbase conquered :razz: :twisted:

OT @ saved game files: Any clue about dword [systInfo+48h] ???

Flocke wrote: Fri Sep 22, 2023 10:58 pmNonetheless, thinking of the Bajorans, it could transfer to their strongest ally if any.
That would make it at least a somewhat canon event. :idea:
Once a minor is part of an empire most other relationship values get deleted. Except the attitude values. So you have to check the best value of all known empires (which still might be the old system owner). So more checks for this special case plus a min threshold for a transfer... :mad: :dwn:


Tethys wrote: Fri Sep 22, 2023 11:30 pmI wonder if membership with Bajor would remove the station? Lets say I sign membership with Trill, and build an Outpost there. Lets say the Ferengi bribe them away. Does outpost persist in this case as well? How about when the Ferengi member Trill?
It's all explained above, you just have to think a bit. This trains the brain muscles! :wink:

Default code issues (and/or then look at patch changes):
Spocks-cuddly-tribble wrote: Mon Nov 07, 2022 2:56 pmThis funny bug is well known. sub_440BC0 change_system_owner loc_440F24 remove_stations is used only if the ex-owner was an empire.
If you conquer the system your own station remains (new system owner = station owner).
Funny thing is the code for rebellions has an unused special case to keep certain stations.

To fix issue we'd need another patch for remove stations checks:

sub_45E180 minor_affiliation_break_end (so bribing into ending affiliation will also remove stations)
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: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions

Post by Flocke »

Spocks-cuddly-tribble wrote: Sat Sep 23, 2023 12:18 am UE -> save game editor -> [starbaseInfo+28h] -> set new owner = done starbase conquered :razz: :twisted:

OT @ saved game files: Any clue about dword [systInfo+48h] ???
Can't tell on that offset, from my documentation in savegames it always has been 0
And your suggestion above might have been meant as a joke, but this kind of stuff I hope to achieve with code extensions next year. :wink:
User avatar
Final Run
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 89
Joined: Mon Apr 13, 2015 3:34 pm

Re: Disable auto-remove Space Stations features & Transfer ownership during rejoin-rebellions

Post by Final Run »

Spocks-cuddly-tribble wrote: Fri Sep 22, 2023 9:17 pm

Image
Angosia is my affiliate, and I had a peace treaty with the Ferengi when they declared war on the Angosians. Eventually I declared war and liberated Angosia with one troop transport since the starbase was still there to ward off the Ferengi. Sadly, the starbase vanished after liberation.
With this patch the cardassian Starbase would persist (but all other stations as well). :wink:

Note if minor races rebel (or end memberships in any other way) the station ownership won't change since minor races can't own stations (yet).
The same goes for independent rebel system fractions (native systems or source empire gone).

---

The patch could be modified to change station ownerships also for minors joining by membership and in event of any system takeover via invasion.
But this would mean the above Cardassian starbase gets transferred to the Ferengi. :evil:

I would've much liked to keep that starbase that game :sad:

At any rate, I really like this patch idea even if it's impact is a bit a situational. Hopefully I can test it later in SP!
Post Reply

Return to “General Modding Information/Questions”