More Awesome Than You!
Welcome, Guest. Please login or register.
2024 April 16, 18:24:38

Login with username, password and session length
Search:     Advanced search
540270 Posts in 18066 Topics by 6512 Members
Latest Member: jennXjenn
* Home Help Search Login Register
+  More Awesome Than You!
|-+  The Bowels of Trogdor
| |-+  The Large Intestines of Trogdor
| | |-+  Info: Career metrics and the <MappingsX> key
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Info: Career metrics and the <MappingsX> key  (Read 8803 times)
pbox
Garrulous Gimp
**
Posts: 315


View Profile
Info: Career metrics and the <MappingsX> key
« on: 2010 January 14, 16:13:11 »
THANKS THIS IS GREAT

This doesn't seem to be documented anywhere yet: I'm about to make some overrides for the EA careers, and found out how to use the <MappingsX>keys for career performance metrics.  

Every job level has a performance meter in-game; what exactly constitutes "performance" is defined in the <Metric1>,  <Metric2>, <Metric3> etc keys. Four parameters will fit into the UI; I haven't tested what happens when one tries to use more than four. Most of the EA careers have one or two of these values already defined in the template (the first entry in every career list; Metric1 is usually "Mood") but you can safely remove that default and use whichever metrics you want.

Each of the entries for the different career levels have their own set of parameters. They are not dependent on each other.

Sample:

  <Title>TheDishwasher</Title>
[..]
  <Level>1</Level>
  <Metric1>SkillX</Metric1>
  <Mappings1>0,1,2</Mappings1>
  <Args1>Cooking</Args1>
  <Metric2>SkillX</Metric2>
  <Mappings2>0,1,4</Mappings2>
  <Args2>Charisma</Args2>

This means that this career level uses two parameters for job performance: Cooking skill and Charisma skill - the parameter is "skill X", the argument it takes is the name of the skill. Other parameters I've found that will always work are Mood, RelCoworkers and RelBoss (as long as HasBoss is True, at least) - some of the EA careers also have custom parameters, e.g. MedicalJournals for the medical career. Those do not take any arguments.

The mappings, and this took a little bit of testing to figure out (which is why I'm writing this), define how a number of skill points (or whichever other value you use) is mapped onto the performance meter. The syntax seems to be min, normal, max - min is what's regarded as horrible, normal is normal, max is excellent. The range between normal and max will be circled in white on a sim's skill meter (= this is the stuff they need to learn in order to boost their performance).

Here's an example that illustrates the influence of the min value - this is a sim with no skills at all (same sim in both screenshots, only the min value is different):



Note how in the first screenshot, the minimum is negative - so even though they have no skills, their performance is only "bad" (they can't very well have negative skillpoints so they'll never drop below "bad"). In the second screenshot, the min is at zero - this time, no skills will be regarded as "terrible" which is worse than just "bad". The EA defaults very often use -2 for entry level positions, presumably to make the 12s happy (completely unskilled sims will still have "normal" performance or better).


Another example to show how the normal, max range is reflected in the UI:



This is with the unedited EA default for Metric1 (i.e. super easy mode for that parameter .. note how the min is at -500? Is it even possible to reach -500 mood in-game short of being about to die?).


The mappings appear to be working exactly the same no matter what the parameter is. RelBoss with a mapping of -40, 20, 40 means -40 will be regarded as terrible, 20 is normal, 40 is excellent. And so on.

See this thread for how to tune the EA careers without clashing with AwesomeMod.

Also note that I'm using Awesome with <ScaleJobProgressToAging value="True"> and <JobDifficultyScaling value="5"> so the values I'm using in my examples may or may not work well for you.


ETA: also, twallan just filled me in on the actual calculation that is used here:

Where <MappingsN>mNegMap3,mMap0,mMap3</MappingsN>

Code:
public int CalcMetric(Career career)

{
    career.LastTimeCalculated = SimClock.CurrentTime();
    float num = FindMetricValue(career);

    if (num == mMap0)
    {
        return 0x0;
    }
    if (num < mMap0)
    {
        if (num <= mMapNeg3)
        {
            return -3;
        }
        if (num < ((mMapNeg3 + mMap0) / 2f))
        {
            return -2;
        }
        return -1;
    }
    if (num >= mMap3)
    {
        return 3;
    }
    if (num > ((mMap3 + mMap0) / 2f))
    {
        return 2;
    }
    return 1;
}
« Last Edit: 2010 January 28, 19:24:24 by pbox » Logged
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26281



View Profile
Re: Info: Career metrics and the <MappingsX> key
« Reply #1 on: 2010 January 14, 16:18:30 »
THANKS THIS IS GREAT

This material is really more technical than strategy-related, so it is now Bowels of Trogdor material.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
pbox
Garrulous Gimp
**
Posts: 315


View Profile
Re: Info: Career metrics and the <MappingsX> key
« Reply #2 on: 2010 January 14, 16:22:51 »
THANKS THIS IS GREAT

Oh, oops. I wasn't aware that mere peasants were supposed to post there =).
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.102 seconds with 19 queries.