Removed the Civilization V-related gameplay features from the previous update. This update instead focuses on significantly improving game performance, fixing various bugs, and making general improvements. Details are listed below.
1.4.5.2
--------
**Improvement: multi-dimensional auto menace and optional rules overrides**
- Default ``menace`` is no longer raw damage: it scores damage, hit cover, cooldown, wind-up (``*_ready``), HP, armor, dodge, range, and speed for auto-targeting and square threat sums.
- Optional unit fields: ``menace`` / ``menace_vs`` (absolute fixed), ``menace_mult`` / ``menace_mult_vs`` (multiply the auto multi-dim base; still scales with upgrades).
- Tunable in ``def parameters``: ``menace_armor_weight``, ``menace_dodge_weight``, ``menace_range_weight``, ``menace_speed_weight``, ``menace_hp_ref``.
- **Code**: ``worldunit/world_attributes.py``, ``combat/targeting.py``, ``definitions.py``; ``res/rules.txt`` parameters; ``res/ui/rules_doc.txt``.
- **Docs**: ``mod/modding.rst``, ``mod/aimaking.rst``.
- **Tests**: ``test_rules_menace_targeting.py``, ``test_ai_counter_targeting.py``.
**Improvement: continuous cross-square chase (true pursuit)**
- **Before**: In chase mode, when an enemy left the square the AI issued automatic ``go`` orders to hop into adjacent squares and then attack again — still order-driven, and units could stay “attacking” without leaving the square.
- **Now**: ``chase`` keeps a single ``AttackAction`` on the locked enemy and paths through exits across squares; no automatic ``go`` spam.
- **Hold**: Spawn ``position_to_hold`` still blocks leaving the hold area for offensive / guard. Defensive / chase are exempt (chase clears hold when crossing squares). Normal ``go`` / ``attack`` still call ``stop()`` first and clear hold.
- **Code**: ``worldaction.py`` (``AttackAction._chase_toward``), ``worldunit/world_ai_decision.py``, ``worldunit/world_movement.py`` (``_must_hold``).
- **Docs**: ``player/unit-default-behavior.rst``.
- **Tests**: ``test_chase_continuous_pursuit.py``.
**Improvement: attributes screen shows live terrain-adjusted stats**
- Alt+V shows unit ``mdg_on_terrain`` / ``rdg_on_terrain`` / ``mdg_cd_on_terrain`` / ``rdg_cd_on_terrain`` and charge terrain modifiers.
- Current-square terrain ``mdg_vs`` / ``rdg_vs`` / etc. plus ``*_on_terrain`` feed the damage, cooldown, and speed readings on the attributes screen (terrain ``*_vs`` = decimal percent, e.g. ``.25`` = +25%%; unit ``speed_on_terrain`` remains absolute speed).
- **Code**: ``attributes/terrain_effective.py``, ``attributes/combat_attributes.py``, ``attributes/basic_attributes.py``, ``attributes/bonus_handler.py``.
- **Tests**: ``test_terrain_attributes_ui.py``, ``test_terrain_effective_attributes.py``.
**Fix: Tab no longer finds exits on never-scouted squares**
- **Symptom**: On squares never visited (static fog, no scout record), Tab cycling could still announce far-side exits / paths.
- **Cause**: Fog logic remembered opposite-side exits before the square was actually entered.
- **Fix**: If a square is in neither ``scouted_squares`` nor ``scouted_before_squares``, visibility / place summary stay blank; visited-then-left static fog still allows Tab.
- **Code**: ``clientgame/game_unit_control.py``.
- **Tests**: ``test_unknown_square_tab_blank.py``.
**Fix: ``order_impossible`` beep after Backspace-killing a hunt animal**
- **Symptom**: After a default attack killed a huntable animal, ``order_impossible`` played.
- **Cause**: ``AttackOrder`` treated a vanished target as failure.
- **Fix**: Mark the order complete when the target is gone or ``hp <= 0``.
- **Code**: ``worldorders/movement.py``.
- **Tests**: ``test_hunting.py`` (``test_attack_order_completes_when_huntable_target_gone``).
**Fix: neutral default order and hunt damage**
- Plain / default ``go`` on neutrals (non-imperative) only moves — no AttackAction with zero damage.
- Plain ``attack`` on ``is_huntable`` animals (including Backspace default hunt) deals damage; only imperative attack lets AI treat neutrals as auto-engage targets.
- **Code**: ``worldunit/world_ai_decision.py``, ``worldunit/worldcreature.py``.
- **Docs**: ``player/hunting.rst``, ``player/unit-default-behavior.rst``.
- **Tests**: ``test_neutral_no_auto_attack.py``, ``test_neutral_go_and_hunt_attack.py``.
**Fix: Computer player perception update crash (missing ``_buckets``)**
- **Symptom**: Mid-game (especially with ``computer_only`` map AI, allied AI teammates, or after loading a save) could crash in the main-loop perception stage with ``AttributeError: 'Computer' object has no attribute '_buckets'``.
- **Cause**: The player spatial-grid index ``_buckets`` was initialized only in the wrapper ``Player.__init__``; save/load strips that cache field; allied-vision bulk visibility checks (``bulk_visibility_check``) call allies' ``_potential_neighbors``, which raised if a ``Computer`` did not yet hold ``_buckets``.
- **Fix**: Pre-initialize ``_buckets`` in ``BasePlayer.__init__`` with the other perception caches; ``_potential_neighbors`` falls back to an empty dict when missing; ``update_alliance`` clears the ``allied_vision`` instance cache so alliance changes do not keep stale ally lists.
- **Code**: ``worldplayerbase/base.py``, ``worldplayerbase/perception.py``, ``worldplayerbase/__init__.py``.
- **Tests**: ``test_meteors_computer_only.py``, ``test_phase3_parity.py``, ``test_neutral_passive_creep.py``.
Julian Dreykorn’s latest commit has been merged into the codebase. Thank you very much.
code:
game:
https://github.com/tuohai/soundrts-ultimate-version/releases/tag/1.4.5.2