• 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.
Sep 20, 2009
7
0
I'm thinking about making a user-friendly tool for modding majesty 2, it will automatically unpack resource files into the correct directory structure, retrieve variables from the xml sheets and present them in an easy-to-understand interface. I may also look into the 3d modelling for new weapons/armour and new heroes, and hero logic(if it's possible).

Anyone interested? Is it worth doing?
 
I'm thinking about making a user-friendly tool for modding majesty 2, it will automatically unpack resource files into the correct directory structure, retrieve variables from the xml sheets and present them in an easy-to-understand interface. I may also look into the 3d modelling for new weapons/armour and new heroes, and hero logic(if it's possible).

Anyone interested? Is it worth doing?

You will be greatly loved by those of us still interested in this game. :D
 
I've finished my first simple beta of the Majesty 2 resource extraction/mod setup tool and I need beta testers. Please download the file from the link below and tell me what you think, and if it works for you.

http://rapidshare.com/files/413700052/Majesty2Editor.rar


I've also nearly finished the Majesty 2 resource viewer beta, which will allow you change every value in certain resource files. I'm working on including descriptions of every value, so that people know what they are changing.
 
Hapuga would you mind sharing some of your knowledge on the resource files, and which ones control which aspects of the game? The only files I currently fully understand are: "rpg_params.xml", "global_spawn_settings.set", and "spells.xml". Do you have any idea how to modify how heroes behave? Maybe "unit_actions.xml"?
 
Here is a full list of functions and params + description. Lots of text! This will help u guys get into M2 modding hopefully. Marked green are most useful items.

Majesty2/localization/launcher - launcher icons.
Majesty2/localization/sound/2d - all advisor mission briefings + all research/game-related advisor lines + hero death lines.
Majesty2/localization/sound/3d/asks - all hero lines + castle units sounds.
Majesty2/localization/texts/texts - all game texts + spell names, quest and unit names as well as other text related info.

localization_expansionX has all the same structure, but for the new units and creatures that are added through expansions.

Majesty2/resource.std/ - has all data related to system messages, cursors, icons, etc. not accessible.

Majesty2/resource/resource.pak/entity/buildings - includes all buildings from M2. each building consists of parts that fall off when a building takes damage. each part is an individual object with preset parameters. Each building part has 3-4 files in the folder: .mesh(model file), .mdl(another model file), sometimes .material(yet another model file) and .def. .def is an editable file that includes information for the game, like of what material it is made, is it an obstacle or not, and other. In the initial building folder there are 2 files, a completely built building .mdl file and a .def file for the full building itself. This def has all building data, like the building level, max available level, experience (if available), name, health and many other.
Majesty2/resource/resource.pak/entity/css - has all camera patches. Each .def has coordinates that come in a specific order.
Majesty2/resource/resource.pak/entity/decoration - has all items that serve for decoration purposes. These are boats, farmer stuff, flags, benches, wells and other. Have 3-7 files in a folder. To already known file types 3 more are added: .anm (a model animation file), anim.txt (consists detailed data about animation) and .dds (model diffuse picture). Again, everything is edited through .def file.
Majesty2/resource/resource.pak/entity/fx - .def's for effects.
Majesty2/resource/resource.pak/entity/items - hero items, generic stuff... hero items have blank def's. However, chest loot, and some other interesting items can be edited here.
Majesty2/resource/resource.pak/entity/ladnscape - flowers, mushrooms eagles and other... nothing interesting here, use only for new stuff.
Majesty2/resource/resource.pak/entity/sounds - nothing interesting.
Majesty2/resource/resource.pak/entity/units - one of the most important folders in resource.pak. Stores all hero-related data. Has 16-24 files per unit folder. Have blow anim's, armor .dds looks, and other. Fsm.anim has all the data about animations, like stun durations and other. fsm.graphml has a very detailed description of anim presets, physics and other. the "unitname"/extenders folder has 14 files. actions.inc stores unit actions. ai.inc stores AI behavior. All other functions do pretty much what the file name says. Explore for yourself.
Majesty2/resource/resource.pak/entity/utilities - nothing interesting here.

Majesty2/resource/resource.pak/gameData/campaigns - stores campaign data.
Majesty2/resource/resource.pak/gameData/css- stores all cameras in one file.
Majesty2/resource/resource.pak/gameData/inventions - stores all possible inventions.
Majesty2/resource/resource.pak/gameData/spells - stores all majesty spells.
Majesty2/resource/resource.pak/gameData/music - stores one strange file. Nothing of interest to us.
Majesty2/resource/resource.pak/gameData/smp - stores paypack item data.
Majesty2/resource/resource.pak/gameData/spawn - stores global spawn settings. I suggest not to edit this one to avoid confusion... all individual spawns can be set in the editor.
Majesty2/resource/resource.pak/gameData/units - the most important folder in gameData. Stores info about spells, unit actions and other. action_effects.xml has all data about attacks and other actions of all creatures and units. ask.xml includes probabilities that a certain unit will say a specific phrase. perks.xml has information about states like while being poisoned, or when mana regens or any other. rpg_params.xml include unit parameters for every unit. If you would like to boost those weak, always dieing mages, here's the place to do some magic. unit_actions.xsd have all creature actions and attacks, their cooldowns, AoE radius and other. unit_artefacts.xml - what artifacts a unit may have. unit_decour.xml has all the data about at which level what hero wears what set of clothes, and other cosmetic data. unit_elixirs.xml stores elixir data. unit_emotions.xml stores data about unit emotions. Emotions cannot be set for individual units, all units behave under the same set of rules set here.. That's why those heroes have such a poor "character" in M2. unit_enchants.xml -enchant data.
Majesty2/resource/resource.pak/gameData/visual_patches - has data about how alternative kingdom types look.

Majesty2/resource/resource.pak/interface/cs - cursor, mouse, camera positions and views.
Majesty2/resource/resource.pak/interface/cursor - flag icons with cursor.
Majesty2/resource/resource.pak/interface/dynamic - menu settings.
Majesty2/resource/resource.pak/interface/editor - nothing of interest.
Majesty2/resource/resource.pak/interface/enGUIne - very important folder. Has all the visual settings as well as creature portraits and other.
Majesty2/resource/resource.pak/interface/weather - weather effects.
Majesty2/resource/resource.pak/interface/screen_list - screenshot order and settings.
Majesty2/resource/resource.pak/interface/sdltb - nothing here.

Majesty2/resource/resource.pak/map - campaign, MP and single maps. Wanna make a map, ask me how.

Majesty2/resource/resource.pak/music - music and ambient sounds. Ambient sounds are usually generic bird, wind and other noise sounds, however any music can be put here. The only difference is that ambient sounds are looped by default and cannot be turned off in the map.

Majesty2/resource/resource.pak/properties - holds building, animation and unit properties. In reality, is a pretty useless folder. No individual building/effect/monster settings.

Majesty2/resource/resource.pak/set/environment - all environment data.
Majesty2/resource/resource.pak/set/fsm - unit hardcode responses like "if command was to turn left - prepare to turn left". Nothing of interest here.
Majesty2/resource/resource.pak/set/interaction_entity - nothing here.
Majesty2/resource/resource.pak/set/interaction_terrain - terrain types. Nothing of interest.
Majesty2/resource/resource.pak/set/inventory - The data about health and mana potions. I don't know why these are put here, and not in Majesty2/resource/resource.pak/gameData/units.
Majesty2/resource/resource.pak/set/script - nothing here.
Majesty2/resource/resource.pak/set/shop - very important folder. has all the information about building/hero/item prerequisites.
Majesty2/resource/resource.pak/set/vision - nothing here.

All other files in Majesty2/resource/resource.pak/set have different rpeset settings, like caravan gold per distance in caravans.setand other. Find out for yourself.

Majesty2/resource/resource.pak/sound - spell, unit and creture sounds.

Majesty2/resource/resource.pak/texture - lots and lots of .dds's wit animation pictures, weather and more.

Majesty2/resource/resource.pak/texture - nothing of interest here.

all other resource_patch, resource_expansion etc have the same structure, but have new units, buildings and additions to the gameData.

That's all.
 
Last edited:
Thanks for the info, I'll start start working on a new version of both tools that support all the files that most people might wish to edit.

http://rapidshare.com/files/413876233/maj2editor.rar

*There's the new link, I forgot to include a necessary dll to run the program, and I didn't write an error catch to inform you of this when you launched it.
Thanks for testing, please tell me if this version works for you.
 
The program works okay, but it only extracts the files. It would be nice if the program:

1. would extract all the data to the mod folder by default on 1st lauch.
2. would have an interface, letting you to work with the data.
3. would save the edited data.

Now it is pretty much a "can opener".

+ you may add support to some useful functions I mentioned above.

I think what you're doing is great! I hope you will be able to finish it. Ask me if you have any questions.
 
Hi, and sorry to up this very old thread, but I'm actually trying to mod the game in Monsters Kingdom and I can't have access to the resource of the expansion (.pak).
So I found this thread which can help me but the links are broken now...

Does anyone can give me this Mod Tool or give me something I can use to open the pak files ?
I would be happy.:)

Thank you in advance for your help.:happy:
 
Not sure if the tool is available anymore. Anyway, the MK pak files are encrypted, you will not be able to open them easily.
you can make this file workyou can make this file work


{entity
{"zones"
{ObstacleID "fly_over"}
{body {proper body sensible} {permit body}}
}
{actor}


;#line 8: (include "/properties/buildings/extenders/level.inc")
;#line 8: properties/buildings/extenders/level.inc BEGIN
{"Level"
{MaxLevel 15}
{CurrentLevel 15}
{CurrentExperiens 0.0}
}
;#line 8: properties/buildings/extenders/level.inc END


;#line 9: (include "/properties/buildings/extenders/death.inc")
;#line 9: properties/buildings/extenders/death.inc BEGIN
{"IDeath.BuildingDeath"
}

;#line 9: properties/buildings/extenders/death.inc END


;#line 10: (include "/properties/buildings/extenders/entity_nationality.inc")
;#line 10: properties/buildings/extenders/entity_nationality.inc BEGIN
{"EntityNationality"
}

;#line 10: properties/buildings/extenders/entity_nationality.inc END


;#line 11: (include "/properties/buildings/extenders/seller.inc")
;#line 11: properties/buildings/extenders/seller.inc BEGIN
{"entity_seller"
}
;#line 11: properties/buildings/extenders/seller.inc END


;===================================================
; Èíäèâèäóàëüíûå ñâîéñòâà çäàíèÿ
;===================================================

;#line 16: (include "extenders/safety_emitter.inc")
;#line 16: entity/buildings/tower_guard/extenders/safety_emitter.inc BEGIN
{"safety_emitter"
{power 7}
{radius 10}
}
;#line 16: entity/buildings/tower_guard/extenders/safety_emitter.inc END


;#line 17: (include "extenders/name.inc")
;#line 17: entity/buildings/tower_guard/extenders/name.inc BEGIN
{"Name"}
;#line 17: entity/buildings/tower_guard/extenders/name.inc END


;#line 18: (include "extenders/entity_classes.inc")
;#line 18: entity/buildings/tower_guard/extenders/entity_classes.inc BEGIN
{"EntityClasses"
"building"
"tower_guard"
"guild" ; èñïîëüçóåòñÿ äëÿ íàñòðîéêè ïðèâëåêàòåëüíîñòè
}
;#line 18: entity/buildings/tower_guard/extenders/entity_classes.inc END



;#line 20: (include "/properties/buildings/extenders/rpg_no_perks.inc")
;#line 20: properties/buildings/extenders/rpg_no_perks.inc BEGIN
{"RPGModule" {perks {perkinstance "no_perks_4_building"}}}
;#line 20: properties/buildings/extenders/rpg_no_perks.inc END

{"Health" {value_new {rpg_building} } }

;#line 22: (include "extenders/building.inc")
;#line 22: entity/buildings/tower_guard/extenders/building.inc BEGIN
{"Home"
}
{"Building"
{building_value 0.2}
{has_static}
{stamp "bg_tower_guard"}

{CastleCashMachine
{Base
{AcceptableCards
{Tax
"citizen_guard"
"citizen_taxer"
}
{Personal
"citizen_guard"
"citizen_peasant"
"citizen_taxer"
}
}
}
}
}


;#line 103: (include "/properties/buildings/visual/tower_guard_vis.inc")
;#line 103: properties/buildings/visual/tower_guard_vis.inc BEGIN
{"visialstatemanager"
{desc
{enable "ENTERING_HERO"}
{ref "object01"} {name "oneEnteringSnd"} {effect}
}

{desc
{enable "EXITING_HERO"}
{ref "object01"} {name "oneExitingSnd"} {effect}
}
}

;#line 103: properties/buildings/visual/tower_guard_vis.inc END


;#line 22: entity/buildings/tower_guard/extenders/building.inc END


;#line 23: (include "extenders/upgrades.inc")
;#line 23: entity/buildings/tower_guard/extenders/upgrades.inc BEGIN
{"Upgrades"
{available
{;1é àïãðåéä
{health 300} ;Äîáàâëÿåò õèòïîèíòîâ
{cost ;Ñòîèìîñòü àïðãåéäà
"money" 0
}
}
{;2é àïãðåéä
{health 300} ;Äîáàâëÿåò õèòïîèíòîâ
{cost ;Ñòîèìîñòü àïðãåéäà
"money" 0
}
}
}
}
;#line 23: entity/buildings/tower_guard/extenders/upgrades.inc END



;#line 25: (include "extenders/spawner_extender.inc")
;#line 25: entity/buildings/tower_guard/extenders/spawner_extender.inc BEGIN
{"spawner_extender"
{global_spawn_progs "guard_spawner peasant_female peasant_male"}
}




;#line 25: entity/buildings/tower_guard/extenders/spawner_extender.inc END


;(include "extenders/keep_population.inc")

;#line 26: (include "extenders/actions.inc")
;#line 26: entity/buildings/tower_guard/extenders/actions.inc BEGIN
{"ActionManager"
{actions
{action
{name "tower_guard_imp_attack"}
}
}
}

;#line 26: entity/buildings/tower_guard/extenders/actions.inc END

{"Attacker"}

;#line 28: (include "extenders/inventory.inc")
;#line 28: entity/buildings/tower_guard/extenders/inventory.inc BEGIN
{"m2inventory"
{allItems
{"Weapon"
{weapon_name "tower_bow"}
}

{"Armour"
{type "hero_cleric" 2}
}
}
}

;#line 28: entity/buildings/tower_guard/extenders/inventory.inc END



;#line 24: (include "extenders/treasures_generator.inc")
;#line 24: entity/buildings/tower_guard/extenders/treasures_generator.inc BEGIN
{"TreasuresGenerator"
{PerDay
"money" 10
}
}
;#line 24: entity/buildings/tower_guard/extenders/treasures_generator.inc END


;#line 30: (include "extenders/ai.inc")
;#line 30: entity/buildings/tower_guard/extenders/ai.inc BEGIN
{"Behaviour.GuardTowerBehaviour"
}

;#line 30: entity/buildings/tower_guard/extenders/ai.inc END


;#line 31: (include "extenders/sensor.inc")
;#line 31: entity/buildings/tower_guard/extenders/sensor.inc BEGIN
{"m2sensor"
{ViewRadius 30}
{Visors
{EnemyVisor}
}
}
;#line 31: entity/buildings/tower_guard/extenders/sensor.inc END



;#line 33: (include "extenders/guard_point.inc")
;#line 33: entity/buildings/tower_guard/extenders/guard_point.inc BEGIN
{"guard_point"
{ZoneRadius 12.0}
{GuardRadius 18.0}
}
;#line 33: entity/buildings/tower_guard/extenders/guard_point.inc END


;#line 34: (include "extenders/prime_cost.inc")
;#line 34: entity/buildings/tower_guard/extenders/prime_cost.inc BEGIN
{"EntityPrimeCost"
{Cost 35.0}
}
;#line 34: entity/buildings/tower_guard/extenders/prime_cost.inc END


;#line 35: (include "extenders/fogvisor.inc")
;#line 35: entity/buildings/tower_guard/extenders/fogvisor.inc BEGIN
{"FogVisor"
{radius 17}
}
;#line 35: entity/buildings/tower_guard/extenders/fogvisor.inc END


;===================================================
; Îáùèå ñâîéñòâà çäàíèé
;===================================================

;#line 40: (include "/properties/buildings/sound/destroyable_guard_tower.inc")
;#line 40: properties/buildings/sound/destroyable_guard_tower.inc BEGIN
{"sound"
{"destroyable_building"
{state "building_one_past_ill" {desc {param}}}
{state "building_one_to_full" {desc {param}}}
{state "building_destroied" {desc {param {name "buildings/crash/building_crash_2"}{posi}}}}
{state "building_is_building" {desc {param {name "buildings/construction/construction"}{looped}{posi}}}}
{state "building_building_is_selected" {desc {param {name "interface/building_select/building_building"} }}}
{state "building_ready_is_selected" {desc {param {name "interface/building_select/tower_guard_select"} }}}
{state "building_people_ambient" {desc {param}}}
{state "building_25_live" {desc {param {name "buildings/crash/fire_small/fire_big_1"}{looped}{posi} }}}
{state "building_50_live" {desc {param {name "buildings/crash/fire_small/fire_med_1"}{looped}{posi} }}}
{state "building_75_live" {desc {param {name "buildings/crash/fire_small/fire_small_1"}{looped}{posi} }}}
}
}

;#line 40: properties/buildings/sound/destroyable_guard_tower.inc END


;#line 41: (include "/properties/units/extenders/items_attachment.inc")
;#line 41: properties/units/extenders/items_attachment.inc BEGIN
{"ItemsAttachment"
}

;#line 41: properties/units/extenders/items_attachment.inc END


;#line 42: (include "/properties/sound/stone_material_sound.inc")
;#line 42: properties/sound/stone_material_sound.inc BEGIN
{"snd_props"
{prop {tag "hitprop"}{val "stone"}}
}

;#line 42: properties/sound/stone_material_sound.inc END


{"building" {version 26}}
{"placer"}
{xform scale 0.7}
{"structure"
{place "dummy_static_1" "tower_guard_l0"}
{place "dummy_static_2" "tower_guard_l0_nati_"}
{place "dummy_static_3" "tower_guard_l1"}
{place "dummy_static_4" "tower_guard_l1_nati_"}
{place "dummy_static_5" "tower_guard_l2"}
{place "dummy_static_6" "tower_guard_l2_nati_"}

{place "dummy02" "nati_object01_base_tower_guard"}
{place "dummy03" "nati_object02_base_tower_guard"}
{place "dummy04" "nati_object03_base_tower_guard"}
{place "dummy05" "nati_object04_base_tower_guard"}
{place "dummy06" "nati_object30_l1_dust_tower_guard"}
{place "dummy07" "nati_object31_l1_base_tower_guard"}
{place "dummy08" "nati_object32_l1_base_tower_guard"}
{place "dummy09" "nati_object33_l1_base_tower_guard"}
{place "dummy10" "nati_object34_l1_dust_tower_guard"}
{place "dummy11" "nati_object35_l1_dust_tower_guard"}
{place "dummy12" "nati_object36_l1_base_tower_guard"}
{place "dummy13" "nati_object42_l2_dust_tower_guard"}
{place "dummy14" "nati_object43_l2_base_tower_guard"}
{place "dummy15" "nati_object44_l2_base_tower_guard"}
{place "dummy16" "nati_object45_l2_base_tower_guard"}
{place "dummy17" "nati_object46_l2_dust_tower_guard"}
{place "dummy18" "object01_ground_tower_guard"}
{place "dummy19" "object02_base_tower_guard"}
{place "dummy20" "object03_dust_tower_guard"}
{place "dummy21" "object04_base_tower_guard"}
{place "dummy22" "object05_base_tower_guard"}
{place "dummy23" "object06_dust_tower_guard"}
{place "dummy24" "object07_dust_tower_guard"}
{place "dummy25" "object08_base_tower_guard"}
{place "dummy26" "object09_base_tower_guard"}
{place "dummy27" "object10_dust_tower_guard"}
{place "dummy28" "object11_base_tower_guard"}
{place "dummy29" "object12_base_tower_guard"}
{place "dummy30" "object13_base_tower_guard"}
{place "dummy31" "object14_dust_tower_guard"}
{place "dummy32" "object15_base_tower_guard"}
{place "dummy33" "object16_base_tower_guard"}
{place "dummy34" "object17_dust_tower_guard"}
{place "dummy35" "object18_base_tower_guard"}
{place "dummy36" "object19_base_tower_guard"}
{place "dummy37" "object20_base_tower_guard"}
{place "dummy38" "object21_dust_tower_guard"}
{place "dummy39" "object22_base_tower_guard"}
{place "dummy40" "object23_base_tower_guard"}
{place "dummy41" "object24_base_tower_guard"}
{place "dummy42" "object25_base_tower_guard"}
{place "dummy43" "object26_l1_base_tower_guard"}
{place "dummy44" "object27_base_tower_guard"}
{place "dummy45" "object27_l1_base_tower_guard"}
{place "dummy46" "object28_l1_base_tower_guard"}
{place "dummy47" "object29_l1_dust_tower_guard"}
{place "dummy48" "object30_base_tower_guard"}
{place "dummy49" "object31_l1_base_tower_guard"}
{place "dummy50" "object32_l1_base_tower_guard"}
{place "dummy51" "object33_l1_base_tower_guard"}
{place "dummy52" "object37_l1_base_tower_guard"}
{place "dummy53" "object37_l2_base_tower_guard"}
{place "dummy54" "object38_l2_dust_tower_guard"}
{place "dummy55" "object39_l2_base_tower_guard"}
{place "dummy56" "object40_l2_base_tower_guard"}
{place "dummy57" "object41_l2_base_tower_guard"}
{place "dummy58" "object47_l1_base_tower_guard"}
{place "dummy59" "object48_l1_base_tower_guard"}
{place "dummy60" "object49_l1_base_tower_guard"}
{place "dummy61" "object50_l1_base_tower_guard"}
{place "dummy62" "object51_l2_base_tower_guard"}
{place "dummy63" "object52_l1_base_tower_guard"}
{place "dummy64" "tower_guard_l1_scaffold_tower_guard"}
{place "dummy65" "tower_guard_l2_scaffold_tower_guard"}
{place "dummy66" "tower_guard_scaffold_tower_guard"}
}

;#line 121: (include "/properties/units/extenders/selection_box1.inc")
;#line 121: properties/units/extenders/selection_box1.inc BEGIN
{"volumes"
{"selection_box1"
{able
{visible 0}{bullet 0}{overlap 1}{obstacle 0}{contact 0}{contact_ground 0}
{blast 0}{hole 0}{holed 0}{touch 0}{float 0}{window 0}
{select 1}
}
}
}

{"zones"
{Collider "can_stir"}
}
;#line 121: properties/units/extenders/selection_box1.inc END

}