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_type | The abstract parent type of the knowledge, used in determine mutual exclusivity in some cases |
---|---|
banned_knowledge | What knowledge is incompatible with this. Knowledge in this list cannot be researched with this current knowledge. |
cost | Cost of knowledge in knowlege 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. |
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). |
Procs | |
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. |
cleanup_atoms | Called after on_finished_recipe returns TRUE and a ritual was successfully completed. |
on_finished_recipe | Called whenever the knowledge's associated ritual is completed successfully. |
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. |
on_lose | Called when the knowledge is removed from a mob, either due to a heretic being de-heretic'd or bodyswap memery. |
on_research | Called when the knowledge is first researched. This is only ever called once per heretic. |
recipe_snowflake_check | Special 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_knowledge

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

Cost of knowledge in knowlege 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.
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
- selected_atoms - a list of all atoms we intend on destroying.
on_finished_recipe
Called whenever the knowledge's associated ritual is completed successfully.
Creates atoms from types in result_atoms. Override this is you want something else to happen. This CAN sleep, such as for summoning rituals which poll for ghosts.
Arguments
- user - the mob who did the ritual
- selected_atoms - an list of atoms chosen as a part of this ritual.
- loc - the turf the ritual's occuring on
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
- user - the heretic which we're applying things to
on_lose
Called when the knowledge is removed from a mob, either due to a heretic being de-heretic'd or bodyswap memery.
Arguments
- user - the heretic which we're removing things from
on_research
Called when the knowledge is first researched. This is only ever called once per heretic.
Arguments
- user - the heretic who researched something
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
- user - the mob doing the ritual
- atoms - a list of all atoms being checked in the ritual.
- selected_atoms - an empty list(!) instance passed in by the ritual. You can add atoms to it in this proc.
- loc - the turf the ritual's occuring on
Returns: TRUE, if the ritual will continue, or FALSE, if the ritual is skipped / cancelled