Forum Announcement, Click Here to Read More From EA_Cade.

Fame & Reputation levels

simalary44simalary44 Posts: 17 Member
edited March 5 in Nominated Threads
I apologize if this is in the wrong section,

I am looking through the game's Python files and can't seem to find exactly where the Sim's fame and reputation statistics are stored/monitored. The reason for this is I am working on a mod to set the exact amount of fame and/or reputation the user would like to set.

Thank you.
Post edited by EA_Cade on

Comments

  • TURBODRIVERTURBODRIVER Posts: 68 Member
    Hey! None of the statistics are kept within the Python code itself, that's not how the game works. There is a manager of statistics in Python that manages all of the statistics of any Sim, but the statistics itself are kept within the XML and DATA files.

    You need to extract all of the XML Tuning files from the game PACKAGE files and look through them. I will focus on fame for this explanation.
    You should first learn about the behavior of fame in-game. Every Sim has a trait that identifies their level of fame. So look for a trait that corresponds to a certain fame level in the extracted tuning files. Once you find it, look for files that refer to that trait. One of these files will be a loot file that adds the trait to the Sim, and that loot file is used within a statistic (rankedStatistic_Fame).
    You can easily edit these statistics with XML Tuning files, either via interactions, buffs, or loots (potentially more).

    Within Python, to edit one's statistic, get a SimInfo instance of a Sim and use the 'get_tracker' method (note that some Sims might not have a StatisticTracker) with a statistic instance you want to edit, that returns the correct StatisticTracker. Once you get the correct StatisticTracker by using 'get_tracker', you can use 'get_value' and 'set_value' of a statistic you feed into the method.

    If this all seems like too much, take it slow and study the things I said within the existing code in the game. Editing statistics is commonly used in the Python code, and with some time, you will finally grasp how it works. If you go with the XML Tuning route to edit statistics, there are even more examples of how to do it within the existing tuning files. Good Luck!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top