March 29th - It's time for our Friday Highlights! You can check them out here!
Forum Announcement, Click Here to Read More From EA_Cade.

@SimGuruModSquad: Tunable resources for Python classes

Hey, I've been trying to find the tuning resource for Sim aging multipliers and thresholds.

(Sorry for the formatting, the forum doesn't make it easy to post code.)

I first looked at simulation/sims/aging.pyo:
class AgeTransitions:
__qualname__ = 'AgeTransitions'
AGE_TRANSITION_INFO = TunableMapping(..., value_type=AgeTransitionInfo())
AGE_SPEED_SETTING_MULTIPLIER = TunableMapping(..., value_type=Tunable(..., tunable_type=float, default=1))

I searched through the Custom Content Guide, but it describes XML instance tuning, not python module tuning, so I couldn't find the key I want for this resource.

I did find the Tuning/sims-aging.tdesc file, but again, it contains nothing that would help me find the key, or the actual resource.

Finally, I searched the SimulationFullBuild package for the "sims.aging" string, and I found a resource with key "0x62E94D38-0x00000000-0xF1352E740C4710BA".

It seems to contain some sort of index data for all python tunables. Here's the relevant part for age, with brackets replaced:
{M n="sims.aging" s="10885250052166156230"}

Full relevant section is on pastebin.com/S0H5xpDX - I can't post links yet, and can't paste XML on this forum.

I have no idea what the x="" values are supposed to mean, but based on the custom content docs, s="10885250052166156230" should point me to an instance ID.

However, when I turn that value into hex (0x97102D3FFAAA7FC6) and search for an resource with that instance ID (in all Sims packages, not just the simulation package), I don't turn up anything.

So... where do I go from there?

Comments

  • pboxpbox Posts: 630 Member
    edited October 2014
    To me it looks like that is all in sims.aging_03B33DDF_00000000_97102D3FFAAA7FC6.xml:
    <C n="AgeTransitions">
        <L n="AGE_SPEED_SETTING_MULTIPLIER">
          <U>
            <E n="key">FAST</E>
            <T n="value">2</T>
          </U>
          <U>
            <E n="key">NORMAL</E>
            <T n="value">1</T>
          </U>
          <U>
            <E n="key">SLOW</E>
            <T n="value">0.25</T>
          </U>
        </L>
    
    <E n="key">ADULT</E>
            <U n="value">
              <T n="age_trait">34319<!--trait_adult-->
              </T>
              [..]
              <T n="age_transition_threshold">20</T>
    

    From the tdesc:
    Tunable name="age_transition_threshold" [..] description='Number of Sim days required to be eligible to transition from the mapping key age to the next one."'


    So .. what do you want to do? Maybe I'm misunderstanding, but to me changing the age lengths/mulitpliers looks like it doesn't require anything more than an override for this resource.


    Edit: since you say you were poking SimulationFullBuild .. you may want to use velocitygrass' XML Extractor, that will make your life a lot easier.
    Stuff for TS2 · TS3 · TS4
  • JFinkleJFinkle Posts: 2 New Member
    Oh, I see, I didn't know about the XML extractor, so all I had to work with was the raw combined file. :blush:

    Thanks, this solves my problem completely! :smile:

    PS: I wanted to take a look at both the multipliers and thresholds to start with, I want to make a mod that lets a player set their own values for those.
  • pboxpbox Posts: 630 Member
    Ah. You mean with console commands or something? Yeah that might be useful, I guess everyone prefers different values for that.
    Stuff for TS2 · TS3 · TS4
Sign In or Register to comment.
Return to top