While this is especially directed at our Larian hosts, I welcome all insights here. smile

I'm trying to understand some Osiris behavior and timing issues. I'll explain the scenario as succinctly as possible, but it's hard for me to do. Imagine I have two goals ordered accordingly under '__Start' as follows:

Code:
__Start
  +
    - CharacterCreation
    - MyLevel

  • The CharacterCreation goal is the standard character creation template available from the wiki.
  • MyLevel has an INIT section that sets some placed NPCs off stage. Those NPCs are placed in a level by the same name "MyLevel"

When running in the editor the code in MyLevel that sets the NPCs off stage works fine. It also works with the real game client when playing in single-player. However, as soon as you play in the game client with another player joining during character creation, the NPCs are all on stage. The calls in 'MyLevel' INIT section are not sufficient to make them off stage when character creation ends and the first level 'MyLevel' is loaded.

Now, I thought I understood why this happens. I figured that the issue was related to execution order (and I still think it is mostly). My assumption was that when using real character creation, the 'MyLevel' goal was initializing before the associated level was actually loaded. Setting local objects off stage before a level was loaded was simply getting overriden when the level was loaded after character creation. So, I changed the goal ordering to follow proper conventions:

Code:
__Start
  +
    - CharacterCreation
    + MyLevel
      - MyLevel_start


'MyLevel' was changed to follow the same convention as the 'Sandbox' goal, which is to detect when the level is loaded and complete. This will ensure that the INIT section of 'MyLevel_start' is gated from execution until the level is loaded. Once I made these changes, the NPCs set off stage in 'MyLevel_start' would be off stage in every game mode - mission accomplished!

So, I am not confused by why the above goal re-organization solved the problem, what I am confused by is how it ever worked with real character creation in singleplayer mode in the first place! I figured that the problem should be the same. 'MyStart' would have initialized while the solo player was in real character creation in the character creation level. I would not expect the 'MyStart' level to be loaded and therefore the calls to set the NPCs off stage would effectively be NOOPs. But somehow, those NPCs were set off stage just fine while the player was in character creation.

So what is the difference between the single-player character creation and multi-player character creation that influenced the behavior of goal execution here? Can we get a few words on any special handling that the game performs when a game is being hosted in multi-player versus played solo? I suspect some kind of additional client/server synchronization that might not otherwise be happening. While I'm happy that a proper goal ordering addressed the issue, I'd like to understand a little bit more of the underlying engine behavior to avoid other issues in the future.

I hope that made sense, sorry for the wall of text.

Last edited by Windemere; 10/10/17 05:58 PM.

DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods