Eloinz Plug-Ins Specs
Version 2
---------------------


	This is a short explanation of the PLG 2 file format. It is use-
ful is you want to create your own plug-ins/plug-ins editor.



	The PLG Files are plain text files, that can be read by any
text editors. But you should use either NOTEPAD (windows) or EDIT (dos),
because the other ones might corrupt the files.


1.Header
--------

	In the header is stored the plug's version, it's name and it's
type (to be used in further eloinz versions)

1st line: version. ex: 2        
2nd line: name.    ex: Big Light
3nd line: type.    BRSH, LITE, SND, OBJS, ENT, ARCH, BAD

	The header ends with a seperator, that can be anything, but
something like ---- is recommended to keep the thing clear.


2.Block Properties
------------------

	Those define what is kept or not on the block where the plug-in
is put. a 1 value says it keeps it, and a 0 is doesn't. In this order:

 Keep Ceiling
 Keep Walls
 Keep Floor
 Keep Any Brush (doors, teleporters, etc)
 Keep Lights
 Keep Sound
 Keep Objects
 Keep Entities
 Keep Architecture
 Keep Baddies

	Then, another separator.



3.Static Brushes
----------------

	First of all, you must tell how many static brushes there will
be. If you have 5 of them, 5th line should be '5' (no quotes...). This
number MUST be exact, or the plug-in won't work. After this line, you
must put a separator.

	Then you define each brushes. Here is how to do any brushes in
the PLG files, any where you must define one:

4.Brushes
---------


1st line: The Type. For now, only '1' is valid, that is a 6 face block 
                    brush. In future versions, you will be able to use 
		    more brush types, so you will have more options here.

2nd line: Special Flag 1. use this to set special properties to a brush.
			  Current valid values are:
			  %NORMAL -- Brush appears any time.

                    %ONLYNORTHBLK -- Brush will appear only if theirs a 
                                     block north of it.
                    %ONLYSOUTHBLK -- Brush will appear only if theirs a 
	                             block south of it.
                    %ONLYEASTBLK  -- Brush will appear only if theirs a 
	                             block east of it.
                    %ONLYWESTBLK  -- Brush will appear only if theirs a 
	                             block west of it.

                    %NONORTHBLK  -- Block wont appear if there's a block
				    north.
                    %NOSOUTHBLK  -- Block wont appear if there's a block
				    south.
                    %NOEASTBLK   -- Block wont appear if there's a block
				    east.
                    %NOWESTBLK   -- Block wont appear if there's a block
				    west.

                 The same flags, but ending with PLG instead of BLK has
                 the same effect but the condition applies if/if not the
                 same plug-in is on an adjacent block.


This is where 0.6 really revolutionise Plugs. Instead of writing line
3 to 8 and 9th with a texture, you can now use .MAP's brush format! 
You can even use the extra parameters. Or you can:

3rd to 8th line: X1,Y1,Z1, X2,Y2,Z2 values for type 1 brush (6 face block).
                 Those can have number values, from 0,0,X to 150,150,X (Size of block in eloinz)
                 or they can have %CEIHEI variable, wich is the ceiling height.
                 You can also uses +-*/ operators (ex: %CEIHEI + 10)

9th line:   Texture. Also %FLOOR, %CEILING, %WALLS for style specific 
                     textures.



10th line:  Separator EXCEPT when defining the brush in an entity.


5.Entities, models, etc.
------------------------

	After this, you must put the number of outside world entities,
the same way you did for the static brushes. Then define each entities.


6.Defining Entities
-------------------

1st line: type. Doenst do anything, but must be a number (1 or 2...)
2nd line: classname.

then on a line a key, next line the parameters.

special keys (that have special way of being written):

origin. the parameter can hold a %CEIHEI, BUT YOU CAN'T USE OPERATORS.
ex:  ...
     origin
     64 80 %CEIHEI
     ...

To do a brush, you use fake %BRUSH key, then define a brush normally,
no separator at the end.

to end the entity, use the fake %ENDKEY key (no parameters needed)

after the %ENDKEY, put a separator.



	That's it! Here is an exemple of PLG file:


2
Cross form Light
LITE
---
1
1
1
1
0
1
1
1
1
1
---
6
---
1
%NORMAL
50
50
110
70
70
125
dung01_5
---
1
%NORMAL
( -1250 -3500 15 ) ( -1100 -3500 15 ) ( -1100 -3650 15 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1100 -3500 15 ) ( -1100 -3500 0 ) ( -1100 -3650 0 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1100 -3500 0 ) ( -1250 -3500 0 ) ( -1250 -3650 0 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1250 -3500 0 ) ( -1250 -3500 15 ) ( -1250 -3650 15 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1250 -3650 15 ) ( -1100 -3650 15 ) ( -1100 -3650 0 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1250 -3500 15 ) ( -1250 -3500 0 ) ( -1100 -3500 0 ) SFLOOR4_5 0 0 0 1.0 1.0
---
1
%NORMAL
80
80
110
100
100
125
dung01_5
---
1
%NORMAL
80
50
110
100
70
125
dung01_5
---
1
%NORMAL
( -1250 -3500 15 ) ( -1100 -3500 15 ) ( -1100 -3650 15 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1100 -3500 15 ) ( -1100 -3500 0 ) ( -1100 -3650 0 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1100 -3500 0 ) ( -1250 -3500 0 ) ( -1250 -3650 0 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1250 -3500 0 ) ( -1250 -3500 15 ) ( -1250 -3650 15 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1250 -3650 15 ) ( -1100 -3650 15 ) ( -1100 -3650 0 ) SFLOOR4_5 0 0 0 1.0 1.0
( -1250 -3500 15 ) ( -1250 -3500 0 ) ( -1100 -3500 0 ) SFLOOR4_5 0 0 0 1.0 1.0
---
1
%NORMAL
72
72
128
78
78
%CEIHEI +2
ecop1_1
---
1
---
1
light_flame_small_white
origin
75 75 119
style
6
light
300
%ENDKEY
---
	



