- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Remove needs from servos
- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Remove needs from servos
Replies: 1 (Who?), Viewed: 664 times.
#1
3rd Dec 2020 at 11:26 AM
Posts: 21
Thanks: 334 in 3 Posts
Remove needs from servos
How do i remove the social and fun needs from servos? I want a robot to do chores around the house not to talk.
Advertisement
Lab Assistant
#2
5th Dec 2020 at 7:26 AM
Posts: 137
Thanks: 4459 in 38 Posts
Quote: Originally posted by Agent87
How do i remove the social and fun needs from servos? I want a robot to do chores around the house not to talk. |
You would need to add the social and fun needs to the servo trait's initial commodities blacklist.
There are 2 ways to do this.
The first is to add it to the XML tuning. The trait's name is trait_Humanoid_Robots_MainTrait.
You would add the needs to this section of the XML:
Code:
<L n="initial_commodities_blacklist"> <T>16656<!--motive_Hunger--></T> <T>16652<!--motive_Bladder--></T> <T>16657<!--motive_Hygiene--></T> <T>16654<!--motive_Energy--></T> <T>10020<!--commodity_Motive_Thirst--></T> <T>16617<!--commodity_Motive_HygieneOral--></T> <T>16616<!--commodity_Motive_HygieneHands--></T> </L>
This would make your mod incompatible with other XML mods which modify that trait.
The other method is to add the needs to the blacklist through a script.
This requires injector.py to compile:
Code:
from injector import inject_to from sims4.resources import Types from sims4.tuning.instance_manager import InstanceManager from server_commands.argument_helpers import get_tunable_instance @inject_to(InstanceManager, 'load_data_into_class_instances') def load_data_into_class_instances(original, self): original(self) servo_trait = get_tunable_instance(Types.TRAIT, 218444) motive_fun = get_tunable_instance(Types.STATISTIC, 16655) motive_social = get_tunable_instance(Types.STATISTIC, 16658) # initial_commodities_blacklist is a frozenset and must be converted to a normal set to make it modifiable servo_trait.initial_commodities_blacklist = set(servo_trait.initial_commodities_blacklist) # add the motives to the list. difference_update can be used to remove motives instead and re-enable them. servo_trait.initial_commodities_blacklist.update({motive_fun, motive_social}) # convert it back into a frozenset which the game is expecting servo_trait.initial_commodities_blacklist = frozenset(servo_trait.initial_commodities_blacklist)
Who Posted
|