- Client declares a dependency on Service so that its callbacks come after.
- Client implements on_init() and uses a remote API to register with Service.
- When the save is loaded, on_init gets called for the Client.
- (Note that because on_init is only called once per mod lifetime per game, it is not called for Service)
- Client sees Service is present in on_init, and calls the registration function through the remote API.
This all seems awkward and convoluted. It feels like on_init shouldn't be used for inter-mod communication because of the above situation, and instead that on_configuration_changed should be called after a new game is started. This way on_init/on_load can be for internal stuff, and anything that depends on their setup can wait until on_configuration_changed.
Or am I missing something?