Forum Announcement, Click Here to Read More From EA_Cade.

How to execute function automatically on world load?

NightlydropNightlydrop Posts: 32 New Member
Hi everyone. I have a (quick?) question about modding for @SimGuruModSquad and any lurking modders/experimenters.

I'm making a mod that needs to be initialized on world start. Currently I can do this by invoking a command using the techniques in the maslow example, but it is not at all ideal to have to manually start the mod every time the game loads. How might one go about getting functions to be automatically called so that we can, say, register a service?

Is there something similar to the @sims4.commands.Command decorator that would do this? Like, instead of just reading the function and registering it as something that can be called in the console, it also EXECUTES the function? I really, really do not want to override any Maxis scripts as that's too far into "There Can Only Be One" territory.

Thanks for reading!
Sign In or Register to comment.
Return to top