First, create a text document in the FSG folder. Then, go to 'options.txt' and fine the line that says
and change that to
Code:
physics=<YourModFileName>.txt
Now, the first thing you want to do is create your 'Empty' element, which must be the first element to be defined. So open your mod text file and enter the following:
Code:
element Empty 0 0 0 0 1
The modding guide says:
Code:
element <name> <redColor> <greenColor> <blueColor> <density> <selectability>
'element' is the keyword to add a new element. <name> is the name of your element. <redColor>, <greenColor>, and <blueColor> are the RGB values for the color of your element. <density> sets how heavy the element block is. Heavier blocks can move past lighter ones (that's how denser fluids sink and lighter ones float, like water and oil). The last part, <selectability>, determines whether or not your element can be selected in the selection menu.
Now, the 'self' reaction.
Code:
self <probability> <reactant> <product>
Every frame, the game generates numbers and checks them with anything that say <probability>. If the game's number is lower than or equal to <probability>, than the reaction takes place. In a self reaction, an element simply turns into another element. <reactant> is the element, and <product> is what it turns into.
'Neighbor' reactions occur when 2 elements touch each other.
Code:
neighbor <probability> <reactant1> <reactant2> <product1> <product2>
<probability> is your probability per frame of the reaction happening, <reactant1> and <reactant2> are the two elements that touch, and <product1> and <product2> is what they turn into if the reaction occurs.
When 'notself' is used, that means a self reaction won't occur if the listed elements are touching it.
Code:
notself <element> <inhibitingElement1> [inhibitingElement2] [inhibitingElement3...]
<element> is which element, <inhibitingElement1> is what element will stop the self reaction, and you can have more than one of these listed after.
Movement in FSG is also based off of probability.
Code:
move <element> <verticalMovement> <horizantalMovement>
<horizantalMovement> is the probabilty for horizontal movement. If there is horizontal movement, there is no vertical movement. <verticalMovement> is the probability for vertical movement if there is no horizontal movement. If you want an even mix between both movements, set <horizantalMovement> to 0.5 and <verticalMovement> to 1 or -1. -1 will make it rise, 1 will make it drop.