unorthodox-paradox / omsi_2_csb_ai_enhancements

AI enhancements for CSB vehicles
1 stars 0 forks source link

AI cannot recover on its own from (severe) crash with user #6

Open unorthodox-paradox opened 5 years ago

unorthodox-paradox commented 5 years ago

Symptoms

When a user - AI crash causes significant (electrics and/or engine and/or transmission) damage do the AI vehicle involved, the latter will stay damaged and “refuse” to behave normally, even after the user has “called the police”. The damaged vehicle has thus the potential to block traffic anywhere it gets subsequently re-spawned at by the game.

Identified causes and resolution progress

This is partly bug, partly feature. It is a feature because the original intent was for the AI to “deny” taking over a severely-damaged user vehicle, until the user fixes it (under standard scripts the AI vehicle would magically appear to drive on even without an operable engine, which we deemed plain ugly). It is a bug because we did not anticipate this particular variation (the user’s vehicle causing damage to another vehicle that is already AI-controlled) until beta-testing revealed that OMSI does not automatically repair crashed-into AI vehicles.

Fixing this would entail a) heuristically detecting the crash (OMSI conveys hazard indicator mode activation), b) heuristically detecting that the user called the police (OMSI conveys hazard indicator mode deactivation), and c) auto-repairing the vehicle at the time it next gets re-spawned.

User-level workarounds