Events can be basically anything you can create through use of the accessories.xml file. They can be made to fire off after a set range of time or they can be made to occur randomly. Much of the data for an event is stored in the accessories file, the events file mostly contains the coniditions needed to fire off the event. Like most of the optional landscape features, they can be called from either Definition_Files or Texture_Files.
The event files should be located under your game installation's (or mod's) /data/landscapes folder. They are typically named eventsmyfilename.xml, where myfilename is the name of the event or group of events stored in that particular file.
The basic layout of each event file looks like this:
<event> <condition> ... </condition> <action> ... </action> </event> <event> ... </event>
Each event is defined through it's own set of <event></event> tags and all the necessary info for each event is contained within those tags where the "..." are above. More detail on what each event will contain can be found in the following section.
Each <event> tag can contain the following information. Descriptions are in yellow.
The condition tag determines when/how often the event is fired. The condition types available for use are time and random.
<condition type="time"> This condition returns true after a specified range of time passes. <mintime>#</mintime> Minimum amount of time before event can occur, in seconds <maxtime>#</maxtime> Maximum amount of time before event will occur, in seconds <singletimeonly>true/false</singletimeonly> Whether or not the event can occur multiple times per turn </condition>
- OR -
<condition type="random"> Event might occur once per turn based on random chance <randomchance>0 to 1</randomchance> Percent chance of event occuring 0.5 = 50%, 1.0 = 100%, etc <randomdelay>#, in seconds</randomdelay> Amount of time to delay before the event fires </condition>
Type of event to fire. <action type="fireweapon"> Fires a weapon from the accessories file <weapon>WeaponName</weapon> Name of the weapon to fire </action>
Events are a cool way to add some liveliness or motion to your landscapes. Having lightning bolts, meteors, geysers, etc can be a nice enhancement to many landscape themes. Like all the optional landscape features, they are especially powerful when used to compliment the features found in many of the other landscape files.