HDIAndrew / EFS

12 stars 0 forks source link

If cities are given a construction cost in STRBUILD.dat, Firebirds are not spent upon construction #136

Closed YeOldeEBM closed 1 year ago

YeOldeEBM commented 2 years ago

Description:

Assigning a cost in the Credits column in STRBUILD.dat does not result in the Firebirds being spent upon the city's construction.

Expected behavior:

When building a city, the set Credits cost in STRBUILD.dat is spent from the treasury.

Actual behavior:

When building a city, the set Credits cost in STRBUILD.dat is not spent from the treasury.

Game version:

1.51b

Steps to reproduce:

  1. Open STRBUILD.dat and set the Credits column value to 100 for Chemicals and save.
  2. Start the game as any House.
  3. Note the current amount of Firebirds in the treasury.
  4. Use the starting Engineer to build a Chemicals plant somewhere.
  5. After the Engineer is consumed, check the treasury to see that no Firebirds have been spent.

Additional information:

https://user-images.githubusercontent.com/16946359/202873113-03aef94a-ef79-492d-b469-65bce628e1dd.mp4

Matt-Caspermeyer commented 2 years ago

I'm having difficulty repeating this.

Here's what I know. There is code to subtract the Firebirds cost for the structure. This is being done.

I'm wondering, if you're not getting a screen update somehow.

You can try these steps to see if it is indeed not working for you:

  1. Go to space, or click on another stack to try to get the screen to update.
  2. Try to save your game after you build and reload it to see if the firebirds are lower.

Here is my experience (this is using the latest Debug Build, so it's possible it has been fixed since the version you're using):

Test Struct Build Cost

YeOldeEBM commented 2 years ago

I tried switching screens, stacks, and saving and loading. Nothing will make that 100 FB disappear, so you might be right about it being fixed in the dev build.

Matt-Caspermeyer commented 2 years ago

I tried switching screens, stacks, and saving and loading. Nothing will make that 100 FB disappear, so you might be right about it being fixed in the dev build.

Hmmm... I know the code to subtract the Firebirds is there (has been since I added that feature a long time ago for V1.5).

Let's keep an eye on this and we should have another V1.51 beta release in about a week and so please be sure to test this on that build. If it still doesn't work for you, then we'll have to look a lot deeper...

danieldfischer commented 1 year ago

Tested in 151c with my mod. I can verify it is subtracting Firebirds the bug described by EBM in discord is still present, as well as reproduction steps.

Lab is set to cost 500. Bank has $1404 - city built, $904 remaining. Bank has $104 - city not built, engineer is still consumed.

Matt-Caspermeyer commented 1 year ago

I now know what is causing this problem and it is related to https://github.com/HDIAndrew/EFS/issues/137.

I have a fix for this and it is currently undergoing our testing, review, approval, and merge process.

Once this has completed, we hope to have this fix in the next release (V1.51).