I am looking for where starting stats are defined. I want all players to start out with all the stats the same. So every stat will be like 5 or 10 for all players no matter, how might I do this?
Starting stats
Posted by Metsuro on Thu 20 Jul 2006 12:10 AM — 9 posts, 32,146 views.
I think it's in comm.c, if not something in comm.c calls a function to do it. I know the stats are made by your player name though.
handler.c:name_stamp_stats
How might i change this to make them all the number i wish them to be?
Just change where it sets ch->perm_str, etc. Get rid of the function, or just replace it.
Code: SmaugFuss 1.4
Compiler: CYGwin
Here is where I get lost I have this code I'm looking at. It is in common.c
ch->pcdata->clan = NULL;
switch ( class_table[ch->Class]->attr_prime )
{
case APPLY_STR:
ch->perm_str = 5;
break;
case APPLY_INT:
ch->perm_int = 5;
break;
case APPLY_WIS:
ch->perm_wis = 5;
break;
case APPLY_DEX:
ch->perm_dex = 5;
break;
case APPLY_CON:
ch->perm_con = 5;
break;
case APPLY_CHA:
ch->perm_cha = 5;
break;
case APPLY_LCK:
ch->perm_lck = 5;
break;
}
ch->perm_str += race_table[ch->race]->str_plus;
ch->perm_int += race_table[ch->race]->int_plus;
ch->perm_wis += race_table[ch->race]->wis_plus;
ch->perm_dex += race_table[ch->race]->dex_plus;
ch->perm_con += race_table[ch->race]->con_plus;
ch->perm_cha += race_table[ch->race]->cha_plus;
ch->affected_by = race_table[ch->race]->affected;
ch->perm_lck += race_table[ch->race]->lck_plus;
I still get values that are not equal to the values I've placed in the switch (not 5) so part of my question is should I just berid of the code after the switch to solve this problem?
Compiler: CYGwin
Here is where I get lost I have this code I'm looking at. It is in common.c
ch->pcdata->clan = NULL;
switch ( class_table[ch->Class]->attr_prime )
{
case APPLY_STR:
ch->perm_str = 5;
break;
case APPLY_INT:
ch->perm_int = 5;
break;
case APPLY_WIS:
ch->perm_wis = 5;
break;
case APPLY_DEX:
ch->perm_dex = 5;
break;
case APPLY_CON:
ch->perm_con = 5;
break;
case APPLY_CHA:
ch->perm_cha = 5;
break;
case APPLY_LCK:
ch->perm_lck = 5;
break;
}
ch->perm_str += race_table[ch->race]->str_plus;
ch->perm_int += race_table[ch->race]->int_plus;
ch->perm_wis += race_table[ch->race]->wis_plus;
ch->perm_dex += race_table[ch->race]->dex_plus;
ch->perm_con += race_table[ch->race]->con_plus;
ch->perm_cha += race_table[ch->race]->cha_plus;
ch->affected_by = race_table[ch->race]->affected;
ch->perm_lck += race_table[ch->race]->lck_plus;
I still get values that are not equal to the values I've placed in the switch (not 5) so part of my question is should I just berid of the code after the switch to solve this problem?
What is common.c?
You could get rid of the below code, or change all races bonuses to 0.
You could get rid of the below code, or change all races bonuses to 0.
switch ( class_table[ch->Class]->attr_prime )
{
case APPLY_STR:
ch->perm_str = 5;
break;
case APPLY_INT:
ch->perm_int = 5;
break;
case APPLY_WIS:
ch->perm_wis = 5;
break;
case APPLY_DEX:
ch->perm_dex = 5;
break;
case APPLY_CON:
ch->perm_con = 5;
break;
case APPLY_CHA:
ch->perm_cha = 5;
break;
case APPLY_LCK:
ch->perm_lck = 5;
break;
}this is only called if the main stat is one of them... so what you'll have to do is replace everything in the function with ch->perm_(stat) = 5;
Nice, thank you Saito!