Material Definitions (ocm) Material Definitions (ocm) Material definitions determine looks and behaviour of landscape materials. ValueData typeDescription NameString (max. 15)Name of material. ColorAnimationInteger0 or 1. Color animation. ShapeIntegerShape of surface: Flat (0), Octagon, FlatTop (1), Smoother, Smooth (2) or Rough (3). DensityIntegerA density of 25 and above is liquid. 50 and above is solid. BlastFree offers a parameter to only blast solid materials of a given density or lower. FrictionInteger0-100. Friction. DigFreeInteger0 or 1. Determines wether the material can be dug into. BlastFreeInteger0 or 1. Determines whether the material can be blasted away. Blast2Objectdefinition idType of objects created by blasting this material. Dig2Objectdefinition idType of objects dug out from this material. Dig2ObjectRatioIntegerca. 100-500. Mass ratio when digging out objects. Dig2ObjectRequestInteger0 or 1. If 1, objects are only dug out on request. Blast2ObjectRatioIntegerca. 100-500. Mass ratio when blasting free objects. Blast2PXSRatioIntegerMass ratio when material pixels are blasted free. InstableInteger0 or 1. Stability. MaxAirSpeedIntegerca. 10-100. Maximum falling speed. MaxSlideIntegerMaximum side offset when sliding. WindDriftIntegerHorizontal drift by wind. InflammableIntegerInflammability. IncendiaryIntegerThis material incinerates objects. Note: For compatibility reasons, the misspelling "Incindiary" is also accepted if (and only if) no value with the correct spelling is set. CorrodeIntegerThis material corrodes other materials. CorrosiveIntegerThis material can be corroded. ExtinguisherIntegerThis material will extinguish burning objects. SoilIntegerPlants grow on this material. LightInteger0 or 1. If greater than zero, ambient light is emitted from this material even if drawn unterground. TempConvStrengthIntegerStrength of temperature conversion. BlastShiftToString (max. 15)Material changes into another material when blasted. InMatConvertString (max. 15)Entering this material the material will change into... InMatConvertToString (max. 15)...this material... InMatConvertDepthInteger...when at the given depth. AboveTempConvertIntegerAbove this temperature the material will change into... AboveTempConvertToString (max. 15)...this material. AboveTempConvertDirIntegerDirection of temperature conversion: 0 bottom up, 1 top down BelowTempConvertIntegerBelow this temperature the material will change into... BelowTempConvertToString (max. 15)...this material. BelowTempConvertDirIntegerDirection of temperature conversion: 0 bottom up, 1 top down PlacementInteger0-100. This Value is used for lighting of the landscape and is usually determined automatically from the other material values. TextureOverlayString (max. 15)Standard texture for this material used by the landscape generator. OverlayTypeIntegerBit mask for texture calculation on this material. Bit 0 (1): exact (no zoom), bit 1 (2): no texture, bit 2 (4): extra large zoom PXSGfxString (max. 30 chars)Graphics used for loose material pixels. This graphic should be available as material texture. PXSGfxRt4 integersTarget rectangle for the graphics of loose material pixels. Additional phases on the right and below the specified rectangle will be used. The rectangle should always start in the top left corner and use the complete texture size. MinShapeOverlapIntegerUsed during map-to-landscape zooming when drawn with a texture with shape definitions: Minimum overlap of map pixels to corresponding shapes to cause a full shape expansion. See Shape textures.
Section [Material]
User defined reaction In addition to default reactions, every material can define custom reactions which are executed when the material passes another material as a free pixel (e.g. precipitation or particles after explosios) or by material movement (e.g. when a lake floods a tunnel). ValueData typeDescription Type StringType of reaction that should happen. See Table. TargetSpec StringTarget material, with which the loose material reacts. See material specifications. ScriptFunc StringReaction type script only: Name of the script function, which determines the behaviour. ExecMask IntegerBitmask, determining in which situation the reaction is to be executed. Bit indices are the reaction events. Default value -1 for all events. Reverse BooleanUsually, the reaction defines what happens when loose material of the definition, in which the reaction is defined, hits solid material of the type specified in TargetSpec. If Reverse is set, this definition is swapped. InverseSpec BooleanIf true, the reaction will be defined for all other materials (including "Sky"), which do not fulfill the condition in TargetSpec. CheckSlide BooleanIf true, the standard behaviour (Bouncing off the ground and sliding according to MaxSlide) will be executed before the call is done. Depth IntegerReaction type Convert only: Depth in target material required for conversion. ConvertMat StringReaction type Convert only: Material, into which the loose material is converted. If sky is specified, the material will vanish. CorrosionRate IntegerReaction type Corrode only: Chance of corrosion.
In the .ocm-file: Any number of sections [Reaction]
NameValueEvent MEE_PXSPos0Check before each movement frame of a loose material pixel against its background material MEE_PXSMove1Check against each pixel that a loose material pixel passes during its movemvent MEE_MassMove2During larger material movements (e.g. when a lake is flooded into a tunnel): Check of the moving material against the material over which it's moving
Reaction events
NameBehaviour ScriptFor each collision, the script function specified in ScriptFunc is called. ConvertThe material is converted into another. Comparable to the behaviour of snow in water. PoofBoth the loose and the solid material are removed. Additionally, there's a 1:3 chance of creating a small smoke cloud, and a 1:3 chance that the sound "Pshshsh" is played. Comparable to the behaviour of water in lava. CorrodeThe loose material corrodes the target material at the chance CorrosionRate, and vanishes itself if it does so. If corrosion is performed, a small smoke cloud is created at a chance of 1:5, and the sound "Corrode" is played at a chance of 1:20. Comparable with the behaviour of acid on earth. InsertThe loose material is inserted as solid material. Comparable to the behaviour of any material that hits a material of equal or higher density.
Reaction types
NameMaterials Material nameIf the specification equals the name of an existing material, this material will be used. AllAll materials, including "Sky" SolidAll solid materials SemiSolidAll solid and liquid materials BackgroundAll background materials, including "Sky" SkyThe background material. IncendiaryAll materials that can incinerate objects. Note: For compatibility reasons, the misspelling "Incindiary" is also accepted. ExtinguisherAll extinguishing materials. InflammableAll flammable materials. CorrosiveAll materials which can be corroded. CorrodeAll corrosive materials.
Material specifications
Reaction type 'Script' This resource-intensive method can be used to define the material behaviour freely. The script function should be defined globally and have the following parameters: Parameter number(s)Name(s)Data typeDescription 1,2x, yIntegerPosition of the loose material. The parameters may be modified in order to move the material pixel. 3,4landscape_x, landscape_yIntegerPosition in the landscape, on which the material hits. 5,6xdir, ydirIntegerSpeed (in 1/100px) of the movement of the material. May be modified in order to change the material speed. Not for MassMover. 7pxs_materialIntegerMaterial number of the loose material. Useful if the same reaction function is used for multiple materials 8landscape_materialIntegerMaterial number of the solid material. 9eventIntegerSee Reaction events.
The return value of the function should be either 1 for removal or 0 for keeping the loose material.
Sven22015-10