07 Feb, 2009, Sandi wrote in the 1st comment:
Votes: 0
Does anyone know why reset_char exists?
07 Feb, 2009, Igabod wrote in the 2nd comment:
Votes: 0
I assumed it was to unset cheated characters… Either way it's not really needed, I removed it from my mud. It may do something other than that, but that's my thoughts on it.
07 Feb, 2009, Sandi wrote in the 3rd comment:
Votes: 0
The security in ROM (and probably all DIKUrivs) is so backasswards. It's all about controlling people after you give them too much power. Duh…

That's what I figured, but who knows what ROM stuff does when you're not looking? I'll have to look through it and see if I'm using it myself.
07 Feb, 2009, Sharmair wrote in the 4th comment:
Votes: 0
Its primary purpose is to make sure the character's data is correct. A MUD is a pretty
complex piece of code, and there are a lot of unexpected things that could happen (like
an object being edited while a char happens to be using an object of the same vnum, or
maybe something being changed or even removed while the player is not logged in -
let alone just some oddity with all the interaction in the game). So they use reset_char()
to make sure everything lines up right when the char logs in. It really has little to do
with cheating at all.
07 Feb, 2009, David Haley wrote in the 5th comment:
Votes: 0
Could also be useful in the context of all the character object recycling, but that's just a guess on my part not having seen the code.
07 Feb, 2009, Omega wrote in the 6th comment:
Votes: 0
reset_char strips and resets all affects from a character.

This corrects the added affects. Aswell as correcting other information, such as sex/vs/true_sex values.

Basically it does a giant correct on the players to help ensure everything is good to go.

Eg. Your wearing gear that changes your stats. You logout, those changes aren't saved to your pfile, but what gear you have is, so when you load up, it resets the data, and applies the appropriate value's.

Tis vital.
07 Feb, 2009, Skol wrote in the 7th comment:
Votes: 0
Hehe, Ig… put the distributor BACK into the car and put the wrench down…

:)

Kidding man, but yeah, you'll want to _un_remove that. Darien's example was spot on.
07 Feb, 2009, Scandum wrote in the 8th comment:
Votes: 0
You don't need reset_char on a properly working Diku mud, and getting rid of it is a fun coding exercise.

You might however want to change reset_char to a check_char routine to check for data corruptions.
08 Feb, 2009, Sandi wrote in the 9th comment:
Votes: 0
Darien said:
Eg. Your wearing gear that changes your stats. You logout, those changes aren't saved to your pfile, but what gear you have is, so when you load up, it resets the data, and applies the appropriate value's.


Almost. ROM does save stat mods. But, if the gear you're wearing is tweaked while you're gone, fread_char will naturally load the old mods, not the new ones.


hmmm… think I just answered my own question. Thanks, guys. :)
08 Feb, 2009, Igabod wrote in the 10th comment:
Votes: 0
I've noticed no problems on my rom cause it has no players and I don't edit items without removing all instances of that item from myself. That's just an old habit I picked up from the first mud I ever immed on, the owner pretty much demanded it.
08 Feb, 2009, Scandum wrote in the 11th comment:
Votes: 0
Sandi said:
Almost. ROM does save stat mods. But, if the gear you're wearing is tweaked while you're gone, fread_char will naturally load the old mods, not the new ones.

ROM has the bad habit of transferring all affects from the object index to the actual object when enchanting it - but reset_char doesn't fix old mods, it's there to assist lazy programmers.

Back when I played a ROM mud I made sure to put one enchant armor on all over powered gear, which payed off whenever the inevitable tweaking started. With unenchanted stuff ROM only saves the object vnum and doesn't save any object stats. In my opinion that's worth getting rid off, and if you care, updating the identify output to merge obj and obj->index bonuses if needed.
09 Feb, 2009, Sandi wrote in the 12th comment:
Votes: 0
Scandum said:
but reset_char doesn't fix old mods, it's there to assist lazy programmers.

If you're going to successfully contradict me, I'm afraid you'll have to go into more details.


That is a neat trick with the enchanting, however. ;)
09 Feb, 2009, Scandum wrote in the 13th comment:
Votes: 0
Nevermind, it's used slightly differently in Rom than it's on the codebase I'm familiar with.

A good question is, why does Rom save hitroll, damroll, hp, etc, if it's going to recalculate those stats from scratch upon login?

I still think it's a better practice to add the equipment and affect stats on the go as objects and affects are loaded, the way Rom is set up right now you need to maintain two routines which is a bad practice from a maintainability viewpoint.
09 Feb, 2009, Sandi wrote in the 14th comment:
Votes: 0
Yep, I agree on both points.
0.0/14