OXCE mod examples: Difference between revisions
Appearance
A list of common modding questions |
No edit summary |
||
| Line 1: | Line 1: | ||
In this page there are several common modding questions answered. It is mostly aimed for beginner modders. | In this page there are several common modding questions answered. It is mostly aimed for beginner modders. | ||
===MAP CREATION=== | |||
===EVENTS=== | |||
Events by themselves just "exist" but are not triggered. To trigger an event, you need an eventScript that runs it. | Events by themselves just "exist" but are not triggered. To trigger an event, you need an eventScript that runs it. The actual event decides what you get when the event happens, but the eventTrigger decides WHEN to run the event, depending on research, items, etc. | ||
'''Q: How do I create an event that runs at the start of the game?''' | |||
events: | events: | ||
Revision as of 10:54, 6 December 2025
In this page there are several common modding questions answered. It is mostly aimed for beginner modders.
MAP CREATION
EVENTS
Events by themselves just "exist" but are not triggered. To trigger an event, you need an eventScript that runs it. The actual event decides what you get when the event happens, but the eventTrigger decides WHEN to run the event, depending on research, items, etc.
Q: How do I create an event that runs at the start of the game?
events:
- name: STR_WELCOME_TO_OXCE #the event is just defined here description: STR_WELCOME_TO_OXCE_DESCRIPTION timer: 500 timerRandom: 0
eventScripts:
- type: STR_WELCOME_TO_OXCE_EVENTSCRIPT #can have the same name as the event, but I added the _EVENTSCRIPT part here to differentiate
eventWeights:
0:
STR_WELCOME_TO_OXCE: 100 #this is the actual event run by the eventScript, it can choose randomly but there is only 1 possibility here
firstMonth: 0
lastMonth: 0 # if firstmonth and lastmonth are 0, the event will run once at the start of the game
executionOdds: 100 #how much chance that this eventscript will run