Post by yungjabo on Jun 30, 2024 7:05:46 GMT -5
I have just started exploring the topic of scripting mods for sims 4. I need help with creating a script, its basic idea is this:
Development of non-player sims in career (can also be deterioration, it's all optional). Buying businesses and moving to more expensive houses by non-player sims (depending on their financial situation).
It is also possible to have them strive to fulfill life goals, pump the right skills, etc.
The main problem is that there is no API for python scripting in the public domain. That is, I do not understand what commands are responsible for example for the resettlement of the family or what fields of household objects for example.
I will be glad to any help!
As long as I know how to output information to the console:
Development of non-player sims in career (can also be deterioration, it's all optional). Buying businesses and moving to more expensive houses by non-player sims (depending on their financial situation).
It is also possible to have them strive to fulfill life goals, pump the right skills, etc.
The main problem is that there is no API for python scripting in the public domain. That is, I do not understand what commands are responsible for example for the resettlement of the family or what fields of household objects for example.
I will be glad to any help!
As long as I know how to output information to the console:
import sims4.commands
import services
@sims4.commands.Command('familybudgets', command_type=sims4.commands.CommandType.Live)
def get_family_budgets(_connection=None):
output = sims4.commands.CheatOutput(_connection)
try:
household_manager = services.household_manager()
households = household_manager.get_all()
output(f"Households found: {len(households)}")
output("Family Budgets:")
count = 0
for household in households:
if count >= 1:
break
family_name = household.name
household_budget = household.household_net_worth()
output(f"{family_name} - {household_budget}")
household_fields = household.__dict__
for field, value in household_fields.items():
output(f"{field}: {value}")
count += 1
output("End of Family Budgets")
except Exception as e:
output(f"Error occurred: {e}")