Forum Discussion
MR_TURBODRIVER
6 years agoSeasoned Veteran
Hey. I don't know how you structured your directories, so I mainly see inconsistencies that would be causing issues... but you might be right about this only being available for the game itself.
From what I understand, loading of custom tuning is done by Python itself. On the system init, when the game starts up the python "server", a custom importer is setup. Then that importer is added to the list of module finders which Python uses to load py files. When a module is loaded by Python, it gets processed by the custom importer which checks if variables can be loaded from a tuning file. This means any loaded py file should be processed by the custom importer and filled in with data from a tuning file.
Unfortunately, it looks like one of the steps is to verify the "tuning roots" of the loaded file. The base game "tuning root" is the folder called "Data" inside of the game files, which makes me believe, only py files from that folder can be loaded by this implementation. I don't see any clean way to "hack" this either. The cleanest way would be to just make your own system, or...
Just use a snippet. You can create your own snippet tunable instance that loads with the game. It's not as convenient as referring to a class with static variables, because it requires to refer to an instance in an instance manager, but it's something. I do it that way.
I can't confirm this information without testing, which I don't have time for, but this is all that I can see without actually knowing how the game is supposed to operate.
From what I understand, loading of custom tuning is done by Python itself. On the system init, when the game starts up the python "server", a custom importer is setup. Then that importer is added to the list of module finders which Python uses to load py files. When a module is loaded by Python, it gets processed by the custom importer which checks if variables can be loaded from a tuning file. This means any loaded py file should be processed by the custom importer and filled in with data from a tuning file.
Unfortunately, it looks like one of the steps is to verify the "tuning roots" of the loaded file. The base game "tuning root" is the folder called "Data" inside of the game files, which makes me believe, only py files from that folder can be loaded by this implementation. I don't see any clean way to "hack" this either. The cleanest way would be to just make your own system, or...
Just use a snippet. You can create your own snippet tunable instance that loads with the game. It's not as convenient as referring to a class with static variables, because it requires to refer to an instance in an instance manager, but it's something. I do it that way.
I can't confirm this information without testing, which I don't have time for, but this is all that I can see without actually knowing how the game is supposed to operate.
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.14,622 PostsLatest Activity: 38 minutes ago
Recent Discussions
- 55 minutes ago
World not loading
Solved2 hours ago