Forum Discussion
"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."SimGuruModSquad;12565380" wrote:
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.
Well I’m only watching from the sidelines – but even so it seems pretty obvious to me that anything that would make it easier to mod the game would be a big win. So, yay!- It's a little difficult to say for certain exactly how useful it would be before digging into scripting seriously (still awaiting my copy here in the UK :D), but from general experience with game programming, I'd say that if ingame script reloading could be added as a console command or something similar, then it would see a lot of use.
I'm imagining, reloading the scripts, tweaking a few values, reloading again... and so on in a loop to get some effect exactly right. In the past I've used this kind of technique a lot for things that are very visual e.g. lighting. If that sort of tweaking is commonplace with customising stuff then the time savings versus rebooting the entire game quickly add up. Right now the kind of scripting/data mods I was pondering adding vary from probably well supported things; like adding new careers to more esoteric things like adding superpowers!
So, I would welcome such a feature - but without spending more time looking at the scripts, or knowing how much time investment it is on the Maxis end to add I can't guess at how 'worth doing' it is yet. - I agree that it is hard not to imagine this being useful to someone if not us. But I would really like it. I think that having it enabled via a config file that is slightly obscure maybe with a comment about the risk should help mitigate it as well as an obscure console command. Obviously, its not going to work correctly all of the time and is not expected to but anything that cuts down testing cycle times is a win for the modders. Looks like it might also hot reload resources as well so the two together would be great even if it causes the occasional crash or error.
- > @SimGuruModSquad said:
> MyreMylar 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.
After I heard about the possibility of hotloading scripts into the game I decided I'd put my efforts in and help build a better simulation. Please assist in the community to make sure this happens. - From "We support modding." to "Do it yourself." in record time. >:)
"SimGuruModSquad;12520975" wrote:
Unfortunately we cannot release our raw source code..."
"As I have mentioned previously, we have documentation coming but it will not cover this topic."
As you guys figure things out more and have specific questions on the python side of things I will do my best to give you the info you need.
@SimGuruModSquad This brings up lots of questions. Why can't you release the code or cover this topic in your documentation? And why do people have to have specific questions in order to get an answer? It is sort of how gibbed said. You said you were going to support modding but now you're backing away to this do it yourself stance. Why is that? It's so disappointing.- # WARNING: Decompyle incomplete on every pyo file, after a few lines.
- Where are you guys getting these compiled .pyo files from? Are they hidden in one of the CAS demo packages?
- They are in the preload files from Origin.
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,812 PostsLatest Activity: 5 hours agoRelated Posts
Recent Discussions
- 3 days ago
- 3 days ago