Skip to content
marcushutchings edited this page Jan 9, 2024 · 20 revisions

Mod Rules can be used to configure the behaviour of the simulation systems within the engine. As they get added to the engine they will be documented here.

  • int flankingBonus.defaultMode use to specify the method of flanking bonus to apply for units. Set to zero to deactivate flanking bonus. default = 1
  • float flankingBonus.defaultMax use to specify the maximum damage bonus used by the flanking bonus (unless overriden at unit def level.) default = 1.9
  • float flankingBonus.defaultMin use to specify the minimum damage bonus used by the flanking bonus (unless overriden at unit def level.) default = 0.9
  • int movement.groundUnitCollisionAvoidanceUpdateRate use to control the rate in sim frames that ground/sea units update their unit collision avoidance vectors. A lower number will increase CPU load, but improve reaction time of collision avoidance. Default = 3
  • float movement.maxCollisionPushMultiplier use to restrict the maximum distance, relative to a unit's max speed, a unit can be pushed as a result of collision deconfliction in a single frame. Setting to 1 cuts down the ability of many fast units pushing a slow unit faster than it should go. Default = infinity
  • int movement.unitQuadPositionUpdateRate use to control the rate in sim frames that a unit's position in the quad grid is updated. A lower number will increase CPU load, but increase accuracy of collision detection. Default = 3
  • bool system.enableSmoothMesh use to enable/disable the SmoothGroundMesh, often used to help aircraft navigate drastic changes in terrain. Default = true
  • int system.quadFieldQuadSizeInElmos use to adjust the size (in Elmos) of the quads used for grouping objects for collision detection. Objects get registered in all quads they overlap, so you want to avoid making the quads too small. Also, the collision queries have to assess all unique units that come up in all quads that overlap a collision query area, so the larger the quad size the more unwanted objects that will have to be checked. default = 128
  • float system.pathFinderUpdateRate is removed in engine release after 1821.
  • float system.pathFinderUpdateRateScale use to adjust the rate in which to apply map changes to the pathing system. > 1.0f to increase the intensisty, <1.f to reduce it. Increasing the rate will mean the pathing system responds to changes faster, but at the cost of increased CPU usage. Likewise, reducing the rate will decrease CPU usage, but slow down the response time of the pathing reacting to map changes.

Mod Rules for debugging purposes: (removed in next engine release after 1821)

  • bool system.pfForceSingleThreaded use to force pathing system to send pathing requests single threaded. This is for debugging purposes. Default = false
  • bool system.pfForceUpdateSingleThreaded use to force pathing vertex updates to be processed single threaded. This is for debugging purposes. Default = false
  • bool movement.forceCollisionsSingleThreaded use to force collisions system to use only a single thread. This is for debugging purposes. Default = false
  • bool movement.forceCollisionAvoidanceSingleThreaded use to force collision avoidance system to use only a single thread. This is for debugging purposes. Default = false

Mod Rules coming up: Engine version 2208+

  • int system.qtMaxNodesSearched limits how many nodes the QTPFS pathing system is permitted to search. A smaller number improves CPU performance, but a larger number will resolve longer paths better, without needing to refresh the path. Default = 8192
  • float system.qtRefreshPathMinDist minimum size, in elmos, an incomplete path has to be to allow the path to be refreshed. Once the path is smaller than this distance then the system assumes the path cannot be improved further. A larger number reduces CPU usage, but also increses the chance that a unit will become trapped in a complex terrain/base setup even if there's a route that would bring the unit nearer to the goal. Default = 2000
  • float system.qtMaxNodesSearchedRelativeToMapOpenNodes limits how many nodes the QTPFS pathing system is permitted to search, like qtMaxNodesSearched, except that it calculated based off a relative to walkable nodes in the map. The larger of this and qtMaxNodesSearched will be used. Default = 0.25