now on to my next Exp problem

Posted by Ithildin on Sun 22 Feb 2004 04:53 AM — 6 posts, 19,588 views.

USA #0
Thanks to Greven for my first Exp problem. now here is my second. i've changed the whole exp system around. i need much less than normal. to level it's (level*70)+ expbase. so now every time my character levels, he only needs 70 more xp to level again. i want the exp counter to set back to 0 after you level. example.

i have 2,630 xp of 2700

i get 75 xp on a kill and i level.

so now i have 5 xp of 2770

any ideas?
USA #1
here's where i think i should be:


/* xp cap to prevent any one event from giving enuf xp to */
    /* gain more than one level - FB */
    modgain = UMIN(modgain,
    	exp_level(ch, ch->level+2) - exp_level(ch, ch->level+1));

    ch->exp = UMAX( 0, ch->exp + modgain );

    if (NOT_AUTHED(ch) && ch->exp >= exp_level(ch, ch->level+1))
    {
	send_to_char("You can not ascend to a higher level until you are authorized.\n\r", ch);
	ch->exp = (exp_level(ch, (ch->level+1)) - 1);
	return;
    }

while ( ch->level < LEVEL_AVATAR && ch->exp >= exp_level(ch, ch->level+1))
    {
	set_char_color( AT_WHITE + AT_BLINK, ch );
	ch_printf( ch, "You have now obtained experience level %d!\n\r", ++ch->level );
	advance_level( ch );
    }



i'm guessin i'll need something that would reset the exp back to 0 but also give the overflow of xp on top of that.
Amended on Sun 22 Feb 2004 04:59 AM by Ithildin
USA #2
i had to restart my comp. but i'm gonna try this.

while ( ch->level < LEVEL_AVATAR && ch->exp >= exp_level(ch, ch->level+1))
    {
	set_char_color( AT_WHITE + AT_BLINK, ch );
	ch_printf( ch, "You have now obtained experience level %d!\n\r", ++ch->level );
	advance_level( ch );
       ch->exp = ( 0 );   <------there    
}


see if that works.
USA #3
ok, that's an easy little fix. it doesn't bring the extra xp over to the new level, but it resets it to 0.


now another EXP thing.

i get 12 xp for the kill on a perfect match, but with the damage bonus, i total like 70 xp. i want to take out the damage bonus and just make it to where i could get about 70-100 xp on a perfect match con. my xp min is 0 xp max is 180. i'm not really sure on where to look on this one. but i'll go look a few.
USA #4
i'm guessin this is somewhere that i need to look.
it's under int xp_compute


xp	  = (get_exp_worth( victim )
    	  *  URANGE( 0, (victim->level - gchlev) + 10, 13 )) / 10;



i tried changing the 10 at the end to 5 to see if anything would happen. didn't see anything. here's this as well


/*
 * Calculate roughly how much experience a character is worth
 */
int get_exp_worth( CHAR_DATA *ch )
{
    int exp;

    exp = ch->level * ch->level * ch->level * 5;
    exp += ch->max_hit;
    exp -= (ch->armor-50) * 2;
    exp += ( ch->barenumdie * ch->baresizedie + GET_DAMROLL(ch) ) * 50;
    exp += GET_HITROLL(ch) * ch->level * 10;
    if ( IS_AFFECTED(ch, AFF_SANCTUARY) )
      exp += exp * 1.5;
    if ( IS_AFFECTED(ch, AFF_FIRESHIELD) )
      exp += exp * 1.2;
    if ( IS_AFFECTED(ch, AFF_SHOCKSHIELD) )
      exp += exp * 1.2;
    exp = URANGE( MIN_EXP_WORTH, exp, MAX_EXP_WORTH );

    return exp;
}

sh_int get_exp_base( CHAR_DATA *ch )
{
    if ( IS_NPC(ch) )
      return 1000;
    return class_table[ch->class]->exp_base;
}


so i'm thinkin it's in there. and i'm probably lookin right over it. it's 1 am here so probably.

thanks for any help. i think i'm headin to bed and i'll finish this tomorrow.
USA #5
I still haven't been able to figure out what's all going on. I'm going to look at it a little bit more later tonite. anyone have any thoughts?