Server Events

From Tygron Support wiki
Jump to navigation Jump to search
Please note: This page is currently being updated.

Template:Learned

What is a Server Event

Main article: Events

Server events are events which are communicated to the server, and may affect all stakeholders. An example of this is the activation of a measure. These events may affect the 3D world and the indicator scores.

How do Server Events relate to the Tygron Engine

Server Events can be used in multiple locations in the Tygron Engine; as part of a measure, at the start of a level, as part of a larger event bundle in the action menu, etc. Server Events allow for events to be triggered during a session, which will result in a reaction from the server.

Different Server Event types

There are two flavors of Server Events: Logic Events and Player Events. The difference between these Event Types is that for Player Events at least one dedicated stakeholder needs to be assigned to the Server Event itself as event property. A good example of this is the asking for or receiving of a money transfer (MONEY_TRANSFER_ASK & MONEY_TRANSFER_GIVE) as a Server Event.

Logic Events do not require such a dedicated stakeholder and can be fired without one being assigned as property. A good example of this is the activation of a specific terrain type (TERRAIN_SET_ACTIVE) when creating a flooding as part of a measure. The event CINEMATIC_STAKEHOLDER_START is also a Logic Event Type, because the stakeholder is not a property of the event, but of the linked cinematic.

Logic Event Types

Below is a list describing available Logic Server Event Types:

ACTION_MENU_SET_FUNCTION_AVAILABLE Add or remove a function from a particular Action Menu
ACTION_MENU_SET_MEASURE_AVAILABLE Add or remove a measure from a particular Action Menu
ACTION_MENU_SET_UPGRADE_AVAILABLE Add or remove an upgrade from a particular Action Menu
BEAMER_SET_LAYER Set the beamer layer to a specific overlay type
CINEMATIC_STAKEHOLDER_START Start a cinematic for a specific stakeholder
CINEMATIC_STAKEHOLDER_STOP Stop any cinematic for a specific stakeholder
LEVEL_SET_ACTIVE Activate a game level
MEASURE_UPDATE_CUSTOM Update a custom made measure
MESSAGE_ACTIVATE Activate a specific message
MESSAGE_REVOKE Revoke a message. Effects are not revoked
MESSAGE_RESET Reset a message. Sets the message as inactive and clears the send date.
SETTINGS_ALLOW_GAME_INTERACTION Allow interaction with the project during a session, after a pause moment or level switch
SETTINGS_SET_MESSAGE_AUTO_RESPOND When activated, messages to non-human players and session facilitators are automatically replied to
SPECIAL_EFFECT_SET_ACTIVE Activate/deactivate a special effect
TERRAIN_SET_ACTIVE Activate/deactivate a terrain
TERRAIN_SET_POLYGON Activate/deactivate a polygon as terrain (Safe Zone, Flood Hazard Zone, etc)
TIME_SET_SIM_MULTIPLIER Set the game time multiplier. A value of 1 means that 1 sec in real life is also 1 sec in simulation time. 2 means 1 sec in real life is 2 sec in simulation time
UNIT_SET_ACTIVE Activate/deactivate a unit (vehicles etc)
WEATHER_SET_DATA Set rain data of the weather
ZOOMLEVEL_SET_ACTIVE Activate or deactivate a zoom level

Player Event Types

Below is a list describing the available Player Event Types:

ACTION_MENU_SET_ACTIVE Set a category of actions available for a stakeholder
MEASURE_CANCEL_CONSTRUCTION Cancel a measure planned by a stakeholder while in pre-construction phase
MEASURE_PLAN_CONSTRUCTION Plan construction of a measure by a stakeholder that is not yet planned
MESSAGE_NEW Send a message between Stakeholders through the message panel
MONEY_TRANSFER_ASK Ask for money from one stakeholder to another
MONEY_TRANSFER_GIVE Give money from one stakeholder to another
SETTINGS_SET_ALLOWED_WATER_LEVEL_INCREASE Set the maximum allowed water rise amount in meters in 'polder water' (= open water)

Adding Server Side Events to a project

Events in the Tygron Platform are instructions to the software. An event has to be predefined. It will only have an effect when the event is fired. A number of occurrences in the Tygron Platform can cause events to be fired. Examples include the planning and canceling of a measure, or applying an event bundle as an action.

An event has a type and parameters, which specify what the effect of the event is. There are many event types, with many different effects.

Events are very basic instructions for the Tygron Platform to execute. For this reason, they can only be predefined by editing users. But by using events, it is possible to make a project more complex and help automate events that occur when activating scenarios.

Where events can be used

Places where events can be triggered are:

Event Bundles

It is also possible to create event bundles. Event bundles are collections of events that can be triggered as one package. The advantage over loose events is that event bundles can be triggered by multiple sources. Event bundles can be used to trigger events at specific points during a cinematic. Additionally, event bundles can also be added to action menus of stakeholders. This means that it's possible to provide users with an option, solely to fire events. This can be useful to let a Stakeholder re-watch a cinematic or to automatically activate multiple measures.

Server events and client events

There are two kinds of events: server events and client events.

Server Events

Main article: Server Events.

Server events are events which are communicated to the server, and may have effects for all stakeholders. An example of this is the activation of a measure. This may affect the project data and the indicator scores; changes which are also visible and possibly important to other stakeholders.

Client Events

Main article: Client Events.

Client events are not communicated to the server and and are usually a graphical effect for the stakeholder who triggered the event. Examples of this include flashing an action menu to draw the user's attention, or the visualization of a weather effect.

Adding and removing event bundles

Editor → Future Design (Ribbon tab) → Event Bundles (Ribbon bar)
The Left Panel allows you to add, remove, and select event bundles.

You can create (empty) event bundles, which events can then be added to. An event bundle which does not contain events can be used as any other event bundle, but will have no effects.

How to add an event bundle:
  1. In the ribbon header, select "Stakeholders".
  2. In the ribbon bar, select "Event Bundles".
  3. In the left panel, select "Add".
How to duplicate an event bundle:
  1. In the ribbon header, select "Stakeholders".
  2. In the ribbon bar, select "Event Bundles".
  3. In the left panel, select the event bundle you wish to duplicate.
  4. In the left panel, select "Duplicate".
How to remove an event bundle:
  1. In the ribbon header, select "Stakeholders".
  2. In the ribbon bar, select "Event Bundles".
  3. In the left panel, select the event bundle you wish to remove.
  4. In the left panel, select "Remove".


Adding, removing and editing events

Because events can be added to, and removed from several types of items in a project, please see the respective articles on those items for more information on where to add and remove events. For example, if you wish to add an event to a measure, please see the article on measures. Similarly, for information on how to connect event bundles to elements in a project, please see the respective articles on those elements for more information.

For the exact steps for adding, removing, and changing events, please see Editing Events.




Events in the Tygron Platform are instructions to the software. An event has to be predefined. It will only have an effect when the event is fired. A number of occurrences in the Tygron Platform can cause events to be fired. Examples include the planning and canceling of a measure, or applying an event bundle as an action.

An event has a type and parameters, which specify what the effect of the event is. There are many event types, with many different effects.

Events are very basic instructions for the Tygron Platform to execute. For this reason, they can only be predefined by editing users. But by using events, it is possible to make a project more complex and help automate events that occur when activating scenarios.

Where events can be used

Places where events can be triggered are:

Event Bundles

It is also possible to create event bundles. Event bundles are collections of events that can be triggered as one package. The advantage over loose events is that event bundles can be triggered by multiple sources. Event bundles can be used to trigger events at specific points during a cinematic. Additionally, event bundles can also be added to action menus of stakeholders. This means that it's possible to provide users with an option, solely to fire events. This can be useful to let a Stakeholder re-watch a cinematic or to automatically activate multiple measures.

Server events and client events

There are two kinds of events: server events and client events.

Server Events

Main article: Server Events.

Server events are events which are communicated to the server, and may have effects for all stakeholders. An example of this is the activation of a measure. This may affect the project data and the indicator scores; changes which are also visible and possibly important to other stakeholders.

Client Events

Main article: Client Events.

Client events are not communicated to the server and and are usually a graphical effect for the stakeholder who triggered the event. Examples of this include flashing an action menu to draw the user's attention, or the visualization of a weather effect.

Adding and removing event bundles

Editor → Future Design (Ribbon tab) → Event Bundles (Ribbon bar)
The Left Panel allows you to add, remove, and select event bundles.

You can create (empty) event bundles, which events can then be added to. An event bundle which does not contain events can be used as any other event bundle, but will have no effects.

How to add an event bundle:
  1. In the ribbon header, select "Stakeholders".
  2. In the ribbon bar, select "Event Bundles".
  3. In the left panel, select "Add".
How to duplicate an event bundle:
  1. In the ribbon header, select "Stakeholders".
  2. In the ribbon bar, select "Event Bundles".
  3. In the left panel, select the event bundle you wish to duplicate.
  4. In the left panel, select "Duplicate".
How to remove an event bundle:
  1. In the ribbon header, select "Stakeholders".
  2. In the ribbon bar, select "Event Bundles".
  3. In the left panel, select the event bundle you wish to remove.
  4. In the left panel, select "Remove".


Adding, removing and editing events

Because events can be added to, and removed from several types of items in a project, please see the respective articles on those items for more information on where to add and remove events. For example, if you wish to add an event to a measure, please see the article on measures. Similarly, for information on how to connect event bundles to elements in a project, please see the respective articles on those elements for more information.

For the exact steps for adding, removing, and changing events, please see Editing Events.



Changing the properties of a Server Side Event in a project