Daedalus Dock - Modules - TypesVar Details - Proc Details

chemical_reaction

#Chemical Reaction

Datum that makes the magic between reagents happen.

Chemical reactions is a class that is instantiated and stored in a global list 'chemical_reactions_list'

Vars

inhibitorsReagents that block the reaction from occuring, like an inverse catalyst.
is_cold_recipeSet to TRUE if you want the recipe to only react when it's BELOW the required temp.
mix_messageThe message shown to nearby people upon mixing, if applicable
mix_soundThe sound played upon mixing, if applicable
mob_reactDetermines if a chemical reaction can occur inside a mob
optimal_tempUpper end for above (i.e. the end of the curve section defined by temp_exponent_factor)
overheat_tempTemperature at which reaction explodes - If any reaction is this hot, it explodes!
rate_up_limOptimal/max rate possible if all conditions are perfect
reaction_flagsAffects how reactions occur
required_catalystsRequired chemicals that must be present in the container but are not USED.
required_containerthe exact container path required for the reaction to happen.
required_otherSome stupid magic bullshit for slime reactions. Literally what the fuck.
required_reagentsRequired chemicals that are USED in the reaction
required_tempFermiChem! - See fermi_readme.md Required temperature for the reaction to begin, for fermimechanics it defines the lower area of bell curve for determining heat based rate reactions, aka the minimum
resultsResults of the chemical reactions
temp_exponent_factorHow sharp the temperature exponential curve is (to the power of value)
thermic_constantHow much the temperature changes per unit of chem used. without REACTION_HEAT_ARBITARY flag the rate of change depends on the holder heat capacity else results are more accurate

Procs

chemical_mob_spawnMagical mob spawning when chemicals react
clear_productsClears the beaker of the product only
clear_reactantsClears the beaker of the reagents only if volume is not set, it will remove all of the reactant
clear_reagentsClears the beaker of ALL reagents inside
default_explodeGeneric explosions/failures
explode_fireBEGIN FIRE BASED EXPLOSIONS
freeze_radiusEND FIRE BASED EXPLOSIONS
on_reactionREACTION PROCS Shit that happens on reaction Only procs at the START of a reaction use reaction_step() for each step of a reaction or reaction_end() when the reaction stops If reaction_flags & REACTION_INSTANT then this is the only proc that is called.
overheatedOccurs when a reation is overheated (i.e. past it's overheatTemp) Will be called every tick in the reaction that it is overheated If you want this to be a once only proc (i.e. the reaction is stopped after) set reaction.toDelete = TRUE The above is useful if you're writing an explosion By default the parent proc will reduce the final yield slightly. If you don't want that don't add ..()
reaction_finishStuff that occurs at the end of a reaction. This will proc if the beaker is forced to stop and start again (say for sudden temperature changes). Only procs at the END of reaction If reaction_flags & REACTION_INSTANT then this isn't called
reaction_stepStuff that occurs in the middle of a reaction Only procs DURING a reaction If reaction_flags & REACTION_INSTANT then this isn't called returning END_REACTION will END the reaction
update_infoUpdates information during the roundstart

Var Details

inhibitors

Reagents that block the reaction from occuring, like an inverse catalyst.

is_cold_recipe

Set to TRUE if you want the recipe to only react when it's BELOW the required temp.

mix_message

The message shown to nearby people upon mixing, if applicable

mix_sound

The sound played upon mixing, if applicable

mob_react

Determines if a chemical reaction can occur inside a mob

optimal_temp

Upper end for above (i.e. the end of the curve section defined by temp_exponent_factor)

overheat_temp

Temperature at which reaction explodes - If any reaction is this hot, it explodes!

rate_up_lim

Optimal/max rate possible if all conditions are perfect

reaction_flags

Affects how reactions occur

required_catalysts

Required chemicals that must be present in the container but are not USED.

required_container

the exact container path required for the reaction to happen.

required_other

Some stupid magic bullshit for slime reactions. Literally what the fuck.

required_reagents

Required chemicals that are USED in the reaction

required_temp

FermiChem! - See fermi_readme.md Required temperature for the reaction to begin, for fermimechanics it defines the lower area of bell curve for determining heat based rate reactions, aka the minimum

results

Results of the chemical reactions

temp_exponent_factor

How sharp the temperature exponential curve is (to the power of value)

thermic_constant

How much the temperature changes per unit of chem used. without REACTION_HEAT_ARBITARY flag the rate of change depends on the holder heat capacity else results are more accurate

Proc Details

chemical_mob_spawn

Magical mob spawning when chemicals react

Your go to proc when you want to create new mobs from chemicals. please dont use on_reaction. Arguments:

clear_products

Clears the beaker of the product only

clear_reactants

Clears the beaker of the reagents only if volume is not set, it will remove all of the reactant

clear_reagents

Clears the beaker of ALL reagents inside

default_explode

Generic explosions/failures

explode_fire

BEGIN FIRE BASED EXPLOSIONS

freeze_radius

END FIRE BASED EXPLOSIONS

on_reaction

REACTION PROCS Shit that happens on reaction Only procs at the START of a reaction use reaction_step() for each step of a reaction or reaction_end() when the reaction stops If reaction_flags & REACTION_INSTANT then this is the only proc that is called.

Proc where the additional magic happens. You dont want to handle mob spawning in this since there is a dedicated proc for that.client Arguments:

overheated

Occurs when a reation is overheated (i.e. past it's overheatTemp) Will be called every tick in the reaction that it is overheated If you want this to be a once only proc (i.e. the reaction is stopped after) set reaction.toDelete = TRUE The above is useful if you're writing an explosion By default the parent proc will reduce the final yield slightly. If you don't want that don't add ..()

Arguments:

reaction_finish

Stuff that occurs at the end of a reaction. This will proc if the beaker is forced to stop and start again (say for sudden temperature changes). Only procs at the END of reaction If reaction_flags & REACTION_INSTANT then this isn't called

Proc where the additional magic happens. You dont want to handle mob spawning in this since there is a dedicated proc for that.client Arguments:

reaction_step

Stuff that occurs in the middle of a reaction Only procs DURING a reaction If reaction_flags & REACTION_INSTANT then this isn't called returning END_REACTION will END the reaction

Arguments:

Outputs:

update_info

Updates information during the roundstart

This proc is mainly used by explosives but can be used anywhere else You should generally use the special reactions in /datum/chemical_reaction/randomized But for simple variable edits, like changing the temperature or adding/subtracting required reagents it is better to use this.