Line 39: |
Line 39: |
| The available events are documented below. | | The available events are documented below. |
| | | |
− | ===Content events=== | + | ===Content=== |
| <tt>ContentEvents</tt> are raised when the game loads content from its XNB files or changes locale. | | <tt>ContentEvents</tt> are raised when the game loads content from its XNB files or changes locale. |
| {| class="wikitable" | | {| class="wikitable" |
Line 48: |
Line 48: |
| |} | | |} |
| | | |
− | ===Control events=== | + | ===Control=== |
| <tt>ControlEvents</tt> are raised when the player uses a controller, keyboard, or mouse. They're raised before the game handles the input, so it's possible to selectively prevent the game from responding to it. (That's beyond the scope of this guide, but it involves overwriting <tt>Game1.oldKBState</tt>, <tt>Game1.oldMouseState</tt>, and <tt>Game1.oldPadState</tt>.) | | <tt>ControlEvents</tt> are raised when the player uses a controller, keyboard, or mouse. They're raised before the game handles the input, so it's possible to selectively prevent the game from responding to it. (That's beyond the scope of this guide, but it involves overwriting <tt>Game1.oldKBState</tt>, <tt>Game1.oldMouseState</tt>, and <tt>Game1.oldPadState</tt>.) |
| | | |
Line 70: |
Line 70: |
| |} | | |} |
| | | |
− | ===Game events=== | + | ===Game=== |
| <tt>GameEvents</tt> are raised when the game changes state. | | <tt>GameEvents</tt> are raised when the game changes state. |
| | | |
Line 94: |
Line 94: |
| |} | | |} |
| | | |
− | ===Graphics events=== | + | ===Graphics=== |
| <tt>GraphicsEvents</tt> are raised during the game's draw loop, when the game is rendering content to the window. | | <tt>GraphicsEvents</tt> are raised during the game's draw loop, when the game is rendering content to the window. |
| | | |
Line 110: |
Line 110: |
| |} | | |} |
| | | |
− | ===Input events=== | + | ===Input=== |
| <tt>InputEvents</tt> are raised when the player uses a controller, keyboard, or mouse. | | <tt>InputEvents</tt> are raised when the player uses a controller, keyboard, or mouse. |
| | | |
Line 135: |
Line 135: |
| </table> | | </table> |
| | | |
− | ===Location events=== | + | ===Location=== |
| <tt>LocationEvents</tt> are raised when the player transitions between game locations, a location is added or removed, or the objects in the current location change. | | <tt>LocationEvents</tt> are raised when the player transitions between game locations, a location is added or removed, or the objects in the current location change. |
| | | |
Line 163: |
Line 163: |
| |} | | |} |
| | | |
− | ===Menu events=== | + | ===Menu=== |
| <tt>MenuEvents</tt> are raised when a game menu is opened or closed (including internal menus like the title screen). | | <tt>MenuEvents</tt> are raised when a game menu is opened or closed (including internal menus like the title screen). |
| | | |
Line 175: |
Line 175: |
| |} | | |} |
| | | |
− | ===Mine events=== | + | ===Mine=== |
| <tt>MineEvents</tt> are raised when something happens in [[The Mines]]. | | <tt>MineEvents</tt> are raised when something happens in [[The Mines]]. |
| | | |
Line 185: |
Line 185: |
| |} | | |} |
| | | |
− | ===Multiplayer events=== | + | ===Multiplayer=== |
| {{SMAPI upcoming|2.6}} | | {{SMAPI upcoming|2.6}} |
| | | |
Line 199: |
Line 199: |
| |} | | |} |
| | | |
− | ===Player events=== | + | ===Player=== |
| <tt>PlayerEvents</tt> are raised when the player data changes. | | <tt>PlayerEvents</tt> are raised when the player data changes. |
| | | |
Line 213: |
Line 213: |
| |} | | |} |
| | | |
− | ===Save events=== | + | ===Save=== |
| <tt>SaveEvents</tt> are raised when the player saves or loads the game. | | <tt>SaveEvents</tt> are raised when the player saves or loads the game. |
| | | |
Line 229: |
Line 229: |
| |} | | |} |
| | | |
− | ===Time events=== | + | ===Time=== |
| <tt>TimeEvents</tt> are raised when the in-game date or time changes. | | <tt>TimeEvents</tt> are raised when the in-game date or time changes. |
| | | |
Line 241: |
Line 241: |
| |} | | |} |
| | | |
− | ===Specialised events=== | + | ===Specialised=== |
| <tt>SpecialisedEvents</tt> serve specialised edge cases and should not be used by most mods. Mods using specialised events will be flagged in the SMAPI console as potentially impacting the game stability. | | <tt>SpecialisedEvents</tt> serve specialised edge cases and should not be used by most mods. Mods using specialised events will be flagged in the SMAPI console as potentially impacting the game stability. |
| | | |