HDIAndrew / EFS

12 stars 0 forks source link

Unit.dat Owner attribute - Some owner types don't work as expected #89

Closed floralpond closed 1 year ago

floralpond commented 1 year ago

Description:

The comments at the top of Unit.dat indicate that some owner settings are set like the following (not the full list):

Expected behavior: When set to 33, 44, or 77, a unit should not be able to be produced by houses.

Actual behavior: All houses are able to produce units whose owner is set to 33, 44, or 77. The house specific settings seem to work fine though.

Game version:

1.5, using a slightly modified Unit.dat (see UnitOwnerBug.zip), modified as follows:

Steps to reproduce:

  1. Unzip and activate the attached modified dat file (UnitOwnerBug.zip)
  2. play through the first turn using all houses, and observe that settings 0 (Li Halan only) and 1 (Hazat only) work correctly, but 33, 44, and 77 don't work as expected in that houses can still build these units.

Additional information:

I don't know how to test the rest of the criteria, for example, how can I prove that ministries except imperial guard can produce engineers when set to 33? Another example, 9 is for Imperial Guard, but they don't do anything anyway so I'm not sure how to test that setting. So there is still a little unknown here, but at least the house portion of the settings don't seem to work as expected.

UnitOwnerBug.zip

PS: sidenote, is 77 supposed to include Ministries? The description "non house humans" would make me think that it does include ministries, but the parenthetical "(League, church, rebels)" make me question that belief, so to me this description is not super clear.

Matt-Caspermeyer commented 1 year ago

Hmmm... this is interesting, I thought this had been thoroughly tested in the past, but I guess not.

I'll put it on the radar for V1.51 since it should be an easy fix - thanks for testing this!

For testing, you'll probably have to turn on the production of units for that player and then see if they build said unit in a very specific city. For example, if you want to test if all Ministries except the guard can build something, you would need to do the following:

  1. Set a specific unit, say Artillery, to own be built in a specific city, Farms.
  2. Ensure that the player has a city of this somewhere else than Byzantium II, Holy Terra, or Leagueheim (this is to ensure that there are no build restrictions due to the planet's name).
  3. Turn on the production of units for that player.
  4. Play your game for approximately 20 years.
  5. Ensure that you have set the autosave of the galaxy at the end of your turn to 1 so that you can load the map into the Map Editor and inspect if they have indeed built said unit. Alternatively, you can use the HDIVIEW cheat in the game (typically I like using the Map Editor since you have a lot of capability there to check things).

For 77, that should be exactly what you stated: 1) League, 2) Church, or 3) Rebels.

As a side note, since the owner required in TECH.DAT uses the same function, it will have exactly the same issue (so no need to post a separate issue for that one). Note that the fix will fix all issues with the owner requirements for both UNIT.DAT and TECH.DAT.

Matt-Caspermeyer commented 1 year ago

I've got an update to this issue.

I found the problem and it has been fixed. It is currently undergoing our review process and once reviewed and merged, this issue with automatically be closed in GitHub.

Note that this will go into V1.51.

floralpond commented 1 year ago

oh ok, great! Also thanks for the testing tips!

Luxor70 commented 1 year ago

In 1.51 this bug seems fixed.