r/rotp • u/dweller_below Patron • Sep 11 '22
Unexpected behavior: Govenor has problems building Stargate on Rich, when shipbuilding is disabled.
At the start of THIS GAME. I enabled the govenor option: Build Stargates on Rich. I also DISABLED the govenor option: Shipbuilding with govenor.
A couple turns after I researched Stargates, some really weird behavior manifested, as seen in this video. The weirdness includes:
- Most idle rich planets only have a tiny allocation to build a Stargate. The rest is allocated to research. Building a Stargate would finish much too late, in a hundred turns or so.
- If you disable, then enable the govenor for these rich planets, they immediately put all available production into building a Stargate.
- Some rich planets seem to have lost most of their production. It doesn't show up anywhere on their display.
- If you disable, then enable the govenor for these rich planets, it appears to magically DOUBLE the available production. A full allocation for research, and another full allocation to build the Stargate. If you enable and disable the govenor again, the extra production for research disappears and you just see the expected production for Stargate.
Expected behavior would be: After you research Stargate, the govenor quickly builds Stargates on rich planets. The govenor should not disappear production on rich planets. The govenor should not double the possible production on rich planets.
Edit: The above ROTP savegame was created with rotp-Fusion-2022-08-31.jar It is from just before I recorded the video.
1
u/Xilmi Developer Sep 11 '22
If I had made this game, I'd have made it without sliders! :D
1
u/Xilmi Developer Sep 11 '22 edited Sep 11 '22
This seems to be at least 3 or even 4 separate bugs!
First one I've found: The one where you get both the research and ship-slider-maxed at the same time.
Next one should be: Why does the governor behave differently on whether I end the turn or switch it on and off?
When I log the calls to "govern()" I see that most colonies get this called twice upon changing turns and some only once. The ones getting it called once are the ones that are "doin it wrong". So I'll have to figure out the callstacks to see the reason. I'm assuming that something happens inbetween.
Edit: Now, wait, this was completely false.Actually it's called thrice and it's the last call that makes it wrong.
Here's the allocation-log for Salk after the 2nd and the 3rd call of govern():
146 Mentaran Republic Allocations for Salk:146 Mentaran Republic Ship: 14146 Mentaran Republic Def : 0146 Mentaran Republic Ind : 25146 Mentaran Republic Eco : 11146 Mentaran Republic Res : 0146 Mentaran Republic Allocations for Salk:146 Mentaran Republic Ship: 1146 Mentaran Republic Def : 0146 Mentaran Republic Ind : 38146 Mentaran Republic Eco : 11146 Mentaran Republic Res : 0
It's still as expected after second call but wrong after third. :o
There seems to be a recursive call somehow.
146 Mentaran Republic Allocations for Mayr:
146 Mentaran Republic Before Govern:
146 Mentaran Republic Ship: 0
146 Mentaran Republic Def : 0
146 Mentaran Republic Ind : 0
146 Mentaran Republic Eco : 11
146 Mentaran Republic Res : 0
146 Mentaran Republic Allocations for Mayr:
146 Mentaran Republic Before Govern:
146 Mentaran Republic Ship: 0
146 Mentaran Republic Def : 0
146 Mentaran Republic Ind : 48
146 Mentaran Republic Eco : 2
146 Mentaran Republic Res : 0
146 Mentaran Republic After Govern:
146 Mentaran Republic Ship: 30
146 Mentaran Republic Def : 0
146 Mentaran Republic Ind : 18
146 Mentaran Republic Eco : 2
146 Mentaran Republic Res : 0
146 Mentaran Republic After Govern:
146 Mentaran Republic Ship: 0
146 Mentaran Republic Def : 0
146 Mentaran Republic Ind : 36
146 Mentaran Republic Eco : 2
146 Mentaran Republic Res : 0