DaloLorn / Rising-Stars

A large-scale mod for Star Ruler 2.
http://steamcommunity.com/sharedfiles/filedetails/?id=812827373
Other
18 stars 7 forks source link

Glory/Comfort accumulation does not work correctly #87

Closed BottledByte closed 1 year ago

BottledByte commented 1 year ago

Starting a siege of a planet as Berserkers causes Glory meter to increase steadily, however, after stopping the siege, the Glory meter still increases, for no reason. Repeatedly starting and stopping siege of a planet causes the "Glory for nothing" to stack. This "Glory for nothing" effect does not end even if the planet in question is actually conquered.

Pacifists instead, when sieging a planet or when their planet is besieged, seem to always keep getting Comfort at normal pace.

Found in commit 69c880b8c8fd8a172c85480ed72210b863d932eb

Reproduction steps

Glory for nothing

  1. Start a new game as Berserkers on a tiny map
  2. Declare war to nearest empire
  3. Start sieging any of their planets, so the siege meter starts increasing
  4. Stop the siege and retreat
  5. Glory keeps increasing for no reason

Comfort not decreasing

  1. Start a new game as Pacifists on a tiny map
  2. Declare war to nearest empire
  3. Start sieging any of their planets, so the siege meter starts increasing
  4. Comfort keeps increasing steadily
  5. As a player, take control over enemy empire (by default with F2)
  6. Siege Pacifists planet, so the siege meter starts increasing
  7. Switch back to the Pacifists, Comfort keeps increasing steadily

Additional notes

I guess this is related to recent Glory mechanics changes in commit 9dbbb0bb7a326edac249046e3373bf22511fa6be

DaloLorn commented 1 year ago

You'd need to lay siege to a bunch of Fasshi planets at once to negate Comfort regeneration. Fasshi get 1 Comfort per second, and lose 0.15 per besieged planet.

I can't see anything obviously wrong in that part of the code, so if it's not that, then I have no idea.

DaloLorn commented 1 year ago

(Incidentally, Rahta lose 1 Glory per second and gain 0.15 for every planet they're laying siege to.)

BottledByte commented 1 year ago

You'd need to lay siege to a bunch of Fasshi planets at once to negate Comfort regeneration. Fasshi get 1 Comfort per second, and lose 0.15 per besieged planet.

I see, I guess that I just did not interpreted it correctly, my fault. I was focused on reproducing the Berserker thing and paid much less attention to the Pacifists. Not to mention that reproducing the "Glory for nothing" was also much easier and reliable, compared to taking control over AI empire. :smile:

I am no longer able reproduce the Glory bug after your fixes :+1: . Closing.