[BtS] JKP1187's EVENTS

I've noticed that lately my games have been getting a lot of "[civ]'s soldiers come back from war, increase population etc" events popping up in my game, even though no one has gone to war. The closest thing has been barbarian attacks, and even then they were just the regular spawning barbarians (not event-related ones). I've also gotten the "help brothers of the faith" event, but I can only choose the first options because no one is actually at war. :/
 
Sadly, no. However, I am getting the "soldiers returning from war" even though I have never been at war yet.

Hmm. I will take a look at the code tonight, but I did not do anything with this event; it came with the game, so if it's bugged here, it's probably bugged in the vanilla game, too.
 
That's altogether possible. You might want to do a comparison of whatever files are in common between the two mods using a program like WinMerge (which is available free online).
 
The python trigger code for the "BABY BOOM" event should look like this -- it looks okay to me:

Code:
def canTriggerBabyBoom(argsList):
	kTriggeredData = argsList[0]
	player = gc.getPlayer(kTriggeredData.ePlayer)
	team = gc.getTeam(player.getTeam())

	if team.getAtWarCount(true) > 0:
		return false

	for iLoopTeam in range(gc.getMAX_CIV_TEAMS()):
		if iLoopTeam != player.getTeam():
			if team.AI_getAtPeaceCounter(iLoopTeam) == 1:
				return true

	return false

The key appears to be the "if team.AI_getAtPeaceCounter(iLoopTeam) == 1".

It might be better to check your CIV4EventTriggerInfos.xml file to make sure that the trigger is calling "canTriggerBabyBoom" to check to see if the event can be done. If it isn't, the event might just fire anyway without regard to the conditional instructions set forth there.
 
Version 1.11

1.) New Event: V_Ger
2.) Completed translations to French, German, Italian, and Spanish for the rest of the events using Babel Fish. These translations are not perfect, so if you speak one of those languages and can think of a better way to phrase some of the wording, please let me know and I will be glad to make any changes that are necessary.
 
I got one today that was a bit out of place. But it may well be from the original game.

It claimed that a cigarette smoker had caused a fire in a theatre - which is fine, except for the date: 1280 AD!
 
I got one today that was a bit out of place. But it may well be from the original game.

It claimed that a cigarette smoker had caused a fire in a theatre - which is fine, except for the date: 1280 AD!

It's a Firaxis original. The only prerequisite for the event is "TECH_DRAMA". Hey, it's not like people weren't smoking stuff back then.... ;)
 
Working on that idea, maybe you could create some events for the Future War mod.

You mean NextWar? Heh...check the link in the sig....
 
You mean NextWar? Heh...check the link in the sig....
Doh!
Anyway, I'm currently running Wolfshanze's mod with the Inquisition mod (Limited Religion version), Pirates Mod, Water Animals, Flavian Amphitheater, Macchu Pichu, Petra and Forbidden Palace python mods running. I also have a few modular custom civs installed in the mod, but that shouldn't affect the outcome of python code.
 
I've been trying to sort out my problem, and while I haven't been able to conclusively name the culprit, I'm beginning to think that your mod and the Inquisition mod do not get along for some reason. In fact, in the CvEventManager.py file, under the Partisans section, I have to remove the following line:
Code:
if (owner.getCivics (2) == 14):#forces game to check: (2) = LABOR CIVICS, 14 = EMANCIPATION
or many screen pop-ups (like the tech announcements in single player) will not show up at all. You may want to look into the Inquisition mod and see if there are any code conflicts. I know they both edit the CvEventManager file, and Inquisition also edits the GameUtils.py file, but I don't think the latter would cause any trouble.
 
v. 1.15 - just made a very minor change to CvEventManager.py. Shouldn't effect anything, but just wanted to make sure that the code was in exact conformity with the 3.13 code for everything.



@ Xenomorph: the one-line code change I just made here probably won't affect anything, (I just noticed it when I was going through the code on your request) but you might as well give it a try. I cannot see what the conflict would be. Other than that slight alteration to the Partisans code, there is effectively no difference between my CvEventManager.py and the vanilla 3.13 CvEventManager.py. If I were you'd I'd double-check the merge (maybe even just do the merge again) between the two files. Other than that, I'm afraid your best bet is going to be to talk to bmarnz about it.

If you end up removing that one line from the Partisans code, however, you'd better just deactivate the event altogether by setting its trigger weight in the EventTriggerInfos.xml file to "0". Otherwise, the Partisans event will fire *ANYTIME* a city is razed, regardless of civics.
 
Back
Top Bottom