Louis's Python and SDK

1) You should use the following tag to avoid wasting the wonder:
<bStateReligion>1</bStateReligion>
2) Moving the Holy City from its actual position to the capital is not a waste at all. Capitals often generate more money. So it can be a pretty powerful wonder.

Good job :thumbsup:
Thanks!
But I think I forgot to add that this is a Project not a wonder so it doesn't have that tag. It's easier to make project effects other then wonder effects because for projects I can do anything and just put it under def onProjectBuilt, but with wonders I have to find the correct place to put it.
I also really like what the effect does, when I first got this idea I was sure it would just give me an error and I would give up but surprisingly it worked!
 
I just went into DLL modding, the only file I changed was in the CvDefines.h I changes the MAX_NUM_TEAMS (18) to MAX_NUM_TEAMS (200).
There might have been some other files to change as well probably.

The edit that I did to allow for more Civs was (shows the original edit by Kael to increase the number for FFH also)
Code:
//FfH: Modified by Kael 09/27/2007
//#define MAX_CIV_PLAYERS                                               (18)
/* LPlate Edit - Extra Civs */
//#define MAX_CIV_PLAYERS                                               (35)
#define MAX_CIV_PLAYERS                                               (110)
/* LPlate End Edit - Extra Civs */
//FfH: End Modify
in CvDefines.h.

I think that when I was looking into it, I found thread where someone had run a few tests and found that there was a limit somewhere between 100 and 150 beyond which the game didn't really work. I'm not sure what the value was.
If editing the value I'd keep it close to the value that you actually need for the number of Civs you're defining. Wouldn't be an expert but I believe it can lead to inefficiencies if its unnecessarily high.
 
Thanks!
But I think I forgot to add that this is a Project not a wonder so it doesn't have that tag. It's easier to make project effects other then wonder effects because for projects I can do anything and just put it under def onProjectBuilt, but with wonders I have to find the correct place to put it.
I also really like what the effect does, when I first got this idea I was sure it would just give me an error and I would give up but surprisingly it worked!
Oh, too bad it's not a wonder :undecide:
I wanted to use it for Holy See / Vatican. Would be cool if Christiandom was changing it's Holy City during the game.
I think I even have a movie for that.
 
Thanks!
But I think I forgot to add that this is a Project not a wonder so it doesn't have that tag. It's easier to make project effects other then wonder effects because for projects I can do anything and just put it under def onProjectBuilt, but with wonders I have to find the correct place to put it.
Try using onBuildingBuilt in CvEventManager.
 
Oh, too bad it's not a wonder :undecide:
I wanted to use it for Holy See / Vatican. Would be cool if Christiandom was changing it's Holy City during the game.
I think I even have a movie for that.
Well this project doesn't only change the holy city of Christianity, and projects also have movies but I don't have one for this. I actually made it a project because I have never created a project and I thought it would be cool to make one.
But anyway the code I wrote is extremely easy, just go to the def onbuildingbuilt in the CvEventManager and all you have to do is copy the code I wrote in the CvEventManager.
This just gave me a great idea! I'm currently working on Better Corporations modcomp which will be released today but after that I think I will create a modcomp called Advanced Religions. For example if lets say India is the first to discover Meditation and founds Buddhism but never/rarely builds temples, cathedrals, monasteries, and Buddhist wonders then the Holy City will move to a civ that actually builds all of these things. I will of course also add more religions, I was thinking to break them into more parts like this, Christianity: Catholicism, Orthodoxy, Protestantism; Islam: Sunni, Shia; Shinto, Æsir, Inti (maybe), Toltec, Hellenism, Zoroastrianism. Of course this will take me a lot of Game Font editing. Also each religion will have a unique power and holy cities disappear with time, like if the Vikings evolve into Sweden and become Catholic and then the holy city of Æsir will disappear. Also Holy Shrines can be burned, and if burned then you will get 20-30 gold. Last but not least the max shrine income is 25 gold per turn.
Tell me what you think!
 
Well this project doesn't only change the holy city of Christianity
I know but I wanted to use it that way because I'm also working on improving religions in CoM.
Of course this will take me a lot of Game Font editing.
You should take a closer look at AND2 or CoM. The gamefont already has all those religiouns and even more ;)
Tell me what you think!
Basically... I don't like it... for CoM I would not use that modcomp... but for a DoC type mod (which is obviously your goal) it sounds good. So go ahead :)
 
Fushimi Inari
Effect: Inari God of Rice will destroy your enemies Rice supply over time, enemies can no longer pillage farms in your borders.
Requirements: Civil Service and Rice
Obsolete: Biology
Info: 500:hammers:, 10:culture:, 2:gp: Great Prophet.
Okay, I'm just merging it into my own mod.
If I want to have only the "farm protection" is this part of the code fully enough?
Code:
##-Fushimi Inari - Louis XIV Start Part 2-##
        pPlayer = gc.getPlayer(pPlot.getOwner())
        if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_FUSHIMI_INARI")) == 1:
            if iImprovement == gc.getInfoTypeForString("IMPROVEMENT_FARM"):
                if pPlot.getOwner() != iOwner:
                    pPlot.setImprovementType(iImprovement)
##-Fushimi Inari - Louis XIV End Part 2-##

This part is only about rice removal, right?
Code:
##-Fushimi Inari - Louis XIV Part 1 Start-##
        if iBuildingType == gc.getInfoTypeForString("BUILDING_FUSHIMI_INARI"):
            iPlayer = pCity.getOwner()
            for i in range(CyMap().numPlots()):
                pPlot = CyMap().plotByIndex(i)
                if pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_RICE") and pPlot.getOwner() != iPlayer:
                    UnownedTimer = 20 * gc.getGameSpeedInfo(CyGame().getGameSpeedType()).getGrowthPercent()/ 100
                    pPlot.setForceUnownedTimer(UnownedTimer)
            CyInterface().addImmediateMessage(CyTranslator().getText("TXT_RICE_CONTROL",(UnownedTimer,)), None)
##-Fushimi Inari - Louis XIV Part 1 End-##
 
Okay, I'm just merging it into my own mod.
If I want to have only the "farm protection" is this part of the code fully enough?
Code:
##-Fushimi Inari - Louis XIV Start Part 2-##
        pPlayer = gc.getPlayer(pPlot.getOwner())
        if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_FUSHIMI_INARI")) == 1:
            if iImprovement == gc.getInfoTypeForString("IMPROVEMENT_FARM"):
                if pPlot.getOwner() != iOwner:
                    pPlot.setImprovementType(iImprovement)
##-Fushimi Inari - Louis XIV End Part 2-##

This part is only about rice removal, right?
Code:
##-Fushimi Inari - Louis XIV Part 1 Start-##
        if iBuildingType == gc.getInfoTypeForString("BUILDING_FUSHIMI_INARI"):
            iPlayer = pCity.getOwner()
            for i in range(CyMap().numPlots()):
                pPlot = CyMap().plotByIndex(i)
                if pPlot.getBonusType(-1) == gc.getInfoTypeForString("BONUS_RICE") and pPlot.getOwner() != iPlayer:
                    UnownedTimer = 20 * gc.getGameSpeedInfo(CyGame().getGameSpeedType()).getGrowthPercent()/ 100
                    pPlot.setForceUnownedTimer(UnownedTimer)
            CyInterface().addImmediateMessage(CyTranslator().getText("TXT_RICE_CONTROL",(UnownedTimer,)), None)
##-Fushimi Inari - Louis XIV Part 1 End-##
The first one is the farm protection. I made it that whenever a farm is pillaged the game checks if the player who just got pillaged has Fushimi Inari, if the player has Fushimi Inari then the game sets a new farm exactly where the old one was pillaged.
The second one isn't exactly rice removal, it just monopolizes the enemy rice market for some turns.
P.S. But remember that the farm protection has to be right under def onImprovmementPillaged or something like that
 
The first one is the farm protection. I made it that whenever a farm is pillaged the game checks if the player who just got pillaged has Fushimi Inari, if the player has Fushimi Inari then the game sets a new farm exactly where the old one was pillaged.
:eek:
That's very exploitable and may confuse the AI too.
This means then I can repeatedly gain the loot from the farm turn after turn.
P.S. But remember that the farm protection has to be right under def onImprovmementPillaged or something like that
Thx for the reminder. I'm using Winmerge to put everything to the right place :)
 
Top Bottom