Forum Discussion
11 years ago
"MyreMylar;12540620" wrote:
I saw there was even some talk in the other thread of being able to 'hot load' some scripts while the game was running which sounds promising for tweaking and debugging scripting. Can @SimGuruModSquad confirm whether any of that is at all possible? Do scripting modders need to take down and reload the game each time we we change a script or is there some clever way to force a script reload ingame?
Hey there! Here's the deal on hotloading:
By default modders will need to restart the game to see their script changes update in game, BUT hot loading is a feature that is supported by the engine so it is possible you may be able to get it working. Off the top of my head I actually do not know how difficult it would be for you guys to add hotloading back in.
I am open to having this added as a shipping feature if you guys need it - it will need some work, but it's not impossible. Looking for feedback from you guys on how important this is for you.
A bit more detail: For us, most workflows work fine with hotloading - but when reloading happens it does not recreate already instantiated python objects, it just updates the code. So if the existing object somehow become incompatible with the new code, you will experience a lot of exceptions :) . As I say, in practice this is fine most of the time for the types of things we iterate on, but for certain changes it will not. Also, hotloading only works on loose python files (not zips) - as @TheHologram noted above. Loose .py files are supported out of the "Mods" folder.
About The Sims 4 Mods & Custom Content
Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.
4,843 PostsLatest Activity: 2 hours agoRelated Posts
Recent Discussions
- 21 hours ago
- 3 days ago