A - Z Beginner Full Guide Page 5: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Line 249: Line 249:


* Copy and paste the following in a plain text editor
* Copy and paste the following in a plain text editor
* Save it as thiefsden_world.gui in the guis folder...
* Save it as thiefsden.gui in the guis folder...


  windowDef Desktop{
  windowDef Desktop{
Line 268: Line 268:
  }
  }


WHAT WILL HAPPEN NEXT?
Now we have our files created we can continue in Dark Radiant...


TO BE CONTINUED.......
* Create entity  > darkmod > atdm:map_base
* Place it on the table (just so you know where it is)
* Give it a name, eg, SamsMap (to identify it in the editor - Sam being the assumed character who gave it the player character)
* Add the property gui with the value : guis/thiefsdenmap.gui
* Add the property inv_icon with value : guis/assets/hud/inventory_icons/thiefsdenmap_icon.tga
* Add the property inv_name with value : Sam's Map (this will show in the inventory to the player)
* Add the property inv_map_start with value 1 so it is in the player's inventory at mission start.
 
Save and map the mission in Dark Mod and the map should be in your inventory.


== Adding an Upstairs Room ==
== Adding an Upstairs Room ==

Revision as of 14:06, 24 September 2007

written by Fidcal

Previous Page ... Next Page


Windows

Adding windows to rooms will really help them towards looking authentic. Windows can be models or textures; openable (like doors) or mere architecture. Older medieval gothic type windows might be mere shaped slits in the stone. There are many facets to making windows which cannot all be covered in this beginners' tutorial. A few points to remember...

  • If both sides of a wall can be accessed then make sure there is a window on both sides and aligned.
  • Consider if you use outdoor 'lit' windows, can the player extinguish the light inside then go back outside and see the window still lit?
  • Consider the frame.
  • Consider having a windowsill.
  • Perhaps a support beam or stone is needed over the top of the window?
  • Does the window need to be recessed into the wall?

In this old house we shall put a few simple recesses with window texture...

  • On the west wall of the big room, between the middle vertical beam and the south wall, create a niche 80 wide by 112 high using the same technique as for the yard wall torch niche. Try to get it between courses of stonework (though this irregular stone makes that tough so don't worry.)
  • Texture the back of it with textures/darkmod/window/largesquare02_dark
  • Scale it Horiz 0.15 and Vert 0.2
  • Shift the texture so the frame is equally half on one side and half on the other.
  • Check the texture and alignment of the sides of the niche align with the rest of the stone wall.


  • In the same way create TWO windows 56 wide by 80 high in the small room - one about the middle of the west wall and the other on the south wall and to the east.
  • Position and rotate Creep so he appears to be standing looking out of the south facing window but stand him a little to one side. Place the thugs path_corner at his side. With a bit of tweaking later it might suggest the thug is coming and standing there looking out the window with Creep for a few seconds. We are trying to create opportunities for the player to sneak in!

Outside you cannot put a window on the west wall of the yard else it would show indoors which would need more thought. We might consider an openable window - another avenue for the thief to get in? Ideally we'd have a window or two to the yard but let's leave it for now and press on...

Fires and Fireplaces

Chests and other Containers

Container are effectively an open box with a lid functioning like a door. There is to be a function that prevents anything placed within the container to be unfrobbable within that volume unless the lid is open. This is work in progress so is to be reviewed for this tutorial later. Meanwhile you can still create and use containers but there is the possibility of the player blind-frobbing an object out of a container without opening the lid at the moment...

  • Create three models : darkmod > containers > bc_chest1, 2, or 3 and their respective lids.
  • Place one chest in the little room against a wall.
  • Position its lid exactly on top with the hinges at the back
  • With the lid selected, in Entity Inspector, select the top line - class name
  • Change this from func_static to atdm:mover_door
  • Add a property (or change its inherited property) rotate (NOT rotation but rotate) with the value 0 0 -120. The -120 is the angle it will open; -120 looks about right to me.

Likewise put the other two chests in the big room. One or both them may eventually go upstairs or in the basement when finished.

Alternatively, chests, footlockers, safes, any container, can be made out of brushes and likewise the lid too. Yes you can add atdm:mover_door to it! See also Doors for details.

Locking the chest will be dealt with later under #Locks and Lockpicking.

Putting items into the chest is literally that - just position any item(s) in the chest. I suggest some other dummy items to pack it out rather than a single loose gold ring! Try a patch shaped like some blankets or junk with an appropriate texture. For now we shall just put single items in and this we shall deal with later under #Loot!

Locks, Keys, and Lockpicking

At time of writing using keys is still work in progress TO BE REVIEWED. Meanwhile, we can create a key...

  • Create entity > prop_silverkey (don't use the one from the model list but the entity list)
  • Place it on the table somewhere for now. You can rotate it to lie flat (modify menu)
  • Change its name (NOT class name) to say, key_chest3. You can change the name of any entity you create. For most there is no need but here is an example where in a big mission you might have a lot of keys, and they are small after all. By naming them key_something they will all appear together in the alphabetical enitity list (keyboard L) so you can quickly find what you want. That list selects them for you the Ctrl+Tab through grid view in Dark Radiant centres on them to zoom in. Neat eh? (keys in inventories are not visible though.)
  • You can also add comments to any entity if you wish so you might have 'Gate guard's key to be added to his belt' or something. See Comments for details

Now I think eventually the above will be linked to the chest with something like a 'UsedBy' property on the lid naming the key as its value but for now it is still work in progress.

We can however, lock the chest...

  • Select a chest lid (not the chest itself) and add/set the property : locked, value 1.

Now lockpicking is not finalized yet but it is working so here goes with what I know so far...

To enable the locked chest to be lockpicked do this.....

  • Add/Set these properties and values to the chest lid...
  1. pickable 1 [enables lockpicking]
  2. type c*b [type of pick needed for each pin, circular, bent, etc, * = any]
  3. lockpins 3321 [pin sequence - TO BE REVIEWED]

To create the lockpicks for the above...

  • Create entity atdm:playertools_lockpick_bent and put it on the table for now near the key.
  • Do the same with atdm:playertools_lockpick_circle
  • Add the property inv_map_start with a value of 1 to each of them which will put them in the player's inventory at mission start. (should disappear from the table eventually.) We covered inventory previously in Tools, Weapons, Equipment


Adding a lock and/or handle TO BE REVIEWED


Managing your Mission Files

So far we have only been saving your map file. You will see in the darkmod folder there are materials, and textures, and models, etc. subfolders. It is possible to produce a respectable mission without any other files except the Dark Mod resources. But even if you do not create any custom textures or models for your game, few missions will not need readable texts in the game. While it is possible to include this text right in your map as properties of the readable, that makes it more difficult for later translations into other languages. So this is a good time to discuss where to store any other files.

Placing materials files into the materials folder and textures directly into the textures folder works but makes it difficult to sort them out for zipping up your mission for publication. A better way to organize them is to create your own subfolder within each of those folders (if needed) and put them in there. However, you still need to sort them out later - it's just easier.

An alternative, which keeps all your own files together as a single project can be considered...

  • Move your Doom 'savegames' folder from the base folder to a backup folder or delete it if you don't want them.
  • Move the 'game' folder from the base/maps folder to the backup folder too.
  • Leave all the other Doom files alone but the maps folder and any other folders you place in here are YOURS exclusively.

So, you could create a textures folder, a materials folder, etc, all in the base folder. And your mission map can go in the base/maps folder. When it comes time to zip up for publishing you just zip up the folders only. Job done.

Not quite. As you develop your mission it is essential that you regularly save with a new version map name (as well as your more frequent normal saves with the same name of course) so you have at least the last dozen or so if not the last hundred versions for reference. If you spend months or years on a mission and some dreadful error occurs then sometimes the only solution is to go back to an earlier save. You might have name300.map, name301.map and so on. So your options are:

  • Save all the previous saves in the base/maps folder but move them out while zipping up leaving only the last one.
  • Keep your development maps in the eg, darkmod/maps/mymaps folder and copy the last one to the base/maps folder only when read to zip. (my recommendation)
  • Either way you can still keep any textures, models, etc. in their appropriate subfolders in the base folder all together.

You might also have multiple missions being developed at the same time - some might be just tests. You can solve this by having subfolders within the other folders - whether in the darkmod or the base folder. You might even have a 'shared' folder I guess.

Give it some thought. For a simple mission it might not be worth worrying about.

Readables: Books & Scrolls

By 'Readables' might mean either static books, scrolls, etc, whether open or closed, or functioning such that can actually be read in-game.


Static Book & Scrolls for Decoration

Creating a static, non-functioning readable is fairly straightforward - just create the model of your choice and place it nicely to decorate a shelf or library in your mission. You can see a choice of static and readable types under Readables in Objects Index.


Readable Books & Scrolls

In our mission we are going to create the incriminating message from Creep that the player will have in his/her inventory at mission start, ready to place in Creep's hideout.

For our present use we want a carryable (mobile) note, not a book - and a scroll might be too grand - so we use the simple note type...

  • Create entity darkmod > readables > atdm:readable_mobile_paper01
  • Place it on the table for now.
  • Add the property xdata_contents with the value : creeps_message. This is the name defined in the text file we are going to make and identifies each text.
  • Add the property inv_name with the value : Creep's Message. This is the name that will show in the player's inventory.
  • Add the property inv_map_start with a value of 1 so the message will be in the player's inventory at the start.

Now we define the text of the message itself...


Creating Text for Books and Scrolls

In Dark Mod, multiple in-game texts can be stored in one file in xdata format. For details see Readables but here is the simplest description for our tutorial mission and this is all you need for now...

  • If you are maintaining your mission project in the base folder as described previously in #Managing your Mission Files then create a subfolder in the base folder named xdata.
  • Copy and paste the following into a plain text editor
  • The xd file can be any name with the .xd suffix but the final mission name makes sense so...
  • Save it as thiefsden.xd in the xdata folder just made or otherwise put it in the darkmod/xdata folder.
  • You need to be aware where all your mission files are so nothing gets missed when you zip up for publishing.
creeps_message
{
  precache

 "gui_page1"   : "guis/readables/oldparchment.gui"
 "page1_title" : ""
 "page1_body"  : 
 "I have real good information about Frothbody's sceptor" \
 " - I can be trusted on that. " \
 "Must be some rogue who can do this heist for me.\n\n" \

 "If not interested I'll do it myself so make up your mind quick.\n\n" \

 "                  ~ Sebastien Creep" 
}


Explanation...

  • Multiple texts for different messages and books can be defined in this one file.
  • Each definition consists of a definition name then the details within curly brackets as follows...

creeps_message
{
details in between.
}


text2name
{
details in between. (can be many pages in-game)
}


text3name
{
details
}

...and so on.

  • precache - this means Dark Mod will load it at mission start. Otherwise it will load as the player starts to read it causing a slight lag as it loads off the disk.
  • "gui_page1"  : "guis/readables/oldparchment.gui" - the graphical image of the background scroll, book, etc.
  • "page1_title" : "" - Text in this is shown as a large header suitable for posters, notices, etc. (around 10 or 12 characters only.) We left it blank in this message as it is just a scrawled note.
  • "page1_body" - this is the actual text where...
  1. text is in quotation marks
  2. \ at the end of a line after the quotation mark means the next line is to be added to this line and wordwrapped.
  3. \n within the quotes means start a new line. So \n\n means leave a line gap between paragraphs.

And yes, you can add graphics in .tga format.

For full detals of readables and how you can even make your own readable books out of brushes, see Readables

In-Game Mission Maps

At time of writing this is still being developed TO BE REVIEWED. However, single page maps can be made as follows...

  • Dark Mod in-game maps are image files working in a similar way to readables text over a background parchment etc. and appear in the inventory.
  • Various files are needed:
  1. An image file of the details of your map in tga format
  2. An image file of the background (eg, parchment.) Several are provided in the Dark Mod resources or you can make your own. Your detail and background images might be combined but it is convenient to manage them separately.
  3. A material file - plain text that defines the blending.
  4. A gui file - plain text that defines the images and how they are used.
  5. A small version of the map to be used as an inventory icon.

The details map...

  • You need to draw your map in a paint program else on paper and scan it in - so the results depend entirely on your skills in that area.
  • The map should be of a size that fits comfortably into one of the Dark Mod backgrounds in the guis\assets\readables folder or you can make your own background.
  • The map should be foreground detail only (map, text, etc.) on a white background (which will be blended into the background in-game.)
  • Gimp is an excellent free paint program.
  • If you have no artistic skill then either you cannot have a map or you might ask someone else.
  • It does not need to be a great work of art necessarily and likely it's meant to be a map scrawled by some low-life game character anyway!
  • If you are not artistic but have moderate paint program image processing skills you might grab a screen from Dark Radiant with entities filtered out as a start then process that in the paint program (which is what I did.)
  • For this tutorial you can save the following and convert it from jpg to tga format if you have a program to do that. Save it as thiefsdenmap.tga in guis\assets\maps (might need to create that folder) in the darkmod folder (or base if you are keeping your mission files together there.)
Thiefsdenmap.jpg

You will also need an icon image file for the inventory...

  • In your paint program...
  • Darken/Thicken the detail of the detail map somewhat or it may be barely visible in the icon (not the white background!)
  • Place your darkened details map over the background parchment image and combine them
  • Reduce it to about 256 x 170 and save it as thiefsdenmap_icon.tga in guis\assets\hud\inventory_icons
  • For this tutorial you can save the following and convert it from jpg to tga format if you have a program to do that. Save it as thiefsdenmap_icon.tga in guis\assets\maps (might need to create that folder) in the darkmod folder (or base if you are keeping your mission files together there.)
File:Thiefsdenmap icon.jpg

Now we define the material file to enable the details map to blend....

  • Copy and paste the following in a plain text editor
  • Save it as thiefsden.mtr in the materials folder
  • If you create any other textures then their materials definitions can be added to this same file but this tutorial will not cover custom textures...
// blends in-game map details onto background parchment
thiefsdenmap
{
  {
     blend filter
     map guis/assets/maps/thiefsdenmap
  }
}

Next we need the gui file...

  • Copy and paste the following in a plain text editor
  • Save it as thiefsden.gui in the guis folder...
windowDef Desktop{
   rect      0, 0, 640, 480
   nocursor 1

  windowDef background_map {
     rect      0, -10, 640, 480
     background "guis/assets/readables/oldparchment_landscape"
     visible 1

     windowDef actual_map {
     rect      70, 70, 500, 340
     background "thiefsdenmap"
     visible 1
     }
   }
}

Now we have our files created we can continue in Dark Radiant...

  • Create entity > darkmod > atdm:map_base
  • Place it on the table (just so you know where it is)
  • Give it a name, eg, SamsMap (to identify it in the editor - Sam being the assumed character who gave it the player character)
  • Add the property gui with the value : guis/thiefsdenmap.gui
  • Add the property inv_icon with value : guis/assets/hud/inventory_icons/thiefsdenmap_icon.tga
  • Add the property inv_name with value : Sam's Map (this will show in the inventory to the player)
  • Add the property inv_map_start with value 1 so it is in the player's inventory at mission start.

Save and map the mission in Dark Mod and the map should be in your inventory.

Adding an Upstairs Room

Ladder

Switches, Buttons, & Triggers

Adding a Basement

Elevators

Teleports

Sounds

Add a global? or another atmospheric in the house?

Loot!

Objectives

  1. Break into Creep's House
  2. Steal back the scepter he stole from you
  3. Kill him (normal level)
  4. KO him and lock him outside (hard level)
  5. Drop the incriminating message. Don't get seen (Expert)
  6. Creep is a thief and must have other loot worth stealing - take at least 500 (normal)
  7. Creep is a thief and must have other loot worth stealing - take at least 750 (Hard)
  8. Creep is a thief and must have other loot worth stealing - take at least 1000 (Expert)
  9. Find his key and exit by the front door (expert)

Zipping up

link to zip up wiki

Your own Build Design

link to build design wiki

Previous Page ... Next Page