User Events
Current version: 1
Mod component for defining user events to randomly appear in the game.
Events can have one or more available options for the user to choose from, each with a separate set of effects and availability conditions.
Description
The mod is similar to the Random Events mod, but the mod creator can specify the list of events and a set of available options. Basically, it's the functionality of random events from CIV4's mod Fall From Heaven 2. The game checks, whether a given option is available and presents the user with the list of all options. The user can choose any of the available options and the specific effect will be applied.
Example:
"Wandering Wiseman"
A wandering wiseman appears at {name of the capital city} and wants to share some of his knowledge with you in exchange for some gold.
Options:
1. "Ask him to become your advisor.": -250gold, +1 Great Scientist (available only if the player has >= 250 gold)
2. "Ask him to teach some of your advisors": -100gold, random effect (available only if the player has >= 100 gold)
3. "I don't have time nor money for this nonsense!" - no effect (always available)
Another example:
"Parrots"
Citizens of {name of the city} discovered some rare parrots in the near jungle and started to trade them.
This event can only affect the plot with the Jungle feature and only if the player has discovered Animal Husbandry. The only option is to apply the effects of the event (i.e. +1 gold yield from the Jungle plot).
Also, every event can have a different probability or may trigger other events (with probability 0.0 otherwise). Event effects can be delayed (e.g. a unit will be promoted in 2 turns from the event).
Special thanks:
Whys - for SaveUtils
alpaca - for numerous Lua hints/recipes
greyTiger, smellymummy - for code examples
Available in-game (search for "User Events") or attached to this post.
Current version: 1
Mod component for defining user events to randomly appear in the game.
Events can have one or more available options for the user to choose from, each with a separate set of effects and availability conditions.
Description
The mod is similar to the Random Events mod, but the mod creator can specify the list of events and a set of available options. Basically, it's the functionality of random events from CIV4's mod Fall From Heaven 2. The game checks, whether a given option is available and presents the user with the list of all options. The user can choose any of the available options and the specific effect will be applied.
Example:
"Wandering Wiseman"
A wandering wiseman appears at {name of the capital city} and wants to share some of his knowledge with you in exchange for some gold.
Options:
1. "Ask him to become your advisor.": -250gold, +1 Great Scientist (available only if the player has >= 250 gold)
2. "Ask him to teach some of your advisors": -100gold, random effect (available only if the player has >= 100 gold)
3. "I don't have time nor money for this nonsense!" - no effect (always available)
Another example:
"Parrots"
Citizens of {name of the city} discovered some rare parrots in the near jungle and started to trade them.
This event can only affect the plot with the Jungle feature and only if the player has discovered Animal Husbandry. The only option is to apply the effects of the event (i.e. +1 gold yield from the Jungle plot).
Also, every event can have a different probability or may trigger other events (with probability 0.0 otherwise). Event effects can be delayed (e.g. a unit will be promoted in 2 turns from the event).
Special thanks:
Whys - for SaveUtils
alpaca - for numerous Lua hints/recipes
greyTiger, smellymummy - for code examples
Available in-game (search for "User Events") or attached to this post.