Welcome to Dawn of Eternity

In order to download and play the game you need to sign up for an account and activate it, it's free. Once you have an active account you will be able to see the download page at the top of the forum.

Sign Up

How to create your own map

Discussion in 'Help & Documentation' started by Myz, Dec 17, 2014.

Thread Status:
Not open for further replies.
  1. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    This topic is going to cover map making, it will assume you have absolutely no knowledge about map making so it's suitable for learning how to create your first map. Basic knowledge about editing text files and images will help.

    Things you will need:
    • Dawn of Eternity (duh).
    • Any text editor. I recommend Notepad++ and it is what I will be using here.
    • l3DT (linked below, in section 3)

    Each step below isn't really in order so try each step on a test map before making a proper one.
     
    #1 Myz, Dec 17, 2014
    Last edited by a moderator: May 4, 2015
    • Like Like x 1
  2. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    1. Editing a world file

    First you need to understand how a map is defined and where to put the files.

    Go to your start menu, find Dawn of Eternity
    and in there you should have a shortcut called Dawn, click on that and you will be brought to the installation folder. Alternatively you can navigate to C:\Dawn of Eternity if you used the default installation path when installing the game.


    When you're in the game folder you need to go into "my_content", in there you will have a "maps" folder, this is where all your custom made maps should be put to work properly.

    Okay, we should now be in the right place.
    Open the folder called "Tutorial1". You should see a file called "Tutorial1.world", right click that file and Open with Notepad++(or any text editor you prefer).

    You should now see this in your text editor:
    Code:
    [Initialize]
    5000
    5000
    200
    2500 2500 10
    tut1_terrain.png
    513 
    This is the absolute minimum a map requires to load, if you want to know more about what it means you can check the World file docs. The name of the map is decided by the name of the world file.

    Leave your text editor open and start the game, setting Full Screen to Off when starting the game will make map editing a lot easier so I recommend that you do that. When you're in the game hit your Actions menu(G), go to My Maps and Visit the Tutorial1.


    You should now be in a flat pink map like this
    dawn_of_eternity12182014_031018107.png

    Even though the pink ground looks fantastic you might want something more realistic so let's add a texture to our terrain. Go back to your text editor and paste this in below all the previous stuff.

    Code:
    [GroundTexture]
    Grass_Lawn.jpg
    
    Your entire world file should now look like this:
    Code:
    [Initialize]
    5000
    5000
    200
    2500 2500 10
    tut1_terrain.png
    513
    
    [GroundTexture]
    Grass_Lawn.jpg
    
    Go back into the game and hit your "DEL" key, this will reload the map and it should now look like this
    dawn_of_eternity12182014_031910136.png

    The texture is looking very stretched so let's scale it down from the default value(0.1 0.1) to 0.03 0.03 by editing our [GroundTexture] to look like this:
    Code:
    [GroundTexture]
    Grass_Lawn.jpg
    0.03 0.03
    Press "DEL" key again to reload the map, the texture should now look a lot less stretched out. If you want more information about [GroundTexture] you can check the World docs for it.


    Next thing we could play with is the sky, maybe it's starting to get dark in your map? Let's fix that by editing some basic Sky settings.

    Add the following to your world file:
    Code:
    [Sky]
    0
    0.7 0.7 0.7
    15
    
    Press "DEL", it will now lock the time at 15:00(3 PM), so we'll always have the sun up. Did you like the pink ground we had before? We could keep our grass texture but tweak the ambient light to get the pink back.

    Change your [Sky] to look like this and hit "DEL"
    Code:
    [Sky]
    0
    1 0 1
    15
    
    You should now have pink grass.
    dawn_of_eternity12182014_040950057.png


    You should now how a basic understanding of how to edit a world file and reloading the map after editing it.
     
    #2 Myz, Dec 18, 2014
    Last edited: Mar 23, 2015
  3. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    2. Spawning and placing objects

    We will use our Tutorial1 map for this as well so go there. We will be using the Object Editor to create and place our objects, to find more information about it you can go HERE.

    The object editor spawns things based on the cameras position so it's intended to be used in Free mode, so press F3 so change camera to Free mode.

    Type the following command into your chatbox to turn the Object Editor on: /editor on the chat will tell you that the Editor has been enabled and you will get some red numbers on your screen, the numbers are the cameras world coordinates and can be useful for manually editing things in the world file.

    You are now able to spawn objects, so let's spawn a tree by typing /editor spawn tree1 this will spawn a tree based on your cameras position and rotation and select it for editing. You can look in the game folder to find other objects, or you can search in the editor. Example: /editor search tree
    dawn_of_eternity12182014_044134964.png


    You can move your tree around with the arrow keys, you can use Right Ctrl and Right Shift to move it up and down.

    Press Backspace once, this will change the editors mode into rotation. You will now be able to rotate your tree using the same key as you did for moving it around.

    Press Backspace once more, this will change the editors mode into scaling. You can now scale the object in different ways with the same keys as before.
    This might not be what you want though, in most cases you want to scale your object equally in all directions, to do this you can use the Page up/down keys.

    If you want to select another object simply click on it.

    To delete an object you've spawned you select it by clicking on it with your mouse and then typing /editor delete


    Okay let's say we've spawned and positioned the objects we want. Now we've got to save them or they will be lost when we reload the map.

    Type this in your chat:
    /editor save Tutorial1
    We can also turn off our editor now.
    /editor off

    The objects will be exported into a text file in your my_content/exports folder. Go open the text file and you will find something like this:

    Code:
    [Object]
    tree1.mesh
    2342.33 207 3492.85
    0.69189 0.69189 0.69189
    -0.849739 0.195806 0.408695 -0.269397
    true
    
    [Object]
    tree2.mesh
    2387.1 199.248 3463.45
    1 1 1
    0.53877 0.00805425 0.84232 0.0125921
    true
    
    You need to copy paste this into your World file for it to be saved permanently so go do that. Your Tutorial1.world should look something like this by now:
    Code:
    [Initialize]
    5000
    5000
    200
    2500 2500 10
    tut1_terrain.png
    513
    
    [GroundTexture]
    Grass_Lawn.jpg
    0.02 0.02
    
    
    [Sky]
    0
    0.7 0.7 0.7
    15
    
    [Object]
    tree1.mesh
    2342.33 207 3492.85
    0.69189 0.69189 0.69189
    -0.849739 0.195806 0.408695 -0.269397
    true
    
    [Object]
    tree2.mesh
    2387.1 199.248 3463.45
    1 1 1
    0.53877 0.00805425 0.84232 0.0125921
    true
    
    
    You can now hit "DEL" and reload the map and your objects will spawn in it.
    dawn_of_eternity12182014_051258338.jpg


    If you decide you want to add more things or delete something simply turn your editor on again, delete/add the your things and export it again.

    If you forget to export your objects or your game crashes before you can export there is a file called backup.txt in your exports folder which will have the last spawned objects.
     
    #3 Myz, Dec 18, 2014
    Last edited: Mar 23, 2015
  4. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    3. Creating a heightmap.

    A big flat open map is kinda boring so it's time to create a heightmap to make it more interesting. There are multiple ways of creating or generating heightmaps, you can even manually paint it in an image editor. But for this tutorial we're going to use L3DT to create our heightmap.

    First go download and install L3DT from here http://www.bundysoft.com/L3DT/downloads/standard.php, select the Stable version.


    Now start L3DT and you will get this(when you first start it you will be given a tutorial which you can either chose to follow or just skip it since I will be explaining the parts you need for just making a heightmap).
    1.png



    Select File in the top left corner and hit New Project. Now you will get this screen:
    2.png


    What we want is Blank Heightmap so mark that and hit Next.

    Now you'll get this screen which is basically to decide the size of your map, the default settings actually work quite well for our purposes so we can just leave it like it is in the picture.
    3.png


    Click Ok you will now be put you straight into the editor(Sapphire):
    4.png

    We'll start with Closing the Sapphire window (hit the X in the corner of the Sapphire window) for now so I can show you how to restart it manually for when you close it later. After you've closed it you'll be back in L3DT.

    This is what you click in order to start Sapphire:
    5.png

    So go ahead and start Sapphire again so we can go ahead and learn the basic controls for moving around.

    W, A, S, D keys to move the camera around.
    E and R to move camera up and down.
    And you use Right click to pan the camera.

    Okay now the boring part is over and we can start doing what we actually want to do, so let's go ahead and enable the heightmap editor:
    6.png

    Your cursor now turns into a brush(you can change size of it with mouse scroll) and a window with a series of tools will appear. At the moment all of your terrain is light blue which basically means it's all flat at sea level, just like our current Tutorial map.

    Click anywhere on the terrain with your Raise brush selected, you have now created a hill, it will turn green to indicate that it's now above the sea level.
    8.png

    Now you just have to play around with it until it looks like you want it to. Try out the different tools and see what they do the ones you'll use the most are probably:
    • Raise, raises the terrain.
    • Lower, lowers the terrain.
    • Set to, sets the terrain to a specific height.
    • Smooth, smooths out the sharp edges.


    9.png
    Now that it looks like what we had in mind it's time to export it and put it into the game.


    Close Sapphire like we did earlier, now when you're back in L3DT we need to refresh our heightmap so go ahead and right click your heightfield tab then press refresh, this will build your height map.
    10.png

    It's built, now we need to save it. Right click the Heightfield tab in L3DT again and select the Export layer option. Now you will get a window with a bunch of options and this step is crucial.


    11.png
    First we have to select the file format, this should be PNG.

    Now the Filename, press the "..." button and navigate to your Tutorial1 folder, in my case it's in the default location which is: "C:\Dawn of Eternity\my_content\maps\Tutorial1". Now that you're there you need to set a filename, we'll just call it "tut1".

    We also need to re-size the heightmap to match our map settings. If you look at the [Initialize] part in the world file of our Tutorial1 map it's set to use a heightmap that's 513, which means we need to tell it to export as 513x513.

    When you've set everything up just hit Ok and it should create the tut1.png heightmap in your Tutorial1 folder. So now you need to edit the world file to use our new heightmap. Your world file should look something like this from previous tutorials:
    Code:
    [Initialize]
    5000
    5000
    200
    2500 2500 10
    tut1_terrain.png
    513
    
    [GroundTexture]
    Grass_Lawn.jpg
    0.02 0.02
    
    [Sky]
    0
    0.7 0.7 0.7
    15
    
    You need to switch out the tut1_terrain.png to be tut1.png instead.

    Code:
    [Initialize]
    6000
    6000
    750
    2500 2500 10
    tut1.png
    513
    
    There now it will use the new heightmap. I also messed with the first three numbers(width, length and height) of my Initialize to better match what I had in Sapphire. See the World file documentation for more info about it.

    If you go to the Tutorial1 map you should now see your terrain, if you want to edit it some more just go back to L3DT, edit, export and reload your map in the game with DEL.

    Also remember to save your L3DT project(Save > Save project) somwhere in case you want to edit your terrain in the future. Although if you edit your terrain after you've started placing things in your map then the things will end up out of position, so ideally you should never edit the terrain after you've started placing things on it.


    This is what it looks like in the game.
    dawn_of_eternity03232015_055259609.png


    This is what it looks after I messed around some more with it. Put a more suitable ground texture, added some water, trees and a boat.
    12.png
     
  5. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    4. Creating a terrain mask

    Sometimes you don't want the same texture covering the entire terrain, in that case you need to use [GroundTexture] combined with a mask to apply different textures to different parts of the terrain.

    To create the mask you will need an image editor, preferably one that can handle layers. Some suggestions are Photoshop, GIMP(free) or Paint.net(free). I will use GIMP in this tutorial since it's free.

    Start up GIMP.
    Open up your heightmap image in GIMP, I'll be using tut1.png that I made in the previous tutorial.


    Start with creating a new layer by right clicking in the layer window and hit New layer, use Transparency as the fill type.
    1.PNG



    Right now our map is entirely covered in grass so let's say we want to cover the mountain parts with some other texture.


    Select the new layer, select the paintbrush tool and a brush that suits your needs, I'm just going to use a basic one for this.
    2.PNG

    Now just paint the areas you want to cover with another texture, in this case it's the high points(white areas) we want to add a texture to.

    3.PNG
    I just made this quick and sloppy for demonstration purposes but you get the point.

    Now it's time to export our mask.


    Click the eye in the layer window to hide the layer with our heightmask then go to File and hit Export..
    4.PNG

    Navigate to your map folder in the Export window, you're probably already in the right place if you opened the heightmask from your map folder. Then select a name for your file, make it something reasonable like tut1_mask1.png and hit Export.
    5.PNG

    You should have the tut1_mask1.png in your map folder now so it's time to edit the world file.

    Mine looks like this from the previous tutorial:
    Code:
    [Initialize]
    6000
    6000
    750
    2500 2500 10
    tut1.png
    513
    
    [GroundTexture]
    Grass_Lawn.jpg
    0.02 0.02
    
    [Sky]
    0
    0.7 0.7 0.7
    15
    
    So let's add another [GroundTexture] to it:
    Code:
    [Initialize]
    6000
    6000
    750
    2500 2500 10
    tut1.png
    513
    
    [GroundTexture]
    Grass_Lawn.jpg
    0.02 0.02
    
    [GroundTexture]
    Cliff_Rock.jpg
    0.02 0.02
    tut1_mask1.png
    
    I'm using Cliff_Rock.jpg for my mountains. You can find some textures to choose from in the game/media/world/textures folder, make your own or try to find free ones on the internet.

    Then I select a texture scale that works well for me, in this case it's 0.02 0.02.

    Finally I add the tut1_mask1.png to show where I want the texture applied, and that's it, it should now work in the game so let's check it out.
    dawn_of_eternity03262015_181340264.png

    It's working, now just repeat the process if you need more textures on your terrain.
     
    • Dislike Dislike x 1
    • Informative Informative x 1
    • Useful Useful x 1
Thread Status:
Not open for further replies.

Share This Page