A - Z Beginner Full Guide Page 2

From The DarkMod Wiki
Jump to navigationJump to search

written by Fidcal

Return to previous page

Adding Objects, AI

Later we are going to extend our room to one or two more but first let's add a few objects to our room. There are static objects like tables and beds under RMB menu 'Create Model' and functioning objects like moveable crates and AI under RMB menu 'Create Entity'. For a list of where to find any object in Dark Radiant see Objects Index. For more info about objects in general, read Objects, General Info for Mission Designers.

Static Models...

  • Press Esc to DEselect everything
  • RMB menu > Create Model > darkmod > furniture > tables > wtable1
  • Put it where you like in the room and remember Ctrl + TAB to get a side view to place it on the ground in the room. Moving brushes or objects always snaps to the current grid so if you can't quite get an object in line with the floor or whatever then decrease the grid size temporarily in the grid menu or you can use the + and - keys. But remember to restore later back to 8 just for consistency with this tutorial.
  • Add a few more items of furniture of your choice. Not too many. Later we can shuffle them around when we add a doorway to another room then add more objects. I see this as a rough peasant's house not a grand mansion but choose what you like; put a picture on the wall if you like or a pot on the table. This learning process does not need to make design sense.
  • To turn any object you can experiment with the rotate tool button but for simplicity I will only cover the Resize and Rotate dialog (called the Transform Dialog.) This can be opened via the modify menu > Rotate and Scale. I recommend you assign a shortcut key in the help menu if you use it a lot or keep it open. It is fairly self-explanatory. You will mostly rotate around the vertical Z axis as you will more often be turning furniture around rather than turning it over. Use it to turn your furniture if you wish.

Functioning Entities are not all visible objects so don't worry too much about all the strange items in this list. We'll just pick out a few starting with an AI character...

  • Press Esc to DEselect everything
  • RMB menu > Create Entity > darkmod > AI. (shortcut is darkmod then type b to goto banners and AI is just above it) Non-combat > atdm:ai_townsfolk_male1
  • Put it where you like in the room and remember Ctrl + TAB to get a side view to place it on the ground.
  • Turn him around to face whichever way you like.
  • Likewise add a atdm_moveable_crate01_1, a atdm:moveable_small_spoon_ornamental, and a atdm:moveable_dining_chair2.

Let's make the man friendly so he doesn't hamper our testing...

  • Select the AI by pointing at it and Shift + Alt LMB. This is an exclusive select and automatically deselects everything else.
  • In the Entity Inspector on the panel check the 'Show inherited properties' at the top.
  • Scroll down to see the word 'team' and select it to highlight it.
  • In the box at the bottom change the team from 3 to 0 which is the player's 'team' and click the check button at its right.
  • Alternatively you can add/change properties by just typing the name and value in directly - just clear the box and type in team and the value below and click the check button. Yet another way is to right click the classname at the top and select Add property.

That's a beginning of furnishing our room with objects. In a real mission you would take a lot more and give it a lot more thought.

Ctrl + S to save and feel free to play it in game to see how it's looking. No need to dmap after adding objects - just use the map command as described before.

Adjusting the Light

if you entered the game again with the map command through Dark Mod then you may have noticed the light was a bit too bright - too harsh. This is how to adjust it...

  • Esc to DEselect everything
  • Select the light
  • You can just use J to call up the Light Inspector or...
  • In Entity Inspector select '_color'
  • At the bottom of Entity Inspector is a coloured panel - off-white in this case showing the brightness and colour of the light currently. Click it and the light inspector will appear.
  • Reduce the 'Value' (brightness) to about 40 and click OK. Note that this is shown as 0.40 0.40 0.40 in the properties of the light in the entity inspector. The three values are the red, green, and blue components of white and are to adjust the colour. You can tweak that. For example, gaslight might be slightly blue and torch light slightly orange but it's easier to do it in the light inspector in the colour selector.

Ctrl + S to save and just use 'map' again in DM(Dark Mod) to enter the game - no need to dmap for light changes as they are dynamic in-game. So you can quickly tweak a light value in DR, Ctrl+S to save, then map in DM to immediately see the result.

We'll adjust this room a little later when we have added some more rooms but for now it is done. Save the mission yet again with a NEW name (unless you have snapshot set in the Preferences.) When saving with a new name always first save it in the old name again then the new so both are uptodate. This is a bit over the top for this simple mission but later you will judge when to save - simply estimate how much work you are willing to lose: the last ten minutes? the last hour?

New Rooms: Extending the Mission

Regard the room we've done as a 'back room'. We'll now make a larger front room.

  • Esc to DEselect everything
  • Ensure the grid size is 8. It shows in the grid menu or in the status bar.
  • Ctrl + TAB to the top grid view
  • Drag out a rectangle starting on the big grid square to the north (upwards on screen) of the first room 448 x 320. The big grids vary with zoom so here's an image. Don't worry if yours mission varies from this as so long as you follow the principles it should work...
AZroom2.jpg
  • Ctrl + TAB to a side view and outside drag the floor down to the same internal floor level as the first room and drag the ceiling up one big grid size above the first so it should be 192 high and look something like this....
AZroom2B.jpg
  • As before, this new brush is a solid block.
  • with the new block selected, choose a wall texture in Media browser, same as before or a new one, and apply it to the whole block. (It's quicker than doing the walls one by one after it is hollowed out.)
  • Use the Room button on the left button bar as before to hollow it out then texture the floor and ceiling. Look back to #Making Your First Room if in doubt what to do.
  • Put in a temporary light as before.
  • Put a little furniture in as a living room and/or kitchen combo whatever just for quickness and we'll review it later. You can clone (duplicate) any selection, brush or object or combinations by hitting the SPACE bar then drag it away. When you clone ALWAYS immediately move the new selection. If you get distracted for a moment and forget it then it is not obvious it is there and you may forget and leave a table inside a table or a brush inside a brush.
  • RMB inside the new room and select 'Move Player Start here'
  • Ctrl + S to save and take a look at it in-game. You will need to dmap first to compile the new terrain and then map. You should be in the new room.

How'd it go? You probably found it too dim. Increase the brightness of the light probably to the full 100 100 100. Then SPACE to clone the light and drag the light to one side somewhere in the room. Make three if you like - one high and one low. We are going to completely review and redo the lights later so just make it reasonable for now.

Well now we have two rooms separated by the void so the next step is a doorway between them...

Doorways

There are many approaches to this. This is just one way.

First we need to know the size of our door (an alternate way is guesstimate the doorframe etc. then adjust after if needed.) Doors can be made of brushes but for this tutorial we shall use a static model and get it working later on...

  • DEselect everything
  • RMB in grid view and select Create Model
  • Select darkmod/architecture/doors/old_door_01.lwo
  • By default, the door will be aligned with the south wall which is what we want.
  • Place it in the small room touching the north wall centred in the second big grid from the right. Drag it down to just touch the ground in a side view, decreasing grid size if needed as shown below...
AZdoor01.jpg


AZdoor02.jpg

Doorframe

In a rough hovel, wooden hut, cave, or cellar you might just hang an old door without a frame but mostly in even modest houses it looks better with a frame and definitely in a grander place.

  • Ctrl + TAB for front view and RMB drag scroll zoom to get the front view of the door clearly in the grid view
  • DEselect the door
  • Make the grid size to 2 (grid menu or +- keys)
  • Drag out a brush units = 64 wide x 12 deep x 8 high and place it over the door as the top of the doorframe aligned to the grid as shown in the image below. Drag out two other vertical brushes each 6 wide x 12 deep x 104 high and place them at the side of the door as shown to form the doorframe sides. They penetrate the wall for now but later we shall open out a corridor. Give all three of those entire brushes the texture darkmod/wood/boards/scratched temporarily (we'll adjust later.)
AZdoor03.jpg
  • Depth-wise it should be exactly over the centre of the door exactly against the face of the wall...
AZdoor04.jpg

Because the outer edges of the doorframe align to the big grid it aligns reasonably well with the stonework around see below. Note it just fits under the course of bricks above which is good. (You might have a different wall texture.) Try to avoid cutting half way into bricks like that or worse, leaving a thin sliver of bricks or stone. Think structurally.

AZdoor05.jpg

But you can see the wood texture alignment is pretty bad and we'll fix that next.

Texture adjustment

The horizontal top of the doorframe in the picture above is aligned wrongly; the grain of wood should be aligned to the length of a beam. Also, this texture is boards (planking) so will show the gaps between which must be aligned out of sight. Wood never really comes in an endless sheet anyway - it comes from trees! With experience we could have made one vertical of the doorframe (whose texture is aligned vertically) aligned it better, cloned it for the other side, cloned it again, rotated it, and resized it for the horizontal piece.

Texture Lock

Texture lock is most important. It is a mode toggle (Shift+T or on S>Surface Inspector or DRtexLock.jpg on the top button bar.)

  • When ENABLED it keeps a texture aligned to its surface even when moved or rotated. This means a wooden beam will look just like it would in the real world if you moved or turned it - it would not change relative to the beam.
  • When NOT ENABLED then the texture aligns to the world. This means different surfaces will align together when placed together. So if you cloned a wall and moved the duplicate to one side and a little higher, its stonework would align perfectly with the first wall.

I mostly keep Texture Lock enabled but you need to keep it in mind whenever moving textured brushes: do you wish the brush's surface textures to align with the world or the brush?

Texture Alignment with Surface Inspector

This assumes you used the same texture and constructed the doorframe as I described above. If your alignment is different then use your own judgement where to apply the following.....

Rotation...

  • Esc to DEselect everything
  • Move the camera so you can see the front and top of the doorway in the camera view
  • In the camera view use Ctrl+Shift+LMB to select the front surface of the top horizontal of the doorframe. Make sure you do not select the whole brush with Shift LMB or Shift+Alt LMB.
  • Press S to get Surface Inspector to show/hide or View menu. Tip: Hot keys might not work if you are focused in an input field. Just click somewhere else.
  • In the step input to the right of rotation type in 90 if it is not already there.
  • Click the righthand little arrow button to rotate the texture 90 degrees else you can just type 90 right in the rotation input.

Shifting (scrolling)...

  • Set the step input for Horiz and Vert Shift to about 4.
  • Use the arrows for Horiz and Vert to scroll the texture about.
  • Note that Vert moves the texture horizontally now because we rotated it.
  • Note that the dark lines of the edges of the boards texture scroll in and out.
  • Scroll the texture so the dark lines are not showing and the beam looks OK.
  • Note for the future: When cloning many beams in a row don't have them all identically aligned but shift for variety.

OK, now in the same way you have to inspect ALL of the visible surfaces of that brush one by one and see how they look. Yes, even on top where the player might never look! (someone will!) Rotate/Shift where needed (small end pieces might be vertical or horizontal grain or even 45 degrees - use your judgement.) The far side of the brushes will also be visible eventually so do that too (see next para!)

Tip: When inspecting, if any model or brush gets in the way of the view just select it with Shift+Alt+LMB and press H to hide it. So you can rise above the ceiling then 'Hide' it below you to look down into the room. Hide the wall so you can get at the back of the doorframe. You can keep hiding more stuff as you go along and use Shift H to reveal them again. Don't forget them! Another way might be Filter menu > Hide all entities to hide all the furniture in one go.

Likewise do the side brushes of the doorframe.

Finally, Shift H to unHide and give the whole doorframe and door one last inspection. Looking good?

Corridors, Recesses

This will be a small recess rather than a corridor but the principle is the same : you just make a corridor like a small room except you won't need the ends wich will be open to the rooms either end. You could make a solid and hollow it out and then delete the ends or make walls, floor, ceiling as separate brushes yourself. In this case the recess will be the same textures as the big room so another option is to clone the sides from it and reduce them so let's do that...

  • Esc to DEselect everything
  • Check grid size is 8
  • Set Texture Lock OFF. This will ensure the texture will align to the world not the original brush. In this case it probably would be alright and the worst that can happen is you have to re-align the texture (but you wouldn't want to do that with an entire house.)
  • Shift+Alt+LMB to select the left wall of the big room. You may find it easier to make these selections in the camera view. Repeated Shift+Alt+LMB will cycle down through different items if they overlap in the grid view.
  • SPACE to clone it. Don't wait... drag it away immediately so you never forget it's there.
  • Drag it in the space between the two rooms near the door
  • Resize it to 48 x 8 and position it so it fits exactly as shown below between the two walls. It should be just to the left of the doorframe and touching it. The height is OK as it is.
AZdoor06.jpg
  • Repeat the above with the other wall and put it to the other side of the door
  • Similarly do the same with floor and ceiling. These should become 64 x 56 and fit between the recess side walls touching the south wall, but intruding into the north wall (this will make more sense later.) I have 'deliberately' made a mistake with the floor which we'll correct later so you can see it's no biggy if you get things wrong - you just adjust later. See the red outline of the floor and ceiling in the image below....
AZdoor07.jpg

Ctrl+S to resave the mission.

'Cutting' through walls, Joining Rooms

First, a tip: when you are resizing a narrow brush like a wall it sometimes happens that you accidentally move sideways and reduce its narrow width to zero - nothing at all. DON'T LET GO! If you release the mouse at that point it will be deleted! Instead move your mouse to that side so it re-appears. If you are in doubt as to its dimension you might need to Ctrl+Z undo. Get into the habit when resizing to keep your mouse button held down and only release when you know you can see the brush. I personally wish a brush could not be reduced below one grid unit. Later I will describe methods of moving and resizing which stop accidental side movements.

Now, you cannot actually cut holes in brushes you just surround a space with smaller brushes. The following is easy but it might sound complicated so just try it and the worst that can happen is you have some undoing or reload your last save. So to cut out our doorway do the following...

  • In the small south room face north in camera view looking at your door (this can be done in grid view but it's easier to be sure what you're doing.)
  • Shift + H if you have hidden the wall to UNhide it so you can see both door and wall.
  • Esc to DEselect everything (wish someone had nagged me with this when I started and maybe I would not have lost so much.)
  • Select the door and H to hide it.
  • Select the wall.
  • In the grid view, press SPACE to clone the wall
  • Immediately LMB drag towards the right from outside' the left edge of the wall to reduce its length to just past the right doorframe and touching it.
  • I'll clarify that - you are cloning the wall then moving its left side along past the doorframe like opening a curtain from the left.
  • In camera view you should now see the original wall to the left of the doorframe and also inside the doorway. To the right of the doorway are both walls occupying the same space with just the new clone still highlighted
  • Shift+Alt+LMB select the original wall to the left of the door.
  • You are going to reduce this starting from the opposite' end on the right...
  • LMB drag towards the left from outside the right' edge of this wall to reduce it past the left edge of the doorway. Again, like opening the other curtain.
  • You should now have two walls; one each side of the doorframe and exactly up to it.

Now we need to repeat the above for the south wall of the big room. I'll just summarise: you need to clone the south wall and reduce it to one side of the gap between the short connecting walls of the recess and the same for the original wall. Remember - like dragging curtains aside.

AZdoor08.jpg

If you look south in the camera view from the big north room you will see that all that remains is the gap over the door frame...

  • Clone one of the north walls of the little south room
  • reduce its width to 64 and height to 80 and move it up to fit over the door exactly. It's top corner should just meet the corner edge of the little piece of ceiling we put in the recess. Here is a side view...
AZdoor09.jpg
  • Esc to DEselect the section we just put over the doorway.
  • From the north you should see it is the wrong texture for that recess and that big room.
  • Shift+Ctrl+LMB to select its north face in the recess and re-texture it to the same as the other walls in the recess (same as the big room.) You can copy and paste the texture or get it from the Texture Browser by just clicking it there.
  • You will also need to re-align/rotate the texture on the doorframe if you didn't do that side before

If you examine what has been done by moving about in the camera view you will see the 'deliberate' mistake in the little piece of floor in the recess. Hide the door and you can see there is a gap. Here is a side view.

AZdoor10.jpg

Just select that side view in the grid view and resize it to close the gap. The doorway should be complete. Zoom around in camera view and check it out.

I suggest you clone a light in that big room and drag it near the recess for now.

Ctrl + S to save and then Save As with a new name.

You can now dmap (the new name.) If you get a leak error then use File Menu > Pointfile in Dark Radiant to see a red line pointing the track of the leak. Did you leave a gap?

Map to play through. BUT the door will not yet open so move the player start in one room then the other (RMB menu) then map again to see the door from both sides (no need to dmap.)

So now we have to get that door working.....


Making a Door Open

Beams

Make one beam here to explain caulk... then clone it after

Hidden Surfaces, Caulk Texture

Looks good but one last thing. The hidden surfaces will be rendered unnecessarily even though the player cannot see them. This will affect performance if there are many such surfaces. It is good practice to retexture such surfaces with caulk texture which never gets rendered. Hide the walls and ceiling and retexture the tops and ends of the beam with Media Browser > Textures > Common > Caulk. No need to align! I would not worry about the section of the wall and ceiling behind the beams! I have a theory that in a typical room, caulk texturing is not worth the effort unless there is a lot to do. Definitely do it in a large area where there are lots of hidden surfaces especially if you can detect a slow down in the game with frame-lag.

Tip: Double click the top title bar of camera view is a quick way to go full screen and back again. Likewise with the other windows.

Cloning the Beams, Single-plane Shifting

xxxxx

Inventory, Tools, Weapons, Shop

Compass

AI, patrolling, teams, etc.

doors

link to doors wiki

containers

lockpicking

Readables

Maps

Ladder

Elevators

Sounds

Sky

Water

Weather

Objectives

Zipping up

link to zip up wiki

Your own Build Design

link to build design wiki

Return to previous page