1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Orion's Inquisition Mod

Discussion in 'Civ4 - Mod Components' started by OrionVeteran, Nov 28, 2008.

  1. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    I believe free Temples would make this Wonder irresistable to the AI and a good alternative to purging a non-state religions. However, if you decide to stick with purging non-state religions, I would slow it way down. Perhaps, purge one city of all non-state religions and buildings once every 20 or 25 turns.

    I would be very thankful for your generous efforts to create the custom Wonders I have requested.

    Sincerely,

    Orion Veteran :cool:
     
  2. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    I could be confused, but I think you might want to have a look at the interface code in CvMainInterface.py regarding the control of the inquisition button for holy cities. The option to purge can dissapear in some cases regarding the checking of the the remove holy city option. It's not a big issue though.

    I just have simplified the slab of code there down to:

    Spoiler :
    Code:
    if ProceedWithInquisition:
    								iStateReligion = gc.getPlayer( pUnit.getOwner( ) ).getStateReligion( )
    								if iStateReligion != -1:
    									if pCity.isHasReligion( iStateReligion ):
    										for iReligionLoop in range(gc.getNumReligionInfos( )):
    											if pCity.isHasReligion( iReligionLoop ):
    												if iReligionLoop != iStateReligion:												
    													screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_GODS_PERSICUTION").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 665, 665, False )
    													screen.show( "BottomButtonContainer" )
    													iCount = iCount + 1
    													return
    
    
    Although it's a great function that function:
    CvUtil.ocCityHasNonStateReligion(pCity, iStateReligion)

    I prefer to just let the user dictate whether they want to try a holy city inquisition which could result in the removal of a non-state building if nothing else. This same relaxation doesn't apply to mr-AI because he's not clever enough to be able to think it through.

    Like I said, I could be confused.

    Anyway, have released a flavour of this mod here:
    http://forums.civfanatics.com/downloads.php?do=file&id=11402

    It's Revolution mod specific in character and will not apply to this mod much at all. Main changes are AI behaviour and a few extra utility functions that you could whip up yourself like a bowl of cream in any case.

    Thanks for this mod, keep up the good work and the vision.
    Cheers
     
  3. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    In CvMainInterface.py, the updateSelectionButtons function was changed to prevent the removal of a Holy City with an inquisitor, if the default setting for OC_INQISITOR_CAN_REMOVE_HOLY_CITY in the GlobalDefinesAlt.xml file is set to False, 0. If you want the "option" to remove the HolyCity, then the value should be set to True, 1. The updateSelectionButtons function only determines if the button should appear or not.

    I'm currently working on ver 2 of this mod and I will test this function before the release. Thanks for the function changes, I will review and test.

    Question: Would you know of a way to scale down the Better Auto AI mod to bare bones. At times I have trouble getting it to work with this mod. Any tips would be appreciated.

    Sincerely,

    Orion Veteran :cool:
     
  4. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    @OrionVet
    Yeah I can see where you are coming from. You would want a BTS CORE DLL that is 100% 3.17 with only the addition of two sections of code, the auto play and change civ code. The latter is very useful because if you can flick control between different civs, you can see how the holy cities play out or move from small states to big states. Combined with world builder, that combination allows for some good quality scenario testing.

    If there is not already such a core available on this site, I'll zip one and post here. At the moment though, got to take a break from coding. The real world is starting to become an annoying problem again that won't go away :)

    Cheers.

    EDIT:
    The better bts core has these features built in. What I suggest is that while you wait for a more pure BTS core, you drop the Better BTS core into your testing and find how to autoplay and change civ with it (forgotton the key strokes). Do your testing with that core then drop back to standard BTS for final testing. The Better BTS AI won't have any significant impact on your python logic I'd say.
     
  5. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    There may be a little cat that got out of the bag in this mod but not sure. I goofed a bit in Revolution Inquistion where inquistors can be built in cities without the state religion even if all the other prereq's are there. How about holy offices?

    Just another condition to check for you!
    Cheers.
     
  6. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    The official state religion must be present in the city, where The Holy Office is built. The inquisitor can't be built unless a Holy Office is built first. So by default, an inquisitor can't be built in a city without the state religion, because the Holy office requires it.

    Respectfully,

    Orion Veteran :cool:
     
  7. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Just to give me a head start on fixing my own code, what function in the inquisition python code governs where a holy office can be built? Perhaps it's in the XML? Couldn't find it off hand. No hurry. Enjoy working on version 2.0.
    Cheers.
     
  8. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    It is all done in XML. Any city that has the official state religion can build a Holy City.
    Code:
    File: CIV4BuildingInfos.XML
    <BuildingClass>BUILDINGCLASS_HOLY_OFFICE</BuildingClass>
    <bStateReligion>1</bStateReligion>
    <PrereqTech>TECH_THEOLOGY</PrereqTech>
    
    File: CIV4UnitInfos.XML
    <Class>UNITCLASS_INQUISITOR</Class> 
    <PrereqBuilding>BUILDING_HOLY_OFFICE</PrereqBuilding>
    <PrereqTech>TECH_THEOLOGY</PrereqTech>
    
    I am making progress on version 2, but I still need help getting the AUTO_AI to work right. It seems there is still something missing. I will have to compare with Orion's Challenge, as Dale's Combat Mod has included it.

    Respectfully,

    Orion Veteran :cool:
     
  9. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    If you plug in the BETTER BTS AI 0.45 released today, here are the debug shortcuts:

    Ctrl+Shift+X AIAutoPlay Opens popup to start automation for any number of turns. Pressing while in automation cancels automation.
    Ctrl+Shift+M AIAutoPlay Automate the rest of the current turn only.
    Ctrl+Shift+P ChangePlayer Open popup to change the civ and leader type for any player in the game.
    Ctrl+Shift+L ChangePlayer Open popup to switch which player the human controls.

    Once you are happy with the build, fall back to the standard BTS CORE DLL for final testing. The only merging that has to be done in XML is in GlobalAltDefines, but I think if you don't bother, the SDK does not crash out. What would be interesting to see is whether the Better BTS DLL can simply be dropped into your build without needing any XML clothing other than as "accessory" XML. I'd say so.

    Cheers.
     
  10. Ninja2

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
    As 1.01F is still the official release, here goes; in PythonErr.txt, I get the following (non-crashing) error:

    Code:
    Traceback (most recent call last):
    
      File "CvGameInterface", line 185, in AI_unitUpdate
    
      File "CvGameUtils", line 294, in AI_unitUpdate
    
      File "CvGameUtils", line 571, in doInquisitorCore_AI
    
    RuntimeError: unidentifiable C++ exception
    ERR: Python function AI_unitUpdate failed, module CvGameInterface
    Line 571 is this:
    Code:
    if iReligionLevel > gc.getGame().calculateReligionPercent(iStateReligion):
    I think we've had this one before, and someone (sorry, forgot who) posted a suggested fix:
    Code:
    if iStateReligion == -1 or iReligionLevel > gc.getGame().calculateReligionPercent(iStateReligion):
    My question is: How does this line look in v.2? :)
     
  11. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    Good question. I will look at it tonight and test the proposed fix. Ver 2.00 is very near to completion.

    Respectfully,

    Orion Veteran :cool:
     
  12. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    Orion's Inquisition Mod version 2.00 has been released! :D

    See first post for all of the details on new changes.

    Enjoy!

    Orion Veteran :cool:
     
  13. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    @Orion
    Thanks for making your hard work available to us. My focus is on the python. Any ideas I get from here for Revolution Inquisitions, I will acknowledge for sure.
    Cheers.
     
  14. Ninja2

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
    Great! :) I'll dig into this after the holidays!
     
  15. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    Orion's Inquisition Mod version 2.00A has been released! Multiple functions were changed and many hours of exhaustive python testing went into this version. :coffee:

    See first post for all of the details on new changes.

    :newyear:

    Orion Veteran :cool:
     
  16. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Thanks OrionVet!
    Happy new year to you to.
    Cheers.
     
  17. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    You are welcome. You have the bare bones AutoAI in version 2.00A. Drop in the DLL and AutoPlay will work. Leave the DLL out, and the mod will work without it.

    Orion Veteran :cool:
     
  18. Tephros

    Tephros Caffeine Junkie

    Joined:
    Apr 12, 2006
    Messages:
    521
    Personally I think this is how inquisition should work:

    1. Inquisition unit costs the same as a missionary.
    2. Requires use of theocracy to build or use. No actual tech requirement - can get to via theology or Paya wonder.
    3. Use will reduce population by 1 or 2, depending upon number of religions present and how long they have been present, if the population isn't already 1 (if pop =1, stores are reset to zero) but yield some moderate amount of gold (confiscated property).

    I don't agree with this having anything to do with a victory, except in the sense that it can prevent somebody from getting an AP victory without destroying you, and it can enable you to defy AP resolutions without the +5 anger. While running theocracy, they can't reestablish the religion in your civ to push you around or achieve AP victory.

    In absence of having the AP to contend with, the idea would be mostly to deprive competitors of shrine money while gaining some of your own at the cost of food (-1 pop) and hammers to build the inquisitor. For balance maybe there should be some kind of bonus for running theocracy in cities that contain your religion and no other.
     
  19. OrionVeteran

    OrionVeteran Deity

    Joined:
    Dec 25, 2003
    Messages:
    2,443
    Location:
    Newport News VA
    I will be happy to address each idea.

    Respectfully Disagree: The inquisitor is a very powerful unit. While the Missionary can spread one single religion, the state religion, into a city; the inquisitor can remove ALL non-state religions and their associated religious buildings. With greater capability, there must be a greater cost.

    Respectfully Disagree: Not sure what the Paya wonder is... Organized religion has a central authority, which determines theology. History shows that governments with official state religions had a central authority, the church, which determined religious theology. In a Monarchy, the leader ruled over the affairs of the state, while the official church ruled over religious matters. The Church and State have close ties. Theocracy is a form of government, where Holy men or women are in charge of the state. The Church and State rule together. Point is a Theocracy and Organized religion can have inquisitions.

    Respectfully Disagree: Reducing population by 1 or 2 represents far too many people. The Holy office building, with it's -1 health is still a big population hit, but far more realistic and the Holy Office yields a small amount of gold.

    Respectfully Disagree: The Apostolic Palace (AP) is a Wonder not an organization where the diplomats decide if an inquisition can take place or if a victory can be achieved. See post 271 on the following link:
    http://forums.civfanatics.com/showthread.php?t=249392&page=14

    Now if you don't like the Religious Victory, I might be persuaded to make it an option. That way you can play the game the way you like it.


    Agree: There is a bonus for running Theocracy: New units get +2 free experience points when constructed in cities with the official state religion. Plus, Theocracy prevents the spread of non-state religions. The Holy Office building provides fair compensation for building inquisitors by giving +2 gold on every turn. You can't build a Holy Office under Pacifism or Free Religion civics. Last, but not least, a player is rewarded for religious unity by achieving a religious victory.

    Very Respectfully,

    Orion Veteran :cool:
     
  20. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    @OrionVet
    Thanks for the info on real history and inquisitions. Good stuff. Don't want to take too much of your time, but briefly, is there any real history which implies that the church wanted to conduct an inquisition to potentially stop the citizenry from degenerating into civil war or revolting against the state itself?

    I guess the theoretically possibilities is that the followers of a foreign religion is inciting rebellion against the state in one way or another, or that the citizenry loyal to the state religion, begin organising a rebellion themselves either against the state for not purging the foreign religion, or directly against the followers of the foreign religion themselves.

    Avoiding domestic revolt of any type so as to keep the state functioning well, is one strong motivation for conducting inquisitions in the "Revolutions Inquisitions" mod. The question is if there is any reality to that.

    Cheers.
     

Share This Page