Jump to content

Introducing the Official community mod for Alpha 26


wraitii
 Share

Should these patches be merged in the Community Mod? II  

37 members have voted

  1. 1. Add Centurions: Upgradable at a cost of 100 food 50 metal from rank 3 swordsmen and spearmen. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/27

    • Yes
      28
    • No
      5
    • Skip / No Opinion
      4
  2. 2. Alexander - Remove Territory Bonus Aura, add Attack, Speed, and Attack de-buff Auras https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/26

    • Yes
      25
    • No
      4
    • Skip / No Opinion
      8
  3. 3. Unit specific upgrades: 23 new upgrades found in stable/barracks for different soldier types. Tier 1 available in town phase, tier 2 available in city phase. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/25

    • Yes
      17
    • No
      18
    • Skip / No Opinion
      2
  4. 4. Add a civ bonus for seleucids: Farms -25% resource cost, -75% build time. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/24

    • Yes
      26
    • No
      6
    • Skip / No Opinion
      5
  5. 5. Cav speed -1 m/s for all cavalry https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/23

    • Yes
      14
    • No
      16
    • Skip / No Opinion
      7
  6. 6. Cavalry health adjustments https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/22

    • Yes
      10
    • No
      15
    • Skip / No Opinion
      12
  7. 7. Crush (re)balance: decreased crush armor for all units, clubmen/macemen get a small hack attack. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/20

    • Yes
      16
    • No
      13
    • Skip / No Opinion
      8
  8. 8. Spearcav +15% acceleration. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/19

    • Yes
      27
    • No
      2
    • Skip / No Opinion
      8
  9. 9. Pikemen decreased armor, increased damage: 8hack,7pierce armor; 6 pierce 3 hack damage. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/18

    • Yes
      15
    • No
      14
    • Skip / No Opinion
      8
  10. 10. Rome camp allowed in p2, rams train in p3 as normal, decreased health and cost. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/17

    • Yes
      28
    • No
      4
    • Skip / No Opinion
      5
  11. 11. Crossbow nerf: +400 ms prepare time. https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/15

    • Yes
      11
    • No
      14
    • Skip / No Opinion
      12
  12. 12. adjust javelineer and pikemen roles, rework crush armor https://gitlab.com/0ad/0ad-community-mod-a26/-/merge_requests/14

    • Yes
      7
    • No
      21
    • Skip / No Opinion
      9


Recommended Posts

On 01/09/2024 at 1:14 AM, wowgetoffyourcellphone said:

Hopefully tree-destruction feature will prompt someone to make it more full-featured visually, by making the trees and shrubs tint red when the wall preview is waved over them. It's something I've wanted for a long time for Delenda Est, which allows all buildings to destroy trees when placed. 

btw I'd also like cadavers to be tinted if you wave a foundation over them, so that it's clear if a building buries that food source.

Link to comment
Share on other sites

Some users have reported that the game crashes with community-mod version 0.26.11. They pasted relevant mainlog.html excerpts in the lobby.

according to Atrik_III:

Quote

ERROR: Script component Foundation of entity 6054 failed to serialize: Serialize_InvalidScriptValue
Serializing:
({committed:true, builders:{}, totalBuilderRate:NaN, buildMultiplier:0.7192230933248641, buildTimeModifier:0.7, previewEntity:536871097, finalTemplateName:"structures/rome/house", costs:{food:0, metal:0, stone:0, wood:150}, maxProgress:0.15906241386480338, initialised:true, entsToDestroy:[]})
terminate called after throwing an instance of 'PSERROR_Serialize_InvalidScriptValue'
  what():  Serialize_InvalidScriptValue

 

according to sanafur:
 

Quote

<p>Net client: Received message CEndCommandBatchMessage { m_Turn: 1140, m_TurnLength: 200 } of size 9 from server</p>
<p class="error">ERROR: Cannot serialize NaN values.</p>
<p class="error">ERROR: Script component Foundation of entity 6054 failed to serialize: Serialize_InvalidScriptValue
Serializing:
({committed:true, builders:{}, totalBuilderRate:NaN, buildMultiplier:0.7192230933248641, buildTimeModifier:0.7, previewEntity:536871023, finalTemplateName:"structures/rome/house", costs:{food:0, metal:0, stone:0, wood:150}, maxProgress:0.15906241386480338, initialised:true, entsToDestroy:[]})</p>

 

I would advise checking variables that affect the building rate. To determine which variables those are, see Foundation.js.

Link to comment
Share on other sites

2 minutes ago, Philip the Swaggerless said:

yes i couldn't make it past p1 in multiplayer with various civs

Can you search your logs for lines containing NaN and paste them, as well as surrounding lines for context? Sanafur's excerpt is optimal

Edited by Norse_Harold
Link to comment
Share on other sites

Happened again.  Should I also send crashlog.dmp?

 

CrashLog:

Details: unhandled exception (PSERROR_Serialize_InvalidScriptValue("Serialize_InvalidScriptValue"))

Location: unknown:0 (RtlGetAppContainerNamedObjectPath)

Call stack:

(error while dumping stack: No stack frames found)
errno = 0 (No error reported here)
OS error = 0 (no error code was set)

Not sure how much is relevant but here you go:

Net client: Received message CEndCommandBatchMessage { m_Turn: 410, m_TurnLength: 200 } of size 9 from server

Net client: Received message CSimulationMessage { m_Client: 2, m_Player: 2, m_Turn: 412, m_Data: ({type:"set-rallypoint", entities:[191], x:537.720458984375, z:1051.2384033203125, data:{command:"walk"}, queued:false}) } of size 161 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 411, m_TurnLength: 200 } of size 9 from server

Net client: Received message CSimulationMessage { m_Client: 2, m_Player: 2, m_Turn: 413, m_Data: ({type:"set-rallypoint", entities:[191], x:543.7225341796875, z:1050.23046875, data:{command:"walk"}, queued:false}) } of size 161 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 412, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 413, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 414, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 415, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 416, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 417, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 418, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 419, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 420, m_TurnLength: 200 } of size 9 from server

Net client: Received message CEndCommandBatchMessage { m_Turn: 421, m_TurnLength: 200 } of size 9 from server

ERROR: Cannot serialize NaN values.

ERROR: Script component Foundation of entity 6630 failed to serialize: Serialize_InvalidScriptValue Serializing: ({committed:true, builders:{}, totalBuilderRate:NaN, buildMultiplier:1, buildTimeModifier:0.7, previewEntity:536870967, finalTemplateName:"structures/rome/farmstead", costs:{food:0, metal:0, stone:0, wood:100}, maxProgress:0.06777777777777778, initialised:true, entsToDestroy:[]})

Net client: Disconnected

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, real_tabasco_sauce said:

here is a replay in which it happened.

In the replay, a player as Romans sends all non-cavalry units to build a farmstead, kill a chicken, then walk away. Then the replay ends. Can you confirm that this is the right replay?

I was unable to reproduce the symptoms of the game crashing by following the same steps with a single player match using community-mod v0.26.11. Is something else necessary? For example, did you have a spectator join the game in order to get the game to crash?

Please list the exact steps to reproduce the symptoms.

Edited by Norse_Harold
  • Like 1
Link to comment
Share on other sites

If IsFinished() is called more than once on a foundation that is at buildprogress of 1.0 then obstructing entities can be destroyed more than once. Unexpected results may occur.

I added some logging statements and confirmed that entities are getting destroyed more than once.

I think that the solution is to clear entsToDestroy after the entities in it are destroyed.

I've attached a patch that demonstrates this.

0ad-community-mod-02611-maybefixed.patch

  • Like 1
Link to comment
Share on other sites

Another possibly unwanted behavior that I notice is that obstructing entities that would normally be destroyed at the moment that the foundation is created will instead be delayed and only destroyed after the building is finished. I wonder if this could disrupt pathfinding when units are standing on the foundation at the time that construction is intended to begin.

A solution to this problem would be to only delay destruction of obstructing entities if the structure to be built is a wall and the obstructing entities are trees.

  • Like 1
Link to comment
Share on other sites

18 minutes ago, Norse_Harold said:

If IsFinished() is called more than once on a foundation that is at buildprogress of 1.0 then obstructing entities can be destroyed more than once. Unexpected results may occur.

I added some logging statements and confirmed that entities are getting destroyed more than once.

I think that the solution is to clear entsToDestroy after the entities in it are destroyed.

I've attached a patch that demonstrates this.

0ad-community-mod-02611-maybefixed.patch 698 B · 0 downloads

it would be interesting if this fixes the problem. Many of the problems have occurred when building over no entities, ie just building a farmstead when expected.

Link to comment
Share on other sites

48 minutes ago, real_tabasco_sauce said:

it would be interesting if this fixes the problem. Many of the problems have occurred when building over no entities, ie just building a farmstead when expected.

In my testing, I was seemingly building over no entities, but I think that there are less visible or invisible entities that are being automatically deleted when buildings are constructed there.

Also, I see your proposed changes in the fix_crash branch to re-add `return false` in Commit in Foundation.js. This is good. I think that it will correctly prevent building placement if there is an obstructing entity that is not caught by BuildRestrictions.js:CheckPlacement, such as an entity that moves into the area between the time that CheckPlacement() is called and Commit() is called. An example would be another structure being placed there in that time. This is a guess, though. I don't know whether there is actually a race condition there. Edit: Actually, I think that the purpose of the call to GetEntitiesBlockingConstruction() is to check whether there are units blocking construction and order them to move out of the way.

I think that a correct solution would involve all three changes

  • apply my patch to clear entsToDestroy after the entities in it are destroyed
  • re-add return false on line 275 of Foundation.js, in Commit(), if there are obstructing entities. However, if the building to construct is a wall and the obstructing entities are only trees then do not return false in that case
  • in Commit at line 259, immediately destroy all obstructing entities that would be destroyed on construction except trees. If the entity to be built is a wall then queue trees for later destruction

Some of the code would seem to be redundant. Is there a way to move the wall/tree code block into a separate function so that it can be used by CheckPlacement() and Commit()?

Edited by Norse_Harold
Link to comment
Share on other sites

2 minutes ago, Norse_Harold said:

In my testing, I was seemingly building over no entities, but I think that there are less visible or invisible entities that are being automatically deleted when buildings are constructed there.

Also, I see your proposed changes in the fix_crash branch to re-add `return false` in Commit in Foundation.js. This is good.

I think that a correct solution would involve all three changes

  • apply my patch to clear entsToDestroy after the entities in it are destroyed
  • re-add return false in Commit if there are obstructing entities
  • immediately destroy all obstructing entities that would be destroyed on construction except trees. If the entity to be built is a wall then queue trees for later destruction

Well restoring return false was problematic as it would result in endless construction when building a wall segment on top of a tree.

That being said, I was unable to cause the crashing after this change in 2 multiplayer games.

Link to comment
Share on other sites

1 minute ago, real_tabasco_sauce said:

@Norse_Harold what were your steps to try and reproduce the crash?

I mimiced the Romans player in PhiliptheSwaggerless's replay. I was not able to reproduce the crash. But I only intended to cause multiple destroy calls per entity, and I was successful in that.

To see that, use the attached Foundation.js file which enables logging. Then build lots of structures and watch the logs for multiple occurrences of "destroying entity #", where # is the same number for each occurrence. It may help to build structures with lots of units and on top of grass actors.

Foundation.js

  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, Norse_Harold said:

I mimiced the Romans player in PhiliptheSwaggerless's replay. I was not able to reproduce the crash. But I only intended to cause multiple destroy calls per entity, and I was successful in that.

To see that, use the attached Foundation.js file which enables logging. Then build lots of structures and watch the logs for multiple occurrences of "destroying entity #", where # is the same number for each occurrence. It may help to build structures with lots of units and on top of grass actors.

Foundation.js 14.55 kB · 0 downloads

Were you in multiplayer? The crashes only seem to happen in multiplayer with a player opponent or spectator.

Link to comment
Share on other sites

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...