PDA

View Full Version : Majesty 2 Mods


PolarisOrbit
03-30-2012, 04:18 PM
Majesty 2 is pretty easy to mod but there is a lot of stuff available and sometimes it's hard to find the thing you're looking for. So I made this as a help topic of sorts.

Here's my first batch of questions, all pertaining to Majesty 2 Complete:

1) Where are the following items- Entity data for Monster Kingdoms (mks) and Temple of Lunord (death knight), Spell data for Monster Kingdoms?

2) How do you change the cost multipliers on the Wizard's Tower based on spell distance?

I'm working on a mod for the game because X-Mod didn't work for me and Maj2 Reloaded made different changes than what I wanted. I think I've isolated the problem down to the spells.xml file but by the time I discovered that was the problem I had already made my own mod! Anyway mks pretty much uses an entirely different data set than the rest of the game and I couldn't find the corresponding files in resource or resource_patch, so any help would be appreciated. Also the death knights seem to be entirely missing from the data files which is odd because the ice mages are there and as far as I can tell they were both added to the game as paid DLC at the same time.

Feel free to post your own questions and help with the answers you know about :)

chappa'ai
03-30-2012, 04:52 PM
My knowledge to modding goes as far as to make the rouges guild spell give me 100k gold.

Sorry

palidinsalim
03-30-2012, 08:56 PM
Do either of you know how to change how many units come from monster lairs? I know you can do it for sewers and graveyards (quite funny really have 50 rats come out of a sewer and flattening all your heroes and your palace in less than a minute)

PolarisOrbit
03-30-2012, 09:34 PM
Do either of you know how to change how many units come from monster lairs? I know you can do it for sewers and graveyards (quite funny really have 50 rats come out of a sewer and flattening all your heroes and your palace in less than a minute)

I'm pretty sure you change those in the map files and not globally. Monster dens sometimes make different things on different maps, especially the Plagued Graveyards.

However, I still don't know how to do it because the map editor is a complete mystery to me :) All I've figured out how to do is open files and move the camera, nothing else :o

palidinsalim
03-31-2012, 08:01 PM
Ya I took a look at that editor myself. It seems like its missing a lot of stuff that should be there but isnt.

PolarisOrbit
04-05-2012, 10:40 PM
Well, I'm going to post a quick "how-to" since the current guide on the forums is listed under a cheat topic which is not the best place for this information.

So this is a quick-start guide to modding Majesty 2 on Steam:

1) SETUP

1a) In your Steam directory, navigate to the Majesty 2 folder. For me it is in Steam/SteamApps/common/majesty 2 collection

1b) There are two items of note here: the resource/ folder and the resource.mod/ folder. The game loads all the data in the various resource/ folders (including the resource.expansion/ folders) in a particular sequence, where resource.mod/ is loaded last. Each directory contains files corresponding to game data, and they are allowed to contain the same files so you will see a lot of redundancy between them. Whichever copy of a particular game object is loaded last overwrites the others, so anything you put in resource.mod/ overwrites the stats for the rest of the game.

1c) So what do you put in resource.mod/ anyway? Find out by going into the resource/ directory and using an unzip utility such as 7-zip to extract resource.pak and resource_patch.pak. Make sure you preserve the directory structure when unzipping! I moved these extracted folders outside the Majesty 2 directory to avoid confusing myself but it's not necessary. Now you are ready to start modding.

2) MODDING

2a) There are 4 main folders that are useful for modding. The designers seem to have had a rather haphazard approach to the folder directory because most things are distributed across multiple directories.
entity/ - Contains some stats for buildings and heroes, mostly things which are not easily viewed from inside game interface
gameData/ - Contains most stats for heroes, research costs, and Majesty spells
interface/ - Contains game constants
set/ - Contains more game constants and also the upfront price of buildings

2b) resource.mod/ needs to have precisely the same folder structure as resource/ or else it will appear as though your mod didn't work (or potentially crash). So if you modify gameData/magic/spells.xml extracted from resource_patch, you must place it in exactly the same directory gameData/magic/spells.xml in the resource.mod/ directory.

2c) Most of the data can be edited plaintext, but a program such as Notepad2 can be useful for syntax highlighting the xml documents, which is a majority. Also I recommend always starting your search for things to edit in resource_patch files because those are more up-to-date and have more objects in them. However, some things were not changed in the patch so you will have to go back to the vanilla resource files to edit them.

PolarisOrbit
04-15-2012, 01:08 PM
Any advice on where to upload mods?