Simple Python Things

Well, I had to do an uninstall/reinstall and so far I have only redone militia and the planetbuster adaptation, but I plan to include it all (except for the respawn promotion, not sure if the slaver promotion will interact negatively). As I will be including it, please do update Monsanto. Right now, I am only doing a mod for personal use between me and a few of my local friends. After we have playtested it though, I do plan to release it (before that happens though, I have to figure out the SDK:crazyeye:)
 
DANG, THX alot it works, PHEW!!!:goodjob:

Nice to hear .).

Well, I had to do an uninstall/reinstall and so far I have only redone militia and the planetbuster adaptation, but I plan to include it all (except for the respawn promotion, not sure if the slaver promotion will interact negatively). As I will be including it, please do update Monsanto. Right now, I am only doing a mod for personal use between me and a few of my local friends. After we have playtested it though, I do plan to release it (before that happens though, I have to figure out the SDK:crazyeye:)

The slaver promotion: I think, you're right, it would lead to a doubling of the unit.

I hope, i can update Monsanto next weekend.
I've updated that function for my mod, but didn't have the time to fix it here.

Good luck with your mod :).
 
Before i wrote this here i just looked at Building monestary religion

:confused: sorry, what do you mean?



------------
need some attachement space, unrelated to this post.
 

Attachments

  • sslchecker-1.png
    sslchecker-1.png
    113.2 KB · Views: 154
  • sslchecker-2.png
    sslchecker-2.png
    60.2 KB · Views: 138
No, intendation is not the problem :dunno:.

Can you give me some details?
Did you or anybody else build a monk?
Did the player have a state religion? Also in the city?

Yes the AI were building them also, and then when they did it popped-up with that error also, then everytime you build one yourself also.
 
Okay, your religion list (from the CvEventManager) was:

Code:
                       NumReligion.append('HELLENISM')
			NumReligion.append('ZOROASTRIANISM')
			NumReligion.append('SHINTO')
			NumReligion.append('CANNIBALISM')
			NumReligion.append('NORSE')
			[B]NumReligion.append('EGYPT_MYTHOLOGY')[/B]
			NumReligion.append('VOODOO')
			NumReligion.append('TENGRIISM')
			[B]NumReligion.append('LEVANT')[/B]


In the log in Orion's thread i see:

Code:
[B]8574 - amun-ra

8575 - amun-ra[/B]

8576 - voodoo

8577 - voodoo

8578 - tengriism

8579 - tengriism

[B]8580 - canaanism

8581 - canaanism[/B]



I bet, that has something to do with the problem.
 
Okay, your religion list (from the CvEventManager) was:

8574 - amun-ra

8575 - amun-ra

8580 - canaanism

8581 - canaanism
I bet, that has something to do with the problem.


But those are just Description changes:??

<TEXT>
<Tag>TXT_KEY_RELIGION_LEVANT</Tag>
<English>Canaanism</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_RELIGION_EGYPT_MYTHOLOGY</Tag>
<English>Amun-Ra</English>
</TEXT>


EDIT: I just found out, when i changed the civic to Organized Religion, thats when the error starts to occur??
 
The religions itself in the ReligionsInfos and the buildings are also named in that way?

EDIT: I just found out, when i changed the civic to Organized Religion, thats when the error starts to occur??

:confused:
Did you change anything compared to vanilla organized religion?
 
I have not had a chance to look at your "Warriors Of God" component yet. But was curious could AP votes effect the stats of the units. I was thinking about a crusade component in the future for Rapture. I am thinking about adding units for an entire religion group like all of the Christian denominations maybe. Then have the AP determine the official view of the religion group. So say the AP declares a crusade for example....

Anyway just curious. I have not even looked at it yet in the game.
 
The religions itself in the ReligionsInfos and the buildings are also named in that way?



:confused:
Did you change anything compared to vanilla organized religion?

No and, just looked again and i think a civ made a monk is why? I dont know for sure, sorry.:crazyeye:

I redid a certain part, so let me re-start a new game and see what happens, ok.
 
I have not had a chance to look at your "Warriors Of God" component yet.

I guess, it's better so ;).
Everybody who knows python, will get a real horror, if he looks at the files :blush:.

But was curious could AP votes effect the stats of the units. I was thinking about a crusade component in the future for Rapture. I am thinking about adding units for an entire religion group like all of the Christian denominations maybe. Then have the AP determine the official view of the religion group. So say the AP declares a crusade for example....

Anyway just curious. I have not even looked at it yet in the game.

You mean, you want to attach an effect to resolutions?

I've looked right now at the API, i can't see a function, which can check for a resolution :(.

No and, just looked again and i think a civ made a monk is why? I dont know for sure, sorry.:crazyeye:

I redid a certain part, so let me re-start a new game and see what happens, ok.

I hope, it'll work.





I've re-uploaded the Monsanto-wonder, i've fixed the problem with it.

Problem:
Spoiler :
The problem was, that the AI doesn't understand, that there can be multiple worker units.
It'll just see, that the genetic corn farm doesn't have any tech-prerequisite, and tries to build them everywhere with the normal worker. But you know, normal workers can't build the improvement. So the AI will just not build any improvements on the plots.



Solution:
Spoiler :
I've attached the improvement to a fake technologie. The technologie GEN_CORN is not visibile in the tech treek and can't be researched. After building the wonder, you'll get the technology, but it will not be mentioned, the player will not see it. I've tried to remove the technology after the last improvement was build, but it seems, that it does not work :dunno:. But shouldn't be a problem at this point of the game.




I've also uploaded a small component:
Love And Hate
It allows you to adjust the relations of leaders and civilizations, when they meet each other.
It has two parts in the CvEventManager, both are labeled with "love and hate".
Is probably not very useful for a normal mod, more for a scenario type of mod.

It was requested more than one time, so i decided just to do it, so that i don't have to explain it every time new, how to do it.
 
You mean, you want to attach an effect to resolutions?

I've looked right know at the API, i can't see a function, which can check for a resolution :(.

Thanks for the quick response. Yes was thinking that. Darn. Well I will have to look at the idea of adding some SDK then if it is possible at all.
 
OK tried out your Monsanto, and i keep getting an error, so heres what i found out?

you have:

Spoiler :
Code:
###Monsanto - GenCorn Part 1 End ###                
                                        
		if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == 

gc.getGame().getActivePlayer()) and 

isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):


I changed it to and it works:


Spoiler :

Code:
###Monsanto - GenCorn Part 1 End ###                
                                        
		[B]#[/B]if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == 

gc.getGame().getActivePlayer()) and 

isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
 
OK tried out your Monsanto, and i keep getting an error, so heres what i found out?

I guess, when you've copied the code over, the intendation of the next line was screwed up.
The if in this line should be at the same level like the if from the monsanto building, please check that.
And yes, it works, but now the AI will also see the wonder movies :D.
 
Code:
                        	for iCity in range(1):
                               		pCity = pPlayer.getCity(iCity)
        				iX =pCity.getX()
        				iY = pCity.getY()

the respawn promotion will probably cause python errors when your capital gets conquered. any other way to get the capital city by checking for the palace for example?
 
Top Bottom