##example: function main:particles/system/start {"id":101,"particle":"001","life":20,"billboard":"center","random_x":"-10..10","random_y":"-10..10","random_z":"-10..10","interpolation_duration":10,"from_translation":"0f,0f,0f","from_scale":"1f,1f,1f","from_rotation":"$(to_rotation)","to_translation":"0.25f,0f,0f","to_scale":"0f,0f,0f"}

#base
$data remove storage particles $(id)_$(particle)
$data modify storage particles $(id)_$(particle).particle set value "$(particle)"
$data modify storage particles $(id)_$(particle).id set value "$(id)"
$data modify storage particles $(id)_$(particle).life set value "$(life)"
execute if score @s particle_cooldown matches 1.. run return fail

#transformation
$data modify storage particles $(id)_$(particle).interpolation_duration set value $(interpolation_duration)
$data modify storage particles $(id)_$(particle).from_scale set value "$(from_scale)"
$data modify storage particles $(id)_$(particle).from_translation set value "$(from_translation)"
$data modify storage particles $(id)_$(particle).from_rotation set value "$(from_rotation)"
$data modify storage particles $(id)_$(particle).to_scale set value "$(to_scale)"
$data modify storage particles $(id)_$(particle).to_translation set value "$(to_translation)"
$data modify storage particles $(id)_$(particle).to_rotation set value "$(to_rotation)"
$data modify storage particles $(id)_$(particle).billboard set value "$(billboard)"

$execute store result storage particles $(id)_$(particle).random_x float 0.1 run random value $(random_x)
$execute store result storage particles $(id)_$(particle).random_y float 0.1 run random value $(random_y)
$execute store result storage particles $(id)_$(particle).random_z float 0.1 run random value $(random_z)

$function main:particles/system/spawn with storage particles $(id)_$(particle)