TheLopez's Mod Component Library Thread and more

Hey, thanks for the response. Actually you can open that file with either notepad or wordpad. Like I had mentioned, the only thing in these two files is the MOD name. They look like this:

#CvModName.py
modName = "Pirates Mod"

and

#CvModName.py
modName = "Enhanced Foreign Advisor"

So, I'm wondering if this actually will affect the MODs performance or if these are just some sort of naming indicator files. Do I need them? Can I combine them and if so, can I just copy and paste these together or will the game only read the first line?

Lastly, just to reiterate, if anyone knows about the files I mentioned in the INIParser folder it would be most appreciated.

Thanks again!
 
Hey, thanks for the response. Actually you can open that file with either notepad or wordpad. Like I had mentioned, the only thing in these two files is the MOD name. They look like this:

#CvModName.py
modName = "Pirates Mod"

and

#CvModName.py
modName = "Enhanced Foreign Advisor"

So, I'm wondering if this actually will affect the MODs performance or if these are just some sort of naming indicator files. Do I need them? Can I combine them and if so, can I just copy and paste these together or will the game only read the first line?

Lastly, just to reiterate, if anyone knows about the files I mentioned in the INIParser folder it would be most appreciated.

Thanks again!
You should only need one "CvModName.py" file in whatever mod you are creating. The modName should equal the name of your mod's directory. For instance in my Amra's Modpack the contents of this file are:

#CvModName.py
modName = "Amra v208"

"Amra v208" is the name of the modpack's directory. I believe TheLopez's mods access the CvModName.py file in order to find the mod's directory and thus various files needed to run the mod component. So, it is important to include your modpack's exact directory name or parts of your mod may not function.

I'm sure TheLopez could explain it better but hopefully I was able to help.
 
Im not completely sure, but i think that a .py with no code at all except "modname" is about useless. .py files are used for the random maps (perhaps some other maps?) Most of the code inside often is just script for generating a map. I have made a few mods and integrated many mod components together, some which contain not a single .py file and they work perfectly.

EDIT: Also Im pretty sure that the naming comes from (or can) the .ini file in the mod/modfolder/ folder
 
actually, i just thought about this, and tested it slightly, I know .py files can contain things other than map scripts, And the .ini doesn't actually "name" the mod. I just put a simple mod together and just made a "mods/components/" folder, added 1 xml (the mod is only 3 folders, components/assets/XML, and 1 file, an XML), did not even create a .ini file or anything else, and it works. Civ4 automatically names the mod, based on the folder it is in, and automatically creates a .ini file during start up Basically unless u have messed with the game core, this is the case, so a simple naming file is about pointless in my opinion, just use the already existing .ini. I would imagine you could delete these 2 files, if that is all they contain, and it would still work. Only thing is, if there is a special tag or something associated with them, Im not sure.

#CvModName.py
modName = "Pirates Mod"

and

#CvModName.py
modName = "Enhanced Foreign Advisor"

I have tested it with the military bases mod. If you delete the militarybases.py that basically only names the mod, nothing changes, it is a useless file.
 
This is organized very well, and is very usefull for learning and seeing working mods and the code within them. Also many of these mods implement things i wish civ4 would have came with, specifically the air forces mod. GREAT JOB TheLopez! :hatsoff:
 
Currently, only a few of these have been updated to BtS. Look for some of the modcomps by Grave. Unfotunately, TheLopez hasn't posted to this forums in several months.
 
Just to clear up some confusion, .py files contain more then just map scripts. Python is used to code everything from the event manager to the game screens.

As for the CvModName.py file, it is used by the INIParser to figure out what folder the mod's config.ini options are in. The INIParser looks in '<Civ4 install dir>/Mods/<text value of modName>'. So if your running ImprovementsOutsideBorders mod, but your CvModName.py has its modName variable set to "Mad Nukes" then it will look for the config.ini files in the Mad Nukes directory. If you don't have a CvModName.py file then TheLopez's code will just fall back on all the default values.
 
I'd like to see favorite religion and inquision mod bts compatable
 
And so is Inquisition.... sort of. Look at the Gods of Old scenario, they're in there. Wouldn't take much to turn that into a BtS mod for the epic game.
 
Domino: BtS already has a favourite religion feature ;)

seriously? is it in the epic game? if so, could you tell me how to increase the probability of the leaders switching, Isabell founded Christianity but didn't switch

(couldn't quote this from Grave) "And so is Inquisition.... sort of. Look at the Gods of Old scenario, they're in there. Wouldn't take much to turn that into a BtS mod for the epic game."

I tried to take it out but there were so many errors and I didn't understand how to fix many/some of them. Would it be possible for you or someone else to do 'extract' the inquistor from Gods of Old
 
Hi theLopez /Olleus.

How is the tunnels modcomp coming along?
 
not much to watch here...you'd be better served with a bookmark. :p sad thing though.
 
Top Bottom