View Full Version : For modders & mergers


jdog5000
Jun 06, 2007, 12:29 AM
This thread is for questions and answers about the coding aspects of the Revolution mod and how to customize it or merge it with other mods. Some of these comments still hold for RevolutionDCM, but much has been changed by the new additions and the switch to the WOC Lite system for modular XML loading.

Source Code

The source code for RevolutionDCM, the latest and greatest version of Revolution, can be found on sourceforge (https://sourceforge.net/projects/revolutiondcm/). The source code for the last stand-alone version of Revolution is available here on CivFanatics (http://forums.civfanatics.com/downloads.php?do=file&id=8670).

General Modding Notes

This mod uses DrElmerGiggles custom event manager, many thanks to him for putting it together! It should be very easy to merge the Python portion with other mods that also use this convention.

This mod also uses Teg Navanis's enhancement of Stone-D's tool kit for saving mod data.

The Revolution effects for civics are now completely controlled by XML fields in CivicInfos.xml! This means this mod can now be merged with civics mods. See the XML FAQ and included CivicInfos.xml for a guide on how to set things up to work well. It also means that these XML changes are now required for the proper functioning of the mod.

SDK Parts

There are few gameplay changes in the Revolution SDK code, instead these changes mainly enable new features that were not possible otherwise. Included in these new features are the ability to create new civs in the middle of the game. The extensive Python parts of the mod make use of these new features and are really what drive Revolution.

Sources for the SDK code are included in the download as is an FAQ that contains (somewhat outdated but still useful) descriptions/answers to how to use the SDK sources for your own mod.

Compatibility With Other Mods

All components are designed to be as compatible with other mods as possible. It will work with any mod that simply adds new units/techs/civs/leaders, as it searches through the XML data for the best buildable units of a certain class or with a certain AI type and spawns new civs by searching for unused civs. However, it may not work properly if you have removed unit classes or removed some techs (like Horseback riding) or removed the minor or barbarian civs from the XML. For civics mods, you'll need to merge your changes with the Revolution fields in CivicInfos and associated Schema, see the include XML FAQ.

Multiplayer

Revolution does not work in multiplayer, but if you want to try to update it for multiplayer, please post. Not a trivial task.

lovelylittleboy
Jun 10, 2007, 04:43 AM
I have absolutely no experience at modmaking and I tried to merge revolution with Visa version3 by putting the two assets folder together into a new mod named Visa_Revolution along with all the specific rule changing folders for both mods. This is too simple obviously as after loading this mod, i tried to load a game. At this point the game simply freezes. How would I go about merging revolution with a mod such as Visa or Amra, or at least with the Ethnically Diverse Units mod? (there was an amravolution modpack at one point but it isnt compatible with the warlords v2.08 patch). thanks for the great mod

jdog5000
Jun 10, 2007, 10:57 PM
The difficulty of merging two mods varies greatly based on exactly which ones you choose, but with Amra or the VISA mod for example, you would need to:

- Merge SDK changes to create a single DLL.
- Merge Python event handling code.
- Include both mods custom python files.
- Merge and include both mods XML files
- Include any new graphics

You might want to check out Grave's History in the Making modpack he just released, if nothing else he might be able to tell you about how merging went.

Spitefire
Jun 12, 2007, 12:26 AM
While i dont actully mod (i just fiddle with the XML files for changes i want to make) i seem to be haveing an issue with a change i made to the speed settings of one mode, i always keep some kind of backup so i can change it to normal if a fix is not possable, anyway on to the problem my custom speed setting makes it impossable to use units as a stablizing force i as a test dropped 93 units in one city and it had no effect at all the city just keeps getting more and more unstable so i was wondering if the garrison modifier is somehow tied to number of game turns? i set it up so that the number of game turns was 6050 set to increment 1turn=1year and reaserch costs were jacked way up while production of units and buildings was close to normal rate, if unfixable ill just have to make sure time victory is off and if i can find a way make sure that the year listing is hidden.

jdog5000
Jun 12, 2007, 12:45 AM
While i dont actully mod (i just fiddle with the XML files for changes i want to make) i seem to be haveing an issue with a change i made to the speed settings of one mode, i always keep some kind of backup so i can change it to normal if a fix is not possable, anyway on to the problem my custom speed setting makes it impossable to use units as a stablizing force i as a test dropped 93 units in one city and it had no effect at all the city just keeps getting more and more unstable so i was wondering if the garrison modifier is somehow tied to number of game turns? i set it up so that the number of game turns was 6050 set to increment 1turn=1year and reaserch costs were jacked way up while production of units and buildings was close to normal rate, if unfixable ill just have to make sure time victory is off and if i can find a way make sure that the year listing is hidden.

The stabilizing effect of units is limited, though 93 defenders gets you a -19 effect in a city with no walls or castle. However, if the city is unhappy that will only slow the demise of the city down as the unhappiness effect is stronger.

One thing to check, in the popup that tells you which components are running when you start or load a game, it also has a line saying how many turns it believes are in the game. Check if that number is correct, if not than you could see strange behavior.

Spitefire
Jun 12, 2007, 12:56 AM
the number of turns it was reading matched what i set it to also to note that the city i was useing as my test subject was just built and grew steadly worse over time even with that garrison force i was not getting above -1 and from what i can tell that was not comeing from the unit garrison.
4000BC kind of new city

blunt3d
Jun 12, 2007, 08:52 AM
Has anyone had sucess merging it with the edu mod? If so could you tell me what you did.

blunt3d
Jun 12, 2007, 01:32 PM
Oh never mind i finally merged both of them.

jdog5000
Jun 12, 2007, 05:11 PM
the number of turns it was reading matched what i set it to also to note that the city i was useing as my test subject was just built and grew steadly worse over time even with that garrison force i was not getting above -1 and from what i can tell that was not comeing from the unit garrison.
4000BC kind of new city

If you wouldn't mind linking the changed XML files, I'd like to have a look. There were issues with different game speeds causing ridiculous explosion of Revolutions before, but I've fixed those (or thought I had ...). Thanks.

Spitefire
Jun 13, 2007, 05:20 AM
at the moment i have disabled the speed changes opting for just super pricey resaerch as that allows me to do what i intended (a long game that will hold on each era long enough for world conquest if you really want it at a particular point) i just have to ignore the AD BC clock.

The only changes i made was useing the xml speed file to remove inflation and adjusting one of the speed catigorys (dont seem to matter witch one thay all end up messing up the mod) so that all are at zero except the 1 turn per year set to 6050.

<iYearIncrement>15</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>10</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>8</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>5</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>2</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>1</iYearIncrement>
<iTurnsPerIncrement>6050</iTurnsPerIncrement>

i left the other turn increment tables in because it has not hurt anything in past modifications, that line up is based on the marathon speed line up however i dont have the file i tinkered with that seems to be the only change i made that seem to have a negative impact on the garrison stability count.
from what i can tell when i dont fubar the mod with this speed change a despotism can hold stable a size 4 city useing only troops assumeing no other negative modifiers like religion or natonality or the many other items.
i also noticed with the speed change all net effect civics have a net gain of 0 except despotism that has a net of 1 im certain that isnt normal.

last moment correction the garrison stability aswell as the gov stability modifiyers are both effected by the speed change.

Mebey my number of turns streached the gov/units stability to thin and it defaulted on one or more instability modifiyers while not showing it. (just a wild stab in the dark)

BobTheTerrible
Jun 13, 2007, 08:52 PM
Question: Is there a minimum time that it takes to form civs from barbarians? And is there some easy way to mod this? I can't find it anywhere (figured it would be in the .ini file). I set barbarian cities to appear earlier, but it still seemed to take a bit for civs to pop out.


Which brings me to my second question, not directly related to this mod but I'm hoping for some help. I set barbarian cities to start appearing in one turn from the beginning with a 100% probability (which I'm assuming is supposed to mean that there is a 100% chance for one barbarian city to form on a fogged tile on the map each turn). The file I edited was the Civ4handicapinfo.xml file. But when I tested this a few times, no barbarian cities appeared early in the game... is there some hard limit that says barbarian cities can't appear within x # of turns from the start? (btw I know the xml file was working, since the extra scout I added to everyone appeared). Am I modding the wrong file or something?

jdog5000
Jun 14, 2007, 01:19 AM
Question: Is there a minimum time that it takes to form civs from barbarians? And is there some easy way to mod this? I can't find it anywhere (figured it would be in the .ini file). I set barbarian cities to appear earlier, but it still seemed to take a bit for civs to pop out.

There is no hard constraint, the odds of settling down depend on the population of close proximity barb cities, or any culture in barb cities. They won't settle until they're somewhat established. To increase the chances of settling so they settle earlier, increase:

; Change odds of barb settling down
Modifier = 1.00

It linearly scales the odds.


Which brings me to my second question, not directly related to this mod but I'm hoping for some help. I set barbarian cities to start appearing in one turn from the beginning with a 100% probability (which I'm assuming is supposed to mean that there is a 100% chance for one barbarian city to form on a fogged tile on the map each turn). The file I edited was the Civ4handicapinfo.xml file. But when I tested this a few times, no barbarian cities appeared early in the game... is there some hard limit that says barbarian cities can't appear within x # of turns from the start? (btw I know the xml file was working, since the extra scout I added to everyone appeared). Am I modding the wrong file or something?

There is a constraint that no barb cities can appear before players have a second city. Don't remember exactly how it works, but I did come across it at some point and note it. Maybe in the SDK, but I don't remember where.

jdog5000
Jun 14, 2007, 01:21 AM
at the moment i have disabled the speed changes opting ...

Thanks, I'll check it out ...

BobTheTerrible
Jun 14, 2007, 10:55 AM
There is no hard constraint, the odds of settling down depend on the population of close proximity barb cities, or any culture in barb cities. They won't settle until they're somewhat established. To increase the chances of settling so they settle earlier, increase:

; Change odds of barb settling down
Modifier = 1.00

It linearly scales the odds.

Yeah, that's one of the things I was changing... when you say linearly scales the odds, does that mean 2 would be twice the probability, and 4 would be 4X?


There is a constraint that no barb cities can appear before players have a second city. Don't remember exactly how it works, but I did come across it at some point and note it. Maybe in the SDK, but I don't remember where.

Ok, that makes a lot of sense, thanks for the info.

jdog5000
Jun 14, 2007, 01:11 PM
Yeah, that's one of the things I was changing... when you say linearly scales the odds, does that mean 2 would be twice the probability, and 4 would be 4X?

Correct. If you turn on logging you can see exactly what the odds are for different setups by opening PythonDbg.log. The lines you're looking for a spat out every turn the odds are > 0:

PY: BC - Barb odds: 4 pop, 0 cul 0

The odds from population are 4 in 1000 in this case, so this is probably a single city with a single population point. Culture odds are used much less frequently.

jdog5000
Jun 15, 2007, 02:04 PM
at the moment i have disabled the speed changes opting for just super pricey resaerch as that allows me to do what i intended (a long game that will hold on each era long enough for world conquest if you really want it at a particular point) i just have to ignore the AD BC clock.

The only changes i made was useing the xml speed file to remove inflation and adjusting one of the speed catigorys (dont seem to matter witch one thay all end up messing up the mod) so that all are at zero except the 1 turn per year set to 6050.

<iYearIncrement>15</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>10</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>8</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>5</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>2</iYearIncrement>
<iTurnsPerIncrement>0</iTurnsPerIncrement>
<iYearIncrement>1</iYearIncrement>
<iTurnsPerIncrement>6050</iTurnsPerIncrement>

i left the other turn increment tables in because it has not hurt anything in past modifications, that line up is based on the marathon speed line up however i dont have the file i tinkered with that seems to be the only change i made that seem to have a negative impact on the garrison stability count.
from what i can tell when i dont fubar the mod with this speed change a despotism can hold stable a size 4 city useing only troops assumeing no other negative modifiers like religion or natonality or the many other items.
i also noticed with the speed change all net effect civics have a net gain of 0 except despotism that has a net of 1 im certain that isnt normal.

last moment correction the garrison stability aswell as the gov stability modifiyers are both effected by the speed change.

Mebey my number of turns streached the gov/units stability to thin and it defaulted on one or more instability modifiyers while not showing it. (just a wild stab in the dark)

Basically, the game speed tuning logic isn't set up to handle 6050 turns. All per turn revolution effects in this case are basically divided by 10, and since it's rare to get to -20 per turn, the revolution reducing effects are essentially capped at -1 per turn if everything is going well. However, one time benefits or penalties like losing a city or rejecting rebel overtures are not currently scaled, so it'll take impossibly long to overcome the 300 rev index penalty for rejecting rebel demands, and they'll rebel again. So, once the rebellion cycle starts it won't stop.

The mod just isn't set up to run with that many turns. I may be able to improve this for the next version, we'll see. Perhaps scaling by construction percent instead of number of turns would make more sense, or capping the possible changes at double/half would make sense.

lovelylittleboy
Jun 18, 2007, 03:55 PM
you posted a link to amravolution, however this mod won't work as it isnt compatible with warlords v2.08. Is there a simple way to make them compatible?

TORARADICAL
Jun 23, 2007, 12:13 PM
Any chance you'd be willing to make the amravolution for 2.08, since Amra has taken a vacation from here at least until BTS?
I've tried myself several times now, but with no success.

jdog5000
Jun 23, 2007, 01:37 PM
It definitely requires merging DLL code and recompiling, so no there is no simple way. I do not have any time to pursue creating a new version, but one thing you might want to check out is Grave's History in the making mod (http://forums.civfanatics.com/showthread.php?t=226568). If you don't like all the features, it should be simpler to turn them off than recompile for Amra.

TORARADICAL
Jun 23, 2007, 02:41 PM
It definitely requires merging DLL code and recompiling, so no there is no simple way. I do not have any time to pursue creating a new version, but one thing you might want to check out is Grave's History in the making mod (http://forums.civfanatics.com/showthread.php?t=226568). If you don't like all the features, it should be simpler to turn them off than recompile for Amra.

K, thanks. I'll look into giving that a try.

BobTheTerrible
Jun 25, 2007, 06:43 AM
Another quick question: In revolution ini file, there's a true/false option that says "allow barbarians to form minor civs" which is set off by default... what exactly is a "minor civ"?

jdog5000
Jun 25, 2007, 11:47 AM
If you remember the vanilla 1000 AD scenario, everyone was always at war with the Byzantines and Vikings and no one could talk to them. These were minor civs. Basically, they're barbarians in many respects, but they'll build settlers and culture buildings. I wouldn't really recommend turning it on, full blown civs are far more interesting.

Tarquelne
Aug 29, 2007, 04:33 PM
With jdog5000's help I was able to merge Civ4lerts (http://forums.civfanatics.com/downloads.php?do=file&id=2291) with Revolutions version .8w or so.

IIRC it turned out to be pretty simple.
I think I just appended the Civ4lerts ini file to Revolutions', dropped the unique python and XML files into the proper directories, and added 2 lines to Revolutions' cvcustomeventmanager:
"import Civ4lert" after the various Revolution imports
and

"Civ4lerts.Civ4lerts(self)"

after "Tester.Tester( self, config )"

However, that doesn't seem to work with the BTS version of Revolutions.
I'm guessing it has something to do with all the changes to Revolutions since 0.8. :) The familiar landmarks are missing.

Any help welcome.

jdog5000
Aug 29, 2007, 08:13 PM
To get Civ4lerts to initialize, you should still be able to edit two places in CvCustomEventManager, adding the import line towards the top and then

"Civ4lerts.Civ4lerts(self)"

right after "RevolutionInit.RevolutionInit( self, revConfigFile )"

That should get the Civ4lerts python code running. The, copying over the xml and .ini files from Civ4lerts should get things up and running. You shouldn't need to copy over the contents of the .ini file, although if you did and changed the line in Civ4lerts.py that references "Civ4lerts.ini" that would work also.

Just make sure the only python file you take from Civ4lerts is Civ4lerts.py. Edit CvCustomEventManager as above and leave the others as they are in Revolutions. Let me know if there are any further issues.

Tarquelne
Aug 30, 2007, 02:09 AM
Seems to work!
Wow. Fast response, easy solution. Best mod ever! :) Thanks.

Tarquelne
Oct 15, 2007, 07:35 PM
I've been trying to merge Gods of Old with Revolution. (3.13 BTS and 1.16 Rev.)

Happily, none of the files overlap. However, it looks like the GoO python functions aren't running and I haven't a clue why.

I've appended Rev's ini file to the GoO ini file and renamed it Revolution.ini. Revolution seems to be working normally.

I'm guessing the problem is getting the event managers to work together. The Custom manger has an "import" line for the CvEventManager... and beyond checking for that I'm afraid I'm clueless.

Any help will be greatly appreciated.

jdog5000
Oct 16, 2007, 10:50 AM
It is almost certainly an issue with GoO's Python event manager not being properly invoked. The Revolution mod uses (IMO) a better system where it inherits from the default event manager, while GoO needs to replace the default so it most be located in \Mod Folder\Assets\Python\

If that's not the problem, if you upload the combination and send me a link by PM I can take a quick look ...

Certainly will be cool to have merged versions of some of the BTS mods with Revolution! Don't know if it's legal to post them or not ... seems like it should be as you couldn't play without having bought BTS, though the same is not true for the Warlords scenarios.

Cybah
Oct 22, 2007, 07:16 PM
I'd love to see revolution mod merged with XXL world mod. Any chance you could do this?

jdog5000
Oct 23, 2007, 12:09 PM
I'd love to see revolution mod merged with XXL world mod. Any chance you could do this?

I don't have any extra time, but would be happy to provide some support by PM for anyone who decided to try ...

riesscar
Nov 05, 2007, 09:58 AM
I have just recently combined Revolution with another mod of mine, but for some reason it keeps giving me this error before the game can even start up: "Loading XML file xml\GameInfo/CIV4PlayerOptionInfos.xml; Load XML file xml\GameInfo/CIV4PlayerOptionInfos.xml FAILED" at which point the game stops responding. Any ideas?

jdog5000
Nov 07, 2007, 08:00 AM
I have just recently combined Revolution with another mod of mine, but for some reason it keeps giving me this error before the game can even start up: "Loading XML file xml\GameInfo/CIV4PlayerOptionInfos.xml; Load XML file xml\GameInfo/CIV4PlayerOptionInfos.xml FAILED" at which point the game stops responding. Any ideas?

Check you PM

Endwar 005
Dec 09, 2007, 04:00 PM
Could this possibly be merged with Varietas Delectat? I have absolutely no merging knowledge, so some instructions on how to merge it'd be handy, too.

Thanks!

jdog5000
Dec 10, 2007, 05:15 PM
Could this possibly be merged with Varietas Delectat? I have absolutely no merging knowledge, so some instructions on how to merge it'd be handy, too.

It should absolutely be mergeable, and shouldn't be too hard (relatively speaking :p ). I don't know exactly how the units are specified in that mod, but I'm quite sure the only file that might need merging is Revolution\Assets\XML\Units\CIV4UnitSchema.xml and even that may not need to be merged. If copies exist in both mods, you'll have to open them up using a good text editor (I'd recommend Notepad++ which is free) and see what's different. A program like WinMerge (also free) can help you spot differences.

If there are any other file collisions, post and I'll give you some pointers. Aside from that, you just copy the files from VD into the same locations (ie, Assets\Art\whatever) inside your Revolution folder and it should work. Post if you have any trouble.

doronron
Dec 11, 2007, 11:16 AM
I am in the process of merging the following:

Revolution 1.25
Dale's Ranged Bombard
Dale's AirBomb code from Road to War
Influence Driven War
Gedomon's Air Forces SDK
MAD Nukes 0.7b
Manhattan Project
JUnitSpace
Route Pillage

Veriatas Delectat 3.1 (using Modern Warfare 1.20/WW2:1939 art assets and choices on mechanized units -- I will ask permission for these)
Civ Specific Great People + Unit Civilopedia fix
Actual Quotes
Bad Ronald's Flags (with a few changes and additions for the BtS civs)
More Historical Civilopedia
Antiaircraft Gun module (to replace SAM Infantry)
Modern Workshop
Modern Granary
A few cosmetic changes of my own

I have a no-error compile of the DLL, a merge of the appropriate Python (which I hope I've done right), and I am working on merging the XML. The thing that's taking time at the moment is the graphics linking I need to do on VD -- the fighters and bombers are done, but I need to update jet fighters, stealth bombers, tanks, modern armor, helicopters, and mechanized infantry. Following that, the next hurdle is creating flags that follow Bad Ronald's artstyle for the ten new BtS civs.

jdog5000
Dec 12, 2007, 07:05 AM
Glad to hear it's going well and look forward to seeing the final result!

Endwar 005
Dec 15, 2007, 07:12 AM
Hmmmm...so do i move in both config settings? The revolution config settings and varietas in same folder? They both have the same thing, only the revolution one has more.

jdog5000
Dec 17, 2007, 08:49 AM
Hmmmm...so do i move in both config settings? The revolution config settings and varietas in same folder? They both have the same thing, only the revolution one has more.

The first ~10 settings are set up automatically by Civ for and not specific to Revolution, so if there are any changed settings from the other mod use those. For Revolution.ini, only the settings after [RevConfig] are specific to the mod and important to keep.

rebel5555
Dec 30, 2007, 11:12 PM
I know this is the wrong forum and I'm sorry but I did a search and this is the only relevant thing I've found so here's my problem. I just recently combined the mods "History In The Making" & "Enhanced Size Cities 0.94". I compiled the CvGameCoreDLL without any problems and when I went to load the Combined mod for the first time I get the following error:

[6028.265] Loading XML file xml\GameInfo/CIV4PlayerOptionInfos.xml
[6030.031] Load XML file xml\GameInfo/CIV4PlayerOptionInfos.xml FAILED
[6030.984] Loading XML file xml\GameInfo/CIV4GraphicOptionInfos.xml
[6031.734] Load XML file xml\GameInfo/CIV4GraphicOptionInfos.xml FAILED


I'm completely stumped as I haven't edited either of these files. Could someone help me please?

jdog5000
Dec 31, 2007, 11:51 AM
This is definitely not the right place for this ... however, the problem is that the XML structures in those two files didn't fit the expectations of the DLL. When a mod adds a new field to an XML file (ie, <NewTag>) the DLL also needs to be updated to read in the new fields. Either you're not using the right DLL for the XML files or, if both mods include a DLL, you will need to merge and recompile the DLL from the source code.

Echo of Celts
Jan 25, 2008, 07:52 PM
So I merged this mod with JKP1187's Next War mod... simply by putting all the files into one mod folder. Only one file conflicted... the loading screen so I choose one and ignored the other.

The game loaded and I can tell both Mods are functioning, how do I tell if they are functioning properly though?

I know both do extensive event handling but since no files needed to be merged, I can't think of a reason why they would not work properly.

jdog5000
Jan 26, 2008, 08:37 PM
Well, if the merge worked then pressing Ctrl-Shift-X or W should open the popups like before. If those events are registering, then the others should too ... past that, you can simulate for a while and see if the right kinds of things happen. Finally, you can open the python debug output (shows up in My Games/BTS/Logs or something like that), PythonDbg.log if you've enabled it in your CivilizationIV.ini file.

Kalimakhus
Mar 19, 2008, 03:10 PM
I am not sure if this was asked and answered before so redirection to where I should look will be as good as a full answer.

Adding custom modular civs is quite easy. I have just added a number of Civ Gold civs to Revolution 1.4. I guess the BarbarianCiv should work normally with such civs i.e. they can be spawned out of a barbarian city. The rebellion spawning however is different as the emerging civ choice is based on the parent civ. My question is, where in Python or in config files is it set that this or that civ would spawn out of this or that parent?

Fierabras
Mar 19, 2008, 03:37 PM
Mods/Revolution/Assets/Python/Revolution/RebelTypes.py is what you are looking for, I guess.

jdog5000
Mar 19, 2008, 05:10 PM
Fierabras is correct. There is a two pass method for rebells, first looking for any available types from RebelTypes, then looking if there are any available civs with the same artstyle type (Asian, etc). You'll get better results if you add them to RebelTypes, but it's not necessary for the mod to function.

Gladdig_Kaga
Apr 19, 2008, 01:22 PM
I want to add more religions but i don't know how to do and even less how to make it work with revulotion. :confused:

Please help me? If you help me i'll :worship: you every morning. :)

jdog5000
Apr 19, 2008, 04:09 PM
The good news is that there is nothing in particular needed to get a religion working inside of Revolution, so once you have it working in the game it will work fine with Revolution. I would warn you however that if you're adding religions you'll probably want to play on a big map so there can be extra players ... having lots of extra religions will tend to destabilize empires.

As for how to add religions in general, it'd be mostly a series of XML edits plus some graphics to differentiate them from the others in the game. You should be able to find a mod comp that adds religions and simply merge it in to Revolution ... I doubt there will be any file conflicts.

Gladdig_Kaga
Apr 19, 2008, 05:09 PM
I tried to find tutorials how to make add religions but i only found how to change them. :sad:

Gladdig_Kaga
Apr 22, 2008, 12:40 PM
What program do i need to change the CvGameCoreDLL.dll? It doesnt work with notepad :p

Cybah
Apr 22, 2008, 01:10 PM
LOL. :D You can't change those DLLs. You have to "remake" a dll with other programs using the code files.

Gladdig_Kaga
Apr 22, 2008, 03:26 PM
LOL. :D You can't change those DLLs. You have to "remake" a dll with other programs using the code files.

What program do i need to remake them?

Amra
Apr 22, 2008, 04:35 PM
What program do i need to remake them?
This may help:

http://forums.civfanatics.com/showthread.php?t=196283

Gladdig_Kaga
Apr 23, 2008, 04:22 AM
Ok thank you, I guessed that it whas c++ and I tried to download it but i only found trojans everywhere i went.

Gladdig_Kaga
Apr 24, 2008, 05:02 AM
The reason i wanted to change it whas couse i wanted to merge revolution and M.A.D nukes for BTS but i cant even find where to download mad nukes!:cry::cry::cry:

If someone have it please tell me where to download!

jdog5000
Apr 25, 2008, 05:23 PM
The thread Amra posted has the download links for VS 2005 Express, though the directions in the first post there are dated they still work fine. See the update about using VS 2008 Express in this post (http://forums.civfanatics.com/showthread.php?p=6731340&postcount=89) for a bit more info. I also recommend using smacfan's makefile from this post (http://forums.civfanatics.com/showthread.php?p=6334702&postcount=75).

I use VS 2005 Express, followed those instructions, and it works great. Other people also get good success from CodeBlocks, which might be a bit easier if Makefiles and the like are new to you ... search the forum for it and you'll find a guide to help you out.

Soduka
Apr 26, 2008, 05:35 AM
Would it be possible to get a break down of what lowering or raising the values of each of these lines of XML in Civ4CivicInfos.xml?

<!-- Revolution Mod Start -->
<iRevIdxLocal>-3</iRevIdxLocal>
<iRevIdxNational>-3</iRevIdxNational>
<iRevIdxHolyCityGood>0</iRevIdxHolyCityGood>
<iRevIdxHolyCityBad>0</iRevIdxHolyCityBad>
<iRevIdxSwitchTo>-50</iRevIdxSwitchTo>
<fRevIdxNationalityMod>-.3</fRevIdxNationalityMod>
<fRevIdxBadReligionMod>0</fRevIdxBadReligionMod>
<fRevIdxGoodReligionMod>0</fRevIdxGoodReligionMod>
<fRevIdxDistanceMod>-.25</fRevIdxDistanceMod>
<fRevViolentMod>0</fRevViolentMod>
<iRevReligiousFreedom>0</iRevReligiousFreedom>
<iRevLaborFreedom>0</iRevLaborFreedom>
<iRevEnvironmentalProtection>0</iRevEnvironmentalProtection>
<iRevDemocracyLevel>10</iRevDemocracyLevel>
<bIsCommunism>0</bIsCommunism>
<bIsFreeSpeech>0</bIsFreeSpeech>
<bCanDoElection>1</bCanDoElection>
<!-- Revolution Mod End -->

jdog5000
Apr 26, 2008, 08:10 PM
Why yes, check out the XML_FAQ that's in the mods docs folder :)

In other news, I'll be posting a Python API for the new functions exposed in the Revolution DLL sometime soon ...

Ajidica
Jun 20, 2008, 06:07 PM
In the XML FAQ in the mod, it says that if techs are removed or civics re-named, this will cause problems. What sort of problems would this be. If I were to make a new tech tree for a mod with almost entirely new units and building and re-named civic and few new traits, what would I have to do to make it work?

Also, how do I have only certain civs break of from others?
eg: The English can only emerge from certain civs. Is this even possible without lots of knowledge of python?

jdog5000
Jun 20, 2008, 06:59 PM
All the specific XML variables required by the mod are specified in RevDefs.py so if you for example remove "TECH_SAILING" or "TECH_NATIONALISM" from the game you would want to change the variables in RevDefs to some new tech which serves a similar purpose in your scenario.

As for controlling rebel civ types, the mod uses a tiered system. The most preferable options are specified in RebelTypes.py, if none of those are available then a civ with a similar art style is used, and if none of those are available then a random available civ type is used.

I'll update some of the docs so they include this info for future reference.

I'm looking forward to seeing what you produce ... would this be for you Byzantium scenario?

jorissimo
Jul 05, 2008, 07:58 AM
I want to merge revolution with the modcomps ranged bombardment and archer bombardment. How should I do this?

jorissimo
Jul 06, 2008, 03:15 AM
Oops, I found out there is already a mod with revolution and DCM combined.

Thomas SG
Jul 09, 2008, 04:54 AM
I started merging my mod with your revolution mod and ran into problems right at the first file. I've got your version 1.61. Although I thought that our both versions include solver 0.17 there is difference in the code that isn't marked as new code from you and it's definetly no code from me. Can you help me jdog5000?

MatzeHH
Jul 09, 2008, 07:37 AM
I started merging my mod with your revolution mod and ran into problems right at the first file. I've got your version 1.61. Although I thought that our both versions include solver 0.17 there is difference in the code that isn't marked as new code from you and it's definetly no code from me. Can you help me jdog5000?

The code on the right is the same in BTS 3.17, Solver 0.19 (I think 0.17 too) and Revolution 1.61.
You must have changed your code on the left.

Matze

Thomas SG
Jul 09, 2008, 09:10 AM
Thanks MatzeHH. :goodjob:

Your absolutly right. I must have imported the code without notice from the 3.13 version. :crazyeye:

jdog5000
Jan 25, 2009, 01:04 AM
Warlords Makefile for Revolution, requested by primordial stew.

primordial stew
Jan 28, 2009, 11:52 PM
I figured it was something to do with the makefile, but it seems this is not true :/ Is having VC2003 the *only* way to build the debug dll?

And if so, is running with the debugger only possible when having VC2003 installed (ie because code:blocks doesn't have the necessary dlls)? Really I just need to find some problems, not to actually write any C++.

jdog5000
Jan 30, 2009, 11:30 PM
No, VC2003 is not the only way to get a debug setup working. glider1 and others have figured out how to do it with free legal tools, check out this thread (http://forums.civfanatics.com/showthread.php?t=196283) (their debugging success is towards the end) and bug those involved to right up step-by-step instructions for the good of the community if they haven't already.

EDIT: Instructions from Refar can by found here (http://forums.civfanatics.com/downloads.php?do=file&id=10018).

BobTheTerrible
Feb 15, 2009, 11:39 PM
Quick question - is there either an xml variable I can change, or somewhere where I can insert or manipulate a simple line of Python, to get barbarian civs (regardless of builder or military) to receive a settler when they go from barbarian --> minor civ?

jdog5000
Feb 19, 2009, 01:18 AM
In BarbarianCiv.py in the function createMinorCiv, there's a line which reads:

pyNewPlayer.initUnit(iWorker,cityX,cityY,1)

Right below this line add a copy which replaces iWorker with iSettler, so:

pyNewPlayer.initUnit(iSettler,cityX,cityY,1)

Be warned that Python is very particular about indentation, you should use spaces to line this up with the other line. Just for reference, the unit types I have set up are at this point in the file are:

[iWorker, iSettler, iScout, iBestDefender, iCounter, iAttack, iMobile, iAssaultShip]

iAssaultShip and possibly iScout may be set to None, indicating the civ cannot build a one of those yet.

ripple01
Feb 20, 2009, 10:20 AM
Hey jdog,

I've been meaning to tell you this for a while. It's not realy a bug, per se, but more applicable to modders.

In my mod, I have disabled all starting techs. Accordingly, for the first few turns of each game, I get a Python exception regarding TechDiffusion.py. I assume that it is trying to diffuse techs but there are no techs to diffuse hence the error. Nothing game-breaking by any means, but I just wanted to bring it to your attention. If you need me to provide you with the exact error, just let me know.

Cheers,
ripple01

jdog5000
Mar 26, 2009, 11:53 PM
Translated text files for Chechu.

Tholish
Jun 04, 2009, 03:16 PM
Using VC++2005 Express, following Refars instructions and using his makefile, I can reliably build the standard BtS 3.17 DLL. Taking a new copy of it and replacing applicable files with the source files for Revolution 1.65, I cannot complete a build. It compiles but won't link because of a problem with CyCityInterface2. Here's the message. (I set off items in quotes by inserting blank lines)

1> Creating library Final_Release\CvGameCoreDLL.lib and object Final_Release\CvGameCoreDLL.exp
1>CvDLLPython.obj : error LNK2019: unresolved external symbol

"void __cdecl CyCityPythonInterface2(class boost::python::class_<class CyCity,struct
boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)"

(?CyCityPythonInterface2@@YAXAAV?$class_@VCyCity@@ Unot_specified@detail@python@boost@@U2345@U2345@@p ython@boost@@@Z) referenced in function

"void __cdecl DLLPublishToPython(void)"

(?DLLPublishToPython@@YAXXZ)
1>Final_Release\CvGameCoreDLL.dll : fatal error LNK1120: 1 unresolved externals
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\Tholish\Desktop\CvGameCoreDLL\Final_Relea se\BuildLog.htm"
1>CvGameCoreDLL - 4 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Build log contains pretty much the same information.

So, there's a function somewhere called DLLPublishToPython that looks in CyCityInterface2 at function CyCityPythonInterface2 and doesn't find it everything it wants?

What can I do to make this work right?


EDIT: the function DLLPublishToPython was in CvDLLPython. I commented out the call to CyCityInterface2 and put all the methods from CyCityInterface2 into CyCityInterface1 and it built. Don't know how it will play, or why it happened to me. Anyway.

ANOTHER EDIT: No ill effects.

davidlallen
Jun 04, 2009, 03:21 PM
I have discovered an interesting problem when adding a new feature to Rev DCM. The file xml/terrain/civ4terraininfos is very order dependent and there are other constants you must change when you add a feature.

Symptom: you define a new feature, you add it in WB, and next turn, the feature is deleted.

Workaround: in xml/globalaltdefines.xml, increment NUM_FEATURES. Make sure your new feature appears after the last game feature in the featureinfos file, but before the first battlefield feature.

Proposed solution: I don't know what is happening inside the sdk, but you should distinguish between the battlefield features and the game features in some other way. For example, add an xml tag bIsBattleFieldFeature. Then make sure that you do not rely on the constant and the order of the file to distinguish the two types.

(EDIT: it is more complicated than this, and subject to crashing. See this post (http://forums.civfanatics.com/showpost.php?p=8152185&postcount=515) for more information.)

Tholish
Sep 04, 2009, 03:51 PM
I have no use for the larger TGA files in res/fonts in the RevolutionsDCM 2.5X. The standard one is large enough for anything that would not be grossly imbalanced until adjusted for. (More than 25 religions and corporations indeed! Maybe if you had lots of essentially unique resources...)

I could swear I saw where someone made a patch for removing it, but cannot find it now. How would I go about using the old, smaller tga?

jdog5000
Sep 04, 2009, 07:31 PM
The larger TGA was probably so that Rapture could use RevDCM as a base ... I don't know anything about the TGA files, any help here glider?

johny smith
Dec 04, 2009, 08:08 PM
Just began lurching around at the forums again. You can set the xml in the res folder for religions and corporations to 25 each and return to the old GameFont files. Now as for the bigger fonts it was the only way to crack open the limit that has been plaguing some other mods that wanted more.

Jayrad
Feb 22, 2010, 07:33 PM
How would i combine this to Carters Earth map 32civ BTS V3.19

jdog5000
Feb 23, 2010, 06:18 PM
There a section in FAQ which explains how to get maps to work with RevolutionDCM. (http://forums.civfanatics.com/showpost.php?p=6373859&postcount=11)

phungus420
Feb 23, 2010, 06:23 PM
Actually with 2.7 most scenarios will be able to load. At least any scenario that will work for vanilla BtS will work fine with 2.7, thanks to Tamudjin's fix the CvWBInterface.py, no more CTDs when they player numbers don't add up.

Duneflower
Feb 24, 2010, 01:04 AM
Actually with 2.7 most scenarios will be able to load. At least any scenario that will work for vanilla BtS will work fine with 2.7, thanks to Tamudjin's fix the CvWBInterface.py, no more CTDs when they player numbers don't add up.

Holy...seriously? :eek:

:worship: Tamudjin :worship:

jdog5000
Feb 24, 2010, 12:39 PM
Oh yeah, that's right ... what a cool fix, I'm so glad somebody figured that out. Needs to get into the UP.

Kissa
Apr 02, 2010, 03:56 PM
Don't Know if it's the right place to say that, I really enjoy Rev DCM Mod, but... ;)

Could you add something like Air_Bombing for the sea units against land units/ improvments/ cities (Destroy city Buildings, Walls, Ships in the city, units in the city, etc... like Air_Bombing but for sea units) ? Sea_Bombing ?

and in the same idea for land units against sea units (with gunpowder). For ex : Cannon vs. Galleon and Galleon vs. Cannon etc...

Each unit type could fight each other, the ability of all unit type will be full developed.

And to merged "Commander v.0.1 Mod" with RevDCM ? =>link to thread http://forums.civfanatics.com/showthread.php?t=352036

phungus420
Apr 03, 2010, 04:23 PM
And to merged "Commander v.0.1 Mod" with RevDCM ? =>link to thread http://forums.civfanatics.com/showthread.php?t=352036

Civ4 isn't balanced with such a feature in mind, I also personally don't like the concept. I'm firmly against the inclusion of this modcomp. Feel the need to respond to this, because it's been asked for a few times.

Kissa
Apr 04, 2010, 08:25 PM
Civ4 isn't balanced with such a feature in mind, I also personally don't like the concept. I'm firmly against the inclusion of this modcomp. Feel the need to respond to this, because it's been asked for a few times.

I'v made a small change in my game, i'v add "General" to Great General.

Rename Great General to "Marshall" and this unit is only able to add Xp to a city, or build a Military academy.

The "General" could only give Xp to Units, and lead one of them,

i decrease the amont of Xp the "General" can give to units.

Then in the game there are more "General" emerging in the game, but less effective, it's fun to build small armies.

I don't know if it's really balanced, i think the AI can use its "General" as Great General ?

But it's fun to play, and more logical ?

Like in CivIII, Generals can Lead 3 to 5 Units (?)

Maybe give the Special promotions to Generals, and not by very bizzare Promotions pathes.

Afforess
Apr 04, 2010, 08:44 PM
Don't Know if it's the right place to say that, I really enjoy Rev DCM Mod, but... ;)

Could you add something like Air_Bombing for the sea units against land units/ improvments/ cities (Destroy city Buildings, Walls, Ships in the city, units in the city, etc... like Air_Bombing but for sea units) ? Sea_Bombing ?

and in the same idea for land units against sea units (with gunpowder). For ex : Cannon vs. Galleon and Galleon vs. Cannon etc...

Each unit type could fight each other, the ability of all unit type will be full developed.

And to merged "Commander v.0.1 Mod" with RevDCM ? =>link to thread http://forums.civfanatics.com/showthread.php?t=352036

For that feature, may I recommend my mod? It uses RevDCM as a base, but has that mod, amongst many others in it. I'm sure you would enjoy it. ;)

Kissa
Apr 05, 2010, 09:40 AM
For that feature, may I recommend my mod? It uses RevDCM as a base, but has that mod, amongst many others in it. I'm sure you would enjoy it. ;)
Thinx, i'll try it.
If there's a "but", i'll tell you.
:cool:

Corvex
Apr 16, 2010, 01:15 PM
Has anyone had any success merging this with CivGold 5.0? I've done it myself for earlier versions of each of these mods, but with the present versions, for some reason I can only get one mod or the other to work depending on what I call the combined mod.

Duneflower
Apr 16, 2010, 01:35 PM
Right here, dawg. Take a look at NwT.

kris159
Aug 25, 2010, 05:41 AM
I have absolutely no experience in merging mods, but I'll give a backstory and my problem.

I've been playing the BTS 3.17 version of Thomas' War for a while now, since I can't get 3.19 (which I'm fine with). I just thought it needed some Revolution, so I went hunting around and found the one compatible with 3.17.

I followed the merge guide until I came up to this:

Then, in __init__, add:
config = CvConfigParser.CvConfigParser("(Your ini file name).ini")

I can't find the .ini that came with the origonal mod under __init__ anywhere... I'm looking in CvCustomEventManager.py, am I looking in the wrong place?

Duneflower
Aug 08, 2011, 06:35 PM
At the risk of getting flamed like a punk, since this thread's been dead for nearly a year...

I'm a little baffled by the BUGEventManager paradigm. How do I go about merging in the Next War events, which already have a CvRandomEventManager.py and EventInfo XMLs?

Terkhen
Sep 22, 2011, 09:19 AM
I'm interested in the mechanics of this mod, but sadly I usually play multiplayer...

I'm curious, what would be needed to make this mod work in multiplayer? What are the biggest issues that would need fixing?

Duneflower
Sep 23, 2011, 04:54 AM
To my knowledge, they've got all the major bugs worked out already. Go peruse the RevolutionMP forum.

Terkhen
Sep 23, 2011, 05:06 AM
Thanks :)