]RANDOM SCENERY GENERATOR 
v 1.0
By Nikos Andronikos
fezd@hotmail.com
----------------------------------------------------

CONTENTS
~~~~~~~~
-OVERVIEW
 ed.exe
 build.exe
 makefst.exe
-THE DEF FILE
-KEYS FOR ED.EXE
-WALKTHROUGH


These programs are still beta and are probably a bit buggy, nothing major
though.
Known bugs include:
Sometimes things are placed a bit above the ground, I haven't really looked
into this yet.
Highest point in ed.exe is blue

This pack includes:
ED.EXE      : Where you create your scenery, outputs WLD's.
BUILD.EXE   : Turns your WLD files into FST's.
MAKEFST.EXE : Merges two or more world files. You'll need this to add
              the output from BUILD to your world files.

OVERVIEW
~~~~~~~~

ED.EXE:
 You pass (as a command line argument) this program an FTD and a DEF file,
 you can also pass it a WLD file and an FST file.
 It displays the FTD in the top left corner, you use the arrow keys or the
 mouse to move the cursor around (NOTE: the two cursors are separate, moving
 the mouse will not move the keyboard cursor and vice versor).
 You can load an FST file, that will be draw on the FTD display. This allows
 you to place objects around a current FST file.
 Next to the FTD display is the list of random types, it gets these from
 a DEF file (more about that l8tr). 1 to 9 chooses a random type.
 The one that is selected has either an S or an R in the box next to it.
 S means that Solid fill type is selected, R means random fill type. Hit F5
 to toggle the fill type.
 Hit the spacebar to place the currently selected random type at the cursor
 position, hit backspace to delete it and press enter to set it so that it
 constantly places as you move the cursor around.
 You can draw boxes with the mouse, these boxes will be filled using the
 fill type selected.
 Below the FTD display are three numbers, the first two are the x and y
 positions of the cursor and the third is the height at the cursor location.
 type ed /? for a list of command type arguments.

 example of how to run ed.exe
 ed -l t000000.ftd -i deffile.def -w yourwld.wld -f world.fst
 what these do:
 -l the FTD file you want to place the objects on.
 -i the DEF file you have created, the DEF file is where you define the random types
 -w a WLD file you have previously saved, when you save a WLD file, it is given the
    same name as the ftd file you opened. eg in this case it would be t000000.wld
 -f an fst file you want displayed on the FTD display. Doing this allows you
    to place objects around your current objects in your fst file.
 

BUILD.EXE:
 You pass this program an FTD a DEF and a WLD file.
 It outputs an FST file, called the same thing as the ftd file, but with an
 fst extension, eg t000000.fst.
 type build /? for help.

 example of how to run build.exe
 build -l t000000.ftd -i deffile.def -w yourwld.wld
 what these do:
 -l the FTD file you want the objects placed on.
 -i the DEF file you created in ed
 -w yourwld.wld the WLD file you saved from ed.
 
MAKEFST.EXE
 This program merges two or more world files. It's kind of dodgy in the
 fact that it only copies the information from one file to another so
 it won't renumber your paths and stuff. If you've got paths in your
 world files, then put all the path related stuff in one path and name it
 paths.fst, makefst will then copy the paths from that file into the final
 world file.
 Another alternative is to use Daryls merge program, I've never used so i'm
 not sure how well it works.
 type makefst /? for help.

 example of how to run makefst.exe
 makefst -i world.fst t000000.fst t_01_01.fst

THE DEF FILE
~~~~~~~~~~~~
The DEF file is where you create your random types to place, this file
allows you to not just place one object all over the map, but to place
up to nine different random types on the map a random type is defined in the
DEF file as follows

: NAME A B C
FSD1.FSD
FSD2.FSD

Ok, the ':' signifies the start of a new type, make sure theres a space after
it. NAME is the name ed uses, so you can tell one type from another.
A is the type flag, it specifies what sort of random placement algorithm is
used.
 1 is city (a specialised algorithm for creating cities)
 2 is scattered (true random)
B is the number of fsd files in the list (in this case it would be 2)
C is a flag that is used differently by city and scattered types.
In scattered (type 2), it is the density of placement.
In city (type 1), it specifies whether roads are to be placed, 1 is roads
0 is no roads (note if flag is set to 0, top fsd on the list should be set
to nil).
FSDLIST
After the type definition is the list of fsd files, building randomly picks
from the list for each object it places. In city (type 2) the first fsd file
on the list is the road shape. You can use nil to represent no shape.

Check out rand.def (an example included in this pack)



The below example is a city block with roads.
example:
: CITY 1 6 1
ROAD.FSD
HIGH1.FSD
nil
HIGH2.FSD
HIGH3.FSD
nil


KEYS FOR ED.EXE
~~~~~~~~~~~~~~~

arrows : moves cursor around
The mouse moves the cursor around.
Mouse button 1 fills a single tile, or starts to draw a box, when you release
the mouse button, the box is filled with the fill type.
1-9 : selects a random type
F1  : saves WLD file (at the moment saves it as TEST.WLD)
F4  : cycles draw method.
F5  : toggles fill type.
q   : flashes cursor
`   : redraws screen
ENTER : toggles continuous placement
SPACE : places current random type at cursor position
BACKSPACE : clears the random type at cursor position


WALKTHROUGH
~~~~~~~~~~~
If you're having trouble getting the hang of this pack, do the following

First get three shapes:
TREE.FSD - a tree shape
ROAD.FSD - a 500m long road
B.FSD - a skyscraper or something.

First we have to make a DEF file, type the following in your favorite text
editor.

: FOREST 2 1 10
TREE.FSD

: CITY 1 3 1
ROAD.FSD
B.FSD
nil

Save the DEF file as MYDEF.DEF

copy an ftd file into the directory with these programs (in this case lets
call it t000000.ftd)
At the msdos command line type

ed -l t000000.ftd -i MYDEF.DEF

Use the keys 1 or 2 to select which type to place (0 selects delete)
Hit F5 to select solid fill. draw a box with the mouse.
Now select another type (1 or 2). Hit F5 to select random fill and draw
another box. Hit F1 to save to t000000.wld


At the msdos command line type
build -l t000000.ftd -i MYDEF.DEF -w t000000.wld

Now you should have an FST file called t000000.fst, just use this in
a sim or to use it in a current sim you've make, use makefst.
To use makefst.
First back up you world files.
At the msdos command line type
makefst -i t000000.wld myworld.fst -o world.fst

NOTE: don't do this
makefst -i t000000.wld world.fst -o world.fst



Any questions or bug reports, email me.
