Reasearch (1) - Hex bytes (DMute)

Use this forum to discuss dungeon editors and other tools, like DMute (by George Gilbert, also working for RTC dungeons), DM Builder (by Sphenx), and ADGE by `rain. Includes DM editing tips and tricks.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Reasearch (1) - Hex bytes (DMute)

Post by beowuuf »

Objects use different amount of bytes, even though DMute always shows 8 (2 ident.). Not including the ident, bytes used are:

Doors 2 (see posting)
Potions 2 (byte 3 is the power, each with a range for different experience levels, and 4 is the type)
Weapons 2 (the first is type, and the second is charge where applicable, the maximum seeming to be 3C for wands, torches etc)

Misc items and clothes 2 (the first is type, the second is normally 0, except for cursed objects: the armet, torso, leg, foot plate and sword have values of 3rd byte 26, 27, 28, 29 and A respectively, and fourth byte 1)

Wall texts and speaking pads use 2, bytes 3 and 4 indicating the text, (see other postings) and both are identical (like floor pads and wall objects).

Scrolls use 2, the 4th byte used to indicate open (0) or closed (4). As with chests and monster carried objects, the third byte is only a referece to an already existing object, in this case a wall text/speaking pad, so to create a new scroll a new wall text has to be created, altered then the tile blanked and the objects ident number refered to in the scroll.

All the above (with rare excptions) seem to be stored in such a way that the 2 bytes of the next object in the sequence are displayed in bytes 7 and 8. To see this, look at the first doors on Level 2, or the 'Elements' wall texts in Level 7. So, if you change these values, you are changing the next numerical object.

Chests use 2 for items, but with all others bytes at 0, I wonder if they aren't used for advanced functions while in a characters hand. (I have occasionally seen F9 in byte 5, maybe this byte indictes open/shut etc)


Teleporters use 4 (see posting)

Floor pads and wall objects use the 6 we know and love

Monsters seem to not only use the 6 we see, but an additional 6 - 9 bytes. Byte 6 seems to indicate a monsters position more than hard monster numbers (occasionally groups of 3 nd 4 have the same number hex, etc - maybe the first hex is position, and the second number?) while bytes 7 and 8 are monsters hit points (byte 8 contains higher byte if required). These other bytes for the other monsters aren't really needed, thought it might be nice to hex edit to get more than 1 wasp, 1 rat, 2 rocks, 1 jawa, etc.


In the cases of all items and wall objects, the position (from north/top left clockwise) can be changed by adding 0, 40, 80 or c0 to the objects type ident (so a scroll is 1C, a west facing scroll is DC)
Last edited by beowuuf on Fri Jul 07, 2006 4:41 pm, edited 1 time in total.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Oops again

Post by beowuuf »

For the monster description, I should have said bytes 7 and 8 contain the first monster's hit poiints only.
Was unable to (permenantly) kill off ian_scho (Haynuus), Ameena, oh_brother (Westian), money (Falkor), raixel (Petal) and Lord_Bones (Aurek) in the DM D&D game Time's Champions!

CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
-beowuuf-

4th byte of misc. objects

Post by -beowuuf- »

For waterskins, 0, 40, 80, c0 indicates each level of water from empty to full, while with party bones, these same four codes are used for each of the four characters (left to right, from what I can remember).

And I think someone noticed that weapon charges go down in multiples of four, from another post.
ObsidianLupus
Neophyte
Posts: 1
Joined: Sat Feb 10, 2001 1:00 am

Re: Research (1) - Hex bytes

Post by ObsidianLupus »

ok i have a question. is there a way to create a new object (items, weapons, armor, pressure pads, levers, and keyholes, monsters, probably more) or do you have to take them from elsewhere? i managed to turn a door into a pressure pad by editing the hex code, but it cross-referenced Elijah's robes with that space, when I deleted his from the mirror eq they disappeared from the pressure pad.

I don't know if it's posted elsewhere, if it is just tell me where. I'd like to understand how the ident bytes work and how the game knows how there's multiple items on a space. So if anybody knows, I'd appreciate a response =) Thanks!

-Argent
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

How DMute works

Post by beowuuf »

You can't create new objects, you have to delete one to create a new one of the same type.

The way george describes dmute, it takes an existing object, and turns it into a different object of the same type - mutates it. If you delete an object, it 'mutates it' into nothing, and when you then 'create' an object, it mutated that nothing to an object again. So through all this, the top two bytes NEVER CHANGE.
There is always an object of that type with that number effectively, even if it seems 'deleted'.

Dmute never creates objects from scratch.

If you 'create' an object, and give it the ident numbers of another one, then there are now two unique objects in the dungeon! Once the game catches on, crash city.



Multiple objects are stored in a linked list - the first object references the second refernces the third in a chain (we can't see this), and the tile they are on references the first object in the list. As each tile is unique, there is no problem in referncing a list in more than one place...'cloning'. (It's like having several openings in a box...take something out from any unique hole, it's still going to be gone from the box).

When a thrown object or monster, etc enters one of these cloned tiles, it rememebrs which tile it entered onto...so it joins the linked list, and then will continue out as normmal - all other occurances being like images.

The only exception to this is cloning a flying object (possible from a saved game) or a monster. So if you created a creature and cloned it, the game seems confused as to the origins of the creatures when they independanatly move, so when one dies a crash is usually not far behind.

Hope that wasn't too long winded, if it wasn't clear ask again, or maybe someone can explain it better
Was unable to (permenantly) kill off ian_scho (Haynuus), Ameena, oh_brother (Westian), money (Falkor), raixel (Petal) and Lord_Bones (Aurek) in the DM D&D game Time's Champions!

CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
Post Reply

Return to “Editors and Tools (DMute, DM Builder, ADGE, etc.)”