24 Feb, 2009, boblinski wrote in the 1st comment:
Votes: 0
Could someone point me in the right direction for what files I'll have to edit to increase my max stats to something like 30 or 35?

I've tried simply editing the races and making their stats high, but the mud restricts them from going about 25.
24 Feb, 2009, Kline wrote in the 2nd comment:
Votes: 0
Hi, please provide what code base you're using so we can direct you to the proper spot. (Stock, QuickMUD, the latest crazy RaM build ..? ;)

As a cursory guess, I'd check either const.c (if you have one) and look for a stat table, or save.c and see if stats > 25 get reset down on player save/load.
25 Feb, 2009, Omega wrote in the 3rd comment:
Votes: 0
get_curr_stat

if its rom, it restricts max to 25.
25 Feb, 2009, boblinski wrote in the 4th comment:
Votes: 0
I'm using stock QuickMud code
25 Feb, 2009, cbunting wrote in the 5th comment:
Votes: 0
Hello,

The code you are looking for is in handler.c

Here is an example.

int get_curr_stat( CHAR_DATA *ch, int stat )
{
int max;

if (IS_NPC(ch) || ch->level == LEVEL_IMMORTAL)
max = 35;

if (IS_NPC(ch) || ch->level == LEVEL_LORD)
max = 30;

if (IS_NPC(ch) || ch->level == LEVEL_HERO)
max = 25;

else


You'll also have to add additional stats to the attribute bonus tables and one other place I think but I don't remember offhand.

Chris
25 Feb, 2009, Sharmair wrote in the 6th comment:
Votes: 0
cbunting said:
You'll also have to add additional stats to the attribute bonus tables and one other place I think but I don't remember offhand.

That would be in const.c. Make sure you have an entry for every value a stat can be. The tables are
called str_app[26], int_app[26], wis_app[26] etc. Change that number from 26 to one more then your
new max (there is an entry for 0). You might also have to change some code in any OLC that might
clip your input to a range less then 26.
25 Feb, 2009, boblinski wrote in the 7th comment:
Votes: 0
Okay thanks guys, I'm going to start working on this one very shortly.. I was just wondering, before I start.. if there is any way I can have a 'max trainable' and a 'max attainable'…

——————–
example:

Bob has-> Str: 20(20)

he goes to the trainer and tries to train his strength: train strength
Your strength is already at its maximum.

so Bob decides to buy a pair of magical gloves which add 5 strength…

Bob wears the gloves and his strength jumps up: Str: 20(22)
——————–
In this example, bobs Max_trainable for strength was 20…
his Max_Attainable for strength was 22…
25 Feb, 2009, David Haley wrote in the 8th comment:
Votes: 0
Yes, you can certainly do such a thing. You'd have to cap the base values, but not the "curr" values (i.e. after modifiers are applied).
25 Feb, 2009, boblinski wrote in the 9th comment:
Votes: 0
How and where might this be done?
(sorry.. I like to find things out before I dive in and drown in the deep end)
26 Feb, 2009, Igabod wrote in the 10th comment:
Votes: 0
In the do_train function in act_move.c you can put an if check in the part relating to the stats.

if (!str_cmp (argument, "str"))
{
if (class_table[ch->class].attr_prime == STAT_STR)
cost = 1;
stat = STAT_STR;
pOutput = "strength";
}


could be changed to this

if (!str_cmp (argument, "str") && ch->perm_stat[STAT_STR] < 50)
{
if (class_table[ch->class].attr_prime == STAT_STR)
cost = 1;
stat = STAT_STR;
pOutput = "strength";
}
else
{
stc("You can't train your strength any higher than 50.\r\n",ch);
return;
}


I'm sure there are other ways to do it but that way is simple enough. Be sure to change the 50 to whatever you want your max str to be.
22 Apr, 2009, boblinski wrote in the 11th comment:
Votes: 0
Currently in QuickMud stock code, ALL races can obtain 25 in all stats, provided they have the right equipment.

I would like to change my code so that the stats in the race_tables become the absolute max stats (with equipment).. how might I do this?

Example:
{
"human", "Human", 0, {100, 100, 100, 100},
{""},
{13, 13, 13, 13, 13}, {18, 18, 18, 18, 18}, SIZE_MEDIUM},

I want 18 to be the absolute maximum.. so even if a player has a sword with +2 strength, if he already have a str of 17… his strength will increase to 18.. not 19.
22 Apr, 2009, Kline wrote in the 12th comment:
Votes: 0
You should have something similar to get_curr_str() that will look at a player's stats, add bonuses, and return a number. Just add a check that if( total >= race_table[ch->race].max_str ) return race_table[ch->race].max_str or something.
22 Apr, 2009, Sharmair wrote in the 13th comment:
Votes: 0
Kline said:
You should have something similar to get_curr_str() that will look at a player's stats, add bonuses, and return a number. Just add a check that if( total >= race_table[ch->race].max_str ) return race_table[ch->race].max_str or something.

That would (probably) be get_curr_stat(CHAR_DATA*, int) in handler.c.

Taking a look at the code in stock ROM 2.4b6 (I am pretty sure your code is based on that), I see that
it uses the race stats, but for some reason makes the max the race max plus 4, plus 2 if it is the class'
prime stat, plus one if the race is human. You should be able to change that part of the code to just
not add any pluses (just use the race max) if you want.
23 Apr, 2009, boblinski wrote in the 14th comment:
Votes: 0
Code:
const struct dex_app_type dex_app[31] = {
{60}, /* 0 */
{50}, /* 1 */
{50},
{40},
{30},
{20}, /* 5 */
{10},
{0},
{0},
{0},
{0}, /* 10 */
{0},
{0},
{0},
{0},
{-10}, /* 15 */
{-15},
{-20},
{-30},
{-40},
{-50}, /* 20 */
{-60},
{-75},
{-90},
{-105},
{-120}, /* 25 */
/*add extra dex stats*/
{-125},
{-130}, /* 27 */
{-135},
{-140},
{-145} /* 30 */
};


Error:
Quote
$ make
gcc -Wall -O -ggdb -DNOCRYPT -DQMFIXES -c -o obj/const.o const.c
const.c:913: error: conflicting types for 'dex_app'
merc.h:2211: error: previous declaration of 'dex_app' was here
const.c:913: error: conflicting types for 'dex_app'
merc.h:2211: error: previous declaration of 'dex_app' was here
make: *** [obj/const.o] Error 1


I've editted handler.c to have 30 as a max.. so not sure whats wrong..

Ideas?
23 Apr, 2009, Kline wrote in the 15th comment:
Votes: 0
I'm guessing line 913 of your const.c is "const struct dex_app_type dex_app[31] = {". You need to update line 2211 of your merc.h, too, to expand that struct to 31 elements. Your merc.h file still has the "old" struct of like 25 or 27, whatever it was before you added to it.
0.0/15