Player attribute maths

Talk about EVERYTHING related to Kick Off 1 + 2.

Moderator: Moderators

User avatar
Steve Camber
Mad! 7000+ poster!
Mad! 7000+ poster!
Posts: 7560
Joined: Sat Jun 16, 2001 12:00 am
Location: Sheffield, England
Contact:

Player attribute maths

Postby Steve Camber » Fri Sep 09, 2005 12:19 pm

I've converted this from 68000 to C. Hopefully it's clear enough..

This is applied to the Shooting, Passing, Defending, and Keeping player attributes.

Code: Select all

unsigned int uiKO2Attribute=ScaleByAgilityAndMorale(uiPMAttribute)/2;

int ScaleByAgilityAndMorale(int iVal)
{
   iVal*=iPlayerAgility;
   iVal=SquareRoot(iVal);
   
   int iMorale=iPlayerMorale/4; //Morale is signed so goes from -128 to 127 (-32 to 31 after divsion)
   
   if (TeamA) iMorale=iMorale+10;  //THE "10%" ADVANTAGE. WHY OH WHY OH WHY....
   
   iVal=iVal+iMorale;
   
   //clamp between range of 0 and 200
   if (iVal>200)
         iVal=200;
   if (iVal<0)
         iVal=0;
   
   return iVal;
}


An afterthought.. By using this forumla and checking the Team A/B/N statistics, I guess it would be possible to create a big table of who can successfully tackle who :shock:
--
SteveC - Kick Off engineer - Ranked somewhere waaaay down the list
18 Dec 2003 - "One day I'm going to disassemble the 68000 code, and find out exactly what's going on in there!! "

Ask me about online KO2 :)
User avatar
Steve Camber
Mad! 7000+ poster!
Mad! 7000+ poster!
Posts: 7560
Joined: Sat Jun 16, 2001 12:00 am
Location: Sheffield, England
Contact:

Postby Steve Camber » Fri Sep 09, 2005 3:31 pm

TeamA

Code: Select all

Player #00 : Shirtnum  0 : Tackling Score =   74
Player #01 : Shirtnum  0 : Tackling Score =   55
Player #02 : Shirtnum  1 : Tackling Score =   78
Player #03 : Shirtnum  0 : Tackling Score =  100
Player #04 : Shirtnum  6 : Tackling Score =  100
Player #05 : Shirtnum  0 : Tackling Score =   84
Player #06 : Shirtnum  3 : Tackling Score =   88
Player #07 : Shirtnum  2 : Tackling Score =   77
Player #08 : Shirtnum  0 : Tackling Score =  100
Player #09 : Shirtnum  5 : Tackling Score =  100
Player #10 : Shirtnum  4 : Tackling Score =   93
Player #11 : Shirtnum  0 : Tackling Score =   74
Player #12 : Shirtnum  8 : Tackling Score =   96
Player #13 : Shirtnum  0 : Tackling Score =   69
Player #14 : Shirtnum  0 : Tackling Score =   76
Player #15 : Shirtnum  7 : Tackling Score =   82
Player #16 : Shirtnum  0 : Tackling Score =   77
Player #17 : Shirtnum 14 : Tackling Score =   65
Player #18 : Shirtnum 12 : Tackling Score =   77
Player #19 : Shirtnum 11 : Tackling Score =   78
Player #20 : Shirtnum 10 : Tackling Score =   95
Player #21 : Shirtnum  9 : Tackling Score =   96


TeamB

Code: Select all

Player #00 : Shirtnum  0 : Tackling Score =   69
Player #01 : Shirtnum  0 : Tackling Score =   50
Player #02 : Shirtnum  1 : Tackling Score =   73
Player #03 : Shirtnum  0 : Tackling Score =   97
Player #04 : Shirtnum  6 : Tackling Score =  100
Player #05 : Shirtnum  0 : Tackling Score =   79
Player #06 : Shirtnum  3 : Tackling Score =   83
Player #07 : Shirtnum  2 : Tackling Score =   72
Player #08 : Shirtnum  0 : Tackling Score =   98
Player #09 : Shirtnum  5 : Tackling Score =  100
Player #10 : Shirtnum  4 : Tackling Score =   88
Player #11 : Shirtnum  0 : Tackling Score =   69
Player #12 : Shirtnum  8 : Tackling Score =   91
Player #13 : Shirtnum  0 : Tackling Score =   64
Player #14 : Shirtnum  0 : Tackling Score =   71
Player #15 : Shirtnum  7 : Tackling Score =   77
Player #16 : Shirtnum  0 : Tackling Score =   72
Player #17 : Shirtnum 14 : Tackling Score =   60
Player #18 : Shirtnum 12 : Tackling Score =   72
Player #19 : Shirtnum 11 : Tackling Score =   73
Player #20 : Shirtnum 10 : Tackling Score =   90
Player #21 : Shirtnum  9 : Tackling Score =   91
--
SteveC - Kick Off engineer - Ranked somewhere waaaay down the list
18 Dec 2003 - "One day I'm going to disassemble the 68000 code, and find out exactly what's going on in there!! "

Ask me about online KO2 :)
Semtex
2000+ Poster!
2000+ Poster!
Posts: 2917
Joined: Tue Sep 03, 2002 12:00 am

Postby Semtex » Fri Sep 09, 2005 3:44 pm

What is frightening is when Cox is injured and you can only bring on tackling ability of low 70's at best...

Good work Steve, How does it decide that sometimes Barber will stand up to Cox?
User avatar
SimonB
2000+ Poster!
2000+ Poster!
Posts: 2717
Joined: Sun Jun 17, 2001 12:00 am

Postby SimonB » Fri Sep 09, 2005 3:54 pm

Just to confirm - these are the stats from the default game - i.e. not with the A=B version?
Birmingham 2011 World Cup: 15th best player :)
User avatar
Steve Camber
Mad! 7000+ poster!
Mad! 7000+ poster!
Posts: 7560
Joined: Sat Jun 16, 2001 12:00 am
Location: Sheffield, England
Contact:

Postby Steve Camber » Fri Sep 09, 2005 4:03 pm

Yep, this is with standard olde TeamA and TeamB, hence the differing values.

I'll keep looking into it, there may still be some more factors thrown into the mix at some point!
--
SteveC - Kick Off engineer - Ranked somewhere waaaay down the list
18 Dec 2003 - "One day I'm going to disassemble the 68000 code, and find out exactly what's going on in there!! "

Ask me about online KO2 :)
User avatar
Steve Camber
Mad! 7000+ poster!
Mad! 7000+ poster!
Posts: 7560
Joined: Sat Jun 16, 2001 12:00 am
Location: Sheffield, England
Contact:

Postby Steve Camber » Fri Sep 09, 2005 4:24 pm

Tackling/Defending High Score Table

100 A R.Cox
100 A R.Simpson
100 B R.Cox
100 B R.Simpson

96 A G.Nicholls
96 A R.A.Scott

95 A R.Barber

93 A S.D.R.Wells

91 B R.A.Scott
91 B G.Nicholls

90 B R.Barber

88 A R.Curtis
88 B S.D.R.Wells

83 B R.Curtis

82 A M.M.Barratt

78 A E.Curtis
78 A S.M.Fisher

77 A A.Lindsey
77 B M.M.Barratt
77 A M.I.Barker

73 B S.M.Fisher
73 B E.Curtis

72 B A.Lindsey
72 B M.I.Barker

65 A R.A.Hunt

60 B R.A.Hunt
Last edited by Steve Camber on Fri Sep 09, 2005 5:11 pm, edited 1 time in total.
--
SteveC - Kick Off engineer - Ranked somewhere waaaay down the list
18 Dec 2003 - "One day I'm going to disassemble the 68000 code, and find out exactly what's going on in there!! "

Ask me about online KO2 :)
User avatar
jesper
1000+ Poster!
1000+ Poster!
Posts: 1814
Joined: Tue Dec 16, 2003 12:19 pm
Location: Copenhagen, Denmark
Contact:

Postby jesper » Fri Sep 09, 2005 4:30 pm

Nice work Steve. Thanks :)

So morale is signed, hmm. Just had a look at the stats file. Fisher has (unsigned) morale 226 and signed morale -30. Hunt and Barker have negative morale as well which is understandable, but why is Fisher so unhappy?
You cannot avoid the Google [Bot]
User avatar
Steve Camber
Mad! 7000+ poster!
Mad! 7000+ poster!
Posts: 7560
Joined: Sat Jun 16, 2001 12:00 am
Location: Sheffield, England
Contact:

Postby Steve Camber » Fri Sep 09, 2005 4:35 pm

A bad morale brings down the keeping attribute, so maybe he's not the best keeper in the squad!

I'll analyse keeping, passing and shooting next.

Side note.. After realising that morale is a signed value, I have changed the competition version super CPU teams to have maximum morale. I was previously giving them a high value which of course meant they were unhappy. So in theory they should be even more unstoppable now, unless they were already maxed out even when unhappy!
--
SteveC - Kick Off engineer - Ranked somewhere waaaay down the list
18 Dec 2003 - "One day I'm going to disassemble the 68000 code, and find out exactly what's going on in there!! "

Ask me about online KO2 :)
User avatar
jesper
1000+ Poster!
1000+ Poster!
Posts: 1814
Joined: Tue Dec 16, 2003 12:19 pm
Location: Copenhagen, Denmark
Contact:

Postby jesper » Fri Sep 09, 2005 4:47 pm

Code: Select all

S.M.Fisher

Morale -30
Agility 195
Keeping 181
Effective keeping 95

M.Hopkins

Morale 35
Agility 143
Keeping 143
Effective keeping 80

A.Andrews

Morale -56
Agility  154
Keeping 87
Effective keeping 55


Fisher is still the best!
You cannot avoid the Google [Bot]
User avatar
manicx
Site Admin
Site Admin
Posts: 8788
Joined: Mon Mar 11, 2002 12:00 am
Location: Athens, Hellas
Contact:

Postby manicx » Fri Sep 09, 2005 5:16 pm

I noticed that when you score too many goals against the computer, Fisher slows down considerably. It's like moving at 50% of the normal speed. Is this due to morale?
User avatar
Steve Camber
Mad! 7000+ poster!
Mad! 7000+ poster!
Posts: 7560
Joined: Sat Jun 16, 2001 12:00 am
Location: Sheffield, England
Contact:

Postby Steve Camber » Fri Sep 09, 2005 5:37 pm

manicx wrote:I noticed that when you score too many goals against the computer, Fisher slows down considerably. It's like moving at 50% of the normal speed. Is this due to morale?


All player's running speed decreases gradually as the game progresses (possibly more so when in possession of the ball). There is a lower cap, so they dont come to a complete standstill. It's not related to morale at all.

There is also a function which makes the winning player slower by a multiple of the goal difference. However, this may only affect the goalie. There is also some code which appears to make the player speed up again in the last minute. Needs further research though...
--
SteveC - Kick Off engineer - Ranked somewhere waaaay down the list
18 Dec 2003 - "One day I'm going to disassemble the 68000 code, and find out exactly what's going on in there!! "

Ask me about online KO2 :)
TheFoxSoft
Moderator
Moderator
Posts: 4209
Joined: Fri Jun 15, 2001 12:00 am
Location: Rome, Italy

Postby TheFoxSoft » Fri Sep 09, 2005 11:02 pm

Steve Camber wrote:There is also a function which makes the winning player slower by a multiple of the goal difference. However, this may only affect the goalie. There is also some code which appears to make the player speed up again in the last minute. Needs further research though...


:shock: :shock: this is interesting
User avatar
Monty
Posting is free!!!
Posting is free!!!
Posts: 22
Joined: Thu Sep 08, 2005 12:31 am
Location: Germany

Postby Monty » Sat Sep 10, 2005 1:41 am

Steve Camber wrote:All player's running speed decreases gradually as the game progresses (possibly more so when in possession of the ball). There is a lower cap, so they dont come to a complete standstill. It's not related to morale at all.

There is also a function which makes the winning player slower by a multiple of the goal difference. However, this may only affect the goalie. There is also some code which appears to make the player speed up again in the last minute. Needs further research though...


for i can only talk about the oracle-version, it seems that this lower cap is missing there. i had several games against the computer where i led 25:0 or something around that and i had to take care that my keeper hadn't to do a goal-kick. if that happened the game was practically over, because he moved either with a speed of one pixel per 10 seconds towards his goal-kick-position or he moved BACKWARDS of the pitch into nowhere (= negative speed).

but this is maybe just a bug of the oracle-version...

Who is online

Users browsing this forum: No registered users and 11 guests