Last edited by OTZ; September 03, 2007 at 06:35 AM.
I suspect that it would be illegal to distribute the files with the mod, however since you use the unpacker from the command line a batch file could be used to unpack the relevant files into the mod folder during installation.
yep...I guess you could make the mod files have to search in the existing campaign folders for the relevant model info...
anywho...I've managed to convert the Kingdom of Jerusalem to the knights templar in SS, and I must say that I likey! Very cool...not that the KT were bad in the vanilla version of SS.
i beleive that any modification to your files is only illegal if you sell it, i could be completely wrong though. i do know that it voids all your warrenties and such.
“Being a Humanist means trying to behave decently without expectation of rewards or punishment after you are dead.” ― Kurt Vonnegut
"Education: that which reveals to the wise, and conceals from the stupid, the vast limits of their knowledge." ― Mark Twain
"Imagination is a quality given a man to compensate him for what he is not, and a sense of humor was provided to console him for what he is." ― Oscar Wilde
“While money can't buy happiness, it certainly lets you choose your own form of misery.” ― Groucho Marx
Doing it on a personal basis or telling other people how to do it isn't a problem (though only because CA have given consent for people to modify the data files), the problem would be distributing unmodified Kingdoms models and textures (whether you ask for money or not) as they may well work work with vanilla M2TW whether you have Kingdoms or not.
As I mentioned above though for people who actually have Kingdoms the files are sitting in the packs on their hard drives so a well crafted batch file could unpack them and put them where they're need for a mod.
care to walk through how you did this? i would love to add or replace units in SS with kingdom units.... teutonics for a start...yummm...
thx.
Yeah, no problem. It'll take a bit for me to do - I've got a busy day ahead of me.
@ DenniZ I'm thinking about doing a mini-mod that adds many of the units from Kingdom's to SS - but it'll only work for those that have the XP. The problem is that there's only limited room in the SS EDU file, so I may have to cut some the original units out of the game in order to fit more in (who the hell uses peasants anyway!?!)
many thanks otz. Ive been fiddling with the modeldb all morning with those model/texture paths, trying to swop them about, and have had no joy, either doesnt load up or just crashes going into battle. Ho hum. I await your words with patience.
thx again.
ok, I started a tutorial, but it might be too lengthy (and time consuming)...
Can you tell me what you've done so far, and I'll try and troubleshoot your problem...
Well having a couple of hundred peasants in your army can be pretty usefull you know. It can really tire your enemy if you send a couple of peasant-waves at them before sending in your knights
Anyway back O/T
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. 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..."
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 forum 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 04, 2007 at 05:01 AM.
Man that looks very good!!
ty for tutorial . 1 unit is done . around 28 to go ^.^
Great tutorial mate. Thanks.
I have one question. I added a unit and everything worked great. Except Im getting the "Unlocalized Placement Text" instead of the units name in custom battle.
Im sure Im just missing a file or havent edited the file it needs. Where can you find that?
Yeah, you need to create an entry in the export_units file, located in SS_mod/data/text file.
Somthing like this:
{Armenians_of_Celicia}Armenians of Cilicia
{Armenians_of_Celicia_descr}Armenians are arguably the most numerous native Christians in Outremer, and therefore the most important to the soldier starved Crusader States. Often fighting under their own chieftains and lords, Armenian troops have a fierce reputation in Outremer, making them excellent troops. These bowmen are protected by armour and wield a composite bow and an axe.
{Armenians_of_Celicia_descr_short}Fierce armoured bowmen from Outremer's most numerous native Christians, armed with composite bow and an axe.
You can copy this entry from the one in the Crusades folder, but you will need the strings_bin converter first...it's easy to do!
Here's the link for the bin coverter http://www.twcenter.net/forums/downl...o=file&id=1006
Yep that did the trick! Thanks again.
New problem...haha
I moved over the Gotland Footmen. Everything is good except the Upgraded version is showing up completely invisible. Not silver but just invisible. Ive double checked and all the spires/meshes/skins are moved over. Have you had any problems with upgrade textures before?
Hi all
thanks OTZ for the great tutorial it works fine with all the units so far except with the greek firethrowers. When I use the same procedure as with all the other units I get a CTD. Is anyone else experiencing this problem or do you have to alter an extra file for example. Again thanks for the great tutorial
cheers
@ Uryens - try copying over the textures/meshes again just to be sure you got them all.
@Llearion, can you post the last few lines from your log report? Or is it an unexpected error?
EDIT - the problem is the "greek fire" attribute in the EDU. Hmmm...I'll try and figure it out - I imagine an animation has to be copied as well.
For starters - copy over the greek_fire entry in the export_projectiles file - I know at the very least this is required. You can also copy over the descr_area_effects file itself (the whole thing - I hope! There isn't one in SS, so I "assum" it'll be ok!)
Last edited by OTZ; September 04, 2007 at 04:39 AM.
oooh this looks great, close to what i was doing, but i dont think i edited the total number of units, didnt realise. Right, off to give it a try. Many thanks dude for your time and patience, much appreciated.