PDA

View Full Version : Events



Modding Forum
10-23-2006, 01:48
Placeholder

alpaca
11-14-2006, 20:56
After a look through the events file I noticed that some events have two arguments (i.e. two turns are given).
Judging from the events that this is done for (world_is_round, timurids_invasion_warn and similar), I concluded that these turn settings probably give an interval from which one turn is randomly chosen by the game to trigger the event.
As an example:

event historic world_is_round
date 320 328
This would mean that the America's are discovered in between turns 320 and 328

The dates are supplied in years, not in turns. That means the game will be discovered between turns 160 and 164

If anybody's interested, this is how the discovery of America works:

;-- World is round --
monitor_event EventCounter EventCounterType world_is_round
and EventCounter > 0

; unhide America
restrict_strat_radar false
terminate_monitor
end_monitor


;-- America discovered --
monitor_event TileSeen not FactionType aztecs
and not FactionType slave
and IsPositionInRect 0 48 40 141
historic_event america_discovered event/america_discovered.bik
terminate_monitor
end_monitor


;-- Aztecs contacted --
monitor_event ObjSeen TargetFactionType aztecs
and not FactionType slave
unfreeze_faction_ai aztecs
add_events
event counter disable_no_brigands
date 0
event counter disable_no_pirates
date 0
end_add_events
historic_event aztecs_contacted event/aztecs_contacted.bik
terminate_monitor
end_monitor
This means that after the world_is_round event mentioned above, America can be discovered. When somebody sends a ship there, you get another historic_event and afterwards, when somebody sees an Aztec token, the Aztecs are finally activated and another historic event is triggered.

What actually excites me about these are the two new events: ObjSeen and TileSeen that will allow us to create a whole new class of similar discovery events and probably a lot more because we can for example check if an army can see an opposing one, etc. pp.

Niccolo Machiavelli
11-25-2006, 23:56
Thanks - this helped a lot, but since I changed the timescale to 0.5, I just wanted to add that the numbers refer to years after start and not turns. Comes in handy if you want to change the starting date when playing timescale 0.5 and don't want to wait 640-656 turns for america to be discovered, regardless of your starting date (which was what happened to me...).

[edit]: oops - multiplying is hard - corrected the turns needed for america to be discovered on timescale 0.5...

Headlocked
02-11-2007, 12:44
Thanks Niccolo!

I am looking at increasing the number of Historic Events to inhance the feeling of the progress of history...

Rather than just mechanical/scientific events i want to "event" things like Chaucer's Canterbury Tales, the massacre at Cesena, compilation of the Domesday Book, the founding of the Hanseatic league, etc etc.

Someof these are purely timeline-related, but i would like to tie most of them to some construction:
E.g. Hanseatic League- When Bruges, Hamburg, Copenhagen, Stettin 7Thorn all have built Merchants Wharves (no matter who owns).

Any help is much appreciated! :)

Cheers,
HDD

Lopus
02-15-2007, 04:59
Is there a way to script in a war between certain nations?

Re Berengario I
02-15-2007, 10:56
Yes, you have to link the console command diplomatic stance with the firing of an event through a script.