IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Mordor Data Files Data Format
Braindead
post Sep 25 2004, 09:04 AM
Post #1


Zombie Master
**********

Group: Admin
Posts: 3,807
Joined: 24-September 04
From: Belgium
Member No.: 1
referrer:;)



Mdata11 data format (Map File)

Each record is 20 bytes wide.

Meaning of datatypes used:
Word : unsigned integer, 2 bytes wide
LongWord : unsigned integer, 4 bytes wide
Currency : floating point, 8 bytes wide

File Header
Number of Levels : Word

Offset Records (occurs number of levels times)
Record Number : start of data for level x : Word

Level Header Record 1
X-dimension : Word
Y-dimension : Word
Level Number : Word
Number of Areas : Word
Number Of chutes : Word
Number Of Teleports : Word

Room Data Records Level 1 (Occurs 900 times)
Area Number : Word
BitMask : Currency

Monster Lair Header Level 1
Number Of Lairs : Word

Monster Lairs Level 1 (Occurs 200 times)
Monster Type : LongWord
Laired Monster ID : Word (Reference to monster file)

Teleporter Header Level 1
Number of Teleports : Word

Teleporters Level 1 (Occurs number of teleporters times)
X : Word
Y : Word
Dest X : Word
Dest Y : Word
Dest Z : Word

x,y specify location of teleport, dest x, y, z specifies where teleports to, set dest x, y, z to all 0's to have a random teleporter

Chute Header Level 1
Number Of Chutes : Word

Chutes Level 1 (Occurs number of chutes times)
X : Word
Y : Word
Number Of Levels To Drop : Word

Level Header Record 2

...


--------------------
Do not PM me for support, if you have troubles running Mordor ask in the Technical Support forum!
Go to the top of the page
 
+Quote Post
Braindead
post Sep 25 2004, 09:04 AM
Post #2


Zombie Master
**********

Group: Admin
Posts: 3,807
Joined: 24-September 04
From: Belgium
Member No.: 1
referrer:;)



format for mdata 1. (sorry, its C++ data types mostly (except for 'vbstring'- feel free to convert it to whatever you feel is best braindead smile.gif)

vbstring means 2 bytes of the string length, followed by the string. - eg:
04wave
05hello
03the

short is 2 bytes.
float is 4 bytes.
recordlength = 260;

rec1: vbstring fileversion
rec2: short NumberOfRaces;
rec3: short NumberOfGuilds;
rec4: short NumberOfSubItemTypes;
rec5: short NumberOfItemTypes;
rec6: short NumberOfMonsterSubTypes;
rec7: short NumberOfMonsterTypes;
rec8-recNumberOfRaces:
vbstring racename
short minStats[7];
short maxStats[7];
short m_resistences[12];
long m_alignement;
short m_size;
short m_bonusPoints;
short m_maxAge;
float m_expFactor;
rec ... to NumberOfGuilds
vbstring guildname
short m_averageHits;
short MaxLevel;
short MH;
float expFactor;
short u3;
short reqStats[7];
long alignment;
float abilityrates[7];
short u7;
float u8;
short questPercentage;
float spellstuff[38];
long RaceMask;
short u12;
float levelMod;
float u13;
float u14;
short u15;
float u16;
short u17;
short u18;
rec: ... to NumberOfSubItemTypes
vbstring name
short itemtype
rec:... to numberOfItemTypes
vbstring name
short IsEquipable
rec:... to NumberOfSubMonsterTypes
vbstring name
short MonsterType
rec:... to numberOfMonsterTypes
vbstring name
short not used.


--------------------
Do not PM me for support, if you have troubles running Mordor ask in the Technical Support forum!
Go to the top of the page
 
+Quote Post
Braindead
post Sep 25 2004, 09:04 AM
Post #3


Zombie Master
**********

Group: Admin
Posts: 3,807
Joined: 24-September 04
From: Belgium
Member No.: 1
referrer:;)



mdata 2

recordlength = 75
rec1: vbstring fileversion
rec2: short NumSpells:
rec3 ... num spells
vbstring spellname
short m_ID;
short m_class;
short m_spellLevel;
short m_u4;
short m_alwaysZero; // always 0
short m_killEffect;
short m_affectMonster;
short m_affectGroup;
short m_damage1;
short m_damage2;
short m_specialEffect;
short m_required[7]
short m_resistedBy;


--------------------
Do not PM me for support, if you have troubles running Mordor ask in the Technical Support forum!
Go to the top of the page
 
+Quote Post
RabidWombat
post Dec 23 2004, 07:04 PM
Post #4


Journeyman
*

Group: Members
Posts: 19
Joined: 6-December 04
From: Yorkshire
Member No.: 80
referrer:Goooooogle



mdata3.mdr format (items file)

The first item record starts at offset 0x177 (375), each record is 0x7D (125) bytes long.
All fields are 16 bit signed Int unless otherwise noted.
Fields marked as 'UNUSED' always have a value of zero.

Length of name
Name (text)

After that:

0x00: Item Id

0x02: attack modifier

0x04: defence modifier

0x06: Item Value (32 bit Signed Int)

0x0A: Starting Level for finding

0x0C: Chance of finding

0x0E: Abilitys (bitmask)
  • 0x01 = Levitate
  • 0x02 = Invisible
  • 0x04 = Protect
  • 0x08 = See Invisible
  • 0x10 = Critical Hit
  • 0x20 = Backstab
0x10: UNUSED

0x12: Swings

0x14: Special items
  • 0x01 = Permenant Stat modifier (potions, tomes etc)
  • 0x0B and 0x0C = Spell point recharge items
  • 0x0D and 0x0E = Age reducing items
  • 0xC0 to 0xC9 = Guild Crests
0x16: Spell ID by it's position in mdata2.mdr (go figure)

0x18: ID number of the spell this item can cast (0 = none)

0x1A: Number of 'Charges' for the spell

0x1C: UNUSED

0x1E: Guilds that can use this item (bitmask)
  • 0x001 = Nomad
  • 0x002 = Warrior
  • 0x004 = Paladin
  • 0x008 = Ninja
  • 0x010 = Villain
  • 0x020 = Seeker
  • 0x040 = Thief
  • 0x080 = Scavenger
  • 0x100 = Mage
  • 0x200 = Sorcerer
  • 0x400 = Wizard
  • 0x800 = Healer
0x20: UNUSED

0x22: Level Scale Factor

0x24: Damage Modifier (32 bit float)

0x28: Alignment (bitmask)
  • 0x01 = Unaligned
  • 0x02 = Good
  • 0x04 = Neutral
  • 0x08 = Evil
0x2A: UNUSED

0x2C: Number of hands required

0x2E: Item Class
  • 0x00 = Hands
  • 0x01 = Dagger
  • 0x02 = Cross
  • 0x03 = Sword
  • 0x04 = Staff
  • 0x05 = Mace
  • 0x06 = Axe
  • 0x07 = Hammer
  • 0x08 = Leather Armour
  • 0x09 = Chain Armour
  • 0x0A = Plate Armour
  • 0x0B = Shield
  • 0x0C = Cap
  • 0x0D = Helmet
  • 0x0E = Gloves
  • 0x0F = Gauntlets
  • 0x10 = Cloak
  • 0x11 = Bracers
  • 0x12 = Sash
  • 0x13 = Girdle
  • 0x14 = Boots
  • 0x15 = Ring
  • 0x16 = Amulet
  • 0x17 = Potion
  • 0x18 = Scroll
  • 0x19 = Tome
  • 0x1A = Dust
  • 0x1B = Crystal
  • 0x1C = Rod
  • 0x1D = Stone
  • 0x1E = Sphere
  • 0x1F = Cube
  • 0x20 = Artifact
  • 0x21 = Misc Item
  • 0x22 = Guild Crest
0x30: Resistances granted (bitmask)
  • 0x001 = Fire res
  • 0x002 = Cold res
  • 0x004 = Electrical res
  • 0x008 = Mind res
  • 0x010 = Disease res
  • 0x020 = Poison res
  • 0x040 = Magic res
  • 0x080 = Stone res
  • 0x100 = Paralysis res
  • 0x200 = Drain res
  • 0x400 = Acid res
0x32: UNUSED

0x34: STR required
0x36: INT required
0x38: WIS required
0x3A: CON required
0x3C: CHA required
0x3E: DEX required

0x40: UNUSED

0x42: STR modifier
0x44: INT modifier
0x46: WIS modifier
0x48: CON modifier
0x4A: CHA modifier
0x4C: DEX modifier

0x4E: UNUSED

0x50: Curse status
  • 0x0 = Not Cursed
  • 0x1 = Cursed
  • 0x2 = Cursed, will auto-equip
0x52: Spell level for item
  • -1 = Casters Spell Level
0x54: Class restricted
  • -1 = Yes
  • 0 = No
EDIT:
- Corrected spell ID field(s)
- Added 'Value' Field

This post has been edited by RabidWombat: Dec 29 2004, 11:09 AM


--------------------
Originally posted by SupremeLlama

Where can I buy a Life? I have PayPal
Go to the top of the page
 
+Quote Post
Braindead
post Dec 23 2004, 07:59 PM
Post #5


Zombie Master
**********

Group: Admin
Posts: 3,807
Joined: 24-September 04
From: Belgium
Member No.: 1
referrer:;)



Seems like we have another user interested in modding, woot w00t.gif

I think Wabbit already figured out the item file layout, he just didn't post it yet... I'll send him a PM to post the rest of the files... smile.gif


--------------------
Do not PM me for support, if you have troubles running Mordor ask in the Technical Support forum!
Go to the top of the page
 
+Quote Post
RabidWombat
post Dec 24 2004, 09:23 AM
Post #6


Journeyman
*

Group: Members
Posts: 19
Joined: 6-December 04
From: Yorkshire
Member No.: 80
referrer:Goooooogle



QUOTE (Braindead @ Dec 23 2004, 07:59 PM)
Seems like we have another user interested in modding, woot w00t.gif

I think Wabbit already figured out the item file layout, he just didn't post it yet... I'll send him a PM to post the rest of the files... smile.gif
*
Blame it on my ISP for going south the other day mad.gif I wanted to check something out on Warlock's site and couldn't so I decided to dig it out of the file the hard way smile.gif . I'm not sure what I'm going to do with the info yet, so far I'm just decoding the mdr files and stuffing them into MySQL (makes searching much easier).

I'm currently digging through the other mdr files to see if I can fill in the blanks in the items file, I figured several people had already done it but I couldn't find it documented anywhere, plus it's an interesting challenge.

<-- not a geek, honest whistling.gif


--------------------
Originally posted by SupremeLlama

Where can I buy a Life? I have PayPal
Go to the top of the page
 
+Quote Post
Wabbit
post Jan 1 2005, 01:46 PM
Post #7


Wanderer
**

Group: Mordor MP Prog
Posts: 55
Joined: 28-September 04
Member No.: 27



sorry for the delay - been a little busy smile.gif - i'll have a look for my notes on the file format smile.gif
Go to the top of the page
 
+Quote Post
Valek
post Feb 23 2009, 03:44 AM
Post #8


Apprentice


Group: Members
Posts: 1
Joined: 22-February 09
Member No.: 5,189
referrer:Looking up Mordor stuff on Google



Heh, this brings back memories. I used to use DOSEdit on my old character files (and the monster file to bring everything up to level 3 on the Shareware version), and later upgraded to UGE. It's been years, but those are very pleasant memories smile.gif

This post has been edited by Valek: Feb 23 2009, 03:44 AM
Go to the top of the page
 
+Quote Post
unc
post Oct 5 2012, 05:13 AM
Post #9


Apprentice


Group: Members
Posts: 3
Joined: 2-October 12
Member No.: 6,972
referrer:internet



MDATA9.MDR -- Guild Logs file

uint16 = 2 bytes, unsigned
uint32 = 4 bytes, unsigned


first byte = uint16 - total number of records in file

the rest of the file are all guild logs in the following format:
uint16 -- guild ID, from 0 (Nomad) to 11 (Healer) in the same order as described in the helpfile
uint32 -- timestamp, in the form of days after December 30, 1899
uint16 -- the length of the message
variable length -- the message (not null terminated)
Go to the top of the page
 
+Quote Post
unc
post Oct 5 2012, 07:07 AM
Post #10


Apprentice


Group: Members
Posts: 3
Joined: 2-October 12
Member No.: 6,972
referrer:internet



MDATA13.MDR -- Monster/Item Metadata File

Contains metadata information about monsters/items

File consists of records, each record is 100 bytes long.

First record just contains the version number

Second record contains the number of monsters in the file.

Third record contains the number of items in the file

Fourth record contains the number of monsters that are known

Fifth record contains the number of items that are known

Sixth record onward are all monster or item records. They have this format:

uint16 - index of the monster/item
uint16 - identification level of the monster/item. for monsters: 1 = very little known, 2 = more to learn, 3 = almost everything, 4 = all is known. for items: 4 = all is known, everything else = almost everything
next 8 bytes - number of monsters seen/items found, multiplied by 10,000 (this is because VB3 Currency type holds 4 decimal places)
string *30 - 30 bytes holding the name of the first character to find the monster/item
uint16 - id of the last monster who dropped the item, or 0 if it is a monster record
uint32 - time the monster/item was last seen, in days after Dec 30 1899
string *8 - the x,y,z coordinates of the last sighting of this monster, or the depth where this item was last found
uint16 - the number of deaths associated with this monster, or 0xFFFF for item entries

rest of the record is padding

This post has been edited by unc: Oct 5 2012, 07:39 AM
Go to the top of the page
 
+Quote Post
unc
post Oct 6 2012, 07:03 PM
Post #11


Apprentice


Group: Members
Posts: 3
Joined: 2-October 12
Member No.: 6,972
referrer:internet



MDATA7.MDR -- guild masters file

Each record in this file is 128 bytes long.

First record - version of the game ("1.1") as a vbString (2 bytes describing the length of the string, followed by the string)

Every other record - a guildmaster record in the form of
vbString - guildmaster name
int16 - guildmaster level
Go to the top of the page
 
+Quote Post
Sduibek2
post Apr 26 2015, 08:20 PM
Post #12


Vagabond
**

Group: Members Plus
Posts: 78
Joined: 14-May 10
Member No.: 6,285
referrer:The City Seer



I will soon be adding MDATA13, MDATA14, MDATA15 here. And adding to the wiki. I didn't realize somebody already documented MDATA13. Whoops! :laugh.gif:

This post is mostly a note-to-self so I don't forget to post the information wink.gif

This post has been edited by Sduibek2: Apr 26 2015, 08:21 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 12th December 2019 - 07:10 PM
Bridged By IpbWiki: Integration Of Invision Power Board and MediaWiki © GlobalSoft
Copyrights and Credits