[Religion and Revolution]: Events

orlanth

Storm God. Yarr!
Joined
Nov 17, 2001
Messages
1,805
Here are some possible additional random Events. (I may wait to add a large set of new ones, since I'd like to have some with options that are unlocked with a Tech or Native Knowledge.) I'd also like to add a set of simple quest type events where your king demands 100 of a given Yield type; still need to figure out the details of how to do that.

Overfishing
A change in the currents has disrupted usual spawning patterns, and fishermen trawling from the ports of %s2_city are hauling in an unusually rich catch. Although seasonal yields are booming, local elders grumble that such intense harvesting may jeopardize the catch in years to come.
* Obstreporous nonsense! Spread wide the nets! +100 food in city, +25 gold. Permanent -1 food on tile.
* Verily, we must be wise stewards of the sea. Let us set strict limits for the remainder of the season. No impact

Foreign Prospectors
Attacted by wild rumors of rich local silver deposits, independent foreign prospectors have been pouring into the hills near %s2_city.
* Sell claim deeds to the more prosperous miners in exchange for a large share of the first year's profits. +0 to 500 gold. -2 silver on tile
* Sell claim deeds to the more prosperous miners, demanding all the money up front. +200 gold. -2 silver on tile
* Pay to outfit them with the finest equipment, as long as they agree to become our loyal subjects. -100 gold. +1 Expert Silver Miner
* Run them out of town! This silver is mine alone! no effect

Witch Trial
The townsfolk are whispering that a large family of recent immigrants to %s2_city are suspected to be witches! They keep to themselves, grow strange roots in cottage gardens, and don't attend church on Sundays. One of them even has a birthmark!
* This is superstitious nonsense. Of course they are welcome in our community, birthmarks or no. +1 Expert Sugar Planter.
* A grave accusation that must be taken seriously! Impound them, and send for a learned expert from Europe to deliberate the matter. -500 gold. +1 Firebrand Preacher
* Throw them all into the river. If they float, they are surely agents of the devil! If not at least we have proved our piety. +100 Religion FF points
 
Becalmed!
Sir, our ship has become adrift in the Doldrums.. The sails hang slack, the men are restless as rum and water grow short!
* Put every man to an oar, and spare not the lash! We must reach land as soon as possible! +10% damage, immobile for 1 turn
* Take advantage of the time to drill the men hard and polish the ship from stem to stern! +10% damage, +5 Experience, immobile for 4 turns
* What will be, will be.. send the men below decks to rest and conserve rations till the winds fill our sails. immobile for 3 turns
 
Comandeered
Your Lordship, the Royal Navy has requisitioned one of our finest ships to aid in his campaign against the Barbary Pirates. How shall we respond?
We are duty bound to answer. The ship is theirs. -1 Frigate, +1 relation with King
Let them build their own ships! We cannot foresake the defense of our shores. -1 relation with King

if option 1 chosen, after 30 turns:
The Royal Navy has returned our Frigate, somewhat the worse for wear, though with a generous share of booty in her hold! +1 Frigate , +1 to 200 gold


I'm not sure of how to code a diplo modifier to your King in Events.. any tutorials or tips for this?
 
Hi Orlanth! I'm impressed. :goodjob:
-Overfishing
-Foreign Prospectors
-Witch Trial
I really like these events. :)

Here are some possible additional random Events. (I may wait to add a large set of new ones, since I'd like to have some with options that are unlocked with a Tech or Native Knowledge.) I'd also like to add a set of simple quest type events where your king demands 100 of a given Yield type; still need to figure out the details of how to do that.
As I said I really like your three events... But I EVEN like more the idea of simple quests with kings demand ;)
I even wondered once if he could ask for a specific unit: converted natives. I was wondering if we could have a reward for "selling" to him a converted native...
 
Becalmed!
Sir, our ship has become adrift in the Doldrums.. The sails hang slack, the men are restless as rum and water grow short!
* Put every man to an oar, and spare not the lash! We must reach land as soon as possible! +10% damage, immobile for 1 turn
* Take advantage of the time to drill the men hard and polish the ship from stem to stern! +10% damage, +5 Experience, immobile for 4 turns
* What will be, will be.. send the men below decks to rest and conserve rations till the winds fill our sails. immobile for 3 turns
Great! But I would like these events to be combined with our weather features. Are you ok with this? I mean this event would be triggered on a specific kind of terrain feature (winds or so)...

Comandeered
Your Lordship, the Royal Navy has requisitioned one of our finest ships to aid in his campaign against the Barbary Pirates. How shall we respond?
We are duty bound to answer. The ship is theirs. -1 Frigate, +1 relation with King
Let them build their own ships! We cannot foresake the defense of our shores. -1 relation with King

if option 1 chosen, after 30 turns:
The Royal Navy has returned our Frigate, somewhat the worse for wear, though with a generous share of booty in her hold! +1 Frigate , +1 to 200 gold
That sounds great!
I'm not sure of how to code a diplo modifier to your King in Events.. any tutorials or tips for this?
Would this help?
http://forums.civfanatics.com/showthread.php?t=329173
http://forums.civfanatics.com/showthread.php?t=353024
 
Ok, I have implemented & uploaded several of the Events. (sorry I didn't realize how to post a notification message.)

Here are a couple other ones including one requested by Robert:


Natives at Court
The Royal Court has been taken with the picturesque garb and customs of certain of our native converts, and has sent for them to be transported to Europe.
* As they wish.. perhaps this will help us to curry favour at Court. +100 gold, +1 relation with King
* These people are human beings, not a museum exhibit! -1 relation with King


A Counterblaste to Tobacco
(triggers when many tobacco industry buildings)
Our beloved monarch has suddenly developed an eccentric opinion that tobacco smoking is somehow injurious to the lungs, even going so far as to publish a pamphlet denouncing the habit. This bizarre idea could ruin our export market!
* As strange and misguided as this may be, we have little choice but to accept it. -2 price of Tobacco/Cigars in Europe. +1 relation with King
* His Highness has clearly taken leave of his senses! We must fund opposing pamphleteers to shout down this preposterous calumny! -100 gold, -1 relation with King

http://en.wikipedia.org/wiki/A_Counterblaste_to_Tobacco

:king::nono::smoke:
 
@orlanth:
Currently any more events in work ?
I would really like to get more of these.
Well, I have been working on a new type of quest Event called a Royal Requisiton, where the King will demand that you produce and deliver 200 units of a certain good. I started with Lumber, I'm hoping to do this using the TAC Events XML parameters so that it will be easy to add a good variety of similar quests configurable with XML. It seems a bit more complicated to implement than I realized though. I have put together a version that I think should work, but I'm having trouble testing it in-game (using ctrl-shift-E to run events, it seems that events sometimes trigger ok and sometimes don't, including the standard ones from TAC.) I will upload the current version to SVN if you want to look at it and see if you're able to locate any problem.
 
Well, I have been working on a new type of quest Event called a Royal Requisiton, where the King will demand that you produce and deliver 200 units of a certain good. I started with Lumber,

Sounds very interesting. :)

I have put together a version that I think should work, but I'm having trouble testing it in-game (using ctrl-shift-E to run events, it seems that events sometimes trigger ok and sometimes don't, including the standard ones from TAC.)

Did you make sure, that you have met all conditions of these events ?

Because "ctrl-shift-E" will only trigger events, where conditions are met.
(At least to my knowledge.)

So if an event requires a unit or a certain amount of goods, you need to create that situation with Worldbuilder
or "ctrl-shift-E" cannot trigger that event.
 
Yes I tried that. EVENTTRIGGER_REQUISITION_LUMBER doesn't have any conditions other than population>5 which I fulfilled, I also tried removing that condition. Some other Events seem to not happen when their condition is met, while some do. For example EVENTTRIGGER_COUNTERBLASTE should be able to trigger when there are 2 or more tobacco buildings, it currently seems to not trigger at all for me, but it did trigger appropriately when I tested a few weeks ago. Some original TAC events are like that too. Very confusing :confused:
 
@orlanth:

Code:
def canTriggerDeliverLumber(argsList):
	ePlayer = argsList[1]
	iCity = argsList[2]
	player = gc.getPlayer(ePlayer)
	king = gc.getPlayer(player.getParent())
	city = player.getCity(iCity)
	if not player.isPlayable():
		return false
	if city.isNone():
		return false
	if not king.isEurope():
		return false
	# Read Parameters 1+2 from the two events and check if enough yield is stored in city
	eEvent1 = gc.getInfoTypeForString("EVENT_DELIVER_LUMBER")
	event1 = gc.getEventInfo(eEvent1)
	iYield1 = gc.getInfoTypeForString("YIELD_LUMBER")
	[COLOR="Red"]if city.getYieldStored(iYield) <= -event1.getGenericParameter(1):[/COLOR]
		return false
	return true

Please change the line in red into:

if city.getYieldStored(iYield) < -event1.getGenericParameter(1):

(the "<=" into "<")

Same thing here:

Code:
def CanDoRequisitionDeliver(argsList):
	eEvent = argsList[0]
	event = gc.getEventInfo(eEvent)
	kTriggeredData = argsList[1]
	iYield1 = gc.getInfoTypeForString("YIELD_LUMBER")
	player = gc.getPlayer(kTriggeredData.ePlayer)
	city = player.getCity(kTriggeredData.iCityId)
	[COLOR="Red"]if city.getYieldStored(iYield) <= -event.getGenericParameter(1) :[/COLOR]
		return false
	return true

This is a pretty common mistake I have seen before. :)
(Because otherwise the Trigger will not need X goods, but X+1 goods.)

Could you eventually check all events for this possible mistake ? :thumbsup:
(I am currently busy with other things.)
 
I noticed that was set negative in TAC, but that's why I had set <iGenericParameter1>-200</iGenericParameter1> to negative -200 to specify that the goods are subtracted. So in that case leaving the trigger at
if city.getYieldStored(iYield) <= -event1.getGenericParameter(1)
should be correct.
 
if city.getYieldStored(iYield) <= -event1.getGenericParameter(1)
should be correct.

No it is not correct. :)

I am not talking about the "-" .)
(Please reread my post again. :thumbsup:)

I am talking about the "<=".
Please exchange that for "<".

if city.getYieldStored(iYield) <= -event1.getGenericParameter(1)

will become

if city.getYieldStored(iYield) < -event1.getGenericParameter(1)

The "=" is problematic.

Because with the "=" the trigger will not be able to trigger at 200 goods.
It can only be successfully triggered at 201 goods.
(Things like that often cause a lot of confusion when testing.)
 
Top Bottom