SMODS.Tag - Breezebuilder/Steamodded-Wiki GitHub Wiki
API Documentation: SMODS.Tag
Class prefix: tag
- Required parameters:
keyloc_txtor localization entry (reference)
- Optional parameters (defaults):
atlas = 'tags', pos = { x = 0, y = 0 }(reference)config = {}, discovered = false, no_collection, prefix_config, dependencies(reference)min_ante: Minimum ante needed for this tag to appear. Use in_pool for more advanced spawn restrictions instead.
API methods
loc_vars, generate_ui(reference)in_pool(self, args) -> bool, { allow_duplicates = bool }- Define custom logic for when a tag is allowed to spawn. A tag can spawn if
in_poolreturns true and all other checks are met. - When called from
generate_card_ui, the_appendkey is passed asargs.source.
- Define custom logic for when a tag is allowed to spawn. A tag can spawn if
apply(self, tag, context)- This function defines the tag's behavior when triggering. Unlike vanilla tags, this function is not restricted by
self.config.typematchingcontext.type, meaning you have to check context manually.- To trigger the tag, you should call
tag:yep(message, colour, func)and settag.triggered = true. messageis the string to display upon trigger,colouris the colour of the message box,funcis a function that gets executed as an event before the used tag gets removed. This function should always returntrue.
- To trigger the tag, you should call
- This function defines the tag's behavior when triggering. Unlike vanilla tags, this function is not restricted by
set_ability(self, tag)- This function allows you to store any additional information your tag may need when it is created. Values should be stored within
tag.ability.
- This function allows you to store any additional information your tag may need when it is created. Values should be stored within