Download the editor from here.

This program will open two windows, one, where you have to type in your code,and another one to view your current arena. The simple script language defines the arena, (an example of reusing ancient code).

Make sure, you have added 4 men in the arena.

Once you aer done, copy the text to notepad, and save with the extention .smo. Its recommended to upload a video capture of the new arena to youtube, if you manage to capture a funny sequence. Also share the mods source with other people.

 

Example Code:

addbox( vec(20,2,50),vec(0,-8,0), 0,1);

addbox( vec(3,4,8),vec(-7,-6,0), 10,1);

addbox( vec(3,4,8),vec(7,-6,0), 10,1);

addbox( vec(8,17,10),vec(0,0,0), 6,1);

 

p=vec(0,1,0);

repeat(33) {

       p=rot(p,vec(pi*2/33,0,0));

       cutplane( p, -6);

};

 

addbox( vec(6,1,30),vec(0,7,0), 0,0);

addbox( vec(2,1,1),vec(3,10,0), 0,0);

addbox( vec(2,1,1),vec(-3,10,0), 0,0);

 

chair0(pos)={

       addbox(vec(4,1,3),pos+vec(0,5,0),1,1); breakability(80);

       addbox(vec(1,3,3),pos+vec(3,9,0),1,0); breakability(80);

       addbox(vec(1,2,3),pos+vec(3,2,0),1,1); breakability(80);

       addbox(vec(1,2,3),pos+vec(-3,2,0),1,1); breakability(80);

};

 

chair0(  vec(50,-10,0) );

 

man(vec(0,8,-28),vec(0,0,1),2);

man(vec(0,8,28),vec(0,0,-1),3);

man(vec(0,8,-18),vec(0,0,1),0);

man(vec(0,8,18),vec(0,0,-1),1);

 

Explanation:

 

vec: defines a 3D vector in the following form vec(x,y,z) ;  negative y is the direction of gravity.

 

addbox(  size_vector, position_vector,   texture,   0=moving  / 1=static );

adds one box. To get other shapes, use cut();

 

man( position_vector,  looking_vector,  texture_integer  );

Adds one guy. A mod must place 4 guys in the level. Position vector specifies the point between the two feet on the floor. Looking vector is used to turn the guy.  If you prefer to use angles, use: vec(sin(angle),0,cos(angle))

The texture integer is unused during real gameplay. In this editor program it sets the textuer, and 2=player1 controls, 3=player3 controls, all other numbers will make the AI control the guy

 

repeat( number ) {  };

Repeats the stuff inside.

 breakability ( number); sets the breakability of the last added box. A value of 250 will barely allow the guys to walk on it without breaking it.

 

vec = rot( vec,  axis);  rotates vec around axis. The angle is defined by the length of axis. The new vector is returned.

 

turnto( vec ); turns the last added box, so that its facing in the given direction

 

cutplane( normal, shift);  cuts the last added box with a plane. Used in this example to create a round cylinder.

 

random(0);  

the parameter is ignored, returns a vector within the range -1, 1 in all dimensions

 

Misc:

Variables:  All varables are 3D vectors. Can define them like position = vec(0,0,0);

Functions: They work as seen in the example with chair0.

 

Other functions: atanxy(vec),  abs(scalars),  cos(angles), sin(angles) , tan(angles) , atan( vec), dot(vec, vec), normalize(vec); mod(scalars)