Enigmasand Guide Alpha3 ver. 1.02
Well, I made a guide for [url="http://fallingsandgame.com/viewtopic.php?t=514"]wxSand[/url], so I'm gonna give Enigmasand a go ^_^.
BASIC ELEMENTS
Because Enigmasand uses XML, all elements and reactions are in tags.
let us take, for example, Wall.
- Code: Select all
<element name="WALL" color="ff808080">
</element>
The code tells us that the element is called "WALL" and it's colour is ff808080. "808080" is a darkish grey colour in Hex. The First "ff" is the Alpha Channel (currently not supported). Leave this in.
Wall also has a </element> tag straight after the opening tag, so we know it has no gravity and is inert.
ELEMENTS WITH GRAVITY
Elements that have gravity and reactions are more complex;
- Code: Select all
<element name="SAND" color="FFEECC80" dens="1.4">
<gravity g="0.95" r="0.25"/>
</element>
So, It's called sand; it's fairly sand coloured; it has a relative density of 1.4 (water has relative density 1 (like in real life), so sand will sink in water); It falls at a rate of 0.95 and slips at a rate of 0.25. Remember to end the reaction tag with "/>" rather than just ">"
ELEMENTS WITH REACTIONS
Self Reactions
- Code: Select all
<element name="FIRE" color="ffff4040" dens="0.01">
<gravity g="-0.15" r="0.05"/>
<self chance="0.1" result="BLANK"/>
</element>
It's called Fire, it's red, it has a very low density, it has a slow Negative Gravity.
More Importantly, it has a Self tag.
- Code: Select all
<self chance="0.1" result="BLANK"/>
So, every ten Frames (as in, Frames per Second), the result is "BLANK": it Selfs into Empty. Remember to end the tag with "/>" and not just ">"
Neighbor Reactions
- Code: Select all
<element name="PLANT" color="ff20cc20">
<reaction chance="0.3" trigger="FIRE" res1="1.0" ares1="FIRE" bres1="FIRE"/>
<reaction chance="0.1" trigger="WATER" res1="1.0" ares1="PLANT" bres1="PLANT"/>
</element>
Plant. It's green, It doesnt fall.
It has Neighbor Reactions.
- Code: Select all
<reaction chance="0.1" trigger="WATER" res1="1.0" ares1="PLANT" bres1="PLANT"/>
It's a Reaction. 0.1 means every 10 Frames. The trigger for the Reaction is Water. "res1" is 1, similar to the "1" in wxSand code...
- Code: Select all
neighbor 0.2 Plant Water [b]1[/b] Plant Plant
...That can be a 0.5 and have another 0.5 [Edit: Or 0.25 and 0.25 and 0.5. Or any number of decimals assuming the total is 1.0]
"ares1" is "Plant". This means the Plant stays as Plant.
"bres1" is "Plant". This Means the Water turns into Plant.
ELEMENTS NOT IN THE LIST
"Okay, I've looked played the game," you say, "but where's Molten Cera? That's not in the element list!"
let's look at the .xml file:
- Code: Select all
<element name="CERA2" color="ffeeddcd" menu="0" dens="1.3">
<gravity g="1.0" r="0.35"/>
<self chance="0.4" result="CERA"/>
</element>
Aha! Cera2 has an extra peice of information in the tag; "menu=0". THis means that, whilst it won't appear in the menu, it still features in the game.
EXPLOSIONS
Explosions work thusly:
- Code: Select all
<explosion chance="chance from 0 - 1" trigger="what causes the explosion" type="TYPE" sizex="size of explosion" result="what it explodes into"/>
type="0" are cirular explosions
type="1" are firework-like explosions.
PHYSICS
Because Enigmasand is in XML, you have to tell it what it is. Start any Enigmasand Physics file with
- Code: Select all
<enigmasand>
and end it with
- Code: Select all
</enigmasand>
LOADING MODS
Save the Mod as "default.xml" and open Enigmasand. Backup the normal deafult.xml file.
-LE4dGOLEM
WILL ADD MORE LATER!






