RevolutionDCM for BTS

OV, do you have the Limited Religions mod comp done? You had it completed, but then you went to work on softcoding some things. It looks like you've gotten all that solved based on what I've seen in the python/SDK forums; so I'm guessing it's pretty much completed. I'd like to take a look at it, merge it in, and make some tweaks as necessary (and probably port or implement some functions directly into RevDCM's SDK to improve performance), and then test it. Sooner would be nice, as I've pretty much ran out of other stuff to work on for 2.72; the other items in the list are over my head and need to be tackled by jdog or glider, so having this to work on would be nice.
 
OV, do you have the Limited Religions mod comp done? You had it completed, but then you went to work on softcoding some things. It looks like you've gotten all that solved based on what I've seen in the python/SDK forums; so I'm guessing it's pretty much completed. I'd like to take a look at it, merge it in, and make some tweaks as necessary (and probably port or implement some functions directly into RevDCM's SDK to improve performance), and then test it. Sooner would be nice, as I've pretty much ran out of other stuff to work on for 2.72; the other items in the list are over my head and need to be tackled by jdog or glider, so having this to work on would be nice.

Real busy lately. I will post in the morning, with some comments.
 
I have a quick question: does the AI ever use a great general for attaching it to its units or always as great military instructor in the cities? ive never seen it at all that the AI attach the great general to its units for giving them the 20XP. For debugging i removed the ability for the great general to merge with the city as a military instructor but nevertheless the AI didnt attached the general to its units.

Is this the normal AI behaviour or is it a bug? i would love to see more great generals attached to units....

cheers
 
OV, do you have the Limited Religions mod comp done?

Yes. The attached zip file contains my latest limited Religions and Inquisition updates for RevDCM.

Notes:

1. I have split limited religions and OIM for the sake of clarity and to simplify options.

2. There is new code for identifying the religious shrine and for the missionary.

3. The can train callback is included, but commented out, as this function needs to be added to the SDK. I have added the OC_TRAIN_ONLY_STATE_RELIGION_MISSIONARY check in the GlobalDefinesAlt.xml to create an option for restricitng Missionary production to only state religion missionaries.

4. In OIM: Since there was so much debate on the RELIGIOUS INFLUENCE value, I believe it should be removed from the SDK and tied directly to the value for OC_THRESHHOLD_RELIGIOUS_INFLUENCE in the GlobalDefinesAlt.xml file. This will allow the player to set the value to what ever they desire. However, there is another alternative, if you really want to hard code it. Base the RELIGIOUS INFLUENCE Threshold on Era:

Ancient 90%
Classical 85%
Medieval 80%
Renaissance 75%
Industrial and above 70%

5. My preference is to tie to the value for OC_THRESHHOLD_RELIGIOUS_INFLUENCE.

6. Lastly, I am unable to get the AI in RevDCM to produce any inquisitors. If you go back and use the functions from OIM version 250D, The AI will produce them. For, now, that code is not included in the attachment, as I'm unsure of how much of the Inquisitor code you put in the SDK. Therefore, the focus for the attachment is Limited Religions (in it's entirety) and Religious victory code from OIM.

Orion Veteran :cool:
 

Attachments

  • LR_OIM_for_RevolutionDCM.zip
    29.2 KB · Views: 57
I don't see any reason to keep most of this code in Python; and I'd rather just move it to the SDK. Anyone know where victories are handled in the SDK?
 
Thanks I will take a look. Also I'm assuming most tech stuff is handled in CvTeam, there are alot of Religious specific tests in here that will require creating new functions. I'm assuming these should go in CvTeam; let me know if you think differently.
 
I don't see any reason to keep most of this code in Python; and I'd rather just move it to the SDK. Anyone know where victories are handled in the SDK?

I think I might have hosed up one line of code. Edit: Nope! I had it right. :hammer2:

Code:
if CyGame().calculateReligionPercent(iStateReligion) > OIM.getOC_THRESHHOLD_RELIGIOUS_INFLUENCE():

Make sure the following entry is in the GlobalDefinesAlt.xml file:

Code:
<Define>
	<DefineName>OC_THRESHHOLD_RELIGIOUS_INFLUENCE</DefineName>
	<iDefineIntVal>79</iDefineIntVal>
</Define>

Sorry for the mess up.
 
I'm going over the code line by line translating it into C, so I'll notice if there are issues; thanks though.
 
What is the difference between the RevDCM and BTS Vanilla CIV4CivilizationInfos and CIV4LeaderHeadInfos?

I tried to spot some differences but did not find any obivous ones. I'm interested since I want to edit/change/replace them.
 
What is the difference between the RevDCM and BTS Vanilla CIV4CivilizationInfos and CIV4LeaderHeadInfos?

I tried to spot some differences but did not find any obivous ones. I'm interested since I want to edit/change/replace them.

1. Vanilla is a term used to describe something as it was originally released from Firaxis.

2. BTS vanilla is CIV4 with the officail BTS 3.19 installation patch.

3. RevDCM is a mod to run with BTS 3.19.

4. CIV4CivilizationInfos and CIV4LeaderHeadInfos are two different XML files.

5. The difference between RevDCM and BTS Vanilla CIV4CivilizationInfos and CIV4LeaderHeadInfos, refers to the difference between the respective official game XML files and the changed XML files found in RevDCM.
 
Thanks for the response and sorry if I made myself unclear. I know all of the 1-5 but my question is what did you change in those two XML files for RevDCM? Not details but overall.

Did you change specifics for civs? Barbs? Minor civs? Leaders?

As I said I couldn't find any obvious changes you made when comparing to vanilla. For example I am thinking on adding civs from CIV GOLD and it would be nice to know if I need to keep changes you made in those two XML files or if I can just replace them.
 
Thanks for the response and sorry if I made myself unclear. I know all of the 1-5 but my question is what did you change in those two XML files for RevDCM? Not details but overall.

Did you change specifics for civs? Barbs? Minor civs? Leaders?

As I said I couldn't find any obvious changes you made when comparing to vanilla. For example I am thinking on adding civs from CIV GOLD and it would be nice to know if I need to keep changes you made in those two XML files or if I can just replace them.

in Civ4LeaderheadInfos, new memory and memory decay information has been added to all leaders. As for civ4CivilizationInfos, I have no idea.
 
Compare using Winmerge, it'll highlight the differences for you. If you're planning on doing any long term modding, you'll need winmerge anyway, especially if you plan on merging mods.
 
As I said I couldn't find any obvious changes you made when comparing to vanilla. For example I am thinking on adding civs from CIV GOLD and it would be nice to know if I need to keep changes you made in those two XML files or if I can just replace them.

If there is a file, it has been changed from vanilla BtS. As phungus said, use WinMerge to find the changes.
 
I'm not understanding:

CvGame::testVictory(VictoryTypes eVictory, TeamTypes eTeam, bool* pbEndScore)

It passes eVictory into a bValid test here:

bool bValid = isVictoryValid(eVictory);

Which should just set the variable bValid to true or false. Then there are the victory checks which look like this:

Code:
	if (bValid)
	{
		if (GC.getVictoryInfo(eVictory).isEndScore())
...validation logic
	}

The validation logic then either sets bValid to true or false. The issue is before every validation logic check there is the if(bValid) control statement. So what I don't understand is how any victory condition is checked after the first.

In otherwords the way I'm reading it this function should set bValid to true or false as one of the first things it does. If it sets it to false, then no victory type is checked. If it sets it to true, then only the first victory type is checked, and the others wol't be. It doesn't make any sense to me.

Also where are victory types even defined. There are only 3 functions that are created in CvVictoryInfos that are boolean and look like they can be used to see if a victory type is valid. How would I ask in CvTeam for instance, if Cultual Victory is on?
 
The first check:

bool bValid = isVictoryValid(eVictory);

just looks at whether a victory of type eVictory is allowed in this game instance (was it checked in the custom game screen).

If the victory type is valid for this game, then the following checks look at whether the player qualifies for victory type in question. The flow is basically: is eVictory a time victory? is eVictory a score victory? is eVictory a conquest victory? etc.

For checking if cultural victory is valid in other parts of the code, you can use:

GC.getGameINLINE().culturalVictoryValid()

The other types don't have such easy functions, you can check out what I do in the CvPlayerAI::AI_getXXXVictoryStage functions for one approach.
 
Does anyone know where the code that tells the inquisitor what city to go to, ie how it selects the target city to conduct the inquisition in, is? I'd like to add some logic so that it will also try to purge vassal cities if it has vassals and has high religious domininace.
 
Does anyone know where the code that tells the inquisitor what city to go to, ie how it selects the target city to conduct the inquisition in, is? I'd like to add some logic so that it will also try to purge vassal cities if it has vassals and has high religious domininace.

CvPlayerAI::getInquisitionRevoltCity()

Anyway, you would need to change it to loop over your's and any vassal cities as well.
 
Top Bottom