Adding custom level tutorial
- 3ds max (gmax) no older than 2011 year - Eshme Import/Export DAO Tools doesn't work with new versions.
- Eshme Import/Export DAO Tools - Script for 3s max
- Dragon Age Origins and Dragon Age Toolset - install it in the same folder as the game.
- Adobe Photoshop and Nvidia DDS Plugin for textures.
- mesh lightmap fixes - Install this project.
- Engine won't work with models bigger than 45 000 polygons and 30 000 vertexes. Even if it works still make sure your model isn't too complex - Lightmapping render can be failed.
Before we begin extract all DAO resources and keep it somewhere. You will need them.
You can use also the toolset to extract the model and textures, but fisrt you need to know the name of what you are looking for, in the tooset go File->Open file-> /packages/core/data/modelmeshdata.erf there you have some strings to help you find the models:
armours: arm_ +armour type; gloves: glv_; boots: boo_; clothes: cth_; robes: rob_; helmets:hlh_; weapons: w_+ weapon type; shield:w_shd; hair: har_; props:prp_;placeabes:plc_; creature: c_; npc creatures: cn_; children: kn_;
for races and genders you have human/elf/dwarf/qunari followed by the gender female/male, so human male: hm_; dwarf female: df_; etc.
- in the modelmeshdata.erf you need extract the .msh files the _0 files are the model you see in game when using the armour/cloth, the _2 and _3 files are the low level of detail (LOD) models, when other NPCs are using them and they are far away from you.
- in the .../core/data/modelmeshhierarchy.erf you need extract the .mmh and .phy files.
- in the .../core/data/materialobjects.erf you need to extract the .mao file.
- in the files .../core/data/textures.erf (props, placeables) and/or .../core/textures/high/textures.erf (characters and armours) you need to extract the .dds files, in those files the letter for the races in the file's name are changed to p, so human male, dwarf male, elf male, qunari male are all: pm_, because they all use the same texture.
Watch where you install Eshme script - program files(x86) for 32 programs at 64 bit computers. Eshme script and the game have to be in one folder of program files.
Take Eshme Import/Export: Startup, YAGG and DAOTools -> put into C(your disc):/Program Files/Autodesk/3dsmax/Scripts -> scripts
If your installation is correct them when you first open 3d man you will see window with the settings
In Game Path HAVE to be folder of the game C:\Program Files (x86)\Dragon Age, in Export Path folder Override in folders C:\Program Files (x86)\Dragon Age\packages\core\override.
Next sctar of 3d max you can begin your work in 3 d Max -> Run Script.
Size of the texture have to be :4 1024 -> 2048 -> 4096 -> 8192. You will need 3 type of them and you probably need to connect textures because DAO engine works only with one material at one model. Put them all in one file and make the same posistion for each part of every type:
1) Diffuse map. Has "_d" letter in the name. What your model will looks like. Create Alpha channel and make it white inless you have parts than need to have "holes" in it. Then it will looks like that:
2) Normal map. Has "_n" letter in the name. It is grey texture. Just save your Diffuse map with this settings:
How it has to looks like:
3) Spectacular map. Has "_s" letter in the name and necessary for the lightmapping. Just take duffise texture the modify it image-> adjustments ->brightness brightness:45, contrast: 95 and copy its blue channel to alpa. The texture is ready.
Save you textures. Normal map settings is listed above. Diffuse and Spectacular settings:
4) All textures put into Documents\BioWare\Dragon Age\AddIns\your Module_ID\module\override in the same folders as models. Each model has to be organised and be in it's own folder. Make sure each model has all 3 types of textures and each type has it's letter. Example: prp_namemodel_0d, prp_namemodel_0n, prp_namemodel_0s.
Select your model and on the panel above use Rendering-> Material editor-> Compact material editor Then click on Get Material and choose from the list Dragon Age Material.
In Material Type choose Prop Default, in Render Semantics – Default (Opaque Prop)\ Trasparent if you have any transparency. Select your texture in Texture Maps - diffuse, normal and specular. Select your model and click on Assign Material to Selection (1) and use Show Map in Viewport (2). Now give your material proper name without _0 in the end. Example: if your model texture is named is prp_orl_bed_0d name the material prp_orl_bed.
More than one texture
Necessary step if you connect more then one texture for a model. But even if your model has only one texture it is better to make sure evertything is correct.
Select your model and then open Modifiers-> UV Coordinates- > Unwrap UVW
You will see something like this:
Geen lines are coordinates of textures on the model. Dragon age: Oginins engine work with only one material and can "see" everything ONLY inside the bolder square form the picture. WChoose as background texture if your model and now move all green lines so it will cover it like is has to be. You can move materials one by one by choosing them in All ID's. You can change scale of coordinates, rotate them and do all manipulations you see necessary to make your coordinates fit to texture inside the square just like this:
Save and close Unwrap UVW.
After you finish working with the materials and the textures you can work with the model now. If your model looks rough change it by Right click -> convert to Editable Poly-> Vertex-> Select all (CTRL+ A)-> Weld. Before next step finish all fixes: Unwrap UVW, material and textures. If you move to next step without fixing you have to redo it from the beginning later.
1 - Right click on a model and select "Convert into editable poly"> In modifier list choose and add 2 Unwrap UVW to your model. In the second one you have to change map channel to 2 - this is the channel needed for lighmapping.
2 - For the rest part you need to look for this video becaue I cannot describe how this part supposed to work but you have to follow my instructions while you working with the materials. Dragon Age Modding: Creating Props using 3ds max
3 - While you using Runscript-> manage models -> look for your models and make sure they have those settings. Change collision Walkable\ Non walkable if this object lies on the floor. Mesh:
4 - Run script-> export and name your files with _0 in the end. EXAMPLE: prp_yourmodel_0. Since you use textures for the whole group you folders for each model has to be in one big folder for your group. Like this:
5 - After you port the model open MAO file with the Notepad and JUST after line <DefaultSemantic Name="Blend"></DefaultSemantic> add this line <Texture Name="mml_tLightmap" ResName="LM.dds" RequiresID="true"></Texture>. Now save the file.
Models for scaling
You can test the collision by pressing button "Fade cutaway" and see which models disappear - those don't have collision. You can change it by set Override Cutaway: false if you use model without collision. Now press "Fade cutaway" - the model will be in level now. You don't have collision to cover your whole model- you need it cover only part on the ground so your character won't walk through the model.
- "wallfull1_0" - Both. Wall with collision. Use it when you need wall.
- "wallfulldoor1_0" - Both. Door arch with collision. Use it when you need an arch without door.
- "support1_0" - Both. Two columns with collision. Use it when you need column- collision is cylindric form.
- tti_top01_01 - TTI ONLY.Celing without collision. Use it when you need an item on the ceiling without collision.
- prp_painting_01_0 - painting on a wall with collision.
- prp_chestornat01_0 - chest with collision.
- prp_chair_01_0 - chair with collision.
- prp_table_01_0 - table with collision.
- prp_tevbookshelf1_0 - bookshelf with collision.
- prp_vase_01_0 - vase with collision.
- prp_bed01_0 - bed with collision.
- prp_cand04_0 - chandelier from above no collision.
- prp_dwfrug2_0 - rug on the floor.
- fca_floor01_0 - floor with collision.
Save your .LVL files in Documents\BioWare\Dragon Age\AddIns\your Module_ID\core\env. Make sure .ERF and .ERF.BACK are here too after you press "Do All Local post".
1) NOTE:ALWAYS port your custom levels from SINGLE PLAYER! Manage modules-> Single Player-> open your LVL there.
2) Add minimap. Right click, then select Minimap > Minimap Selection Tool. The default green box appears. Right click on the area again, Minimap > Post Minimap to Local. It's possible to handcraft or refine the minimap, as detailed under Custom minimaps.
3) Press Button "Render lightmaps".
4) Press button "Set Start point" for Pathfinding -> Press button "Generate pathfinding". NOTE: Pathfinding is not possible for two overlapping height levels. Also generation fails if you put the start point in collision (non-walkable part) so watch carefully where do you put it.
5) Press button "Do All Local post" - this will export your level and you can use it in your area. Files will be ported into Documents\BioWare\Dragon Age\Toolset. Or use Search for each location name in Documents.
6) All files have to be in folder in Documents\BioWare\Dragon Age\addins\your Module_ID\packages\core\override. Each model has to be organised and be in it's own folder. Your Custom model and texture files has to be in the same folder as your ported Levels.
Make sure that your folder has all type of files also with folders Textures and trees.
NOTE: When you will make Builder to Player packed you will be asked to delete some of files NEVER DO THAT! Instead before creeating create different folder with the same name toolsetexport and keep there all you level files and custom level models. Keep also all your custom model armor and items in new folder override. After that create Builder to Player withou these files and look for next step
It is well known issue with B2P exporter when your file have more then two dots in name. Usually it is with *.gpu.rim files so here is simple how-to to pack your areas into dazip.
So you go ahead and create your dazip file without your areas. I’m not gonna explain here how to create dazip file, I assume you already know how to do that. Now when you have your file ready, open it with 7-zip (you can also do the same with any app which can open zip files – note that dazip is just a renamed zip file).
SO WHEN YOU HAVE OPENED YOUR DAZIP FILE WITH 7 ZIP:
- Navigate into “contents” -> “packages” – > “core” folder.
- There should already be a “data” folder. If there is already folder named “override” you are ready to go. If not -> Right click onto view and select “Create folder” and name it “override” (without quotes of course). Here I usually create another folder into override named “env_short_name_of_my_mod” like “env_yad” to keep things grouped, but it’s not needed.
- Drag your areas into that folder. They will be automatically added to dazip file. Exported areas are usually grouped into folder named by your exported level name which you have set up in your level editor.
Be aware that anything you put in packages/core/override folder can override all other resources from game if they have same name.
When dazip is installed with damodder, it will unpack your areas into packages/core/override on target system.
ON TARGET SYSTEM:
Your areas (levels) will be unpacked into ../packages/core/override/env_your_mod_short_name/..
If user wants to uninstall mod, he must also manually delete “env_your_mod_short_name” folder from “../packages/core/override/..” folders in their documents folder after mod uninstall with damodder.
If not, your areas and items will be, or can be, used by game further on (other modders can use your areas, and items will continue to override other same named resources in main game).
You can use similar procedure for almost any resource from the game. You just need to follow exact same folder structure as in your mod, remember, mod is working on your PC with your files without any erf files or similar.
8- Done. You module is ready to play.
- Installing the toolset - very important for program troubleshooting. NVIDIA_PhysX section- if you have pathfinding generation problems.
- Bug: Water plane missing in-game - how to fix this bug and make your water appear in the game.
- Bug: New level doesn't work correctly - how to fix it if your level doesnt work.
- Bug: Bulder to Player with new level issue - description of the bug.
- Lighting Tutorial - Lightmapping troubleshooting.
- Level Editor Tutorial and Level tutorial - General advises.
- Adding custom armor tutorial - How to add your own armor.
- Adding custom shield tutorial - How to add your own shield.
- The .lvl files from DAO the Single player and core resource source files project, if you wish to modify the layouts in the level editor.
- 3D converter