Difference between revisions of "Particle Properties"

From The Powder Toy
Jump to: navigation, search
(Replace pavg with tmp3, tmp4)
m (tmp4)
Line 26: Line 26:
  
 
== tmp4 ==
 
== tmp4 ==
tmp3 is used to store properties of elements that have been infected by VIRS or are inside PIPE or STOR.
+
Suck it up
  
 
== flags ==
 
== flags ==

Revision as of 23:04, 22 June 2024

Particle properties are the properties that every individual particle has which can change during simulation, for example temperature and ctype. Some of these properties are saved in saves or stamps and others are not.

ID

The particle ID is a unique number assigned to each particle. The ID is visible in the HUD in debug mode and used mainly in the simulation code.

type

This is the type of the particle, indicating what element it is.

ctype

This is a secondary type which is used by particles like CLNE/BCLN/PCLN/PBCN and CRAY which create other elements. It is usually set to an element type and in some cases is used to store a number.

temp

This stores the particle's temperature. When setting temp from the console or PROP tool, it accepts temperature in degrees Kelvin, instead of the Celsius scale which is used for displaying temperature in the HUD.

life

This is used by some particles as a timer, either to make the particle disappear after a certain time or to time a reaction.

tmp

This is used by some particles for storing a number, or in the case of PIPE, an element type.

tmp2

This is like a second tmp and is mainly used for graphics purposes.

tmp3

tmp3 is used to control TUNG, QRTZ, and GLAS breaking, and to store properties of elements that have been infected by VIRS or are inside PIPE or STOR.

tmp4

Suck it up

flags

This is a property that is only used with a few different elements. It is not saved. There are currently 4 different flags:

  • 0x1: "Stagnant" - Used by energy particles and water when a particle can't move, to reduce lag by not performing as many checks next frame.
  • 0x2: Skip movement for one frame, only works on PHOT (used when created by powered clones)
  • 0x4: Used for water equalization, to keep track of which particles have been checked
  • 0x8: Compatibility flag, which allows sponge to move, or photons to be decorated. (for compatibility with older saves)