Custom Museum Framework
Triggers, Actions, and Queries
Custom Museum Framework comes with a small handful of triggers, actions, and game state queries for you to use. The actions and queries are of course not limited to only being used in trigger actions and can be used wherever actions and queries are accepted, whether it be dialogue or machine rules or some modded asset or whatever else.
If a parameter is wrapped in < >
then it is a required parameter. If the parameter is wrapped in []
then it is an optional parameter. If the parameter has a +
after it, that means you can provide multiple of that parameter separated by spaces.
Table of Contents
Triggers
Custom Museum Framework adds the following three triggers:
TRIGGER | DESCRIPTION |
---|---|
Spiderbuttons.CMF | Raised whenever a new item is donated to a museum. Both the Input and Target items of this trigger will be a copy of the item in question. The Target location of the trigger will be the museum it was donated to.![]() This trigger will fire for the vanilla museum as well. |
Spiderbuttons.CMF | Raised whenever an item is retrieved from a museum. Both the Input and Target items of this trigger will be a copy of the item in question. The Target location of the trigger will be the museum the item was removed from. |
Spiderbuttons.CMF | Raised whenever a custom Lost Book is found. Both the Input and Target items of this trigger will be a copy of the Lost Book item that was found. The Target location of the trigger will be the museum that the Lost Book belongs to. |
Actions
Custom Museum Framework adds the following three actions:
ACTION | DESCRIPTION |
---|---|
Spiderbuttons.CMF[<MuseumId]>+ [<ItemId]>+ [<X Y]>+ | Donate one ItemId to the museum with the given MuseumId . If X and Y are provided, the ItemId will be placed on the item pedestal at those tile coordinates, otherwise it will be placed in the first available tile. If the museum already contains the ItemId in question, the item does not meet any donation requirements, there are no free item pedestals, or the tile pedestal at the given X and Y coordinates is occupied, this action will do nothing. |
Spiderbuttons.CMF[<MuseumId]>+ [<ItemId]>+ [<X Y]>+ | Donate one ItemId to the museum with the given MuseumId . If X and Y are provided, the ItemId will be placed on the item pedestal at those tile coordinates, otherwise it will be placed in the first available tile. The ItemId will be donated even if the museum already contains one of the ItemId in question or doesn't meet any donation requirements. If X and Y are provided and the item pedestal at those coordinates is already occupied, whatever donation is already there will be overwritten. If X and Y are not provided and there are no free item pedestals, the ItemId will be placed at coordinates 0, 0 |
Spiderbuttons.CMF[<MuseumId]>+ [<ItemId]>+ [<Pop]>+ | Finds the first item in the museum with the given MuseumId that has a matching ItemId and removes it from its item pedestal. If Pop (default true ) is set to false , the item will be deleted. If set to true , the item will pop onto the ground to be picked up by the player. |
Game State Queries
Custom Museum Framework adds the following five game state queries:
QUERY | DESCRIPTION |
---|---|
Spiderbuttons.CMF[<MuseumId]>+ [<Min]>+ [<Max]>+ [<RequirementId]>+ | Returns whether or not the museum with the given MuseumId has between Min (default 1 ) and Max (default -1 ) items donated to it. If Max is set to -1 , the query will only check the Min . If any RequirementId is specified, the query will count how many items donated to the museum satisfy any of the museum requirements whose Ids match one of the given RequirementId . |
Spiderbuttons.CMF[<MuseumId]>+ [<ItemId]>+ | Returns whether or not the museum with the given MuseumId has any item donated that matches one of the given ItemId . If no ItemId is provided, this returns whether or not the museum has any items donated at all. |
Spiderbuttons.CMF[<ItemId]>+ | Returns whether or not the given ItemId has been donated to any custom museum tracked by Custom Museum Framework. |
Spiderbuttons.CMF[<MuseumId]>+ [<BooksetId]>+ [<Min]>+ [<Max]>+ | Returns whether or not the museum with the given MuseumId has between Min (default 1 ) and Max (default -1 ) Lost Books found that belong to the bookset with the given BooksetId . If Max is set to -1 , the query will only check the Min . |
Spiderbuttons.CMF[<MuseumId]>+ [<Min]>+ [<Max]>+ | Returns whether or not the museum with the given MuseumId has between Min (default 1 ) and Max (default -1 ) Lost Books found that belong to any bookset. If Max is set to -1 , the query will only check the Min . |