Quick mods - building cost, hero cost, gold from caravans, etc

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Status
Not open for further replies.
Sep 16, 2009
15
0
Nothing you can't figure out from reading any posts/articles on modding the demo. Done in the US retail version. For anybody with more experience, please feel free to correct anything that is wrong (or say if there's a better way of doing things).

Requirements: Total Commander (it's free)
To do: Make a copy of your resource.pak file located in your \...\Majesty 2\resource directory (just incase you make changes that break the game)

The file we will be modifying will be the following: \...\Majesty 2\resource\resource.pak\set\trading\shops.set (ignore the typos in the file, it's just the way it was made)

-------------------------

Modding Buildings
*Quick note: Each building is listed in the file twice. The first listing is in regards to cost/requirements to create the building. The second listing is what you see when you select the building (hero training, upgrades, etc).

Building costs
Using Total Commander, navigate to the following folder: \...\Majesty 2\resource\resource.pak\set\trading - there is one file: shops.set
Click and hold the right mouse button on shots.set until a menu appears
Click on Edit (click on "Yes" if a box pops up)
Change the value of "count money" for the desired building(s)
Close the file (click "Yes" to save the file)
Back in Total Commander, click "Yes" to save and repack the file

Building prerequesites
To have the game require you to have a certain amount of gold, change the "gold" value under "Prerequesities". This will not change the cost of the building, just how much needs to be in your treasury.
To have the game require you to have a certain number of heroes, change the "heroes count" value.
To have the game require another building, you need to add in the building required (see below example).

Example - this will change the requirements for the Rogue's Guild, making it free, but requiring you to have built a market, 2000 gold in your treasury, and T1 Marketplace:
{"guild_rogue"
{enabled}
{Cost
{money}
{"count money" 0}
}
{Entity guild_rogue}
{"Max count" 2147483647}
{"Max upgrade" 3}
{Prerequesities
{buildings market_1}
{gold 2000}
{"heroes count" 5}

}
}

Hero limits (3 by default), cost of heroes and hero recruitment time
Find the second listing for your building. The example below will just be the part of the coding that deals with the heroes. It will change the cost of a rogue to 0 gold, increase the maximum to 5 and decrease their production time to 0.
*Please note: I've had some issues increasing the number on some guilds. I was able to increase the Cleric's to 10, but not the Rogue's (I can't get more than 5 Rogues for a single guild). I do not know what is causing this. Changing the production time doesn't seem to affect it.

{"guild_rogue"
{entity_id guild_rogue}
{units
{"hero_rogue"
{enabled}
{Cost
{money}
{"count money" 0}
}
{Entity hero_rogue}
{"Max count" 5}
{"Production time" 0}

}
}

In this secong building code, you should be able to make a building produce more than a single guild hero type. Maybe make a Super Guild, that produces everything. You can also change the amount of time a hero spends in the guild.

-------------------------

Modifying gold from caravans

The file we will be modifying will be the following: \...\Majesty 2\resource\resource.pak\set\caravans.set

This file lists how much gold you get from a caravan based on the distance from the castle. Simply increase the value of the second number to increase the gold you get. Example (this will give you insane gold using these values):

25 200000
50 300000
75 400000

-------------------------

You should be able to figure out a lot just by looking through various files, such as changing the HP of buildings, or even changing the behavior of heroes. Just remember to always keep a copy of the original file, and maybe copies of updated files in case a change breaks the game.

I look forward to seeing what other people come up with. I'd like a building that summons animals as heroes (who doesn't want a hero Manbearpig?)

[Edit: added]
Actually, I was wrong when I said the file was in two parts. The file lists the items you can buy from each building. The "first part" is really just changing the items as you buy them from the castle, while the "second part" is what's the buildings you buy from the castle.
 
Last edited:
Sep 16, 2009
15
0
Changing the cost of building upgrades

The location/file depends on which building you want to mod. In this example, I will be decreasing the costs of upgrading it.

Edit the following file: \...\Majesty 2\resource\resource.pak\entity\buildings\castle\castle.def

{"Upgrades"
{available
{;1é àïãðåéò
{money 75}
{health 1000} ;Äîáàâëÿåò õèòïîèíòîâ
{building_value 1}
{cost ;Ñòîèìîñòü àïðãåéäà
"money" 200
}
}
{;2é àïãðåéò
{money 150}
{health 1500} ;Äîáàâëÿåò õèòïîèíòîâ
{building_value 1}
{cost ;Ñòîèìîñòü àïðãåéäà
"money" 500
}
}
}
}

I do not know what the "money" and "health" after "{;1é àïãðåéò" refer to. Changing the health doesn't increase the HP of the castle. They might be prerequisites.

Changing the vision of a building

By default: {"FogVisor" {radius 50}}
I experimented with this value. Making it 200 will display all the non-terrain in the map (so you know the locations of all creep-spawns, treasures and locations for temples/caravan spots). It looks wierd, but doesn't seem to cause any problems. The game treads it like you have vision of the areas, letting you build. Increasing the value to 100 does as it should, properly increasing the vision of the castle (including terrain). Increasing this value to, say, 5000 will cause the game to crash when the map loads.
 
Sep 16, 2009
15
0
Yes. Just looking at all the files, I'm certain it's possible to truly modify a lot of things. I'll figure out how to create new buildings or heroes (though I'll be limited to using existing building/hero models).

And... these are only cheats if you want them to be. If you find the game easy, then just change it so things cost more, or make it so you can can't build certain guilds until certain requirements are met.
Example:

In order to build Wizards, you must have T2 Clerics. In order to build Warriors, you must have T2 Rogues and T2 Rangers. In order to build Dwarves, you must have 5000 gold in your treasury (cause you know those buggers love 'dem shinies).

Looking at the unit files, you can change the behavior of units. I'm not going to touch those values for awhile. I want to figure out how to get my hero Manbearpig. And create new towers/upgrades. I'd like to change the Wizard Tower to have some other abilities. Maybe for 500g, it will freeze all enemies in a small radius around it. It all looks possible from the files.

I've only had this in front of me for a few hours (and I had to spend some time playing it). I'm sure others will come up with better things quicker than I.
 
Status
Not open for further replies.