Soulforge Machines Tutorial

Creation of the machines is made much easier by using telliamed's explanations of mission specific scripts:
http://thiefmissions.com/telliamed/scripts2.html

The machine scripts are near the bottom of the page.

The machines are quite simple.
They each consist of one or two Inputs, a marker with a script (which determines what it does with the inputs) and one or two Outputs.

Some machines will automatically process the inputs, others need to recieve a TurnOn message (i.e. you have to press a button or pull a lever).

An Input must have the script: MachineSlot
It must be solid (i.e. things must be able to collide with it)

Included with this tutorial is a small Dromed-only mission that has each type of machine.

Here are inscructions on how to set up each machine (I've left out how they create some of the less useful objects and how they deal with different stages of Guiding Beacon because it's unlikely that will be part of your FM. If you do want to know, see telliamed's page):

*In your mission, load the miss16.osm script module (the same way you'd load convict and gen)

***Amalgamating Machine***
*Creates: MineBulb, FlareMixture, FlashMine
*Requires 1 Input and 1 Output
*Must be activated by a Button or Lever

Creating the Input:
*Create an object with the script: MachineSlot
*Objects must be able to collide with this

Creating the Machine:
*Create a Marker with the script: AmalgMachine

Creating the Output
*Create another Marker.
*This doesn't need any extra scripts or properties

Links:
*Link the Input to the Machine with a ScriptParams flavour. Set the Link Data to 1
*Link the Machine to the Output, also with ScriptParams. Set the Data to 1. (All Input/Output links have the ScriptParams flavour. The Data is needed to tell the machine which Input/Output the other object represents)
*Link a Button to the Machine with a ControlDevice flavour.

See the example in machines.mis to see what inputs are needed and what the outputs are.


***Bellowing Machine***
*Creates: Scouting Orb
*1 Input, 1 Output
*Activates automatically (i.e. no Button/Lever needed)
*Create the Input (solid object with the MachineSlot script)
*Create the Machine (a Marker with the BellowingMachine script)
*Create the Output (an ordinary Marker)

*Link the Input to the Machine (Flavour: ScriptParams, Data: 1)
*Make a second Link from the Input to the Machine, with a ControlDevice flavour (this is becasue it activates automatically)
*Link the Machine to the Output (ScriptParams, Data: 1)


***Fusing Machine***
Creates: FluxSpheroid, FlashBomb
*1 Input, 2 Outputs
*Activated by a Button or Lever

*Create the Input (solid object, script: MachineSlot), Machine (script: FusingMachine) and 2 outputs (2 Markers)

*Link a Button to the Machine (ControlDevice)
*Link the Input to the Machine (Data: 1)
*Link the Machine to the first Output (Data: 1)
*Link the Machine to the second Output (Data: 2)


***Linking Machine***
*Creates: Regulating Round (part of the Homing Beacon)
*1 Input, 1 Output
*Activated by Button/Lever

*Link the Input to the Machine (script: LinkingMachine) (Link Data: 1)
*Link the Machine to the Output (Data: 1)
*Link the Button to the Machine


***Rolling Machine***
*Creates: Flare
*2 Inputs, 1 Output
*Button/Lever needed

*Create two Inputs (which can be identical)

*Link one to the Machine (script: RollingMachine) (Data: 1)
*Link the other to the Machine (Data: 2)
*Link the Machine to the Output (Data: 1)
*Link the Button to the Machine


***Sealing Machine***
(Creates: Mine, ExplosiveCharge)
*2 Inputs, 2 Outputs
*Button/Lever needed

*Link both Inputs to the Machine (the first with Data: 1, the second with Data: 2)
*Link the Machine to both Outputs (the first with Data: 1, the second with Data: 2)
*Link the Button to the Machine