Post by yungjabo on Jun 30, 2024 3:21:38 GMT -5
I want to make a mod on story development (since the command center mod does not provide for the development of non-player sims in career). I am contacting you because I found a guide on your source that helped me to at least run my first script with console output:
But I can't find this syntax in public sources. How to access all sims? How to move sims from house to house? How to get them a job? To make a career advancement using e.g. "promotion chance" to start with.
For example here I can find all families in the game saved, but "household.funds" is an OBJECT, what are its attributes? How do I get the number of their budget?
Really hoping for your help, because I've been looking for information for 2 days but never found an open api for scripting. Thanks!!!
import sims4.commands
@sims4.commands.Command('myfirstscript', command_type=sims4.commands.CommandType.Live)
def myfirstscript(_connection=None):
output = sims4.commands.CheatOutput(_connection)
output("This is my first script mod").
But I can't find this syntax in public sources. How to access all sims? How to move sims from house to house? How to get them a job? To make a career advancement using e.g. "promotion chance" to start with.
For example here I can find all families in the game saved, but "household.funds" is an OBJECT, what are its attributes? How do I get the number of their budget?
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 >= 5:
break
family_name = household.name
household_budget = household.funds
output(f"{family_name} - {household_budget}")
count += 1
output("End of Family Budgets")
except Exception as e:
output(f"Error occurred: {e}")
Really hoping for your help, because I've been looking for information for 2 days but never found an open api for scripting. Thanks!!!