growth_and_differentiation
Growth and Differentiation Component: Used to randomly "grow" a creature into a new entity over its lifespan.
If we are passed a typepath, we will 100% grow into that type. However, if we are not passed a typepath, we will pick one from a subtype of the parent we were applied to!
Vars | |
growth_path | What this mob turns into when fully grown. |
---|---|
growth_probability | Integer - Probability we grow per SPT_PROB |
growth_time | Failover for how much time we have until we fully grow. If passed as null, we eschew setting up the timer. Remember: We can grow earlier than this if the randomness rolls turn out to be in our favor though! |
initial_growth_probability | Stores the growth_probability the component had when it was Initialized |
lower_growth_value | Integer - The lower bound for the percentage we have to grow before we can differentiate. |
optional_checks | Optional callback for checks to see if we're okay to grow. |
optional_grow_behavior | Optional callback in case we wish to override the default grow() behavior. Assume we supersede the change_mob_type() call if we have this set. |
percent_grown | Percentage we have grown. |
ready_to_grow | Are we ready to grow? This is just in case we fail our checks and need to wait until the next tick. We only really need this because we have two competing systems, the timer and the probability-based growth. When one succeeds, this component is considered successful in growth, and will actively try to grow the mob (only barred by optional checks). |
signals_to_kill_on | List of signals we kill on ourselves when we grow. |
timer_id | ID for the failover timer. |
upper_growth_value | Integer - The upper bound for the percentage we have to grow before we can differentiate. |
Procs | |
comp_on_round_start | What we invoke when the round starts so we can set up our timer. |
grow | Grows the mob into its new form. |
setup_growth_tracking | Sets up the two different systems for growth: the timer and the probability based one. Both can coexist. Return COMPONENT_INCOMPATIBLE if we fail to set up either. |
stop_component_processing_entirely | Wrapper for qdel() so we can pass it in RegisterSignals(). I hate it here too. |
Var Details
growth_path
What this mob turns into when fully grown.
growth_probability
Integer - Probability we grow per SPT_PROB
growth_time
Failover for how much time we have until we fully grow. If passed as null, we eschew setting up the timer. Remember: We can grow earlier than this if the randomness rolls turn out to be in our favor though!
initial_growth_probability
Stores the growth_probability the component had when it was Initialized
lower_growth_value
Integer - The lower bound for the percentage we have to grow before we can differentiate.
optional_checks
Optional callback for checks to see if we're okay to grow.
optional_grow_behavior
Optional callback in case we wish to override the default grow() behavior. Assume we supersede the change_mob_type() call if we have this set.
percent_grown
Percentage we have grown.
ready_to_grow
Are we ready to grow? This is just in case we fail our checks and need to wait until the next tick. We only really need this because we have two competing systems, the timer and the probability-based growth. When one succeeds, this component is considered successful in growth, and will actively try to grow the mob (only barred by optional checks).
signals_to_kill_on
List of signals we kill on ourselves when we grow.
timer_id
ID for the failover timer.
upper_growth_value
Integer - The upper bound for the percentage we have to grow before we can differentiate.
Proc Details
comp_on_round_start
What we invoke when the round starts so we can set up our timer.
grow
Grows the mob into its new form.
setup_growth_tracking
Sets up the two different systems for growth: the timer and the probability based one. Both can coexist. Return COMPONENT_INCOMPATIBLE if we fail to set up either.
stop_component_processing_entirely
Wrapper for qdel() so we can pass it in RegisterSignals(). I hate it here too.