skillchip
Vars | |
abstract_parent_type | Used to determine if this is an abstract type or not. If this is meant to be an abstract type, set it to the type's path. Will be overridden by subsequent abstract parents. |
---|---|
activate_message | Message shown when activating the chip |
active | Set to TRUE when the skill chip's effects are applied. Set to FALSE when they're not. |
auto_traits | Traits automatically granted by this chip, optional. Lazylist. |
chip_category | Category string. Used alongside SKILLCHIP_RESTRICTED_CATEGORIES flag to make a chip incompatible with chips from another category. |
chip_cooldown | Cooldown for chip actions. |
complexity | How complex the skillchip is. Brains can only handle so much complexity at once and skillchips will start to deactivate when the brain's complexity limit is exceeded. |
cooldown | Cooldown before the skillchip can be extracted after it has been implanted. |
deactivate_message | Message shown when deactivating the chip |
holding_brain | Brain that holds this skillchip. |
incompatibility_list | List of any incompatible categories. |
skill_description | Skill description shown on UI |
skill_icon | Fontawesome icon show on UI, list of possible icons https://fontawesome.com/icons?d=gallery&m=free |
skill_name | Skill name shown on UI |
skillchip_flags | Variable for flags. DANGEROUS - Child types overwrite flags instead of adding to them. If you change this, make sure all child types have the appropriate flags set too. |
slot_use | How many slots taken up in the brain by this chip. Max brain slots are hard set and should not be changed at all. |
Procs | |
get_chip_data | Returns a list of basic chip info. Used by the skill station. |
get_complexity | Returns the chip's complexity. |
get_metadata | Gets key metadata from this skillchip in an assoc list. |
has_activate_incompatibility | Checks whether a given skillchip has an incompatibility with a brain that should render it impossible to activate. |
has_brain_incompatibility | Performs a full sweep of checks that dictate if this chip can be implanted in a given brain. |
has_mob_incompatibility | Performs a full sweep of checks that dictate if this chip can be implanted in a given target. |
has_skillchip_incompatibility | Checks for skillchip incompatibility with another chip. |
is_active | Returns whether the chip is active. |
is_on_cooldown | Returns whether the chip is on cooldown. Chips ordinarily go on cooldown when activated. |
item_action_slot_check | We don't grant actions outside of being activated when implanted |
on_activate | Called when a skillchip is activated. |
on_deactivate | Called when a skillchip is deactivated. |
on_implant | Called when a skillchip is inserted in a user's brain. |
on_removal | Called when a skillchip is removed from the user's brain. |
set_metadata | Sets key metadata for this skillchip from an assoc list. |
try_activate_skillchip | Activates the skillchip, if possible. |
try_deactivate_skillchip | Deactivates the skillchip, if possible. |
Var Details
abstract_parent_type
Used to determine if this is an abstract type or not. If this is meant to be an abstract type, set it to the type's path. Will be overridden by subsequent abstract parents.
activate_message
Message shown when activating the chip
active
Set to TRUE when the skill chip's effects are applied. Set to FALSE when they're not.
auto_traits
Traits automatically granted by this chip, optional. Lazylist.
chip_category
Category string. Used alongside SKILLCHIP_RESTRICTED_CATEGORIES flag to make a chip incompatible with chips from another category.
chip_cooldown
Cooldown for chip actions.
complexity
How complex the skillchip is. Brains can only handle so much complexity at once and skillchips will start to deactivate when the brain's complexity limit is exceeded.
cooldown
Cooldown before the skillchip can be extracted after it has been implanted.
deactivate_message
Message shown when deactivating the chip
holding_brain
Brain that holds this skillchip.
incompatibility_list
List of any incompatible categories.
skill_description
Skill description shown on UI
skill_icon
Fontawesome icon show on UI, list of possible icons https://fontawesome.com/icons?d=gallery&m=free
skill_name
Skill name shown on UI
skillchip_flags
Variable for flags. DANGEROUS - Child types overwrite flags instead of adding to them. If you change this, make sure all child types have the appropriate flags set too.
slot_use
How many slots taken up in the brain by this chip. Max brain slots are hard set and should not be changed at all.
Proc Details
get_chip_data
Returns a list of basic chip info. Used by the skill station.
get_complexity
Returns the chip's complexity.
Intended to be overriden.
get_metadata
Gets key metadata from this skillchip in an assoc list.
If you override this proc, don't forget to also override set_metadata, which takes the output of this proc and uses it to set the metadata. Does not copy over any owner or brain status. Handle that externally.
has_activate_incompatibility
Checks whether a given skillchip has an incompatibility with a brain that should render it impossible to activate.
Returns a string with an explanation if the chip is not activatable. FALSE otherwise. Arguments:
- skillchip - The skillchip you're intending to activate. Does not activate the chip.
has_brain_incompatibility
Performs a full sweep of checks that dictate if this chip can be implanted in a given brain.
Override this with any snowflake chip checks. Returns TRUE if the chip is fully compatible, FALSE otherwise. Arguments:
- brain - The brain to check for implantability with.
has_mob_incompatibility
Performs a full sweep of checks that dictate if this chip can be implanted in a given target.
Override this with any snowflake chip checks. An example of which would be checking if a target is mindshielded if you've got a special security skillchip. Returns a string with an incompatibility explanation if the chip is not compatible, returns FALSE if it is compatible. Arguments:
- target - The mob to check for implantability with.
has_skillchip_incompatibility
Checks for skillchip incompatibility with another chip.
Does this skillchip have incompatibility with the skillchip in the args? Override this with any snowflake chip-vs-chip incompatibility checks. Returns a string with an incompatibility explanation if the chip is not compatible, returns FALSE if it is compatible. Arguments:
- skillchip - The skillchip to test for incompatability.
is_active
Returns whether the chip is active.
Intended to be overriden. Returns TRUE if the chip is active.
is_on_cooldown
Returns whether the chip is on cooldown. Chips ordinarily go on cooldown when activated.
This does not mean the chip should be impossible to do anything with. It's up to each individual piece of code to decide what it does with the result of this proc.
Returns TRUE if the chip's extraction cooldown hasn't yet passed.
item_action_slot_check
We don't grant actions outside of being activated when implanted
on_activate
Called when a skillchip is activated.
Arguments:
- user - The user to apply skillchip effects to.
- silent - Boolean. Whether or not an activation message should be shown to the user.
on_deactivate
Called when a skillchip is deactivated.
Arguments:
- user - The user to remove skillchip effects from.
- silent - Boolean. Whether or not a deactivation message should be shown to the user.
on_implant
Called when a skillchip is inserted in a user's brain.
Arguments:
- owner_brain - The brain that this skillchip was implanted in to.
on_removal
Called when a skillchip is removed from the user's brain.
Always deactivates the skillchip. Arguments:
- user - The user to remove skillchip effects from.
- silent - Boolean. Whether or not a deactivation message should be shown to the user.
set_metadata
Sets key metadata for this skillchip from an assoc list.
Best used with the output from get_metadata() of another chip. If you override this proc, don't forget to also override get_metadata, which is where you should usually get the assoc list that feeds into this proc. Does not set any owner or brain status. Handle that externally. Arguments: metadata - Ideally the output of another chip's get_metadata proc. Assoc list of metadata.
try_activate_skillchip
Activates the skillchip, if possible.
Returns a message containing the reason if activation is not possible. Arguments:
- silent - Boolean. Whether or not an activation message should be shown to the user.
- force - Boolean. Whether or not to just force de-activation if it would be prevented for any reason.
try_deactivate_skillchip
Deactivates the skillchip, if possible.
Returns a message containing the reason if deactivation is not possible. Arguments:
- silent - Boolean. Whether or not an activation message should be shown to the user.
- force - Boolean. Whether or not to just force de-activation if it would be prevented for any reason.
- brain_owner - the owner var of the brain is set to null on organ/on_mob_remove(), so we need this if owner is null.