December 12, 2024, 02:55:03 PM

Username
Password

Pages: [1]   Go Down
Print
Author Topic: Guide for Modding existing maps  (Read 9742 times)
0 Members and 1 Guest are viewing this topic.
olly
Global Spokesperson
*
Offline Offline

Posts: 2300



View Profile
« 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

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

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.


* 1.jpg (581.85 KB. 2560x1440 - viewed 896 times.)


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


* 2.jpg (1153.77 KB. 2560x1387 - viewed 809 times.)


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.


* 3.jpg (1119.07 KB. 2560x1387 - viewed 843 times.)


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.


* 4.jpg (996.64 KB. 2560x1389 - viewed 774 times.)


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.


* 5.jpg (1342.98 KB. 2560x1440 - viewed 792 times.)


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


* 6.jpg (1286.9 KB. 2560x1440 - viewed 764 times.)


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


* 7.jpg (1284.97 KB. 2560x1387 - viewed 806 times.)


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.


* 8.jpg (815.55 KB. 2560x1387 - viewed 772 times.)


« Last Edit: July 07, 2019, 07:58:30 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2300



View Profile
« Reply #1 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.


* Blender 10.jpg (844.53 KB. 2560x1388 - viewed 821 times.)


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.


* Blender10.jpg (1531.93 KB. 2560x1390 - viewed 897 times.)


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.


* Blender 11.jpg (896.24 KB. 2560x1390 - viewed 823 times.)


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.


* Blender12.jpg (681.57 KB. 2560x1440 - viewed 772 times.)


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.


* Blender 14.jpg (571.53 KB. 2560x1389 - viewed 785 times.)


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.


* Blender15.jpg (545.65 KB. 2560x1389 - viewed 749 times.)


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.


* Blender16.jpg (450.46 KB. 2560x1386 - viewed 767 times.)


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.


* Blender17.jpg (638.69 KB. 2560x1389 - viewed 802 times.)


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


* Blender19.jpg (637.14 KB. 2560x1387 - viewed 800 times.)

« Last Edit: July 07, 2019, 05:30:44 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2300



View Profile
« Reply #2 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)


* Blender21.jpg (1375.07 KB. 2560x1389 - viewed 819 times.)


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.


* Blender20.jpg (170.8 KB. 806x789 - viewed 732 times.)



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


* Blender22.jpg (609.8 KB. 2037x935 - viewed 820 times.)


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


* Blender23.jpg (772.5 KB. 997x1674 - viewed 815 times.)



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


* Blender24.jpg (173.97 KB. 1871x1386 - viewed 728 times.)



27) Test in-game


* Blender25.jpg (306.37 KB. 639x959 - viewed 693 times.)

« Last Edit: July 07, 2019, 05:31:25 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2300



View Profile
« Reply #3 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 ->


* Blender26.jpg (230.07 KB. 1158x927 - viewed 726 times.)


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).


* Blender27.jpg (537.78 KB. 2560x1389 - viewed 837 times.)


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 ->


* Blender29.jpg (266.05 KB. 1354x1638 - viewed 649 times.)

-------------------------------------------------------------------------------------------------------------------
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.


* Blender31a.jpg (523.9 KB. 1287x1900 - viewed 762 times.)


« Last Edit: July 07, 2019, 05:38:09 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Pages: [1]   Go Up
Print
Jump to: