unorthodox-paradox / omsi_2_csb_ai_enhancements

AI enhancements for CSB vehicles
1 stars 0 forks source link

Properly support saved situation reload #88

Open unorthodox-paradox opened 4 years ago

unorthodox-paradox commented 4 years ago

Background

Currently the use case of reloading a previously saved situation is not formally supported. While, as part of the work on 1.5.3, some changes were introduced toward that goal, little testing was undertaken to confirm these are bug-free.

Saved situation reload is not exactly trivial to implement correctly:

The workaround chosen by many vehicle authors is to wipe out as much state as possible (by allowing all inits to re-execute as if the vehicle were "freshly-spawned"), while for the most part ignoring the other facets. As a consequence, we oftentimes witness vehicles that post-reload have a non-configured / "blank slate" IBIS; dashboard switches being reset to their original spawn-time positions; cabin temperature being equal to the environmental one, despite the A/C having been on for hours; and so on. In our opinion this isn't a proper solution, as it beats the whole point in saving a situation -- getting back a vehicle that is identical, both in terms of internal state and external context, to the one captured by the "save-point".

Course of action

Progress thus far

Thus far the focus has been to preserve more state than the vanilla scripts did. Only now have the downsides of doing so dawned on us.

User-level workarounds

For best results, always save the situation while the vehicle is stationary, and, before reloading, do not alter the date and time. Even then you may hit the other problems discussed herein, which is why this use case remains, for the time being, unsupported.