RevDCM Specific Code Proposals

OK, I see what you mean. We would need a similar tag in BuildingInfos as well, or does this tag already exist there? Anyway please merge your code in the current RevDCM SVN, comment it, and then upoload it here for me to merge in then. I've also PMed zappara and davidlallen to let them add in any thing they need/want as well. Also I'm surprised, you sure you don't have any other optimizations ready to go?

Buildings already have the tag, that's where I got the idea from.

As for RevDCM, If I get those 4 changes, I'll be completely satisfied... for now. ;)
I'll submit the code as soon as I can, in a few hours.

Edit:

Oh yeah, if you could update the BULL version too, that would be nice, they fixed the OOS bugs they caused.
 
I don't have any new requests. It is quiet lately on the Dune Wars front. I will repeat my suggestion for you to release your mod installer and patch installer, so that others can benefit from the work you put in on that; but you had already said "no" to that.
 
The RevDCM install script will be in the "Source Code" optional add on once we get 2.7 done and compiled in an installer. When you install 2.7 (once it's released), just select that option and then look in the Code folder, all the SDK source and install script will be in there.

I'm surprised there is nothing from Dune Wars. Didn't you guys write some working all terrain transport code?
 
Oh yeah, if you could update the BULL version too, that would be nice, they fixed the OOS bugs they caused.
The BUG and BULL components will be updated once the new versions of BUG and BULL are officially released.

After that glider's going to merge in his work he has done for multiplayer, which should further improve MP stability. And we will need a new gamefonts.tga file. That's all that's left to do, once that's all done we will release version 2.7. I think all of that should be done by the end of the week.
 
Here's my changes, Phungus.

View attachment CvGameCoreDLL.rar

Tell me if it doesn't compile... I never tested it.

Oh, and if you want the building button to show up in the sevopedia for the PrereqBuildingClass code, add this block to the end of PlaceRequires in SevoPediaUnit.py

Code:
#Afforess
		if (gc.getGame().getActivePlayer() >= 0):
			pCiv = gc.getCivilizationInfo(gc.getActivePlayer().getCivilizationType())
		else:
			pCiv = None
		for j in range(gc.getNumBuildingClassInfos()):
			if (gc.getUnitInfo(self.iUnit).getPrereqBuildingClass(j)):
				if (pCiv):
					iPrereq = pCiv.getCivilizationBuildings(j)
				else:
					iPrereq = gc.getBuildingClassInfo(j).getDefaultBuildingIndex()
				screen.attachImageButton(panelName, "", gc.getBuildingInfo(iPrereq).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, iPrereq, -1, False)
 
Quickly browsed through the code, and I have a couple requests. Could you upload the Python and XML files that should be changed by this, for the XML specifically could you plug in an altered Infos file that shows the added tags being used (look at the Lion unit in UnitInfos, it has the added tags in it for RevDCM; this is just for reference for other modders)? Second request is to move the the inquisitions code in CvMainInterface.py to the SDK, if that's possible. The code is pretty calculation heavy, and there should be some noticeable improvement if it is moved into the gamecore.

Edit:
Also please ensure the Inquisitor code works. I used the dictionary method for the AI code because EmperorFool's code did not seem to work (AI never built or used Inquisitors), and looking at the code you've submitted it looks like you've converted EF's code, and I'm not sure that works, at least it didn't with python.
 
Quickly browsed through the code, and I have a couple requests. Could you upload the Python and XML files that should be changed by this, for the XML specifically could you plug in an altered Infos file that shows the added tags being used (look at the Lion unit in UnitInfos, it has the added tags in it for RevDCM; this is just for reference for other modders)? Second request is to move the the inquisitions code in CvMainInterface.py to the SDK, if that's possible. The code is pretty calculation heavy, and there should be some noticeable improvement if it is moved into the gamecore.

Yeah, I would need to make a bunch of changes, adding a new mission, but I can do it; I've done it twice before.

Also please ensure the Inquisitor code works. I used the dictionary method for the AI code because EmperorFool's code did not seem to work (AI never built or used Inquisitors), and looking at the code you've submitted it looks like you've converted EF's code, and I'm not sure that works, at least it didn't with python.

It does work. I still think that the code needs some general tweaking (like making sure the AI isn't over building inquisitors), but these problems exist in the python version too; so it's not a downgrade.
 
Just did some restructuring and updating to the SVN. I haven't added your proposed code yet, as I'm waiting on the XML and python files that go along with it, also waiting on the mission being moved over to the SDK, I think that's where the biggest performance boost will come from; looping over all units and doing a calculation heavy check in python doesn't seem the most efficient mechanism to me. Thanks for working on these Afforess, especially the inquisitor stuff; and again please make sure it all works when you're done. It doesn't seem possible you could write that much code and not introduce a bug, even if most of it is pretty much copying and pasting and just changing the format from python to C++; so make sure it compiles and the AI is building and using inquisitors.

Edit: Also there is alot of inquisitions code in CvUtil.py you probably will want to move over to the SDK Afforess. At least it looks like a bunch of stuff that would optimize performance if it was moved over.
 
Not really a code proposal but is there some modders' guide of RevDCM somewhere? I could figure things out all by myself but having some guideline to know where to dive in the mod to modify it for a total conversion (for example) would be great :)
 
Most of what you need to know about using RevDCM can be found in the BUG mod forums, specifically the Merging BUG with other Mods thread in the BUG mod forums. Pretty much everything in BUG applies to RevDCM, especially with the upcoming 2.7 build (If you want to start working with RevDCM now and don't want to wait for the official 2.7 release, I strongly recommend you grab what's on the SVN instead of using 2.61), as Revolutions has been pretty much turned into a BUG module (there is some SDK stuff related to Revolutions though). I'm not really sure what to put in a guide, or how to go about making one, never really been my strong suite. Best thing to do would be to start a thread explaining what you want to do, or asking what you want to know and someone should be able to direct you where to look. After 2.7 is released jdog or glider might want to make a Mod Mergers Thread like what's in the BUG forums, but would be best to wait for then, because 2.7 changes things quite a bit, as most merger stuff can be handled the same way as merging a mod with the BUG mod.
 
Most of what you need to know about using RevDCM can be found in the BUG mod forums, specifically the Merging BUG with other Mods thread in the BUG mod forums. Pretty much everything in BUG applies to RevDCM, especially with the upcoming 2.7 build (If you want to start working with RevDCM now and don't want to wait for the official 2.7 release, I strongly recommend you grab what's on the SVN instead of using 2.61), as Revolutions has been pretty much turned into a BUG module (there is some SDK stuff related to Revolutions though). I'm not really sure what to put in a guide, or how to go about making one, never really been my strong suite. Best thing to do would be to start a thread explaining what you want to do, or asking what you want to know and someone should be able to direct you where to look. After 2.7 is released jdog or glider might want to make a Mod Mergers Thread like what's in the BUG forums, but would be best to wait for then, because 2.7 changes things quite a bit, as most merger stuff can be handled the same way as merging a mod with the BUG mod.
Is there some thread or post that explains what will be in 2.7? Spending all my time in the FFH forums made me deconnect from the other mods' actuality :p

BTW, since I have you, if I'm going for RevDCM as a base for my project, I think I might as well use LoR. I really like what you did, so I feel like using it. I'm not sure what the under the hood differences are between RevDCM and LoR though; because that's all that will matter really, since I'm going for a total conversion...

My main concern is hardcoding, whether in python or in the DLL (though I hope none is in the DLL). Since, as I said like three times already, I'm going for a total conversion, I will have many things different from what may be hardcoded (techs, units, civics come to mind)...
 
After the release of 2.7 I'll update LoR to 0.9.8d; they'll be pretty similar. LoR just has more art and a couple added techs, units, civs, leaders, and legend units to go along with it's expansion pack theme. RevDCM 2.7 is basically just BtS with Revolutions (and all it's components) built into the BUG format (it's main purpose now is to function as a standardized modding core for other mods to build off of). As far as hardcoding goes, 2.7 does alot to remove as much hardcoding as possible. There are however two techs hardcoded in the SDK (Scientific Method and Liberalism); that's unfortunate and jdog has said he will be removing those hardcoded techs in a future update, but for now it's used for some revolutions functionality and jdog has been working on other stuff. There are some units, civs and techs hardcoded in the Revolutions python as well. Mainly in these files: RevDefs.py and RebelTypes.py. The hardcoded objects are basically stored in strings in these files, these strings are in turn referenced all throughout the Revolutions files; so if you change something in one of these files, you'll need to search for that string and change the code where it's referenced in the other revolutions python files.
 
So it'll be made even more customizable? That's good news.

Thanks for the infos; any idea when 2.7 will be available?
 
OK, I see what you mean. We would need a similar tag in BuildingInfos as well, or does this tag already exist there? Anyway please merge your code in the current RevDCM SVN, comment it, and then upoload it here for me to merge in then. I've also PMed zappara and davidlallen to let them add in any thing they need/want as well. Also I'm surprised, you sure you don't have any other optimizations ready to go?
Well, one thing that have been asked by RoM players is the Master Victory mod component. I know it's used in several other modpacks so I assume it's quite bug free component and I think most RevDCM based mods would like to have that kind of option. If it's too complex to add now, it can wait for RevDCM 2.8.

One other idea that I've been thinking is that could it be possible to add 2 new integer tags to building infos to allow modders to adjust local and national rev index - the python code probably already uses some other tags for this purpose (bGovernmentCenter?) but it would allow more flexibility if we could f.ex. set Courthouses to increase local stability and set some Great Wonder to increase national stability etc. Some buildings also could lower stability so both positive and negative values should work. Oh, and religious buildings could affect the religion stability modifiers. Perhaps this is something that could be made for RevDCM 2.8 since this would require new code...

Other than that, I really haven't had time to keep up with mod components section so I'm not sure if there would be other useful components.

For my own modpack I've been making new UI improvement which I call 'Resource Display'. Basically it shows on mainscreen what resources player has (with colors+numbers) and player can customize it from BUG options: turn on/off and show different resource sets based on game progress (f.ex. you can set it to show early metal resources). You can check out example pictures here. I know it has couple flaws still since I'm not that good programmer and currently it's set to work only with RoM's resources but I think it could be merged to other mods. The python code for it has not been released yet.
 
Well, one thing that have been asked by RoM players is the Master Victory mod component. I know it's used in several other modpacks so I assume it's quite bug free component and I think most RevDCM based mods would like to have that kind of option. If it's too complex to add now, it can wait for RevDCM 2.8.
Mastery victory is too complex and doesn't really seem like something that should go in the RevDCM core; it's more something modmakers can add if they so choose. Of course if glider or jdog want to add it they can, but I wol't do it. If you want it in RoM Afforess could probably add that component into the RevDCM's dll pretty easily though.

One other idea that I've been thinking is that could it be possible to add 2 new integer tags to building infos to allow modders to adjust local and national rev index - the python code probably already uses some other tags for this purpose (bGovernmentCenter?) but it would allow more flexibility if we could f.ex. set Courthouses to increase local stability and set some Great Wonder to increase national stability etc. Some buildings also could lower stability so both positive and negative values should work. Oh, and religious buildings could affect the religion stability modifiers. Perhaps this is something that could be made for RevDCM 2.8 since this would require new code...
Sounds logical. I will clone the reveffect tags that make sense from CivicInfos into BuildingInfos and SpecialBuildingInfos.

For my own modpack I've been making new UI improvement which I call 'Resource Display'. Basically it shows on mainscreen what resources player has (with colors+numbers) and player can customize it from BUG options: turn on/off and show different resource sets based on game progress (f.ex. you can set it to show early metal resources). You can check out example pictures here. I know it has couple flaws still since I'm not that good programmer and currently it's set to work only with RoM's resources but I think it could be merged to other mods. The python code for it has not been released yet.
Looks interesting. After the upcoming release of a new BUG version it'd be a good idea to suggest adding this component to the BUG mod. Anything that goes into BUG will make it into RevDCM, and this seems more appropriate for the BUG mod. This is the thread to make requests for new components: BUG component requests thread, I suggest you submit this component there for the BUG team to look at after they release their update.
 
Something that would be interesting, but perhaps really low priority, is to give an icon to 'stability'. I mean, in LoR (not sure about RevDCM), when you look at a civic, you see something like '+1 local stability'. I was thinking 'local stability' could be changed to an icon to reduce the overload of text we can get for some civics. 4 icons would be needed though; local & national; positive & negative.

Also, I think the current display (at least in LoR, again) of the 'overview' in the Revolution Watch needs refining, it's too confusing to read. I'm talking about the small part were you see like 'Slavery -3', etc. It's all on the same line, very confusing.
 
Hey Opera good to see you here :king:

I've also recently started on a cyberspace-themed total conversion mod using RevDCM as a base; a short while ago I went through the XMLs and weeded out most of the base Civ4 content, I'll attach a zipfile of this runnable RevDCM XML "skeleton" which should hopefully save time for anyone making a total conversion mod based on RevDCM.

As far as the tech hardcoding, I've removed basically all the Civ4 techs and it doesn't seem to cause problems; I'd guess the only issue is absence of the effect of Liberalism and Sci Method, which you could work around by making techs with those XML tags with different display text names appropriate for your use.

I'm actually thinking about disabling the Revolutions aspect for now until my mod is further developed but can't find how to disable it in the options or XML; is there a way to do this using RevDCM? (e.g. DuneWars is based on this modpack, but doesn't employ Revolutions.)

phungus420, re your upcoming 2.7 release, do you anticipate it should be relatively easy to merge the RevDCM XMLs I'm currently making onto this new modpack? It sounds like the only changed tags will be in buildings, which shouldn't be too bad.
 
Hey Opera good to see you here :king:

I've also recently started on a cyberspace-themed total conversion mod using RevDCM as a base; a short while ago I went through the XMLs and weeded out most of the base Civ4 content, I'll attach a zipfile of this runnable RevDCM XML "skeleton" which should hopefully save time for anyone making a total conversion mod based on RevDCM.

As far as the tech hardcoding, I've removed basically all the Civ4 techs and it doesn't seem to cause problems; I'd guess the only issue is absence of the effect of Liberalism and Sci Method, which you could work around by making techs with those XML tags with different display text names appropriate for your use.
Hey there Orlanth!

That's wonderful. I was actually contemplating not using RevDCM because there is some stripped BTS 'mod' that would be perfect for starting a total conversion... Now I have less reasons not to use RevDCM.

But if 2.7 is near, maybe I should wait for it before using your bare version?
 
Just did some restructuring and updating to the SVN. I haven't added your proposed code yet, as I'm waiting on the XML and python files that go along with it, also waiting on the mission being moved over to the SDK, I think that's where the biggest performance boost will come from; looping over all units and doing a calculation heavy check in python doesn't seem the most efficient mechanism to me. Thanks for working on these Afforess, especially the inquisitor stuff; and again please make sure it all works when you're done. It doesn't seem possible you could write that much code and not introduce a bug, even if most of it is pretty much copying and pasting and just changing the format from python to C++; so make sure it compiles and the AI is building and using inquisitors.

Edit: Also there is alot of inquisitions code in CvUtil.py you probably will want to move over to the SDK Afforess. At least it looks like a bunch of stuff that would optimize performance if it was moved over.

I just finished converting ALL of the inquisitions code to SDK. Everything.

I added some Global Defines so modders can still tweak values, and such, and there is some new XML. I need to gather everything together, and I'll post it this evening.
 
Back
Top Bottom