Player with a -1 value

Here you can... report bugs. Open a new thread for each bug, please.
Post Reply
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Player with a -1 value

Post by idcarlos »

Hi.

With this savegame
I have play the match and when finish one of the players are with a valued as -1.

I'll try to debug... but I need some ideas...
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

Ok.

I'm debuging what happened with my player.
the id of the player is 6167

File: player.c
Function: player_update_fitness(Player *pl)
line 758

when try to calc the new fitness value

Code: Select all


    pl->fitness += (((pl->peak_age - pl->peak_region - pl->age) *
             const_float("float_player_fitness_increase_younger_factor") +
             const_float("float_player_fitness_increase_add")) *
            variance * streak_factor);

pl->peak_region value is -214748.359 :shock:

peak_region value it's from savegame, I don't know why have this value.

One question... this function it's for players that no participate in the game?

Code: Select all

if(pl->participation)
{
    pl->participation = FALSE;
    return;
}
Un saludo
Carlos Garcés
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

idcarlos wrote:pl->peak_region value is -214748.359 :shock:

peak_region value it's from savegame, I don't know why have this value.
i'm sorry, i don't have the time currently to debug. i hope i'll be able to do it in a few days. i have no idea where this value comes from :-P
One question... this function it's for players that no participate in the game?

Code: Select all

if(pl->participation)
{
    pl->participation = FALSE;
    return;
}
yes, this is for players who played in the last match. the fitness of those doesn't get increased.

gyözö
Press any key to continue or any other key to quit.
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

It's happend with player from academy.

In youth_academy_add_new_player peak_region not is set ¿it's ok?

And... ¿what is peak_region?
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

idcarlos wrote:In youth_academy_add_new_player peak_region not is set ¿it's ok?
oh. no, it's not ok. it's a bug. let's add

Code: Select all

new.peak_region = math_gauss_dist(const_float("float_player_peak_region_lower"), const_float("float_player_peak_region_upper"));
to the code after peak_age then (copied from player.c, player_new()).
And... ¿what is peak_region?
peak_region determines how long a player maintains his highest skill. the range for peak_region is in the constants file (as you can see in the code above), i think it's around 2-4 years or so.

gyözö
Press any key to continue or any other key to quit.
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

peak_region determines how long a player maintains his highest skill. the range for peak_region is in the constants file (as you can see in the code above), i think it's around 2-4 years or so.

gyözö
Maintains his highest skill? It's to let youngers players grow faster?

Bug is fixed in CVS. Please review it before the next release.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

idcarlos wrote:Maintains his highest skill? It's to let youngers players grow faster?
no, it's got nothing to do with young players. it's an attribute for all players. it just expresses that different players stay on their peak level for different time spans. there are players who play on a high level for 8 years, and there are also ones who can only maintain their level for 3 years.

gyözö
Press any key to continue or any other key to quit.
Post Reply