Actions are the activities you can choose from when you click on a building. You add them to your mod with an .lpaction file.
- ACTION_UNIQUEID: It is the ID for the action. Scenes use this to figure out if they should be triggered during this action or not.
- ACTION_NAME: It is how the action is displayed in the list of choices for the building.
- WHERE: It contains the locations where the action is available. See Docs/Modding/Lists/All_wheres.txt
- WHEN: It contains a time range during which the action is available. This can also roll over from one day to the next: 22 - 4
- MINUTES: It gives you a range to specify or randomize how long the action should take.
- TIMEOUT_MINUTES: It makes it impossible to have the same action again for a specific number of minutes.
- ALSO_TIMEOUT: It contains the IDs of other actions that should also time out for the time stated in TIMEOUT_MINUTES.
- EFFECTS: It contains the effect the action should have on the player's stats. Different flags, between parentheses, mean different things here:
- START: The effect is applied when the action begins
- END: The effect is applied when the action ends
- DURATION: The effect is gradually applied during the action. If the action is aborted early, that means part of the effect has been applied.
- INTERRUPTED: The effect is applied when the action is interrupted
- BUFF: This effect is applied for a certain amount of minutes, for example attractiveness +5 (BUFF:300)
- CONDITIONS: Contains additional conditions (beyond WHERE and WHEN) that need to be true for the action to be available. This is currently limited to checking the value of stats, marked with (STAT_COMPARE).
- MOVE_FIRST: Contains a bool that checks if the player should be moved to the location first before performing the action.
- SCENE_ALWAYS: Lists a scene ID that should immediately trigger when the action is started. It's best to limit this use to action files of your own, rather than modifications of someone else's.
- ANIMATION: Lists animations that should play while the action lasts. Hardly any animations are available for this, but eg sleep.lpaction comes with such an animation.
ACTION_NAME: Have a meal
WHERE: home, work
WHEN: 5.30 - 22.30
MINUTES: 40 - 90
ALSO_TIMEOUT: have_a_snack_in, have_a_snack, have_a_meal_in
EFFECTS: stock_meal -1 (START), mood +3 (END), energy +15 (DURATION), mood -1 (INTERRUPTED)
CONDITIONS: stock_meal >= 0.8 (STAT_COMPARE)