Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Aug 17, 2006, 07:07 AM   #1
DerChefkoch_75
Chieftain
 
Join Date: Aug 2006
Posts: 16
Religion Merging mods ?

hi

i'm fairly new here, but already spent the last 3 days browsing your forum .. unfortunately, many questions did not get answered (and yes, i even used the 'search' option)...

i am a software developer but not fit in python. i have the warlord expansion ...

my first question: i only play the warlord expansion, and make use of the customasset folder, but a look at the python code in the CvPath.py file shows me that the warlords customasset folder is ignored - am i correct ?
(the command shows something along the line of 'merge the civ4 path with warlord path' - in 'my documents' warlord has an own folder parallel to civ4 by default)

second question (more important): many mods come with 2 ini files and a CvModName.py. how to merge those ?

i downloaded for example a couple of small mods (JUnitReligion, Great Generals From Barbarian Combat Mod).
i already use the Ethnically Diverse Units mod which works fine (does not use a mod config, just a simple ini for the game). merging it with the immigration mod (which is only for the 1.61 vanilla version, but i was able to edit the xml files so it would be compatible with warlord) resulted in +2419434686598 gold per round shown on the top left of the screen(which you do not actually get), so i don't know if the game itself would have worked. replacing the cvpath and cvconfigparser files of the immigration mod with appropriate files from 'Great Generals From Barbarian Combat Mod' after comparing them with 'araxis merge'-developer tool resulted in a crash.

nonetheless, i'd like to at least include these 2 small mods, but i do not know how to handle the different eventmanager files and the different config and cvmodname files....
i guess cvmodname would be renamed to the ethnical mod, since that mod is my default mod, but how to proceed further ?

thx in advance
DerChefkoch_75 is offline   Reply With Quote
Old Aug 17, 2006, 08:46 AM   #2
Jeckel
Great Reverend
 
Jeckel's Avatar
 
Join Date: Nov 2005
Location: Peoria, IL
Posts: 1,621
Ok, let me see if I can answer a few of these for ya.

1) The two ini files generally in a mod's /Mods/<modname> directory. The <modname>.ini one, example JUnitReligion.ini is generated by the Civ4 hardcode and can basicly be ignored. IF you delete it, the game will make a new one with default values the next time you use the mod to play a game.
The other ini you usely see, example JUnitReligion Mod Config.ini, is the ini file that is part of the mod and has options you can set and change to effect how the mod works.

2) The CvModName.py file. If you look in the file you will see that it has only one variable. That variable should be the name of the mod's directory, it should be the exact same as <modname> in /Mods/<modname>, example /Mods/JUnitReligion is the directory so the variable in CvModName.py should be "JUnitReligion". You have to have the quotes around it so Python knowes it is a string and I'm pretty sure it is case sensitive.

3) CvPath.py, using the mod directory name in CvModName, is used by CvConfigParser to find the config.ini file of the mod. I don't really know if it has anything to do with finding stuff in CustomAssets, you might want to ask on Dr. Elmer Jiggle's thread.

Hope that helps and good luck.
__________________
"For evil to conquer, good men need only do nothing."
"War is God's way of teaching Americans geography."
"When Scientists ask questions, Engineers build answers."
Vinland Solutions: Programming Progress - INI Buddy: Config Editing Done Easy
My Beyond the Sword Mod Library - [Col2] JTradeRoutes: An Improved Interface
Jeckel is offline   Reply With Quote
Old Aug 19, 2006, 04:09 PM   #3
DerChefkoch_75
Chieftain
 
Join Date: Aug 2006
Posts: 16
Quote:
Originally Posted by Jeckel
Ok, let me see if I can answer a few of these for ya.

1) The two ini files generally in a mod's /Mods/<modname> directory. The <modname>.ini one, example JUnitReligion.ini is generated by the Civ4 hardcode and can basicly be ignored. IF you delete it, the game will make a new one with default values the next time you use the mod to play a game.
The other ini you usely see, example JUnitReligion Mod Config.ini, is the ini file that is part of the mod and has options you can set and change to effect how the mod works.

2) The CvModName.py file. If you look in the file you will see that it has only one variable. That variable should be the name of the mod's directory, it should be the exact same as <modname> in /Mods/<modname>, example /Mods/JUnitReligion is the directory so the variable in CvModName.py should be "JUnitReligion". You have to have the quotes around it so Python knowes it is a string and I'm pretty sure it is case sensitive.

3) CvPath.py, using the mod directory name in CvModName, is used by CvConfigParser to find the config.ini file of the mod. I don't really know if it has anything to do with finding stuff in CustomAssets, you might want to ask on Dr. Elmer Jiggle's thread.

Hope that helps and good luck.

thx for your answer
eventually i figuered that out myself - my problem is how to merge two config / python files ....(the config shouldn't be a problem, simply appending the options, but how to name the file itselft afterwards ?)
DerChefkoch_75 is offline   Reply With Quote
Old Aug 19, 2006, 09:16 PM   #4
Jeckel
Great Reverend
 
Jeckel's Avatar
 
Join Date: Nov 2005
Location: Peoria, IL
Posts: 1,621
Just include both config.ini options. In the python files the config files are called by name so moving the options from one file to another or renameing the config.ini files without also editing the proper places in the python will cause the ini file reading to fail.

If you have any other question just post them here and I'll keep an eye on this thread, I'm always happy to lend ahand.
__________________
"For evil to conquer, good men need only do nothing."
"War is God's way of teaching Americans geography."
"When Scientists ask questions, Engineers build answers."
Vinland Solutions: Programming Progress - INI Buddy: Config Editing Done Easy
My Beyond the Sword Mod Library - [Col2] JTradeRoutes: An Improved Interface
Jeckel is offline   Reply With Quote
Old Aug 20, 2006, 06:07 AM   #5
Teg_Navanis
King
 
Join Date: Jan 2006
Posts: 737
Quote:
Originally Posted by DerChefkoch_75
thx for your answer
eventually i figuered that out myself - my problem is how to merge two config / python files ....(the config shouldn't be a problem, simply appending the options, but how to name the file itselft afterwards ?)
The config parser parses all .ini files in the directory of the mod, so the config's name is not important.

And yes, unfortunately, CvPath doesn't recognize files in the CustomAssets folder.
__________________
Unit Statistics Mod - Kill list, damage counter and more. Keep track of your units and find out which one of them is the best!
CivMail - A small e-Mail client for Civ4
Teg_Navanis is offline   Reply With Quote
Old Aug 20, 2006, 12:32 PM   #6
Jeckel
Great Reverend
 
Jeckel's Avatar
 
Join Date: Nov 2005
Location: Peoria, IL
Posts: 1,621
Quote:
Originally Posted by Teg Navanis
The config parser parses all .ini files in the directory of the mod, so the config's name is not important.
I don't think I understand what you mean by this. It has been my impression that if you change the name of a config.ini file then
Code:
config = CvConfigParser.CvConfigParser("<config.ini file name>")
is not going to find its given file, and then all your config.getint()s and config.getboolean()s will not know which config file to lookin.
__________________
"For evil to conquer, good men need only do nothing."
"War is God's way of teaching Americans geography."
"When Scientists ask questions, Engineers build answers."
Vinland Solutions: Programming Progress - INI Buddy: Config Editing Done Easy
My Beyond the Sword Mod Library - [Col2] JTradeRoutes: An Improved Interface
Jeckel is offline   Reply With Quote
Old Aug 20, 2006, 12:40 PM   #7
Teg_Navanis
King
 
Join Date: Jan 2006
Posts: 737
You're right, forgot about that one.
__________________
Unit Statistics Mod - Kill list, damage counter and more. Keep track of your units and find out which one of them is the best!
CivMail - A small e-Mail client for Civ4
Teg_Navanis is offline   Reply With Quote
Old Aug 20, 2006, 04:24 PM   #8
DerChefkoch_75
Chieftain
 
Join Date: Aug 2006
Posts: 16
Quote:
Originally Posted by Jeckel
I don't think I understand what you mean by this. It has been my impression that if you change the name of a config.ini file then
Code:
config = CvConfigParser.CvConfigParser("<config.ini file name>")
is not going to find its given file, and then all your config.getint()s and config.getboolean()s will not know which config file to lookin.
as far as i can interprete the python code (similar to basic or c) all the parser does is to retrieve an array of files and parses ALL of them
so i think the name of the config could be pointless after all ....

problem: how to merge the python file "cvmodname" ?
and even worse: how to merge a python file "custom event handler" ??
DerChefkoch_75 is offline   Reply With Quote
Old Aug 20, 2006, 05:48 PM   #9
Jeckel
Great Reverend
 
Jeckel's Avatar
 
Join Date: Nov 2005
Location: Peoria, IL
Posts: 1,621
Quote:
Originally Posted by DerChefkoch 75
problem: how to merge the python file "cvmodname" ?
and even worse: how to merge a python file "custom event handler" ??
First it is very important to point out that the CvCustomEventManager.py file is somthing seperate from the CvPath.py, CvConfigParser.py, and CvModName.py files. CvCustomEventManager.py is a custom event manager, where as the other three files are a INI file reading utility. The INI file reading has nothing to directly do with custom event managing and visa versa.

1) You don't need to merge CvModName files. The CvModName file has a single variable. This variable should be set to the name of the mod's main directory under the Civ4/Mods/ directory. For example, JUnitReligion mod is in the Civ4/Mods/JUnitReligion/ directory so in the CvModName file that single variable should be set to "JUnitReligion" with the quotes so python knows its a string.

2) ..Well, I started explaining the CvCustomEventManager.py file, but this is a little more complex and I have to go do some RL stuff. I am going to be out of town for a day or two so I am going to write up a little Tutorial on using Dr Elmer Jiggle's Custom Event Manager and post it in the Tutorial forum. I'll link to it from here when I get back in town and post the tutorial.
__________________
"For evil to conquer, good men need only do nothing."
"War is God's way of teaching Americans geography."
"When Scientists ask questions, Engineers build answers."
Vinland Solutions: Programming Progress - INI Buddy: Config Editing Done Easy
My Beyond the Sword Mod Library - [Col2] JTradeRoutes: An Improved Interface
Jeckel is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Merging mods ?

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Mods SingASong Civ4 - CIV Gold 5 Jul 27, 2010 02:40 AM
Merging Mods? wrestler235 Civ4 - Creation & Customization 3 Aug 02, 2008 05:43 AM
help -merging mods Bierhoff Civ4 - Creation & Customization 0 Feb 13, 2008 09:29 PM
Merging mods? Keraunos Civ4 - Creation & Customization 3 Feb 01, 2007 03:39 PM
merging mods bergrar Civ4 - Creation & Customization 2 Oct 23, 2006 09:32 AM


Advertisement

All times are GMT -6. The time now is 12:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR