Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

Nysha's New Creators for November - posted on 1st Dec 2017 at 9:00 AM
Replies: 2 (Who?), Viewed: 1021 times.
Test Subject
Original Poster
#1 Old 13th Oct 2017 at 3:16 PM
Reloading of resources/xml while sims 4 is running
As i try to develop my mod Bedwetting for everyone i often find myself cursing about the amount of problems that have nothing to do with program language or thing that could be solved by better reading a documentation. They are just there and you have to learn from them to mod sims 4. That leads not only to long hours of debuging and changing of code, but also a very high amount of restarts of sims 4.

To fix some problems with xml for example i had to restart sims 4 about 8 times just to find out that "looping_animation" stopps any other interaction with "looping_animation" to be executed, even if the animations could be executed at the same time in theory.
The final solution was to use "canonical_animation" instad, who knew? By the way, this bug stopps toddlers from wetting diapers while napping on chair/floor/couch. The action is triggert, but the wetting itself "waits" until the toddler wakes up again, because the sleeping animation blocks the other one. It's a bug in the core (original) game too^^

Anyway, it's not even about the debuging time, but about the 8 restarts that need about 4 minutes each. With python code i can use a reload call that reloads the python code, but in case of xml i can not get it done.

What i have found so far:

Code:

core_services.py:
def file_change_manager():
global _file_change_manager
if paths.SUPPORT_RELOADING_RESOURCES:
return _file_change_manager
raise RuntimeError('The FileChangeService is not available')

tuning_commands.py:
def tuning_reload(_connection=None):
if not paths.SUPPORT_RELOADING_RESOURCES:
sims4.commands.output('Tuning reloading requires the --enable_tuning_reload flag.', _connection)
return False
else:
sims4.callback_utils.invoke_callbacks(sims4.callback_utils.CallbackEvent.TUNING_CODE_RELOAD)
done = set()
dependents = set()
...

path.py
line 31: SUPPORT_RELOADING_RESOURCES = False
line 108: # global SUPPORT_RELOADING_RESOURCES ## Warning: Unused global


I tried to use the "-enable_tuning_reload" flag on starting the game, but that did not work. Has anyone got that working or other ideas how i can improve the time i need for debugging?
Advertisement
Instructor
#2 Old 14th Oct 2017 at 6:45 AM
Have you seen this ? Link
Quote:
Originally Posted by Proximitron
As i try to develop my mod Bedwetting for everyone i often find myself cursing about the amount of problems that have nothing to do with program language or thing that could be solved by better reading a documentation. They are just there and you have to learn from them to mod sims 4. That leads not only to long hours of debuging and changing of code, but also a very high amount of restarts of sims 4.

To fix some problems with xml for example i had to restart sims 4 about 8 times just to find out that "looping_animation" stopps any other interaction with "looping_animation" to be executed, even if the animations could be executed at the same time in theory.
The final solution was to use "canonical_animation" instad, who knew? By the way, this bug stopps toddlers from wetting diapers while napping on chair/floor/couch. The action is triggert, but the wetting itself "waits" until the toddler wakes up again, because the sleeping animation blocks the other one. It's a bug in the core (original) game too^^

Anyway, it's not even about the debuging time, but about the 8 restarts that need about 4 minutes each. With python code i can use a reload call that reloads the python code, but in case of xml i can not get it done.

What i have found so far:

Code:

core_services.py:
def file_change_manager():
global _file_change_manager
if paths.SUPPORT_RELOADING_RESOURCES:
return _file_change_manager
raise RuntimeError('The FileChangeService is not available')

tuning_commands.py:
def tuning_reload(_connection=None):
if not paths.SUPPORT_RELOADING_RESOURCES:
sims4.commands.output('Tuning reloading requires the --enable_tuning_reload flag.', _connection)
return False
else:
sims4.callback_utils.invoke_callbacks(sims4.callback_utils.CallbackEvent.TUNING_CODE_RELOAD)
done = set()
dependents = set()
...

path.py
line 31: SUPPORT_RELOADING_RESOURCES = False
line 108: # global SUPPORT_RELOADING_RESOURCES ## Warning: Unused global


I tried to use the "-enable_tuning_reload" flag on starting the game, but that did not work. Has anyone got that working or other ideas how i can improve the time i need for debugging?
Test Subject
Original Poster
#3 Old 14th Oct 2017 at 2:19 PM
Thats... a bit more complicated then i expected, but it looks like it could work great after some try and error. Thank you
Back to top