I've asked this in the Stainless Steel forum - but I thought I should post it here as well....can we port units from Kingdoms to mods for vanilla M2TW? I know it can be done - but can vanilla M2TW mods use the units in a "legal" sense?
I've asked this in the Stainless Steel forum - but I thought I should post it here as well....can we port units from Kingdoms to mods for vanilla M2TW? I know it can be done - but can vanilla M2TW mods use the units in a "legal" sense?
Last edited by OTZ; September 01, 2007 at 08:46 AM.
As far as I can see anything done in a mod is in that grey area of legal and not,it all just depends on what you choose to do with it.If you do not herald it as an alternate to buying kingdoms,then I do not really see the problem with it...but again..there is the grey area...
Edictum mod adds new edicts to Rome II. http://www.twcenter.net / YouTube: Edictum Mod / Click here for Edictum Mod on steam
Vote Brain Slug for president.
There is an easy way to do it. You just have to set the path correctly in the modeldb file, so that it reads from the M2TW/mods/xxinsert_campaign_namexx/units/etc etc....that way you aren't actually releasing the models/textures. That's how I've changed over the Kingdom of Jerusalem to vanilla M2TW
OTZ im trying to do pretty much the same as you did with the KoJ but with the Teutons. Could you pretty please with sugar on top post a short tutorial on how you did it? I will include you in my prayers if you do!
/Matte
likewise, any chance of a little walkthrough please?
Would be most appreciated.
Yes, but how are you going to be able to have the file read multiple models.db? Can you make it so it can read the Crusades, Americas, Britannica, and Tutonic all at the same time? Otherwise, maybe CA should release something that allows that to happen so modders can put new units from all four campaigns in one campaign map for those who already bought Kingdoms.
**originally posted in the SS mod forum**
Ok, upon request, here's a brief little guide to adding some of Kingdom's units to your version of Stainless Steel.
The first thing you need to do, is figure out what you want to add. In my example, I'll be adding some Tripolitan Squires from the Crusades Campaign.
Remember - back up your files, or at least beware that this could impact your game.
Step 1) go to your Medieval 2\tools\unpacker folder and click on unpack_crusades. Since we need the unit info and the unit models for the Squires, we have to extract it from the Crusades Campaign.
The unpacker will create a lot of different files in the Medieval 2\mods\crusades folder. This is where we'll get what we need.
Here's the list of files that we will be accessing/modifying:
- Medieval 2\mods\crusades\data\ui\units\jerusalem
You will need to copy the Squires' tga file - which is just their unit card. You can paste this in the Stainless_Steel_Mod\data\ui\units\knights_templar folder
- Medieval 2\mods\crusades\\ui\unit_info\jerusalem
You will need to copy the Squires' unit info card and you can paste this in the Stainless_Steel_Mod\data\ui\unit_info\knights_templar folder
- Medieval 2\mods\crusades\data
You will need to access the export_descr_unit (EDU for short). Find the unit we are porting to SS - Ctrl + f will do the trick.
Simply copy the entry without the last line "recruit_priority_offset 0" - it should look like this:
Spoiler Alert, click show to read:
Ok, so now this info has to be copied to the SS EDU file (located in Medieval 2\Stainless_Steel_Mod\data). Open up the file and paste the text to the very bottom. Make sure you change the ownership! Close it and save.
Step 2) Copying over the model info can be a little tricky, but careful attention will yield success!
Go back to the mods folder - and find the battle_models file (located in Medieval 2\mods\crusades\data\unit_models). Open this up. And yes, it should look like a bunch of letters and numbers thrown up on a piece of paper - but once you understand the format, it gets pretty simple.
So in that file, is the text we need for our Squires or any other unit for that matter). One important thing to note is the first line in the file, and specifically one number
22 serialization::archive 3 0 0 0 0 790 0 0
The number in red is equal to the number of units + armour upgrades in the game. So if our Squires have no armour upgrades, then they will only count as 1 additional entry in this file - no matter how many factions will have access to them. We'll cahnge this when we get to the SS battle_models file.
For now, lets find the entry for the Squires. Using Ctrl + F, search for Tripolitan_Squires - this corresponds to the dictionary line in the EDU file. The unit name will be highlited amongs a ton of other text.
Here's what it could look like:
Spoiler Alert, click show to read:
The bolded text is what we need to copy from this file. Make sure you start at the "1" in 18, and end with all spaces before "31 dismounted_knights..."
Also double check to make sure you get all of the upgrade entries as well (for each ug entry, you have to add +1 to the unit count in this file!).
This file format is very particular when it comes to spaces...any mistakes, and you'll get a CTD.
If you want details on what everything means - refer to this thread for a detailed explanation (in fact, I encourage it): http://www.twcenter.net/forums/showthread.php?t=74945
Once copied, paste this text at the very bottom of the SS battle_models file (Medieval 2\Stainless_Steel_Mod\data\unit_models). You'll notice "9 jerusalem " in there somewhere. This also needs to be altered, because there's no jerusalem faction in SS. the "9" is the number of characters in the word "jerusalem" so anything we change has to match the number.
We can change this to "15 knights_templar " - knights _templar is 15 characters long - hence "15"
Make sure to do this for every "9 jerusalem " - it should only be done twice for the squires.
It should look like this
Spoiler Alert, click show to read:
There has to be at least one space at the end of every line - very important to remember!
Now we have to also change the unit count at the top of this file. Find this line at the start:
22 serialization::archive 3 0 0 0 0 820 0 0
The number in red is the one that needs changing (yours will probably not be 820 - I've added quite a few units already...). Simply add +1 to the count. Don't close this file just yet though...
Now to import the actual models themselves.
If you notice, there are directory paths in the battle_models folder for each unit. As an example 64 unit_models/AttachmentSets/Final Crusader_jerusalem_diff.texture .
This path must always be in the root directory that your game is launching from. In our example, it has to be Medieval 2\Stainless_Steel_Mod\data\unit_models. I've tried re-routing the path to look in the Kingdoms folders, but I can't get it to work. So this means that all the models have to be manually copied from the XP to the SS folders...the easy way is just to copy and merge all the folders in the XP unit_models tree with the SS unit_models folder tree (go to the Medieval 2\mods\crusades\data\unit_models folder and copy everything in there except the battle_models file - then copy into the edieval 2\Stainless_Steel_Mod\data\unit_models folder and paste it.). It works - as this is the way I've done it. The long way is to do it manually, by copying only the relevant meshes and textures...and everything else that is needed...you will be required to create some additional folders if you do it this way.
Once it's copied over, the unit should now work in game. You can edit the descr_units file, in the text folder as well, if you want the unit description to show up in game.
Try and only do one unit at a time, and always test the game afterwards to make sure it works. There's no point in adding more than one, otherwise you'll spend a lot of time error checking if you get a CTD.
You will also need to edit the unit stats in the export_descr_unit file in order to match the Real Combat stats. In order to make the new units recruitable, simply go into the export_descr_building file, and add them to the building you want to make them from. Just follow the format in that file, and it should be easy.
It's not as detailed as it should be - but there's enough info to get you started. Check out the tutorial threads in the modding folder as well - I will also be around to help with any problems you might have.
I learned all this from scratch myself - so I have every reason to believe anyone else can learn this stuff as well.
I'm working on converting the Knights Templar to a "Crusader States" faction...all the Kingdom of Jersualem units are in game, and most of the Hospitallers are as well. Here's osme screens:
Last edited by OTZ; September 03, 2007 at 11:32 AM.
wow very detailed walkthrough. thanks a lot man. will certainly try it later.
one question, when crusades is unpacked, in the data/text folder i see only a export_units.txt.strings.bin, is that the one we need to edit in order for the unit description to show up? if so, how do you edit the bin file? thanx.
Yes, you will need the txt/bin converter to unpack those files to regular txt.
Here's the link for that: http://www.twcenter.net/forums/downl...o=file&id=1006
thanks! trying it now.
EDIT: worked like a charm. thanx again.
Last edited by 88cali; September 03, 2007 at 01:39 PM.
so then... if one wanted to add all of the new kingdoms units to a grand campaign and such, would it be best to just sort of create a "fifth" kingdoms campaign combining all the factions and units? or would it be better to unpack the units from one and just mod, like, say the crusades campaign map or something like that?
Hello, I recently got back into modding the game in my leisure time and have successfully added a few units to the Models-B ( Knights Hospitaller, English Dismounted Knights and the kingdoms unit Dismounted Ritterbruder for Hre) but am stuck on the Marshalls of the Hospitaller ( unique).
Not sure if this code is correct as it isn't quite in the same format when copied-pasted from the new kingdoms modelsB to the old Mtw2 modeldsB ( going into my DLVExt mod folder) Also, is there soemthing i'am forgetting since it is a new unique unit?
Any help is appreciated! --Edit....Ive used Knight Errants nice utility to re-format the kingdoms ModelB file...but I still get a crash with no log....2nd edit....Well I deleted the marshall reference from the EDU and left my modelB marshall entry intact and the game loaded finally. So I guess the culprit is in the edu entry but it is copy-pasted to the bottom like the other units and I cant seem to see the problem with the edu entry....
type Marshall of the Hospitallers
dictionary Marshall_of_the_Hospitallers ; Marshall of the Hospitallers
category cavalry
class heavy
voice_type Heavy
banner faction main_cavalry
banner holy crusade_cavalry
soldier Marshall_of_the_Hospitallers, 24, 0, 1
mount order mailed horse
mount_effect elephant -4, camel -4
attributes sea_faring, hide_forest, hardy, can_withdraw, can_formed_charge, knight
formation 2, 4.4, 3, 6, 3, square, wedge
stat_health 2, 0
stat_pri 11, 7, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 12, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 6, 5, 6, metal
;stat_armour_ex 6, 0, 0, 0, 5, 6, 4, metal
stat_sec_armour 0, 0, flesh
stat_heat 7
stat_ground 0, -2, -10, 2
stat_mental 11, impetuous, highly_trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 1450, 185, 130, 305, 1450, 1, 430
armour_ug_levels 3
armour_ug_models Marshall_of_the_Hospitallers
ownership antioch
era 0 antioch
era 1 antioch
;unit_info 11, 0, 34
recruit_priority_offset 15
Last edited by Mandor; September 14, 2007 at 10:48 AM.
Well.., I finally added dismounted_halbrudder by tweaking with the modeldB, it seems my entry was indeed wrong and the edu was correct.
Now trying to add the correct ModelsB for Marshall_of_the_Hospitallers with no success.
Anyone help here? Thanks!
28 marshall_of_the_hospitallers
1 4
66 unit_models/_Units/CM_Fancy/marshall_of_the_hospitallers_lod0.mesh 121
66 unit_models/_Units/CM_Fancy/marshall_of_the_hospitallers_lod1.mesh 900
66 unit_models/_Units/CM_Fancy/marshall_of_the_hospitallers_lod2.mesh 2500
66 unit_models/_Units/CM_Fancy/marshall_of_the_hospitallers_lod3.mesh 6400
1
3 hre
66 unit_models/_Units/CM_Fancy/textures/CM_fancy_hospitallers.texture
60 unit_models/_Units/CM_Fancy/textures/CM_fancy_normal.texture
60 unit_sprites/antioch_Marshall_of_the_Hospitallers_sprite.spr
1
3 hre
68 unit_models/AttachmentSets/Final Heater Special_antioch_diff.texture
68 unit_models/AttachmentSets/Final Heater Special_antioch_norm.texture 0
1
5 Horse
13 MTW2_HR_Lance
13 MTW2_HR_Sword 2
21 MTW2_HR_Lance_Primary
14 fs_test_shield 2
18 MTW2_Sword_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Last edited by Mandor; September 14, 2007 at 12:57 PM.
where is ur ctd on start up or when ur loading a custom battle