Fun in the dll with hardcoding record #s

Discussion on running your own board and editing MajorMUD.
Post Reply
User avatar
syntax
Site Admin
Posts: 553
Joined: Tue Jun 02, 2009 10:02 am

Fun in the dll with hardcoding record #s

Post by syntax »

I had a friend notice that MME was not showing a quarterstaff as being usable for mages. Upon inspection I didn't see any "ClassOK" abilities on the weapon which normally allow "limited/staff" weapon classes use stuff. So I set out on a treck to try and figure out why. After a while of digging through the DLL I finally found it. Both item #100 (quarterstaff) and item #68 (dagger) are hardcoded to allow limited/staff weapon classes to use them. Where I found them was also a whole slew of hard-coded numbers:

Code: Select all

CODE:00402320 mov ds:dword_482CC8, 14h		=> (20) moved into 2 spots during _create_player ... looks like in the current hp / max hp fields (obviously before health bonus from CP is applied)
CODE:0040232A mov ds:dword_482CCC, 3E8h 	=> 1000 ... not referenced anywhere?
CODE:00402334 mov ds:dword_482CD0, 3E8h		=> 1000 ... added to user in 3 places during _create_player... I think it's how much energy they get?
CODE:0040233E mov ds:dword_482CD4, 7Dh		=> (125) looks like it's added to the user during _create_player, not sure for what.  puts it in the +188 offset in the user record which are 4 unknown bytes
CODE:00402348 mov ds:dword_482CD8, 5		=> ref'd in _train_level, I think this is how many lives you get back when you train
CODE:00402352 mov ds:dword_482CE0, 64h		=> (100) ? referenced in _cleanup_currency function
CODE:0040235C mov ds:dword_482CE4, 64h		=> (100) ? referenced in _cleanup_currency function
CODE:00402366 mov ds:dword_482CE8, 0Ah		=> (10) ? referenced in _cleanup_currency function
CODE:00402370 mov ds:dword_482CEC, 0Ah		=> (10) ? referenced in _cleanup_currency function
CODE:0040237A mov ds:dword_482CF8, 85Ch		=> room 2140 = Newhaven, Village Entrance ../ possibly used to set first room new characters land in?
CODE:00402384 mov ds:dword_482CFC, 88Dh		=> room 2189 = Temple, Halls of the Dead ... reason ?
CODE:0040238E mov ds:dword_482D00, 8Eh		=> room 142 = earthen tomb in slums ... reason ?
CODE:00402398 mov ds:dword_482D04, 178h 	=> room 376 is the jail ... reason ?
CODE:004023A2 mov ds:dword_482D18, 64h		=> item 100 quarterstaff ... ref'd in _user_can_user to force-allow limited weapon classes to use it
CODE:004023AC mov ds:dword_482D1C, 44h		=> item 68 dagger ... same as above


User avatar
BearFather
Posts: 668
Joined: Sun Feb 09, 2014 6:27 pm
Location: Portland, OR
Contact:

Re: Fun in the dll with hardcoding record #s

Post by BearFather »

Well the halls/tomb would be default good/evil death spots. If a room doesn't have a death room you go to one of those two places.


Post Reply