mana_pool 
An abstract representation of collections of mana, as it's impossible to represent each individual mana unit
Vars | |
| amount | The abstract representation of how many "Vols" this mana pool currently contains. Capped at [maximum_mana_capacity], begins decaying exponentially when above [softcap]. |
|---|---|
| attunements | A abstract representation of the attunements of [amount]. This is just an abstraction of the overall bias of all stored mana - in reality, every Vol has its own attunement. |
| attunements_to_generate | If we have an ethereal recharge rate,i ths is the attunement set that will be given to the generated mana. |
| discharge_destinations | The mana pool types we will try to discharge excess mana (from exponential decay) into. Uses defines from magic_charge_bitflags.dm. |
| discharge_method | The priority method we will use to transfer mana to [discharge_destination] mana pools. Any given type does not guarantee all destinations will receive mana if they are full. Uses defines from magic_charge_bitflags.dm. |
| donation_budget_this_tick | The maximum mana we can transfer for this tick. Is used to cap our mana output per tick. Calculated with [max_donation_rate_per_second] * seconds_per_tick. |
| ethereal_recharge_rate | The natural regen rate, detached from transferrals. Mana generated via this comes from nothing. Has nothing to do with the ethereal species. |
| exponential_decay_divisor | The divisor used in exponential decay when [amount] surpasses [softcap]. Lower = A steeper decay curve. |
| intrinsic_recharge_sources | The intrinsic sources of mana we will constantly try to draw from. Uses defines from magic_charge_bitflags.dm. |
| max_donation_rate_per_second | The maximum mana we can transfer per second. [donation_budget_per_tick] is set to this, times seconds_per_tick, every process tick. |
| maximum_mana_capacity | The absolute maximum [amount] we can hold. Under no circumstances should [amount] ever exceed this value. |
| softcap | The threshold at which mana begins decaying exponentially. |
| transfer_caps | List of (mana_pool -> max mana we will give) |
| transfer_default_softcap | If true, if no cap is specified, we only go up to the softcap of the target when transferring |
| transfer_method | The priority method we will use to transfer mana to all that we are trying to transfer into. Uses defines from magic_charge_bitflags.dm |
| transfer_rates | List of (mana_pool -> transfer rate) |
| transferring_from | List of mana_pools transferring to us |
| transferring_to | List of (mana_pool -> mana_pool_process_bitflags). Holds pools we are transferring to. |
Procs | |
| adjust_mana | The proc used to modify the mana composition of a mana pool. Should modify attunements in proportion to the ratio between the current amount of mana we have and the mana coming in/being removed, as well as the attunements. Mana pools in general will eventually be refactored to be lists of individual mana pieces with unchanging attunements, so this is not permanent. Returns how much of "amount" was used. |
| get_attuned_amount | Returns an adjusted amount of "effective" mana, affected by the attunements. Will always return a minimum of zero and a maximum of the total amount of mana we can give multiplied by the mults. |
| get_overall_attunement_mults | Returns the combined attunement mults of all entries in the argument. |
| get_transfer_rate_for | Returns the amount of mana we want to give in a given tick |
| transfer_mana_to | Perform a "natural" transfer where we use the default transfer rate, capped by the usual math |
Var Details
amount 
The abstract representation of how many "Vols" this mana pool currently contains. Capped at [maximum_mana_capacity], begins decaying exponentially when above [softcap].
attunements 
A abstract representation of the attunements of [amount]. This is just an abstraction of the overall bias of all stored mana - in reality, every Vol has its own attunement.
attunements_to_generate 
If we have an ethereal recharge rate,i ths is the attunement set that will be given to the generated mana.
discharge_destinations 
The mana pool types we will try to discharge excess mana (from exponential decay) into. Uses defines from magic_charge_bitflags.dm.
discharge_method 
The priority method we will use to transfer mana to [discharge_destination] mana pools. Any given type does not guarantee all destinations will receive mana if they are full. Uses defines from magic_charge_bitflags.dm.
donation_budget_this_tick 
The maximum mana we can transfer for this tick. Is used to cap our mana output per tick. Calculated with [max_donation_rate_per_second] * seconds_per_tick.
ethereal_recharge_rate 
The natural regen rate, detached from transferrals. Mana generated via this comes from nothing. Has nothing to do with the ethereal species.
exponential_decay_divisor 
The divisor used in exponential decay when [amount] surpasses [softcap]. Lower = A steeper decay curve.
intrinsic_recharge_sources 
The intrinsic sources of mana we will constantly try to draw from. Uses defines from magic_charge_bitflags.dm.
max_donation_rate_per_second 
The maximum mana we can transfer per second. [donation_budget_per_tick] is set to this, times seconds_per_tick, every process tick.
maximum_mana_capacity 
The absolute maximum [amount] we can hold. Under no circumstances should [amount] ever exceed this value.
softcap 
The threshold at which mana begins decaying exponentially.
transfer_caps 
List of (mana_pool -> max mana we will give)
transfer_default_softcap 
If true, if no cap is specified, we only go up to the softcap of the target when transferring
transfer_method 
The priority method we will use to transfer mana to all that we are trying to transfer into. Uses defines from magic_charge_bitflags.dm
transfer_rates 
List of (mana_pool -> transfer rate)
transferring_from 
List of mana_pools transferring to us
transferring_to 
List of (mana_pool -> mana_pool_process_bitflags). Holds pools we are transferring to.
Proc Details
adjust_mana
The proc used to modify the mana composition of a mana pool. Should modify attunements in proportion to the ratio between the current amount of mana we have and the mana coming in/being removed, as well as the attunements. Mana pools in general will eventually be refactored to be lists of individual mana pieces with unchanging attunements, so this is not permanent. Returns how much of "amount" was used.
get_attuned_amount
Returns an adjusted amount of "effective" mana, affected by the attunements. Will always return a minimum of zero and a maximum of the total amount of mana we can give multiplied by the mults.
get_overall_attunement_mults
Returns the combined attunement mults of all entries in the argument.
get_transfer_rate_for
Returns the amount of mana we want to give in a given tick
transfer_mana_to
Perform a "natural" transfer where we use the default transfer rate, capped by the usual math