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_atom_types | If set, required_atoms checks for these exact types and doesn't allow them to be ingredients. |
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 |
is_starting_knowledge | If this is considered starting knowledge, TRUE if yes |
name | Name of the knowledge, shown to the heretic. |
poll_ignore_define | Determines what kind of monster ghosts will ignore from here on out. Defaults to POLL_IGNORE_HERETIC_MONSTER, but we define other types of monsters for more granularity. |
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' |
research_tree_icon_path | In case we want to override the default UI icon getter and plug in our own icon instead. if research_tree_icon_path is not null, research_tree_icon_state must also be specified or things may break |
result_atoms | Paired with above. If set, the resulting spawned atoms upon ritual completion. |
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 | |
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. |
summon_ritual_mob | Creates the ritual mob and grabs a ghost for it |
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.
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
is_starting_knowledge
If this is considered starting knowledge, TRUE if yes
name
Name of the knowledge, shown to the heretic.
poll_ignore_define
Determines what kind of monster ghosts will ignore from here on out. Defaults to POLL_IGNORE_HERETIC_MONSTER, but we define other types of monsters for more granularity.
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'
research_tree_icon_path
In case we want to override the default UI icon getter and plug in our own icon instead. if research_tree_icon_path is not null, research_tree_icon_state must also be specified or things may break
result_atoms
Paired with above. If set, the resulting spawned atoms upon ritual completion.
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 if 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
- our_heretic - The antag datum of who gained us. This should never be null.
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
- our_heretic - The antag datum of who is losing us. This should never be null.
on_research
-
Called when the knowledge is first researched.
-
This is only ever called once per heretic.
-
Arguments
-
- user - The heretic who researched something
-
- our_heretic - The antag datum of who researched us. This should never be null.
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
- 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
summon_ritual_mob
Creates the ritual mob and grabs a ghost for it
- user - the mob doing the summoning
- loc - where the summon is happening
- mob_to_summon - either a mob instance or a mob typepath