Skip to content

Feature/expand unit behaviour#93

Merged
GianRathgeb merged 26 commits intomainfrom
feature/expand-unit-behaviour
Dec 12, 2025
Merged

Feature/expand unit behaviour#93
GianRathgeb merged 26 commits intomainfrom
feature/expand-unit-behaviour

Conversation

@GianRathgeb
Copy link
Contributor

When merged this pull request will:

  • Add environment-aware navigation: units can become lost in low visibility, bog down on soft ground, and recover via landmarks/LOS/regroup; movement applies drift/slowdowns and repaths accordingly.
  • Parse navigation bias phrases (“stick to roads,” “proceed cautiously,” “shortest route”) and route bias to movement; road-biased orders are logged for visibility.
  • Improve visibility sampling with terrain concealment/weather, tune loss/bog heuristics with behaviour/terrain/weather factors, and escalate prolonged bogs to stuck-soft with engineer assist logging.
  • Integrate radio/log feedback for lost/bogged/recovered states and engineer assistance requests.

Issue ticket number and link

Expand Unit Behaviour #48

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have tested my code.
  • I have documented my code in accordance with gdscript_documentation_comments.
  • I have requested a review in discord.
  • I have moved the related issues to the review section in the SCRUM Board.

Already defined some variables to build upon
Added deterministic environment behavior for units using an external RNG, including visibility, loss, and terrain slowdown calculations. Implemented registration, navigation bias, lost/bogged state management, and speed multiplier broadcasting. Integrated adapters and profiles for movement and visibility, and improved per-unit state handling.
Added implementations for environment speed multiplier, drift, repath request, and navigation bias setters/clearers. Also implemented path complexity calculation for units, providing normalized metrics based on path length and turns.
Added logic to sample_visibility_for_unit and sample_visibility_at to return visibility values based on unit position and renderer state. These methods now provide local visibility metrics for use in EnvBehaviorSystem.
Added signal connections and handlers for unit events (lost, recovered, bogged, unbogged) in the environment behavior system. Units are now paused or resumed based on these events. Also implemented navigation bias application and a helper for UID-to-index conversion.
Integrate drift application/clearing so lost/recovered units get movement drift updates via MovementAdapter.
pause and request engineer support on bogged units; log when road-biased moves are applied for easier debugging.
lost units now clear drift and repath when visibility, timeout, or friendly LOS allows; bogged transitions also trigger replanning.
parse common navigation-bias phrases into orders and attempt to assign engineer assistance when units bog down, logging the intent for visibility.
tune loss/bog heuristics with terrain/LOS recovery and stuck-soft escalation, apply env drift in movement, parse navigation-bias phrases, and emit radio/log feedback with engineer assistance hooks.
scale loss risk with behaviour, weather, terrain; recover when near landmarks or Hold/Regroup; retain existing drift/repath handling.
@GianRathgeb
Copy link
Contributor Author

current state: many issues solved but the feature is still hard to test, which costs a lot of time so it'll take a few more days to finish

@GianRathgeb
Copy link
Contributor Author

the systems should now be working without crashing anything. Please review again so that I can revert the changes to the mission

Copy link
Contributor

@Tapawingo Tapawingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very good. Remember to revert mission changes before merging :)

@GianRathgeb GianRathgeb merged commit a8e865f into main Dec 12, 2025
3 checks passed
@GianRathgeb GianRathgeb deleted the feature/expand-unit-behaviour branch December 12, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants