How would you work in general with neomill7. Plus Tips and hints.



First, to become familier with neomill, create a small test world like, I recommend, of 10x10 tiles and check out how the neomill7 treadmill works.

Create your actors and world trees, stones and other surface entities you want to spread in your world as a set of barebone objects first and keep them in the main dir. Add the filenames of the surface entities you made to the Neomillpos7.wdl script (see script remarks where). 

Create a "shell" level in WED with a Skycube or Skydome, a position and a player mdl in the middle of the xyz universe, where players z should be a little higher than 0 at first. Attach a player script to the player and a main script here neomill7.wdl to the level. Build the level. All tiles of the Neomill treadmill will be created and removed dynamically in this level.

Create a flat (!) terrain with the tile size you decided to use (e.g. 4096x4096, default in Neomill7) in MED. Put a (border-) seamless texture on the .hmp terrain, add a detail map and save it as TR0-0.hmp to the main game directory. Use Tile1.exe to create a .hmp tile-file array of the size you want (rec. 10x10 = 100 tiles/files).

Create a one block wmb im WED, size 4096x4096x500 also. Texture it. Make sure that the block is exactly (!) in the center of the xy raster and a little lower than 0 in the z axis, to prevent overlapping of the wmb with the terrain .hmp. in the first go. You can correct the z-position later to 0 later if necessary when editing them individually. 
Save the block as BL0-0.wmp and build it as a map entity (!) named BL0-0.wmb.

Now use Tile1.exe to create the file array for both wmps and wmbs from both BL0-0.wmp and BL0-0.wmb.

You can test the world now already by using the neomill7.wdl script att. to the main "shell" level, while mill_control7.wdl must be included in neomill7.wdl. Walk around until you encounter an error message telling you that you reached a border tile of the tile/file array which can not be loaded because it does not exist (like TR11-9.hmp). In your final game you can prevent that error by placing an invisible block in the border tiles. Maybe you have seen this in some commercial games already.

O.K. Now you can edit each .hmp terrain individually in hight or texture in MED and save it back. You can also create larger hills from 4 terrains with mirroring them, so that 4 hmps buid one large hill.

Same for wmps. You can edit a wmp tile now individually and also change it very drastically. You can csg subtract objects or add objects or prefabs as much as you want. Build them as one wmb and therefore they will be handeled as one tile by mill_control7.

 If you have a terrain for a certain x/y position ready and you will not change it any further in its shape, you can load the terrain in WED and place it right in the middle of the xyz raster. This way you can place a house or rock (blocks) in the proper position on the terrain, on a hill for example. Delete the terrain in WED now, save the wmp and build the block as wmb. Neomill7 will now load the terrain and wmb for this tile with the wmb house in the right position.

If you have created a little world consisting of hmps amd wmbs you can now add more stuff like mdls, sprites or ,again, small wmbs.
 For that the neomillpos7.wdl must be included in the neomill7.wdl and the mdls,sprites or wmbs must be in the main game directory. Also you need to add the filenames of your mdls etc. in the neomillpos7 script as mentioned above (in Function Mdl_name_up). Change the var max_names to the maximum number of different entities you have available and want to spread.

 Because ent_create can attach an action to an entity when created, you should have some actions ready. There are a set of 5 predefined actions in mill_control7 with ID Numbers 1 to 5. See mill_control7.wdl for their purposes. When you add your own actions increase the var max_ACTS to the total number of diff. Actions.
When running Neomill7 with Neomillpos7 you can select an Action ID with the Keys n and m and a filename of your entity with v and b.
 Walk to a position where you think a tree might look great. Select an entity and an action you want to be attached to the tree and press the key 1 once.
The filename of the tree (like Larch.mdl), its xyz position and its direction (taken from the player) and the Action ID is saved to a file named like MD4-7.dat.
 Continue walking, stop, select a bush sprite now and an Action ID and press 1 again.
This way a list of entity information is written to the .dat file of the tile the player stands on. These informations will be used by mill_control7 the next time the world is started. If Mill_control7 finds no .dat file nothing will be created (no error message).
Neomillpos7 writes .dat files for each tile the player is standing on and appends entities if you revisit a tile and continue adding surface stuff. The .dat file is a simple txt file and can be edited with any text editor.

To hop to another tile instantly use keys 2 and 3 for x array axis and 4 and 5 for y axis. Feel free to redefine the keys if you want.

OK, nice little world.

If you want to add some pseudo shadows on a terrain you can use Ter1.exe after you have placed all mdls and sprites. Export the terrain texture you want to shade as a .bmp from MED. Load it in TERplot1.exe and follow the instructions in ABOUT from the MAIN menue in Terplot1. Place the shadows at the marks and put the bmp back on the terrain.

--------------------------------------------------------------------

Problems that probably will occur: The tree stands too deep in the terrain or is 4 meters above the ground. Reload the mdl in MED and reposition it. Save it back then. For Sprites: Add or subtract some quants in mill_control7.wdl after ent_create with e.g. mdz = mdz + 30. Better make a mdl from the sprite if possible.
        
Note: If you write your own Action to be attached to an entity of the neomill7 tile world you MUST include the position checking code lines in a loop, so that the entity keeps its proper position always. Have a look at the "rotator" Action in Mill_control7.wdl to see what I mean.

In this version of mill_control7 there is no "file exists ?" checking for .hmp and .wmb files of the file/tile array (for speed reasons). An error message will occur if mill_control7 does not find the file it expects. That means if you want no wmbs in an larger area you cannot simpy delete the wmb files, but create a small dummy block wmb set to invisible. Same for terrain. However, you can write a "file exists ?" checking for .wmbs and .hmps in Mill_control7 yourself, if you want, but this would increase the lag of the tile refreshing process again I think.

If you create an actor which follows you, you need to take care that he will not be created a second time, when revisiting a 9 tile set where the actor was created initially. A situation like that can occur. So use a flag to prevent double knights or monsters.

Timing problems: I did my best to find the best wait() state values for secure refreshing the 9 tile treadmill system. When the timing does not work synchron or it is not balanced, entities might appear in the wrong place or disappear. So you should check your worlds for placing all objects a little homogen perhaps and not too much in one place. Also test your world on a slower or faster PC.

I used an 1.3 GHZ Athlon, 1.5 GB RAM and an RADEON 9600 256 MB WinXP
and GSTUDIO Extra Edition Vers. 7.07 to develop Neomill7

--------------------------------------------------------------------

Note: Max. number of files in one directory in XP FAT32 is 65534   
 
Max. number of files in one Dir is in XP NTFS  4 292 967 295 

--------------------------------------------------------------------

OK. The neomill project is just a barebone for a full RPG or Adventure Game with large worlds or cities. However I think it leads in the right direction and the neomill worlds are editable at anytime and can be very large.

 I leave it up to you to enhance or modify the scripts, add housholding of entities or dialogs and levels and points as well as loading and saving situations or starting new levels (like caves) within Neomill7 worlds. You could also enhance the script for a space flight game by adding Z axis movement and Z tile milling. Or create a flight simulator.
Permission is granted by

J.Hunke

  
   

