Forum Announcement, Click Here to Read More From EA_Cade.

Need a litte tuning file explanation.

rudy8292rudy8292 Posts: 3,410 Member
Hi all,

Pre Get Famous, I used a mod that kinda overhauled EA's weather forecast system.
Sadly the modder decided to take the mod offline because it had some problems, so I decided to give it a try.

I started editing the forecast tuning files, but I'm having some questions because I don't really understand what certain parts of these tuning files mean, so I hope some experienced modder can help me out a bit so I can continue to revive this mod.
<L n="weather_event_time_blocks">
    <U>
      <T n="key">0</T>
      <L n="value">
        <U>
          <U n="duration">
            [b]<T n="lower_bound">2</T>[/b]
           [b] <T n="upper_bound">3</T>[/b]
          </U>
          <T n="weather_event">182331<!--weather_Snow_Storm--></T>
        </U>
        <U>
          <U n="duration">
          <T n="lower_bound">3</T>
            <T n="upper_bound">5</T>
          </U>
          <T n="weather_event">182376<!--weather_Snow_Light_Freezing--></T>
          <T n="weight">2</T>
        </U>
        <U>

I would like to know a few things:

- What does the Key thing mean in the forecast files most of the time starting with 0 and going like 0,6,12,18
- What does the Lower bound and Upper bound mean in the duration lines (I assume lower bound was the minimum x Sim hours a weather event will be triggered and the Upper bound the maximum x Sim hours it will be triggered, but not sure).
- Some events have a ''Weight'' coding line under them, what does this exactly do?

- Sometimes there are multiple weather events within a key block that don't have weight's to them at all. Does this mean the game randomly chooses a weather event to trigger from the possible weather events within that block listed?

for example:

<T n="key">0</T>
      <L n="value">
        <U>
          <U n="duration">
            <T n="lower_bound">2</T>
            <T n="upper_bound">3</T>
          </U>
          <T n="weather_event">182331<!--weather_Snow_Storm--></T>
        </U>
        <U>
          <U n="duration">
            <T n="lower_bound">3</T>
            <T n="upper_bound">5</T>
          </U>
          <T n="weather_event">182376<!--weather_Snow_Light_Freezing--></T>
        </U>
        <U>
          <U n="duration">
            <T n="lower_bound">3</T>
            <T n="upper_bound">5</T>
          </U>
          <T n="weather_event">182374<!--weather_Snow_Heavy_Freezing--></T>
        </U>
        <U>
          <U n="duration">
            <T n="lower_bound">4</T>
            <T n="upper_bound">6</T>
          </U>
          <T n="weather_event">182331<!--weather_Snow_Storm--></T>
        </U>
      </L>
    </U>

Also sometimes weather events don't have duration coding attached to them at all, what does that do, because it really confuses me.

For example:
<U n="duration">
            <T n="lower_bound">3</T>
            <T n="upper_bound">5</T>
          </U>
          <T n="weather_event">182374<!--weather_Snow_Heavy_Freezing--></T>

The above weather event has duration coding attached to it, but a few (key) blocks later the same event has no duration coding attached to it.
<U>
          <T n="weather_event">182374<!--weather_Snow_Heavy_Freezing--></T>
          <T n="weight">1</T>
        </U>

Does this mean that the weather effect will last until the next key block hits? i.e. key blocks seem to start with 0 (most of the time) and go like 6,12,18.


Sorry for the (lots of) questions, but I couldn't figure it out and couldn't find a clear guide or explanation online, so I hope someone can help me out a bit.

Thanks a lot!
Post edited by rudy8292 on

Comments

  • TriplisTriplis Posts: 3,048 Member
    edited November 2018
    Hey @rudy8292 I suggest downloading the latest TDESCs. Found here, as of writing this post.

    Then look for WeatherForecast.tdesc under Weather Forecasts > Descriptions

    You can open .tdesc file in any standard text editor. I like to use Notepad++, but it's totally down to preference. Atom is also a good option, imo.

    I believe most of it is explained in there to some degree. :) I have no particular experience with the weather tuning, but I believe it describes it well there.

    For example, it says under weather_event_time_blocks:
    The weather events that make up this forecast. Key is hour of day that event would start, value is a list of potential events

    Feel free to ask if you still have questions after reading the tdesc and I can try to help you reason it out.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • rudy8292rudy8292 Posts: 3,410 Member
    edited November 2018
    Triplis wrote: »
    Hey @rudy8292 I suggest downloading the latest TDESCs. Found here, as of writing this post.

    Then look for WeatherForecast.tdesc under Weather Forecasts > Descriptions

    You can open .tdesc file in any standard text editor. I like to use Notepad++, but it's totally down to preference. Atom is also a good option, imo.

    I believe most of it is explained in there to some degree. :) I have no particular experience with the weather tuning, but I believe it describes it well there.

    For example, it says under weather_event_time_blocks:
    The weather events that make up this forecast. Key is hour of day that event would start, value is a list of potential events

    Feel free to ask if you still have questions after reading the tdesc and I can try to help you reason it out.

    @Triplis
    Thank you so much for this tip! I didn't know this existed, so this was very helpful!

    From what I understand in the TDESC Weather Forecast file is that

    -<Key> is indeed the hour of day
    Does this mean that Key 0 is actually midnight and key 23 for example 11PM that day? I am Dutch (but playing the game in English) and our time clock count goes all the way from 0:00 (midnight) to 24:00 (next midnight) and everything in between. Does the game coding use a same clock format? i.e. ''key'' >18<is 6 PM?

    - Weather Events within the key block are all the weather events that can trigger during that time (key) block
    - Upper bound and Lower bound are the times certain weather events can last (being lower bound the minimum duration and the upper bound the maximum duration for said weather event)

    - Weight means the likelihood the game will pick said weather event to occur over other weather events without or with a lesser weight in that time block, but it is still random, so it does not have to pick the weather event with the highest 'weight'?

    The only things I still haven't really figured out are what if a weather event has no duration attached to it? Does it mean that IF the game decides to pick that weather type from said key block, that weather event will at least last until the next key block starts and the game picks another event from the next key block?

    And also what if no weather event within a certain key block has a weight attached to it? I guess it must mean that every single weather type listed within that key block has an equal chance to be randomly chosen by the game to occur?

    Thank you for the help!

    This Tdesc thing helped me a lot already!


    Post edited by rudy8292 on
  • TriplisTriplis Posts: 3,048 Member
    rudy8292 wrote: »
    The only things I still haven't really figured out are what if a weather event has no duration attached to it? Does it mean that IF the game decides to pick that weather type from said key block, that weather event will at least last until the next key block starts and the game picks another event from the next key block?

    And also what if no weather event within a certain key block has a weight attached to it? I guess it must mean that every single weather type listed within that key block has an equal chance to be randomly chosen by the game to occur?
    In general, I think the key thing to look for is what the default values are defined as in the tuning. Some variables will have a default value, if you don't set them yourself.

    It says, for example, that the default duration lower_bound is 1 and the default duration upper_bound is 4. But if you left out the duration code entirely, I'm not sure if it would set the duration or not.

    You could set up Scumbumbo's Sims Log Enabler tool. Then if you load up the game with a mod that doesn't have a duration defined and look in the tuning.log file in the Sims Log Enabler folder, you should be able to find out if any tuning errors show up for that file.

    In the case of the weight, the default weight is listed in the tdesc as 1, so that's probably what it would be if you didn't define it, but you did define a weather event.
    <Tunable type="int" name="weight" class="Tunable" default="1" display="Weight" muid="612D8D3DAE40FD94" description="Weight of this event being selected." tuning_state="NeedsTuning" Deprecated="False" filter="0" group="General" />
    

    But yeah, if the weight was the same for all and it's random apart from the weight, then setting the weight as the same for each would, I think, mean the chance is the same, as you speculate.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • rudy8292rudy8292 Posts: 3,410 Member
    @Triplis

    Thanks a lot for the help and tips! Will see if I can come up with something.

    Will give the Log Enabler tool a try tomorrow! :)

  • TriplisTriplis Posts: 3,048 Member
    No problem, hope you've been able to work it out as you desire. :)
    Mods moved from MTS, now hosted at: https://triplis.github.io
Sign In or Register to comment.
Return to top