i'm trying to make it possible to train your hr/dr up in a keggermud (quickmud deriv) i've got the necessary parts added to do_train and during testing i have no problems, it increases the hr/dr as it is supposed to, however whenever the character logs out and then back in again it has the previous hr/dr they had before. my guess is it's because of the void reset_char function in handler.c but i could be wrong. is there some way of making the changes to hr/dr through training permanent? also i wouldn't mind some suggestions for other things i can add to the train function cause i've made it to where you can buy trains from the questmaster and would like to give my non-existant players plenty of options for uses of their trains.
If you're just increasing ch->hitroll and ch->damroll respectively, these values are usually bonus values that get lumped together with gear and other things via a get_hitroll() function or macro. They aren't written or loaded to the pfile. You could add a bonus_hr/bonus_dr values to your char_data struct, increase these, add it to pfile save/loading, and into your func or macro that calculates total hr/dr.
actually, yes they are saved to the pfile. i fixed my problem by removing the reset_char call from the nanny function though. i was kinda hoping someone could provide me with an alternative to this though cause the reset_char function has uses which are quite necessary.
Igabod: Yes, and also updating your hr/dr calculation functions to account for it. A lot of Diku* MUDs have GET_HITROLL or similar macros that will take (ch->hitroll + dex + other stuff) = final value. Just make certain your new field gets added there, too. You'll also need to add trainhit/traindam to your merc.h/mud.h char_data struct just like you see the regular hitroll/damroll in it.
yeah i went and started working on that earlier and realized after i added it to save.c that there were a lot more things i needed to do so i just decided to procrastinate a little cause i am slightly lazy. added two new spells for mages instead. thanks for informing me about merc.h i hadn't even thought about adding it there, although i probably would have figured it out after i did everything else. i'll probably get to work on this project tomorrow morning. i'll let everybody know how it goes.