View Issue Details

IDProjectCategoryLast Update
0023434AI War 2Bug - GameplayJul 21, 2020 7:01 pm
Reporterdeso Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version2.103 Hotfix 
Fixed in Version2.104 Negative Build Percentage Hotfix 
Summary0023434: Economic stations don't rebuild after they're destroyed. The percentage goes into the thousands and it never stops rebuilding
DescriptionPretty much what the title says. After a wave or something destroys them, long after the wave is cleared, the station keeps rebuilding.

The completed % shows "-10800%" done.

If you delete it, and rebuild it manually, it sometimes fix it, sometimes the option to build a command station disappears!

This is quite crappy, and it's a huge gameplay issue in my current game
TagsNo tags attached.

Relationships

related to 0023432 resolvedChris_McElligottPark Negative structure build percentage bug 

Activities

deso

Jul 21, 2020 2:49 pm

reporter  

screenshot.png (796,892 bytes)

BadgerBadger

Jul 21, 2020 3:09 pm

manager   ~0057747

Do you have a save game with this scenario?

deso

Jul 21, 2020 3:32 pm

reporter   ~0057748

I would, if I knew where the save games are stored.

BadgerBadger

Jul 21, 2020 3:47 pm

manager   ~0057749

<AI War 2 Install Dir>/PlayerData/Save/CampaignName

Chris_McElligottPark

Jul 21, 2020 7:01 pm

administrator   ~0057752

Thanks! Hotfix will be out in about 30 minutes, max.

* Somehow or other, it became possible for some self-building ships to go very negative in their build percentage (instead of counting up to 100%, they would be way in the negative percentages of building process).
** This seems to be a new bug in the last day or so, based likely around some changes that we made to improve the cross-thread reliability of the game. The problem is, upon manual code review of the areas that would be relevant, we just can't see anything that looks like a bug.
** Ultimately what is happening is that the SelfBuildMetalRemaining is getting absolutely giant in value, far larger than the original metal cost of the ship that is constructing. This was probably an integer overflow from it going really negative first, and then wrapping back around, but it's hard to be sure.
** We've put in some extra defensive code to make sure that if it goes negative at all, it marks itself as complete. We've also put in protections so that if you "owe more than it is worth" in general, that it will assume that there was an overflow and just go ahead and finish it now. These two changes should help to keep the problem from happening again, and fix the cases where it was already in progress.
** While we were already at it, we put in a small general improvement that prevents you from being overcharged for the last tiny percentage of constructing a ship. If you had a bunch of engineers building, and each frame cycle they normally would do 1.1% of the construction of a ship, and charge you accordingly, then you might wind up in a case where you had only 0.2% remaining work to do, and yet got charged the full 1.1% rate. It is now careful to only charge you for what you would owe, so the 0.2% rate in this example.
** Hopefully there are no other errors in any of the metal flows, with things like drones building, anything engineers would claim or repair, etc. The code looks clean, but then again the code for the self construction also looks clean. In the next couple of days, please let us know if you see anything else that seems amiss with how metal is being charged against you. So far we can't duplicate anything like that anymore, now.

Issue History

Date Modified Username Field Change
Jul 21, 2020 2:49 pm deso New Issue
Jul 21, 2020 2:49 pm deso File Added: screenshot.png
Jul 21, 2020 3:09 pm BadgerBadger Note Added: 0057747
Jul 21, 2020 3:11 pm BadgerBadger Relationship added related to 0023432
Jul 21, 2020 3:32 pm deso Note Added: 0057748
Jul 21, 2020 3:47 pm BadgerBadger Note Added: 0057749
Jul 21, 2020 4:04 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Jul 21, 2020 4:04 pm Chris_McElligottPark Status new => assigned
Jul 21, 2020 7:01 pm Chris_McElligottPark Status assigned => resolved
Jul 21, 2020 7:01 pm Chris_McElligottPark Resolution open => fixed
Jul 21, 2020 7:01 pm Chris_McElligottPark Fixed in Version => 2.104 Negative Build Percentage Hotfix
Jul 21, 2020 7:01 pm Chris_McElligottPark Note Added: 0057752