Author Topic: A Primer on the Equestrian Events  (Read 11857 times)

Offline drift9999

  • Townie
  • ***
  • Posts: 114
A Primer on the Equestrian Events
« on: August 31, 2012, 07:53:00 AM »
A Primer on the Equestrian Events
by drift9999

Introduction
I remember when aiming to supermax riding for the second generation of my Immortal Dynasty, I felt it was quite a luck-based mission and decided to have a backup skill of bass (since Riding has no opportunities, this plan is OK). I've seen some posts both here and the official Sims 3 forums express concern over the difficulty of those international event wins required for Supermax. Having safely completed it, I wondered what I might have been able to do to improve my chances, and decided to have a look into the mechanics of the Equestrian Center events (racing, jumping, cross-country) and exactly how placings are determined. It seems there's a way to greatly help your chances (and I think I discovered that the development team weren't counting on it being so hard). I figured - why not share my findings with the forum? Who knows - it might be useful for a challenge one day ;)

How Does It Work?
Put simply, there are 15 legs in a race, each lasting for five minutes. Your horse receives points for each leg of the race as well as a bonus for their mood. For each leg of the race, you receive a bonus based on your Sim's skill, your horse's relevant skills and the pace taken. There seems to be a bonus for certain traits, a penalty for certain traits, and a penalty for a racing elder.

Code: [Select]
        private int CurrentLegScore()
        {
            int num = 0;
            num += this.AddScoreForRidingSkill();
            num += this.AddScoreForHorseRacingSkill();
            num += this.AddScoreForHorseJumpingSkill();
            num += this.AddScoreForPace();
            num += this.AddScoreForTraits();
            return (num + this.AddPenaltyForHorseAge());
        }

At the end of the race, your mood bonus is added to your score, and this is compared with a database of predetermined scores as found in the XML, of this format:

Code: [Select]
<Scoring>
  <CompetitionType>CrossCountry</CompetitionType>
  <CompetitionLevel>International</CompetitionLevel>
  <ScoreRequired>515</ScoreRequired>
  <MoneyReward>2000</MoneyReward>
  <Place>1</Place>
 </Scoring>

And you receive rewards accordingly. These predetermined scores are static.

Scoring Points from Skill
Every leg, the horse's Racing or Jumping Skill values are added to the horse's score. Cross Country uses the average of the two.

Skill Level   Rider's Riding Skill   Horse's Racing Skill   Horse's Jumping Skill   
0111
1122
2144
3166
4288
521010
621212
731515
831818
942121
1042525

Riding points are always added regardless of competition type. For Racing and Jumping, only the "relevant" skill is considered - the other skill is completely irrelevant. Cross Country uses the average of the two - though do take note that this average tends to be a little truncated because of the way it's calculated, with each skill's bonus undergoing integer division by 2 and being added. So for example, a horse with level 10 racing and jumping scores 25 per round in a Racing or Jumping competition, but only 24 in Cross Country as the bonuses are truncated. We find that the first three methods called in the CurrentLegScore() method all simply feed correct parameters into and spit out an appropriate value from another method, GetBonusForSkill:

Code: [Select]
    public static int GetBonusForSkill(int level, SkillNames skill, CompetitionType competitionType)
    {
        if (level >= 0)
        {
            SkillNames names = skill;
            if ((names <= SkillNames.Racing) && (names >= SkillNames.Riding))
            {
                switch (((int) (names - SkillNames.Riding)))
                {
                    case 0:
                        return SkillTuning[level].RidingSkillBonus;

                    case 1:
                        switch (competitionType)
                        {
                            case CompetitionType.Jumping:
                                return SkillTuning[level].JumpingSkillBonus;

                            case CompetitionType.CrossCountry:
                                return (SkillTuning[level].JumpingSkillBonus / 2);
                        }
                        return 0;

                    case 2:
                        switch (competitionType)
                        {
                            case CompetitionType.Racing:
                                return SkillTuning[level].RacingSkillBonus;

                            case CompetitionType.CrossCountry:
                                return (SkillTuning[level].RacingSkillBonus / 2);
                        }
                        return 0;
                }
            }
        }
        return 0;
    }

Scoring Points for Pacing
Well, from the XML we have:
Code: [Select]
    <kToneSuccessChance value="0.8, 0.5, 0.35">
      <!--Chance Array:  [0-1, 0-1, 0-1].  Description:  Chance of success [Steady Pace Tone, Take Risks Tone, Go For Broke Tone]-->
    </kToneSuccessChance>
    <kToneBonus value="1, 8, 16">
      <!--Bonus ArrayRange  Description:  Bonus given with [Steady Pace Tone, Take Risks Tone, Go For Broke Tone]-->
    </kToneBonus>
    <kTonePenalty value="0, 8, 16">
      <!--Range  Description:  Penalty given with [Steady Pace Tone, Take Risks Tone, Go For Broke Tone]-->
    </kTonePenalty>

And this module calculates the points:
Code: [Select]
        private int AddScoreForPace()
        {
            float num = EquestrianCenter.kToneSuccessChance[(int) this.mCurrentPace];
            int num2 = EquestrianCenter.kToneBonus[(int) this.mCurrentPace];
            int num3 = EquestrianCenter.kTonePenalty[(int) this.mCurrentPace];
            int num4 = 0;
            float ridingSkillToneMultiplier = EquestrianCenter.GetRidingSkillToneMultiplier(base.Actor.SkillManager.GetSkillLevel(SkillNames.Riding));
            if (RandomUtil.RandomChance01(num * ridingSkillToneMultiplier))
            {
                return (num4 + num2);
            }
            return (num4 - num3);
        }

The riding skill tone multiplier found in the XML database increases the probability of success. This starts at 1.0, becomes 1.1 at riding skill 2, 1.2 at level 4 and so on, maxing at 1.5.

Thus, to summarise the bunch of data above:
  • Steady Pace: 80% chance of +1 point, 20% chance of -0. Chance of "success" (i.e. getting positive points) is 88% at Riding 2, 96% at Riding 4, 100% at 6 and above.
  • Take Risks: 50% chance of +8 points, 50% chance of -8. Chance of success is 55% at Riding 2, 60% at 4, 65% at 6, 70% at 8 and 75% at 10.
  • Go For Broke: 35% chance of +16 points, 65% chance of -16. Chance of success is 38.5% at Riding 2, 42% at 4, 45.5% at 6, 49% at 8 and 52.5% at 10.
Mathematically, if your Rider has maxed skill, the expected values of the three tones are +1, +4 and +0.8 respectively. Take Risks is thus probably the best tone to use to maximise your expected performance, though it's not always the best under some specific circumstances (discussed later in the section on how to beat international competitions).

Scoring Points from Traits
(Does not seem to work.)
Theoretically, you would gain 2 points per leg for Agile or Fast in an appropriate competition (cross country counts either one, not both), and lose 2 points per leg for Hates Jumping or Lazy, based on this module:

Code: [Select]
        private int GetScoreForTrait(TraitNames traitName, CompetitionType competition)
        {
            TraitNames names = traitName;
            if (names == TraitNames.LazyHorse)
            {
                switch (competition)
                {
                    case CompetitionType.Racing:
                    case CompetitionType.CrossCountry:
                        return -EquestrianCenter.kPetTraitPenalty[0];
                }
                return 0;
            }
            if (names <= TraitNames.FastPet)
            {
                if (names < TraitNames.AgilePet)
                {
                    goto Label_00DA;
                }
                switch (((int) (names - TraitNames.AgilePet)))
                {
                    case 0:
                        switch (competition)
                        {
                            case CompetitionType.Jumping:
                            case CompetitionType.CrossCountry:
                                return EquestrianCenter.kPetTraitBonus[1];
                        }
                        return 0;

                    case 1:
                        goto Label_00DA;

                    case 2:
                        switch (competition)
                        {
                            case CompetitionType.Racing:
                            case CompetitionType.CrossCountry:
                                return EquestrianCenter.kPetTraitBonus[0];
                        }
                        return 0;
                }
            }
            if (names == TraitNames.HatesJumpingPet)
            {
                switch (competition)
                {
                    case CompetitionType.Jumping:
                    case CompetitionType.CrossCountry:
                        return -EquestrianCenter.kPetTraitPenalty[1];
                }
                return 0;
            }
        Label_00DA:
            return 0;
        }

However, in practice this doesn't seem to happen.

Positive Traits - I tested a Horse with skills 6/6 and a Rider with a Riding skill of 8 in the Advanced Cross Country competition. A horse with skills 6 and 6 will earn 12 points per round in Cross Country, and the Rider contributes three points to make 15. Using Steady Pace, the number of points scored without considering traits should be 16 * 15 = 240, which is just short of the cut-off for third place (242). Any two-point bonus for whatver reason will result in a 3rd place, whether once per leg or once only, but the horse still finished in 4th, whether Agile, Fast, Agile and Fast, or none.

Negative Traits - I tested a Horse with jumping skill 7 and a Rider with Riding skill 10 in the International Jumping competition. A horse with skill 7 earns 15 points per round, the Rider contributes four to make 19. Steady Pace will mean 20 * 15 = 300 points without considering traits. This is exactly enough for a 6th place finish; any penalty would cause it to be 7th. Even with Hates Jumping, the horse still finished 6th.

The Penalty for Racing Elders
A racing elder will lose two points per leg, both theoretically and actually - in other words, overall 30 points for the whole race.

I tested this with the same setup, an Elder Horse with jumping skill 7 and a Rider with skill 10. The horse finished 7th. I then boosted the mood of the rider by giving him Ambrosia, lots of Fun and a Spa Package (+75, +40 and +75 for +190 total). This would add 19 points but the Elder Horse still finished 7th. After sticking on a few more spa packages to boost the bonus to +36, the Horse finished 6th.

The Mood Bonus
At the end of the competition, your horse will receive a point bonus depending on the mood of the Sim and the Horse - I tested this both ways. Every +10 you have in mood (combined) will award one point. The Horse can't stack too many points, but your Rider can.

My setup to test this one was the same as for the positive traits. The Horse has skills 6/6 and the rider skill 8. I entered them into the Advanced Cross Country competition. They score 240 base points with Steady Pace and need just two more to get 3rd. With no moodlets in place, they scored 4th; by giving the horse a carrot (+40) or the rider Ambrosia (+75) they were able to place 3rd.

Those Blasted International Competitions
So how do you win them? Well, let's take a look at the number of points required for a given (winning) placing in international competitions.
Placing   Racing and Jumping   Cross Country   
1st510515
2nd470480
3rd410420
4th370380
5th340350
6th300300
You'll need to collect 510 points for a win in racing or jumping, and 515 for cross country.

Naturally, to win these you'll want to use a rider who has the riding skill maxed, and a non-elder horse with the relevant skills maxed (or both for cross country). However, there's quite a substantial luck element involved.

International Racing and Jumping
For Racing and Jumping, suppose your rider and horse have the relevant skills maxed. Let's try to calculate the horse's score. Based on the skill of the rider and horse, you have (25 + 4) x 2 or 435 points; you thus need 75 more. Steady Pace isn't going to cut it, so you'll have to choose between Take Risks, Go for Broke or some mix of both.

Picking Take Risks, to have a net gain of +75, you will need 13 successes and 2 failures to win (11 * 8 = +88, but 12 successes and 3 failures is 9*8 = +72, which isn't enough). With a mood boost of +30, you can win on 12 successes and 3 failures; and with a boost of +190 you can win on 11 successes and 3 failures. Mathematically, the probability you'll win if the tone is "Take Risks" throughout (for reasonable moods) is:
  • Mood less than +30 (barring extreme negatives): 23.61%
  • Mood +30 to +189: 46.13%
  • Mood +190 to +349: 68.65%
  • Mood +350 to +509: 85.16%
Picking Go For Broke, on the other hand, to have a net gain of +75 you will need 10 successes and 5 failures to win (5 * 16 = +80, but 9 successes and 6 failures is 3*16 = +48, which isn't enough). With a mood boost of +270, you can win on 9 successes and 6 failures; and with a boost of +590 (the spa treatments help...) you can win on just 8 successes and 7 failures. Mathematically, the probability you'll win if the tone is "Go for Broke" throughout (for reasonable moods) is:
  • Mood less than +270 (at least -50): 20.13%
  • Mood +270 to +589: 37.55%
  • Mood +590 to +909: 57.81%
Thus "Take Risks" outperforms "Go for Broke" except for moods between -150 and -50, which (hopefully) you won't be experiencing.

International Cross Country: The Revenge of Integer Division
Cross-country, on the other hand, is considerably tougher to win because of "integer division" (basically, discarding of remainders at an intermediate step, because the score variable's designed ONLY to hold integers). Your skill bonus is not 25 but 24, because the game computes (25/2 + 25/2) as (12 + 12), losing the remainders halfway. Thus you only have 28 points per leg, or 420 base points. Since you need 515, you have to make up +95 points somehow.

Picking Take Risks, to have a net gain of +95, you will need 14 successes and 1 failure to win (13 * 8 = +104, but 13 successes and 2 failures is 11*8 = +88, which isn't enough). With a mood boost of +70, you can win on 13 successes and 2 failures; and with a boost of +230 you can win on 11 successes and 3 failures. Mathematically, the probability you'll win if the tone is "Take Risks" throughout (for reasonable moods) is:
  • Mood less than +70 (at least -110): 8.02%
  • Mood +70 to +229: 23.61%
  • Mood +230 to +389: 46.13%
  • Mood +390 to +549: 68.65%
Picking Go For Broke, on the other hand, to have a net gain of +95 you will need 11 successes and 4 failures to win (7 * 16 = +112, but 10 successes and 5 failures is 5*16 = +80, which isn't enough). With a mood boost of +150, you can win on 10 successes and 5 failures; and with a boost of +470 you can win on 9 successes and 6 failures. Mathematically, the probability you'll win if the tone is "Go for Broke" throughout (for reasonable moods) is:
  • Mood less than +150 (at least -170): 8.58%
  • Mood +150 to +469: 20.13%
  • Mood +470 to +789: 37.55%
  • Mood +790 to +1209: 57.81%
I guess if you can't get +70 mood then Go For Broke is better, but if you can (you should) then Take Risks outperforms it here too. Stack those mood boosts and hopefully your Sim will be able to win the competitions!

On a closing note, somehow I think EA wasn't intending for winning international competitions to be so difficult - though it's more realistic that they are difficult. If the trait bonus worked properly, having 30 more race points would really make the international events substantially easier. (To use an example - using Take Risks, to get 45 additional points for International Racing/Jumping instead of 75 even with no mood bonus is winnable 68.65% of the time, and just a +50 mood knocks it to 85.16% while +210 makes it 94.34%!)

Summary
  • Your Sim's riding skill and Horse's racing/jumping skills contribute the bulk of your horse's performance.
  • The riskier riding paces are better suited for Sims with higher Riding skill, because the probability that they are successful will increase.
  • Take Risks is generally speaking the best pace to use in terms of overall expected performance, as well as winning most international competitions.
  • Traits, while supposed to influence race performance, do not seem to do so.
  • Elder Horses have a fairly significant handicap to winning races.
  • International competitions, even with maxed skills for both the horse and the rider, are quite luck-reliant.
  • Boost the mood of your Sim and your Horse to improve your chances of winning. Not just with a Unicorn's Blessing or Carrot (+40 points), but try and cram positive moodlets if you can. The Spa's a great way to do this.
  • If you arrive early i.e. be at the door before 5 pm or 12 noon, for every competition session you can compete twice. Don't forget this! More races = more chances to win.

Offline MarianT

  • Global Moderator
  • Watcher
  • ******
  • Posts: 6967
  • Everything in life is here to drive you crazy. R.T
Re: A Primer on the Equestrian Events
« Reply #1 on: August 31, 2012, 11:06:37 AM »
Wow -- very impressive and useful. You get an A+ from me for this analysis.
When the Zombies Come(Completed)--100 Nooboos Nabbed




Enjoy writing stories? Please check the Rules for Stories before posting.



Registered members do not see ads on this Forum. Register here.

Chuckles_82

  • Guest
Re: A Primer on the Equestrian Events
« Reply #2 on: August 31, 2012, 10:54:56 PM »
Haha excellent! You seem to have understood most of this more than I could bother wrapping my brain around. I too, was looking at this code for the Animal Insticts challenge. When is there a competition at 12 noon though?

Offline drift9999

  • Townie
  • ***
  • Posts: 114
Re: A Primer on the Equestrian Events
« Reply #3 on: September 01, 2012, 04:50:44 AM »
Wow -- very impressive and useful. You get an A+ from me for this analysis.
Thanks!  :)

Haha excellent! You seem to have understood most of this more than I could bother wrapping my brain around. I too, was looking at this code for the Animal Insticts challenge. When is there a competition at 12 noon though?
It took quite a while for me to wrap my head around this, honestly, cause I thought there were 16 laps at first and it caused my calculations to go haywire; I didn't realise that the mood of your Sim is relevant too. Only when I opened the Sims3GamePlayObjects.dll did I realise that it was only 15 laps and that the Sim's mood contributed. Glad to have worked it out, though!

The competitions are at 12 noon on Sundays only. Otherwise it's 5 - 9 pm.

Offline Korva

  • Townie
  • ***
  • Posts: 214
Re: A Primer on the Equestrian Events
« Reply #4 on: September 09, 2012, 02:43:57 AM »
Awesome primer, thank you. I did have the impression that cross-country is the hardest to win. It's just a shame traits don't actually work as intended.