Title: Guide for Modding existing maps Post by: olly on June 09, 2019, 06:25:10 PM *************WORK IN PROGRESS OVER THE NEXT FEW WEEKS FOR CAMPAIGN CREATOR MALUS*************
Follow on guide from the older Create-3d-scenery-tutorial http://forum.dark-omen.org/3d-scenery-models/create-3d-scenery-tutorial-t797.0.html (http://forum.dark-omen.org/3d-scenery-models/create-3d-scenery-tutorial-t797.0.html) All Dark Omen maps must be powers-of-eight in X and Y size (8, 16, 32 ... 192, 224 etc are ok, but 30 or 100 aren't). This new tutorial will demonstrate how to easily open and modify existing maps BASE.M3D landscape model, using Blender 2.47, Python 2.6, Apple QuickTime (to fix textures from appearing in pink), Rob's m3d-to-blender-converter, Crash's .PRJ Generator (Aqrit also kindly built us a height map generator) and Mikademus' CLI editor to import scenery onto the map. Download this Map Mod tool pack that contains all the tools and a 40x40 flat Dark Omen 2 mod map template for B6_01 that you can use to create hills with and then save back to Dark Omen to play. https://www.dropbox.com/s/xuv4qrgm5qqye3z/dark%20omen%20mod%20map%20toolkit.zip?dl=0 (https://www.dropbox.com/s/xuv4qrgm5qqye3z/dark%20omen%20mod%20map%20toolkit.zip?dl=0) 1) Download and install Python2.6 then install the old version of Blender 2.47 into C:\Program Files (x86)\Blender Foundation\ which will allow you to install the latest version of Blender into C:\Program Files\Blender Foundation\ if you ever require it in the future. Install Apple QuickTime to fix textures from appearing in pink. 2) Download and copy Rob's m3d-to-blender-converter Python scripts into C:\Documents and Settings\YourOwnUserAccountName\AppData\Blender Foundation\Blender\.blender\scripts 3) Copy the completely flat B6_01 map from the Map Mod tool pack and rename the original Dark Omen 2 Mod B6_01 to B6_01Orig and paste the flat B6_01 map in its place. C:\Program Files (x86)\Dark Omen\Mods\Dark Omen 2\GAMEDATA\1pbat\B6_01 4) Launch Blender 2.47 and check if the scripts have been installed correctly by selecting File -> Import ->Dark Omen .m3d and also Export -> Dark Omen .m3d. Then delete the two existing objects Cube (left click on it to select) and Camera (right click on it to select) to clear the scene. Split the screen by hovering the mouse over the dividing line between the middle and bottom sections and right click to Spilt. On the new bottom right hand corner screen select UV/Image Editor to display a model's textures. Select Textured or Wireframe in the View Point Shading options. [attachment=1] 5) With scene the emptied select File -> Import -> Dark Omen .m3d object B6_01 and navigate to C:\Program Files (x86)\Dark Omen\Mods\Dark Omen 2\GAMEDATA\1pbat\B6_01 and choose BASE.m3d It is vital for the importer to have the model's textures folder in the same location such as C:\Program Files (x86)\Dark Omen\Mods\Dark Omen 2\GAMEDATA\1pbat\B6_01\TEXTURE 6) With the map imported, right click on the terrain model and change from Object mode to Edit mode.Select View to change camera from Side Front and Top [attachment=2] To zoom the camera in and out scroll the mouse wheel. Hold the mouse wheel down to rotate the camera and hold down shift along with the middle mouse button to pan around. Remember to Ctrl Z to Undo if neccessary. Hold down shift while selecting Vertices, Edges or Faces to add to the current selection. 7) In Edit mode you can swap between Vertex, Edge or Face (Polygon). Also toggle between Wireframe and Textured. UV textures can also be replaced in the UV editor (bottom right corner), by Deleting their link to the Datablock and then selecting to Open a new Texture. If it still reverts back to its original Texture Datalink then type in the new texture name inside the Datalink. [attachment=3] 8 ) Click on a face then select All polygon faces by pressing the A button on the keyboard and then select Mesh -> Faces -> Convert Quads to Triangles but remember to convert back to quads and return to Object mode before Exporting again or assigning new textures. [attachment=4] 9) Press keyboard button A to deselect All and then press keyboard button B twice to circle select polygon faces and scroll the mouse wheel to increase of decrease the size of the selection. [attachment=5] 10) Click on the Blue arrow (Y axis) to raise the selected terrain. Then select a few faces in the middle to raise even higher [attachment=6] 11) Using the keyboard button B select a larger area around your new raised hill and then Press the keyboard W key to bring up the Vertices Set Smooth function and repeat until the hills is smooth enough [attachment=7] 12) Sometimes a UV Face will not appear on top of its Texture but can be auto placed back over the texture by selecting the Vertices (Keyboard key A) in the UV Editor and then selecting UVs Pack Islands or Ctrl P. Hold down the middle mouse button to pan around the UV editor and the mouse wheel to zoom in and out, to allow you to locate the misplaced Face. [attachment=8] Title: Re: Guide for Modding existing maps Post by: olly on July 02, 2019, 04:01:43 PM 13) UV Faces can also be rotated around the texture by drawing the direction of the angle of rotation, whilst holding down the left mouse button.
[attachment=1] 14) This allows the texture to be reused but the other way round, to allow new patterns to be created on the terrain. The new B6_01 mod map TEXTURE folder contains all the original ground markings from all of the original maps, for placing around tree bases, hills, boulder patches, cliffs, path ways and streams. [attachment=2] 15) It is useful to import some of the original maps before you start, to examine where they use specific ground textures and later recreate them on your own maps. [attachment=3] 16) The 40x40 mod map template can be reduced in size by simply selecting the unrequired faces (using the keyboard B key circle select) and then pressing keyboard Delete button, then choose to delete Vertices or Faces. Such as removing the top section to create a 32x40 new map. [attachment=4] 17) Deleting some of the terrain will require the _ledge object to also be trimmed down, by switching to Object mode and selecting the _ledge and then switching back to Edit mode. Select the unwanted excess _ledge Faces and Delete them on both sides of the map. [attachment=5] 18) This will leave the top edge of the _ledge to move and reattach onto the existing _ledge Faces. Switch View to Top and after selecting all of the required faces, move them towards the existing ones, then zoom in as far as possible to align them on top of each other. [attachment=6] 19) To Merge/Join together the aligned Vertices, select the existing _ledge Vertex and then holding down Shift add to the current selection the newly aligned top edge Vertex. Then press and hold Ctrl then M and select to Merge at the first Vertex (the existing _ledge Vertex). Repeat Joining the remaining Vertices that have been aligned on top of the existing ones, remebering both sides of the map. [attachment=7] 20) After Merging it is vital to check that no Double Vertices exist, by Selecting All of the _ledge Vertices (keyboard A button) and then navigating to Mesh -> Vertices ->Remove Doubles and the resulting amount of Doubles will appear that have been removed. Ensure no Doubles ever exist as it will cause the Exporting of the new map to fail. [attachment=8] 21) The Terrain Box02 and the _Ledge will now be same sizes 32x40 and once happy will the amount of new hills generated for the Height map, it is nearly ready to save. However, remember to remove any Doubles and ensure all Faces are converted from Quads to Triangles and switch from Edit mode to Object mode before selecting File -> Save As a .blend file. After saving select File -> Export -> Dark Omen .m3d and name the new mod map as BASE.M3D (after renaming any exisiting BASE.M3D files) into C:\Program Files (x86)\Dark Omen\Mods\Dark Omen 2\GAMEDATA\1pbat\B6_01 [attachment=9] Title: Re: Guide for Modding existing maps Post by: olly on July 03, 2019, 08:08:01 PM 22) Now the real fun begins! Continuing with our new 40x40 (instead of the smaller 32x40 example)
[attachment=2] 23) The BASE.m3d file is now ready to convert into a BASE.m3x file that the game engine actually uses. Drag and drop the BASE.m3d file onto Rob's MapGridder program to produce a new BASE.m3x file. [attachment=1] 24) Install xnafx40_redist and then right click and Run As Administrator on Crash's Dark Omen Scenario Tool.exe dost041314\dost\DarkOmenScenarioTool\bin\x86\Release Import B6_01.PRJ which will import the new BASE.m3d 40x40 mod map C:\Program Files (x86)\Dark Omen\Mods\Dark Omen 2\GAMEDATA\1pbat\B6_01 and read his Help guide [attachment=3] 25) Click on Misc -> Generate Height Data and wait a few mins while it works really hard and may appear to not be responding but it will return and complete successfully. Afterwards Generate the ATTR data and select -> No this does not have a water model. Then File -> Export .PRJ and overwrite B6_01.PRJ [attachment=4] 26) To check if the new height map has successfully generated the new TERRain, open B6_01.BTB in the BTB Editor which will display the height map contained in the TERR block of B6_01.PRJ. BTB map dimensions equal the Blender map dimensions but multiplied by 80. (I've actually made this new 40x40 mod map as 3199 width by 3200 height, for you identify the width in the BTB editor. The map mod pack 40x40 is 3200 width by 3200 height). The earlier reduced sized mod map 32x40 would require (32x80 =2560 width and 40x80 =3200 height). http://wiki.dark-omen.org/do/DO/BTB (http://wiki.dark-omen.org/do/DO/BTB) [attachment=5] 27) Test in-game [attachment=6] Title: Re: Guide for Modding existing maps Post by: olly on July 04, 2019, 07:05:21 PM Add some FURNiture scenery using Mikademus' CLI Editor on B6_01.prj and create new INSTances and position them on the map.
28 ) Open your saved .blend map again in Blender and import some trees and bushes found in B6_01. File -> Import -> Dark Omen .m3d -> [attachment=1] 29) Make a note of the grid co-ordinates of where each item is positioned, to later use in the CLI Editor and BTB Editor (to add map boundaries around each item and block troop movement through them). Multiply each Blender dimension by 10 to calculate the CLI position coordinates (10 x 29 = 290) & (10 x 02 = 20) and Multiply each Blender dimension by 80 to calculate the BTB Editor position coordinates (80x29 = 2320) & (80 x 20 = 160). [attachment=2] 30) Before launching the CLI Editor, check that the basepath.txt points towards C:\Program Files (x86)\Dark Omen\Mods\Dark Omen 2\GAMEDATA\1pbat\ 31) Double click on CLI Editor.exe which will open an old style DOS command prompt and for example type -> [attachment=3] ------------------------------------------------------------------------------------------------------------------- Extra useful commands -> INST>help inst INST1>get min INST1>get max INST1>set min [0.00,0.00,0.00] INST1>get max [0.00,0.00,0.00] (Bounding box for solid buidlings) INST>list ex_walk INST1>set ex_walk 1 INST1>list ex_walk exit INST1>list deadmodel INST1>set deadmodel 8 (same as hut dead model) save INST1>list burning INST1>set burn 1 INST1>list burning save INST1>list wounds INST1>set wounds 6 INST1>list toughness INST1>set toughness 1 INST1> Save (and to remove again type) INST info INST> list livemodels INST> remove 1 INST> save ------------------------------------------------------------------------------------------------------------------- 32) Add and position the other trees and then preview in game, remember you can add many INSTances of the same FURNiture. [attachment=4] |