|
|
|
|
|
September 26th, 2008, 07:21 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Script for combining multiple mods
I proudly present a perl script for combining multiple mods and eliminating any clashes. I expect it to be useful for games where you want to play with a number of mod nations which might otherwise clash. It's quite a big, lengthy script, and it has a lot of built-in knowledge of how mods work. So, barring any typos (always a possibility), I'm fairly sure it can handle anything that can be thrown at it without producing any bugs in the resulting megamod.
The usage is:
combineMods era mod1.dm mod2.dm ... modN.dm newModName
e.g. combineMods 2 TombKings.dm vaetti.dm MagicMod
This will produce a mod called MagicMod.dm which will include the Tomb Kings and the vaetti, both in the middle era.
The era has to be a number between 1 and 3 (1=early etc). All the mod nations included in the combined mod will be set to be in that era, so that they can play together.
You can combine any number of mods with this script, and it's also fine to include mods which modify vanilla nations, e.g. CBM.
For those who haven't used a perl script before: On Linux or, I think, Mac, you need to open a terminal and type "perl combineMods ..." where ... is all the parameters, as given above. On Windows I believe you need to download ActivePerl. I think it's free.
Here it is:
Last edited by llamabeast; May 19th, 2009 at 07:17 PM..
|
The Following 10 Users Say Thank You to llamabeast For This Useful Post:
|
|
September 26th, 2008, 07:28 AM
|
|
First Lieutenant
|
|
Join Date: May 2007
Location: Reading, PA
Posts: 724
Thanks: 93
Thanked 37 Times in 27 Posts
|
|
Re: Script for combining multiple mods
WOW.
As someone who usually plays 5 to 10 mod nations at a time, this is fantastic. I've had to manually change numbers throughout and I lost the takeout menu on which I had scribbled the new numbers.
|
September 26th, 2008, 08:46 AM
|
BANNED USER
|
|
Join Date: Feb 2007
Posts: 5,463
Thanks: 165
Thanked 324 Times in 190 Posts
|
|
Re: Script for combining multiple mods
Can it handle all the different shapes?
Firstshape, secondshape, tmpshape, forestshape, plainshape etc? Summon, call allies, domsummon?
What does it do with nametypes?
|
September 26th, 2008, 09:03 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Script for combining multiple mods
Yep yep, it can handle all of them. It can handle all commands in Edi's unofficial modding manual (which I am assuming is complete).
With nametypes, it handles them sensibly, i.e. it keeps track of nametypes from different mods, renumbers them and makes sure each unit is pointing to the correct nametype. However, it obviously needs to choose which vanilla nametypes to overwrite. Near the top of the mod is an ordered list of which nametypes it should overwrite. I chose something like 127, 128, 150, 149, 148, 147 etc.. Obviously it's not ideal to overwrite any apart from 127 and 128, but generally I think that it's unlikely to be noticeable.
|
September 26th, 2008, 09:16 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Script for combining multiple mods
Oh, hang on. firstshape etc all currently assume that you've already defined the monster you want to change to. But of course that won't always be true.
Hmm. I will have a think about that, and try to fix it this afternoon.
|
The Following User Says Thank You to llamabeast For This Useful Post:
|
|
September 26th, 2008, 09:48 AM
|
Lieutenant General
|
|
Join Date: Feb 2007
Location: New Orleans
Posts: 2,741
Thanks: 21
Thanked 28 Times in 17 Posts
|
|
Re: Script for combining multiple mods
Thanks Llamabeast!
__________________
"War is an art and as such is not susceptible of explanation by fixed formula."
- General George Patton Jr.
|
September 26th, 2008, 12:27 PM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Script for combining multiple mods
Okay, I have it very nearly fixed, but have run out of time before some friends who are staying for the weekend turn up. I'll re-upload it on Sunday or Monday.
|
September 26th, 2008, 12:45 PM
|
|
First Lieutenant
|
|
Join Date: May 2007
Location: Reading, PA
Posts: 724
Thanks: 93
Thanked 37 Times in 27 Posts
|
|
Re: Script for combining multiple mods
I'm very interested in seeing how you handle firstshape. It seems to be quite a formidible task, at least to my limited knowledge about the subject.
|
October 4th, 2008, 05:03 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Script for combining multiple mods
Okay! Reuploaded at last! See the first post.
The new version is significantly more cunning, and once more I don't _know_ of anything it can't handle. Summons, sites, nametypes, it's all in. The script is now a beast at about 900 lines (many of which are repetitious to be fair).
Also, the resultant mod is somewhat self-documenting. If you right-click on it from the Dom3 "Mod preferences" screen it will list which mods it includes, along with the version number of each. If you look at the mod file you'll find it lists near the top the ID number ranges that it uses.
|
The Following 3 Users Say Thank You to llamabeast For This Useful Post:
|
|
October 4th, 2008, 06:05 AM
|
|
First Lieutenant
|
|
Join Date: May 2007
Location: Reading, PA
Posts: 724
Thanks: 93
Thanked 37 Times in 27 Posts
|
|
Re: Script for combining multiple mods
Thank you very much. I plan on giving it a test spin tonight when I have more time.
Today is one of my "Give-in-to-the-old-ball-and-chain" days. All of us married chaps must concede a couple of them a year. It is a day dedicated to doing things where she offers up the idea (sic), and the only thing I have to do is add the time, labor and money.
Not much different than all the threads where someone reads a book and then suggests that someone can feel free to make a mod nation based on his brillant thoughts.
Well, actually there is a difference; I can ignore those threads forever without enduring relentless, painful nagging.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|