Dragon Age Origins Level Creation Part 2
As you know we used one of Biowares levels for part 1 because level creation is a big topic just for the basics. Which is why I am covering it in this tutorial Part 2.
This tutorial will show you how to make your own levels and get them working in the game. If you already have your own module and just want to learn to make levels for it and import them, then this will help you too. Only the area you link too differs here, I assume its the one from the above tutorial but it could be an area from any mod that your creating a new level for.
I must warn you, that the first time through, this tutorial is a pain in the .... okay lets not say the A word, but its a long slog because the toolkit is a ... long slog. No way to avoid it I am afraid. But you will find the difficulty comes from not knowing where everything is and trying to guess what the word SAVE means in this toolkit. Once you start seeing how the toolkit actually works, it becomes very easy to use.
But it is initially so alien, you will find it hard to believe a human wrote it.
First thing to know is the Toolkit requires something called ActivePython 22.214.171.124 be installed and if you wish to be able to set up the lighting in your mod (and you do want lighting in your mods, so do not ignore this). Python 2.5 which is supposed to be the same as ActivePython does not work with the Toolkit or ActivePython 126.96.36.199 and so will have to be uninstalled if you already have it on your computer. This may break any program that needs normal Python 2.5.
Python 3.1 does still work but if the light render feature of the toolkit fails to work, you might have to uninstall it too, install Active Python first then reinstall Python 3.1 to fix it. This does work.
The other thing you need to know is the Toolkit does not function correctly with 64bit versions of python, you have to downgrade to the 32bit versions for it to function but once you do, it will work fine. ActivePython 188.8.131.52 can be downloaded from HERE.
Creating your Levels.
First load your mod in the toolkit and go to the Area section of the Palette Window and check your area is available there. We will be importing our new Level in to it when we are done.
Next right click and select NEW and Level to open up the Level Creation Wizard. Our first Level is going to be an outside level so select Terrain (Landscape) Level then click next. The default size is 64 Desired Width (East/West) x 64 Desired Height (North/South). This is tiny, but so is 128x128. 256x256 is the max recommended size for performance reasons but not the biggest size you can have. But for this tutorial we are going to stick to 256x256.
The reason is any unused area will be used as background to our level, we can build mountains there, create shorelines, anything we want the player to see in the distance.
After you have set the size, just continue clicking next, okay or continue until a flat green area appears as your level.
Now if you look at the Object Inspector, you will see the name is Terrain World, so we want to change that so give it a new name. One that best describes what the area will be. I think I'll call mine simply West Hill since it is the West Hill area leading to the keep that I am creating here as my own pet project. You should name yours according to what you want to create.
Now if you followed the first tutorial, you will have enabled some hidden menu options. If not we need to enable them again now so go to the Toolbar below the main menu and look for a small black downward pointing arrow and click on it. The Toolbar with the disks for save should have one so just use that.
Select Add Remove Buttons and then Customize from the menu that appears now scroll down from the toolbars tab and make sure all the Level Editor options are ticked, we will be making use of them today.
Now look for the toolbar below the main menu with green icons on it. One will have a small hill with arrows pointing up on it, another will have a hill with its peak chopped off and another quarter circle icon. Use these to sculpt the terrain as you see fit. But try and make sure the area you want the player to explore is at the center of this level and leave a good area around it for the view.
You do not want the player walking up to the horizon of your level because all he will see is the edge of your map, so we use the edges to create a view he can look at instead and fence off the playable area later to stop him leaving it. I will explain how this is done later, do not worry.
The main icons you will use here are the Deform icon, the Plateau Icon and the Smooth Icon. These will allow you to create your level.
You should now go and create a level using the above information, I'll explain how to paint it and other things when your done.
Painting your level.
How to paint you map........... humm first an optional bit of advice.
Tip (Optional reading)
My advice here is paint the cliffs, valley sides and hill sides first, they will reveal the virtical surfaces of your map and make it easier to see hills, valleys and low lands.
If you look over to your writable copy of your level, you will see terrain mesh and under it palette, that palette has Cobble, Dirt01, Dirt02 and Grass available in it as presents but nothing else. You can use these to paint your map but there's a limit on how many textures you can use. So try not to go too mad.
To add more textures to paint with simply do the following.
Select Palette from your levels left hand side window and right click and select Insert an then New Material.
Now look at the Object Inspector Window whilst your new material is selected under Palette. Change the name to something that describes what you want and then scroll down to Textures in the Object Inspector Window. You will notice if you examine the other textures that terrain textures all start with TER_ so lets find some.
I am assuming your interested in choosing some ROCK textures, in this case ter_rock03 to be exact.
Select Diffuse and find ter_rock03_s.dds by clicking on the 3 dots and scrolling across across until you find what you want.
Next select Normal (stands for Normal Map btw), select ter_rock03_n.dss
Finally select Specular and select ter_rock03_d.dds
That's it, you now have a new texture called rock to paint with. Feel free to add more but you can only blend 2 (or is it 3) textures on your map and your only allowed 8 total. So do think about what you need before painting your level with lots and lots of different textures.
PathFinding & Exportable Area Properties
After painting your level you must now learn a about very important step in level creation, I wish I could clearly explain in a few paragraphs what is involved but I cannot, so your going to have read this next section very carefully. This deals with Exterior levels mainly but the interior levels have a stripped down version of this. Especially for lighting and path finding.
In order to ensure the generate pathfinding only works on areas you want the character to walk in, you have to set some boundaries first. These are called Terrain Collision and are represented by Mountain icons on the tool bar. You might need to enable the icons first if you have not already, that little downward arrow is used to customize what toolbars are available to you as mentioned earlier.
Select Build terrain collision (one of mountain icons, I will cover interior levels further down this tutorial) and click on an area that's right between a walkable area of your level and an area you want to be unwalkable to start building your wall in that point, then click on a similar point further away, tracing around the walkable areas so a blue wall appears and when your done that encircles the entire playable area of your level. Untick the mountain icon for Build terrain collision.
Note: Interior walls automatically block movement, so when designing interiors, the walls you place do the same job as the Build terrain collision icon.
We must now must finish off defining playable areas and this is done via the Exportable Area Properties toolbar. It should be available under the main menu. A white empty box you can type in and a strange icon will be next to it and next to that will be a giant + and - sign. Click the big + to "Create an exportable Area".
This is the secret to solving the Bioware Aliens puzzle of level editing so pay attention.
You will notice your new level has suddenly has green, yellow and red squares on it and the Area properties window has opened. First lets give it a valid name, in Area properties where it says Layout Name, give it a valid name. You will notice the number of characters for names is limited so do the best you can.
Note: Interior levels have the Layout name displayed in the Object Inspector and it too comes with an invalid name by default.
If you click Define Area, you will be able to adjust the box, the green box is the playable area so that must surround your playable area completely.
Once done look at the toolbars below the main menu again for a red flag icon called "setup start point", click on it and then click inside your Blue Walled Area so the startpoint appears right the middle of it. This is not literally where you start, it is merely a way to say "hay Toolkit, this is the part that needs a path, so only make your path fit between me and those wonderful blue walls I made".
Note: Interior levels also need this startpoint too but not the blue walls.
If you look on the same bar as the red flag icon you will see a Paw print with a name "generate pathfinding for active area" and that weird icon with red yellow and green areas shows or hides the pathfinding nodes once they are generated. Since you have already done what needs to be done to generate a new path, click on the paw print now to make a Path for your levels walkable area. When your done you should notice the green path nodes only exist inside your blue wall, nothing outside that wall is walkable and is thus your distance terrain can be decorated as you see fit.
More on that later.
All the external lighting can be set from the Area Properties window above, such as can the fog and other things. When setting up the look of your external area, you must use these settings. Also any object you place on the map before setting the light up here will not use the new light settings until you move that object slightly. That means trees might appear to glow in the dark unless you move them first, after that they automatically start using the new light settings. In fact the moment you move then you should see they way they are lit suddenly change to the correct light colors.
This is why we set the light BEFORE we plant the trees and other things. Imagine moving everything again later because of this annoying issue.
ARGH!!!!! its those Aliens, they do not want this to be easier.
Note: I noticed objects are effected by this too but this solution does not appear to work for them. So let me know if you find a find a solution to objects not using the lighting you set up and I'll add it to this section.
Decorating our level with some Objects.
To place objects in our level such as walls, housing and other things, we do not use the new placeable option. Instead you need to click on the icon that looks like a black castle on the toolbar called "Model Placement" or the Blue Cube in the palette window. Next to Black Castle icon is another important item called "Scatter object tool" that we use to place trees, so remember where you saw it, it looks like a green grassy field icon.
To show you how to add objects to your level, I will now explain how to do it before moving on. First lets reveal a problem, offer a solution and show you where to look for objects at the same time.
Click on the Black Castle Icon and then look at the object inspector. Under model tool in the Object Inspector is Name, click on the 3 dots in the white area and a "requester" will appear. Requester is the name for a window that opens that allows you to choose a file. We call them File Requesters since they are usually used to open or close files.
Now you have thousands of files those aliens expect you to wade through to find the one you want.
You can also see them by clicking on the Blue Cube in the palette window, this may appear more organized but your toolkit will slow down to crawl sometimes when using the Blue Cube method.
I take it you now see the problem I mentioned above, so many files and no way to know what they do or look like without placing them on the level one by one.
Thankfully a second group of Aliens at Bioware revolted and put a complete list including photos on the wiki so you can use the wiki to find the object you want and then look up the file name in the toolkit. You can access the list by going to the Wiki's model List Page. As you can see the list is organized in to sections so you can easily look up what you want.
Adinos tool is also mentioned there.
Adinos DATool does the same job. Rather than post a link, I'll tell you how to find it because the link I had has already broke and may do so again. On the Bioware social site click on browse projects and then simply enter DATool in the search box. Any tool by that name will appear automatically. The one you want is the DATool: DA model manipulator by Adinos. Adinos is user that turns up in the most helpful of places so be sure to say thank you to him when you see him :)
So now you know a solution or two for the problem above lets move on.
Click on the Black Castle Icon named "Model Placement" then go to the Object Inspector window at the bottom right and select the 3 dots next to NAME or use the Blue Cube icon (Models) from the Palette Window. Using the Wiki or DATool, find an object you want to place on level. Then use either the Blue Cube icon or the Black Castle method to select it and add it to our map. If you are low on ram, I recommend the Black Castle method.
Now use the toolbars "3 Axis movement", "3 Axis rotation" or "Local Coordinates" to adjust it as needed.
If you look under your level name in the main window, the object will have appeared as used on the level. Shame the aliens that made the toolkit did not let us select items for reuse from that list because it is common to need the same walls, doors etc as already appear in a level. Instead we have to click on the Black Castle Icon named "Model Placement" or the Cube in Palette Window list and find the object again.
Cut Control C and Control V may solve that problem, thats Cut and Paste btw. Control X is Delete and Control Z is undo. More on that later.
Anyway, that is how you choose which object to place on your level. You will need to have some sort of entrance created for the Room part of this tutorial (if you want a room) be sure to place house or something you can add a doorway too later.
Before we go on, let me explain the to add trees, then you can get on with decorating your level.
Decorating our level with some trees.
Time to talk about Trees, since I am writing this for noobies, I'll explain what a tree is, a tree is a big green and brown thing that falls over a lot these days thanks to global warming changing the weather so much. Or if your in the "its a myth camp", a tree is something that falls over due to the regular but all perfectly normal, record breaking storms we keep having...... :)
We will be placing some trees only only our trees will not get blown down because we are smart, we do not cause global warming on our levels do we.... oh no :)
Okay that was entirely pointless but it is good to lighten the mood some times :)
On with the show.
In the main level window, look for Vegetation on the left and select it, now right click and select Insert and then "New Tree Controller" (Bioware can explain why adding a tree requires a Tree Controller because I have no clue). Lets choose a nice easy to find tree. How about an Oak Tree.
Find and select ter_c_oak or what ever tree you fancy if you have other ideas and OK it.
Now if you look under Vegetation, tre_c_oak will have appeared (or the tree that you chose if different). Any normal person would select it and start clicking where we wanted trees to be but we are dealing with Aliens here so we have to be smart. Remember that "Scatter object tool" icon on the toolbar next to Black Castle Icon, the one that looks like a grassy field. Select that first, then select your new tree from the Trees list and start clicking to place new trees on your level.
If your paying attention you will see models is listed too, but if you look at what's listed under models after placing your own above, you will find it does not actually work, it remains totally blank..... Which is unfortunate, but the tree option does work so take full advantage of it and have a play around and learn what all the trees look like in the game.
Also remember to do this AFTER setting the light so the trees adopt your new light settings.
Clicking on the Black Castle Icon will hide the tree window that appears.
Now Find the "Do All Local Posts" icon in the toolbar and click it to produce an ARL that can be used as an area in the game, remembering to save the level one last time.
Adding your Exterior Level to the game.
Now back in the Palette Window, select the Areas Icon and select the exterior area you want to add the level you just made too and check it out.
Now click on the Area to load it in to the main window and go to the Areas Object Inspector, choose layout and select your new levels Arl file. It should replace what ever you had that. Existing doors and waypoints can be moved to new locations.
When your done, Check the Area in again and save it off from the file menu.
Creating a Room.
Before I start, my thanks go to St4rdog for his Youtube video on this topic, its not always as clear as writen instructions but it is a first class job just the same and readers of this tutorial may find it a great help to view it first then read this or view it whilst reading this. I certainly found it useful.
To create a brand new room go to the file menu and select New and then Level, when asked tick the "Room Level" button and hit next to create the room. Now you see Room World and under that New Area on the left in the levels main window. Select New Area and then select New Room.
Now select the new room and go to its Object Inspector window and give it a name.
Now select New Area and go back to the Object Inspector and look for Layout Name, by default it says <name of exported layout file>. Just like the exterior layout options above, this to has it's limitations and the name entered by default is invalid, meaning your forced to change it. So lets give it a new name right now, one that fits in the box. I'll call mine mycas01 but your can be anything. I think your limited to 7 characters here.
Some options are only available if you have the level name sellected, selecting an object often hides many level editing options. So be sure to select the names on the left if you find you have lost something and cannot remember how to bring it back.
Now select a floor tile from the Model list.
We will be using the Palette windows model list now for speed but remember you can use the Black Castle Icon if you have a problem. I'll provide the names of the models below, thats all you need to look for. It might actually be easier using the Black Castle actually because you can go directly to the file without bothering looking for folders.
Click on the Blue Cube. If your unsure where to look, just scroll down until you see the Floor01 folder and select fca_floor01_0 that is hidden inside it and use that.
Now select fca_floor01_0 and click on the grid in your area window to place one floor tile.
Select the floor tile you just placed and press Control C (Hold down CTRL and press C on the keyboard) to copy it and then Control V (Hold down CTRL on the keyboard) to paste it. Now select the tile again and move it and place it next to the first tilem you will see your original title is left in its original position and the copy is moved to its new location. Repeat this until you have a room with a floor the size you need it to be.
If you find you need to select something you already placed and your mouse pointer refuses to change from the last object you selected, just go to the level window and select the room name from the list on the left. It should allow you to select anything you placed already, or will eventually with some effort (Alien toolsets, what can I say). Holding down control (CTRL) whilst selecting an object will allow you to select multiple objects for copying and pasting.
The controls explained here are standard windows controls and can be used in many other programs so they are worth remembering. I rarely use the copy and paste menu options in programs because of these shortcuts being faster.
Now find a wall you like, I am choosing Wall01, e.g. fca_wall01_0 for mine.
Then I will be choosing arch02, fca_arch02_0 to form a doorway in my closed little room. I need to place 2 of these because its only half an arch.
Finally I'll be using Ceiling03, fca_ceiling03_0 to cover the room over.
This should create a small square room.
Whilst creating your room try and use Control C and Control V to copy something you already placed when building long walls because I found the snap to grid works a lot better if the object you have to line up, is a copy of one that's already placed.
I tried placing new walls and lining them up manually but was unable too do so effectively. So remember this tip, place a wall, copy it, move the copy in to position next to the first, copy the second, move it in to position next to the second, copy the third and so on. This will produce a nice and neat room for you.
Also make good use of the "change snap options" icon, thats the magnet icon near the mouse pointer icon in the toolbar. Sometimes you will need those options all turned on, other times you will not. My Snap settings are.
Enable Snap to Grid = 1.0
Snap to Z Size Independant 1.0
Enable snap rotation = 45.0
The latter is usually best left at 45.0 for any games toolkit I have found.
Now lets place some lights in our room, this is a little different from exterior lighting because we are not having our scene lit by the sun or moon. First lets look at your levels Object Inspector settings. An interior room needs no sun light so scroll down to Layout Sunlight and where it says Enabled, change it to False.
In the levels window, click on the room name and select NEW and Insert New Light.
Now select the new light and change the light type to Point - Static in the lights Object Inspector Window. Before you close it, look at the Affects Characters option, its set to False by default, change to True. Otherwise your characters will appear to be black.
Now place a second light and make that light type Ambient - Baked in the lights Object Inspector Window. This has no Affects Character option you can choose so do not worry if you cannot change it because its greyed out.
Dont you love having these grey areas explained, I always sat and wondered if I had done something wrong at times like these.
Move the Point Static light to the center of the room or near a light source model in the room, and move the Ambient light out of the way in the room. The Ambient light provides the colour for the dark unlike corners and tints the rest of the room a similar colour. Effectively creating the mood for the room.
The lights colour intensity accepts values of less than one, so try 0.5 and 0.7 or 0.001 and see how that works out.
Now there is an icon on the toolbar called "view models fully light" that over rides the lighting you set and hides it if turned on, so turn it off so the only lighting in your room is the lighting you placed. Now you should be able to see the room as it appears in the game and make adjustments to the lights as needed.
This will take practice to get right but if you load the game and it looks terrible but is otherwise working as intended, consider that a victory and have a beer. Then when you sober up, come back and play around with the lighting some more.
Next find the icon that looks like a light bulb on the toolbar, its name is "Render LightMaps" and select it. This is usually unnessessary since the Do all local posts also does the lighting but its a quick way to see if your ActivePython is working.
When I run it I get a few "failed to find lightmap -atlas info for model" warnings. Currently the light map script is not perfect and bioware is releasing updates to it on their forums as explained in the last tutorial. So expect some errors here. I'll update this tutorial with a solution when I find one, if one is even needed.
Next find the red flag icon called "Setup start point" and place a startpoint in the center of your room. Then find the icon next to it called "toggle display of pathgrid nodes and turn it on. Finally select the giant paw print called "Generate pathfinding for active area" and click it. A set of green dots should appear inside your room. The walls you placed should automatically block movement as seen by red dots after the path is generated. They act like the Blue walls you placed on your exterior level basically.
Now save your level under what ever name you choose and prepare to export it for use as an ARL file.
Find the "Do All Local Posts" icon and click it to produce an ARL that can be used as an area in the game, remembering to save the level one last time because the act of "do all local posts" updates the level file so you do need to save it again. Exterior levels too need saving in this way too.
Adding your Room to the game.
Now we add the room to the game but first we need to make a doorway to and from the level. So right click in the palette window and select New and then Placeable. Give it a resource name like Mydoor or something and okay it. Now go to "appearance" in the left hand side of the window that opened up and look at the line that says Door, Ferelden, Small.
Click on it and select the downward arrow. Now find a the Area Transition Doors in the list and choose a door that best fits your room design and entrance from the exterior level. This door way be used to enter and leave your room via your outside level. This door needs to fit that entrance I said you will need earlier.
Open up your exterior level open in the toolset by clicking on its name from the palette windows Area list and then make sure it is checked out. Now click on the Palette windows Placeables and select your doorway you wish to use (make sure this is checked in e.g. no green tick) and place your door where you need it to be using the system described above to place objects in a level.
When your done right click on the level and select "insert waypoint" to place a new waypoint. Then click on it and change its tag in the Object inspector to something like "entermyroom" (can be anything but you need to remember it later).
Now open up your room and check it out so it has a greentick next to it, place a door in your room and then place a new waypoint exactly as described above. Now select your waypoint and give it a new name (in the Object inspector), call it something like "exitmyroom".
Now select the rooms exit door and go to its Object inspector window. Select Variables so a window called Variables opens.
Where it says PLC_AT_DEST_AREA_TAG enter the destination area name as seen in the Palette windows Area list. This should be your exterior level name.
Where it says PC_AT_DEST_TAG, enter the name of the waypoint you placed outside the room. In this example we called it entermyroom so if you used my example, just enter that.
Now go to the exterior level and select the Door on that level then look at its Object Inspector Window. Go to variables again so the Variable window opens and this time do the following.
Where it says PLC_AT_DEST_AREA_TAG enter the destination area name as seen in the Palette windows Area list. This should be your room name.
Where it says PC_AT_DEST_TAG, enter the name of the waypoint you placed inside the room. In this example we called it exitmyroom so if you used my example, just enter that.
Now you need to check in all door and the levels so no green ticks appear and you should have a working connection between your exterior level and your interior rooms. Also remember to save your AREAs normally from the file menu since you have edited them and they will need saying.
What you just did was you placed waypoints inside and outside your room, these are the spawn points the player appears at when he enters or leaves your levels. You entered the spawn points name in the door that sends the player to that spawn point along with the name of the level the spawn point can be found in.
In theory you could have a door send the player across a canyon by using an invisible door over some magical flame the player has to put his hand in to. I explain this because there are ways of using standard features to create special scenarios and whilst all the players are patting you on the back for being clever, all you really did was make a standard doorway :)
Exporting your Model
Time to explore your mod, go to the Palette Menu and select Gobal to garrentee nothing else is selected and the correct export options are available.
Now go to the tools menu and select Export,
Then select Export with Dependant Resources.
Then select Generate Module XML.
Then select Generate Manifest XML.
Your module should be available to test in the game now. Load it up as normal, and see if the new locations work. Tweak as you see fit but take this bit of advice. Once you know the levels working, take note of what you edit whilst tweaking so you can learn how other more advanced things are done. If you mess up your mod, you can always undo the change then.
We are only temporary custodians of the particles which made us - Stephen Hawking
- Site Admin
- Posts: 2148
- Location: UK
- Uploads: 22
- Kudos: 60
- CPU: AMD FX6300 - 3.5 Ghz
- GPU: Nvidia GTX 660
- RAM: 8GB
- Storage Space: 750GB
- Sound Card: On board
- Case: Corsair Obsidian 550D