[XML + Python] Bamyan Buddha States

Well,
I put in the callback file, and adjusted the python.

The errors I am getting are:

a) Lets you build Missionaries without Organized Religion or a Missionary
b) After the 3rd Missionary, it lets you select the 4th to be built (i.e. does not take the unit out of the list), but after 1 turn, a message is given saying the city cannot continue to build the missionary and I recieve gold for the wasted production points (the same way you get gold after failing to finish a wonder).

I am not an expert in Python, by any means, and I am just stating the obvious here,
but the Python to me just seems to let you build the unit without changing the limit, hense why you can select the unit to be built, and then fail to do so because the limit has been reached (just like with wonders).

So what I am saying is, the problem is that the limit isnt changed.
 
^Alright, I just tested it myself with the python callbacks, and I've gotten the same result.

:sad: Well, looks like this thing is on stall for now. :sad:
 
That's a good question... I guess since it was supposed to be a modcomp meant for NextWar, not too many people would have tried it out.

I'll see if I can test it.
 
Well,
I put in the callback file, and adjusted the python.

The errors I am getting are:

a) Lets you build Missionaries without Organized Religion or a Missionary
b) After the 3rd Missionary, it lets you select the 4th to be built (i.e. does not take the unit out of the list), but after 1 turn, a message is given saying the city cannot continue to build the missionary and I recieve gold for the wasted production points (the same way you get gold after failing to finish a wonder).

I am not an expert in Python, by any means, and I am just stating the obvious here,
but the Python to me just seems to let you build the unit without changing the limit, hense why you can select the unit to be built, and then fail to do so because the limit has been reached (just like with wonders).

So what I am saying is, the problem is that the limit isnt changed.

I think the a) is not an error. I previously suggested to add this effect too, the wonder was a little underpowered.
So leave it that way :)
 
Alright, perhaps if it can help some of those more proficient in python (I certainly am not :blush:), below are the relevant python code for both the Bamyan Buddha Statues and the HERC Factory (which the Bamyan Buddha Statues) are based on.

I can't tell whether there is much a difference, frankly, in what they do, but all I do know that this snippet of code here is the relevant code.

The code for the Bamyan Buddha Statues:

Spoiler :
Code:
## HERC Factory Start ##

		iAssault = CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_ASSAULT_MECH')
		iHerc = CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),'BUILDING_HERC_FACTORY')
		obsoleteTech = gc.getBuildingInfo(iHerc).getObsoleteTech()

		pPlayer = gc.getPlayer(pCity.getOwner())

		if eUnit == iAssault:

			if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
				for iCity in range(pPlayer.getNumCities()):
					ppCity = pPlayer.getCity(iCity)
					if ppCity.getNumActiveBuilding(iHerc) == true:

						return True

## HERC Factory End ##


Compared with the code for HERC:

Spoiler :
Code:
## BAMYAN BUDDHA STATUES Start ##
                iMissionary = []
                iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_JEWISH_MISSIONARY'))
		iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_CHRISTIAN_MISSIONARY'))
		iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_ISLAMIC_MISSIONARY'))
		iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_HINDU_MISSIONARY'))
		iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_BUDDHIST_MISSIONARY')    )
		iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_CONFUCIAN_MISSIONARY'))
		iMissionary.append (CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_TAOIST_MISSIONARY'))
		iMoreMissionariesWonder = CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),'BUILDING_BAMYAN')
		obsoleteTech = gc.getBuildingInfo(iMoreMissionariesWonder).getObsoleteTech()

		pPlayer = gc.getPlayer(pCity.getOwner())
		NumReligions = 7
		for i in range (NumReligions):
                        if eUnit == iMissionary[i]:
                                if pCity.isHasReligion(i):
                                        pUnit = gc.getUnitInfo (eUnit)
                                        Class = pUnit.getUnitClassType ()
                                        MissionaryCount = pPlayer.getUnitClassCount(Class)
                                        if MissionaryCount <5:
                                                if (gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
                                                        for iCity in range(pPlayer.getNumCities()):
                                                                ppCity = pPlayer.getCity(iCity)
                                                                if ppCity.getNumActiveBuilding(iMoreMissionariesWonder) == true:
                                                                        return True

## BAMYAN BUDDHA STATUES End ##


If it seems that the HERC wonder is also problematic, and that this thing can't be solved permanently, I guess I'll just give the wonder a different bonus, probably using the event system to make it more interesting. :sad:
 
No. :sad:

The J says he may be able to get to it later, but unfortunately The J is in a bit of a busy rut as of now.

I think I'll just go ask the SDK/Python forum soon to see what they think.
 
Alright, so I asked for some help in the SDK/Python forum, and the news isn't great. Apparently it seems that it is impossible through python to change the national limit, as that is handled through the SDK. So, since SDK is like playing Reserve Russian Roulette for a good number of us modders, I suppose the second-best option is to give the Bamyan Buddha Statues some other kind of bonus. :(

I'm thinking maybe using the event system, a unique bonus can still be given to the wonder, albeit not as interesting as originally planned. Here are some ideas so far, some more similar to the old concept than others:

  • Spawn a Missionary every few turns (say, 5), similar to how the Statue of Zeus worked. This would still allow, on occasion, the possibility of more than 3 missionaries, so this is the closest to the original idea in my opinion.
  • Spawn a set number of missionaries at once, one occasion only, like spawning 5 missionaries free or something
  • Giving all missionaries some kind of promotion, maybe Medic I or something
  • Give a bonus to all monasteries (or temples), like +2 culture for all monasteries or +2 happiness for all temples, of a certain religion
  • Automatically spread religion to [x] amount of cities (player's and/or foreign cities)

Yeah, this isn't great news, but thoughts?
 
Hmm, I'm not really sure what to do about this one. I might just remove it from my mod if it can't work, I don't see the purpose of just giving it a bonus just to do it.

Does this mean that Tsentom's wonder didn't work to begin with?
 
Hmm, I'm not really sure what to do about this one. I might just remove it from my mod if it can't work, I don't see the purpose of just giving it a bonus just to do it.

Does this mean that Tsentom's wonder didn't work to begin with?

If I read correctly, it's not supposed to work, even though there weren't any complaints about it not working in the first place. :(
 
You could always leave it as it is (except editing it from 5 to 3, so you dont get that gold side effect).

As-Is it basically mimics organized religion, thus allowing the building of missionaries without monasteries, This can be nice bonus, either before monasteries are built, or after they become obsolete, one could spread the religion quicker, while allowing the builder to switch to Theocracy.
Theocracy preventing others from spreading their religion, while allowing the builder to spread his. This would be a nice bonus for Religious Victory seekers.

Now Maybe give it some other bonuses too to make it more valuable.

[*]The Commando Promotion to Missionaries produced in all your cities (Python)

I also like Khan's idea of +1/2 happiness with Monasteries, although that might get tricky, having effect all Monasteries.


Alright, so I asked for some help in the SDK/Python forum, and the news isn't great. Apparently it seems that it is impossible through python to change the national limit, as that is handled through the SDK. So, since SDK is like playing Reserve Russian Roulette for a good number of us modders, I suppose the second-best option is to give the Bamyan Buddha Statues some other kind of bonus. :(

I'm thinking maybe using the event system, a unique bonus can still be given to the wonder, albeit not as interesting as originally planned. Here are some ideas so far, some more similar to the old concept than others:

  • Spawn a Missionary every few turns (say, 5), similar to how the Statue of Zeus worked. This would still allow, on occasion, the possibility of more than 3 missionaries, so this is the closest to the original idea in my opinion.
  • Spawn a set number of missionaries at once, one occasion only, like spawning 5 missionaries free or something
  • Giving all missionaries some kind of promotion, maybe Medic I or something
  • Give a bonus to all monasteries (or temples), like +2 culture for all monasteries or +2 happiness for all temples, of a certain religion
  • Automatically spread religion to [x] amount of cities (player's and/or foreign cities)

Yeah, this isn't great news, but thoughts?
 
Top Bottom