Jump to content

Petra Error -- Winter Is Coming(5)


seregadushka
 Share

Recommended Posts

I am able to reproduce the problem, even on version alpha 26. Steps to reproduce.

  1. Extract the Winter Is Coming(5).zip file to the mods/user/maps/scenarios folder in your 0ad game data folder.
  2. Load the scenario Winter Is Coming(5). Slot yourself as player 1, and slot 4 AI in the remaining slots. In fact, you can't change any of the starting parameters. Civs are forced to random.
  3. Use the cheat "gift from the gods" (type it in chat) to get p3, a lot of resources, and fast building.
  4. Build a stable and produce 50 champ cavalry.
  5. Send the champ cavalry to attack another player, generally at the cardinal directions of the map.
  6. After fighting with an AI-controlled opponent for several seconds, the error should appear.

Here is the repeating error message that I see when I test the map with 0ad version alpha 26. During the test, I was Britons and the player that I attacked was Hans.

Quote

WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/civil_centre with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/crannog with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/military_colony with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/house with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/ice_house with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/pyramid_small with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/apartment with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/storehouse with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/farmstead with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/field with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/corral with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/dock with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/barracks with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/stable with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/elephant_stable with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/forge with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/temple with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/market with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/ministry with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/outpost with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/sentry_tower with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/defense_tower with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/arsenal with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/academy with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/fortress with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wallset_palisade with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wallset_siege with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wallset_stone with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/theater with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/apadana with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wonder with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/civil_centre with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/crannog with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/military_colony with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/house with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/ice_house with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/pyramid_small with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/apartment with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/storehouse with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/farmstead with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/field with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/corral with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/dock with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/barracks with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/stable with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/elephant_stable with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/forge with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/temple with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/market with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/ministry with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/outpost with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/sentry_tower with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/defense_tower with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/arsenal with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/academy with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/fortress with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wallset_palisade with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wallset_siege with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wallset_stone with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/theater with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/apadana with count < 0
WARNING: PlayerID 3 |    Petra error in incrementBuilderCounters for structures/han/wonder with count < 0
ERROR: JavaScript error: simulation/ai/petra/defenseArmy.js line 572
orderData is undefined
  PETRA.DefenseArmy.prototype.update@simulation/ai/petra/defenseArmy.js:572:7
  PETRA.DefenseManager.prototype.checkEnemyArmies@simulation/ai/petra/defenseManager.js:275:25
  PETRA.DefenseManager.prototype.update@simulation/ai/petra/defenseManager.js:61:7
  PETRA.HQ.prototype.update@simulation/ai/petra/headquarters.js:2271:22
  PETRA.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:118:11
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:7
 

I made a modified version of the map, where I deleted all entities except one civic center and 4 women for each player. The warning and error messages then did not occur with that modified map.

A hypothesis is that the symptoms are triggered by certain entities in the map.

Edited by Norse_Harold
Link to comment
Share on other sites

On 27/01/2024 at 1:21 AM, Norse_Harold said:

I made a modified version of the map, where I deleted all entities except one civic center and 4 women for each player. The warning and error messages then did not occur with that modified map.

A hypothesis is that the symptoms are triggered by certain entities in the map.

Oh, how great it is! I'm going to edit this map. Now I will know that the main thing is not to put anything extra at stake?

Link to comment
Share on other sites

10 hours ago, Alexandra said:

Oh, how great it is! I'm going to edit this map. Now I will know that the main thing is not to put anything extra at stake?

Don't edit the map yet. I have an idea for how to find out which entities are triggering the problem. I'll let you know what I find out soon, probably tomorrow.

  • Like 1
Link to comment
Share on other sites

Okay, I think that I know what entities trigger the symptoms: the hostile animals (brown bears and wolfhounds) that are owned by AI-controlled players. I used a technique similar to the binary search algorithm, specifically the generalization to graphs, by making multiple edits of the map file in order to narrow down the possible entities causing the problem. Then I guessed that AI-controlled hostile animals could trigger the symptoms, so I edited the map to only change the hostile fauna to be owned by player 0 instead of players 2, 3, 4, or 5. It seems to be correct so far, but long-term testing with this fixed version would be wise.

Winter Is Coming(5).zip

In the future, when you place animals, especially hostile animals, ensure that Gaia is selected as the owning player at the bottom of the scenario editor window.

Also, I consider it a bug in the game for these symptoms to occur when AI controls a hostile animal. Or, it's a bug in the game to allow the user to create a map that is able to trigger these symptoms. I have reported this on Trac with a minimal test case.

Edited by Norse_Harold
Link to comment
Share on other sites

17 hours ago, Norse_Harold said:

In the future, when you place animals, especially hostile animals, ensure that Gaia is selected as the owning player at the bottom of the scenario editor window.

The thing is, I did it on purpose. I wanted to see "what would happen if...". It turned out that there would be a mistake in the end. How interesting. Now I know I shouldn't do that.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...