/tg/ Station 13 - Modules - TypesVar Details - Proc Details

Heretic Knowledge

The datums that allow heretics to progress and learn new spells and rituals.

Heretic Knowledge datums are not singletons - they are instantiated as they are given to heretics, and deleted if the heretic antagonist is removed.

Vars

abstract_parent_typeThe abstract parent type of the knowledge, used in determine mutual exclusivity in some cases
banned_atom_typesIf set, required_atoms checks for these exact types and doesn't allow them to be ingredients.
banned_knowledgeWhat knowledge is incompatible with this. Knowledge in this list cannot be researched with this current knowledge.
costCost of knowledge in knowledge points
descDescription of the knowledge, shown to the heretic. Describes what it unlocks / does.
gain_textWhat's shown to the heretic when the knowledge is aquired
mutually_exclusiveIf TRUE, populates the banned_knowledge list of every other subtype of this knowledge's abstract_parent_type
nameName of the knowledge, shown to the heretic.
next_knowledgeThe knowledge this unlocks next after learning.
priorityThe priority of the knowledge. Higher priority knowledge appear higher in the ritual list. Number itself is completely arbitrary. Does not need to be set for non-ritual knowledge.
required_atomsAssoc list of [typepaths we need] to [amount needed]. If set, this knowledge allows the heretic to do a ritual on a transmutation rune with the components set. If one of the items in the list is a list, it's treated as 'any of these items will work'
result_atomsPaired with above. If set, the resulting spawned atoms upon ritual completion.
routeWhat path is this on. If set to "null", assumed to be unreachable (or abstract).

Procs

can_be_invokedDetermines if a heretic can actually attempt to invoke the knowledge as a ritual. By default, we can only invoke knowledge with rituals associated.
cleanup_atomsCalled after on_finished_recipe returns TRUE and a ritual was successfully completed.
on_finished_recipeCalled whenever the knowledge's associated ritual is completed successfully.
on_gainCalled when the knowledge is applied to a mob. This can be called multiple times per heretic, in the case of bodyswap shenanigans.
on_loseCalled when the knowledge is removed from a mob, either due to a heretic being de-heretic'd or bodyswap memery.
on_researchCalled when the knowledge is first researched. This is only ever called once per heretic.
parse_required_itemParses specific items into a more readble form. Can be overriden by knoweldge subtypes.
recipe_snowflake_checkSpecial check for rituals. Called before any of the required atoms are checked.

Var Details

abstract_parent_type

The abstract parent type of the knowledge, used in determine mutual exclusivity in some cases

banned_atom_types

If set, required_atoms checks for these exact types and doesn't allow them to be ingredients.

banned_knowledge

What knowledge is incompatible with this. Knowledge in this list cannot be researched with this current knowledge.

cost

Cost of knowledge in knowledge points

desc

Description of the knowledge, shown to the heretic. Describes what it unlocks / does.

gain_text

What's shown to the heretic when the knowledge is aquired

mutually_exclusive

If TRUE, populates the banned_knowledge list of every other subtype of this knowledge's abstract_parent_type

name

Name of the knowledge, shown to the heretic.

next_knowledge

The knowledge this unlocks next after learning.

priority

The priority of the knowledge. Higher priority knowledge appear higher in the ritual list. Number itself is completely arbitrary. Does not need to be set for non-ritual knowledge.

required_atoms

Assoc list of [typepaths we need] to [amount needed]. If set, this knowledge allows the heretic to do a ritual on a transmutation rune with the components set. If one of the items in the list is a list, it's treated as 'any of these items will work'

result_atoms

Paired with above. If set, the resulting spawned atoms upon ritual completion.

route

What path is this on. If set to "null", assumed to be unreachable (or abstract).

Proc Details

can_be_invoked

Determines if a heretic can actually attempt to invoke the knowledge as a ritual. By default, we can only invoke knowledge with rituals associated.

Return TRUE to have the ritual show up in the rituals list, FALSE otherwise.

cleanup_atoms

Called after on_finished_recipe returns TRUE and a ritual was successfully completed.

Goes through and cleans up (deletes) all atoms in the selected_atoms list.

Remove atoms from the selected_atoms (either in this proc or in on_finished_recipe) to NOT have certain atoms deleted on cleanup.

Arguments

on_finished_recipe

Called whenever the knowledge's associated ritual is completed successfully.

Creates atoms from types in result_atoms. Override this if you want something else to happen. This CAN sleep, such as for summoning rituals which poll for ghosts.

Arguments

Returns: TRUE, if the ritual should cleanup afterwards, or FALSE, to avoid calling cleanup after.

on_gain

Called when the knowledge is applied to a mob. This can be called multiple times per heretic, in the case of bodyswap shenanigans.

Arguments

on_lose

Called when the knowledge is removed from a mob, either due to a heretic being de-heretic'd or bodyswap memery.

Arguments

on_research

Called when the knowledge is first researched. This is only ever called once per heretic.

Arguments

parse_required_item

Parses specific items into a more readble form. Can be overriden by knoweldge subtypes.

recipe_snowflake_check

Special check for rituals. Called before any of the required atoms are checked.

If you are adding a more complex summoning, or something that requires a special check that parses through all the atoms, you should override this.

Arguments

Returns: TRUE, if the ritual will continue, or FALSE, if the ritual is skipped / cancelled