Перейти к содержимому

Модуль The Dungeon Crawl

1 1 1 1 1
Рейтинг 5.00 (1 голос)

Модуль The Dungeon Crawl содержит подземелье, полное монстров, которых нужно убить, несколько небольших городов и загадку, которая заставит вас («Хотите знать больше?») пройти игру до конца.

Автор: Sharon Shellman.

Этот модуль для Arcanum был создан Шарон Шеллман из Troika Games. Он включает в себя «Основы создания модов» — самый первый учебник по WorldEd, который когда-либо был выпущен. Большинство людей тогда его не понимали, но он стал отличной отправной точкой для мира моддинга Arcanum, который в остальном практически не документирован.

Mod Building 102 - "The Dungeon Crawl Revisited"
A tutorial by Sharon Shellman

Overview

When Arcanum ships on August 21st, it will not only contain the game, but most of the tools we used to build it. We know that there are quite a few people who want to design their own games (heck, we ARE some of those people) and mod building is an excellent way to start. Over the next month, I will be writing a few tutorials dedicated to making your own mods. These tutorials will serve as a quick introduction to the mod making process.

To make it all a bit more exciting, I will be including a version of a playable mod titled "The Dungeon Crawl" with each tutorial. These mods will work with the Arcanum Demo, as well as the gold version of the game.

The first tutorial mod will be a basic dungeon crawl and will contain very little scripting and no dialog, quick and simple.

The second will include a small town in addition to the dungeon area from the first tutorial, and will include basic dialog and scripted events.

The third will expand the mod even further, and will detail more advanced dialog and scripting options. In this way you will actually be able to play through the mod as it develops.

Alright, lets get going…

Entering WorldEd

WorldEd is our world editing tool and will be an executable located within your Arcanum directory. When you first open WorldEd, you will be asked whether you wish to open an existing mod or create a new one. For a new mod, simply type a name in the area provided. (Hint: Map names cannot contain blank spaces.) If you want your mod to be Multiplayer, there is a check box to mark off that states simply "Allow Multiplayer". If you leave it unchecked, your mod will be single-player only.

You now need to create your map. Select File from the menu and choose New. A box will come up asking you for the size of map you want and the base terrain type. Map size is defined by the number of sectors contained in both the X and Y coordinates. A sector is 64 x 64 tiles in size and each tile is approximately 6 feet square. Arcanum's map is 2000 x 2000 sectors, which is absolutely huge. The map I created for the accompanying mod is 30 x 30, which is still quite large. A small dungeon romp could easily be contained in a 10 x 10 sector map.

Base terrain type describes the basic terrain that will cover your map. You can choose from water, forest, desert, jungle and many more. For simplicity, you should choose the type of terrain that you want to cover most of your map. Later on while you are editing your map, you can use the Terrain Editing Tool to change individual areas on your map, for instance, by adding an ocean and coastline to your desert base terrain. Hint: If you're making a dungeon, its best to start with water as your base terrain type, then right click on the sectors where your dungeon will be and fill them with black tiles.)

Adding Buildings

Select the Top-down button to view your map from the top. (Hint: You can use the + and - keys to zoom in and out of the Top-down view.) Select the Build tab on the left and click on the House icon. A small representation of the selected structure type is shown in the display window. You can scroll through the different structure types by clicking the Previous and Next buttons. Once you have chosen one, use the left mouse button to click and drag out the shape of your building in the top-down window. When you release the mouse key, the building is created. Switch back to the Isometric view to see the building in game perspective. (Hint: R will toggle the roofs on and off and W will do the same for walls.)

To expand your building further you need to return to the Top-down view. With the House icon still selected, click and drag from within the building you created. Drag a box outside the existing structure in the direction you want to expand. Release, and the building will have expanded to encompass the area you specified. To add interior walls, simply click and drag in a straight line from one existing wall to another. (Hint: To delete buildings, select the Ø icon then CTRL + Click on the roof and wall segments to delete them.)

To spruce up your walls, select the P icon and then left click on an interior wall section. The P icon lets you add décor to your walls such as crypts, rock formations, fireplaces, shelving and bars depending upon the type of structure you have built. These decorative sections can be from one to three tiles in width and can be cycled through by left clicking repeatedly. (Hint: To delete decorative segments, select the Ø icon then left click to return the wall to its original condition.)

Adding Portals

Portals are doors and windows that can be placed onto existing walls. To add a portal, select either the Door or Window icon from the Build tab. Using the Isometric view, simply left click on an exterior or interior wall and a portal will be created. (Hint: Selecting the Ø icon and then left clicking on a portal will delete it.)

Each structure type has several different doors and windows available, and they can be from one to three tiles in width. To cycle through the different types of doors, create the first one by click the wall once. This creates a singlewide door. Click again on the door and the art will change showing you another singlewide door. Continue to click to go through the available doors. To see the two-tile, or double-width doors, click just to one side of the existing door. You will see the art change into a double door and you can scroll through the available double doors just as you did the single. Clicking to one side of the door again will give you a triple-width door. Windows work exactly the same. (Hint: P will toggle the portals on and off.)

Adding Lighting

Arcanum mods automatically have normal "outside" lighting that slowly cycles through day and night and back again as you play. Interiors however, are unaffected by this outdoor lighting and remain quite dark. The quickest way to light up an interior is by adding source-less lighting.

To add a source-less light, select the Light Bulb icon from the Environment tab. You should see a representation of a light in your display window. Click on the Select button beneath it to bring up a list of the available light sizes. Select the one you want and simply left-click to place it. Clicking again will place an identical light. (Hint: By Editing a light you can change its size, color and choose whether it is a constant or ambient light. (Ambient lights are affected by the day/night cycle.))

Adding Scenery

To add scenery to your mod, select the Environment tab and click on the Tree icon. Use the pull-down menu to select a subcategory. (i.e., beds, plants, small wooden, etc.) The picture shown in your view window will now represent the subcategory you selected.

Clicking the Edit button will allow you to scroll through all of the items available in that subcategory. To select the scenery item you want, simply click on it. Left click in the Isometric view to place the scenery item. Clicking again will place a duplicate scenery item. (Hint: S will toggle scenery on and off.)

Adding Containers

To add containers to your mod, select the Box icon from the Environment tab. Use the pull-down menu to select the type of container you want (magick chests, rubbish bins, empty barrels, dead bodies, etc.). The picture shown in your view window will look like the container type you have selected. Left click in the Isometric view to place the container. Clicking again will place a duplicate container.

Containers can be filled manually, or they can have inventory sources. You can fill containers with Food, Armor, Weapons, Ammo, Gold or Items by dragging them onto the container and releasing. They will then disappear from view and go into the container. Or you can select an inventory source by choosing one from the pop-up list presented in the container's Edit menu. (Hint: B will toggle blocking tiles on and off. Having them off will speed up scrolling around a large map.)

Adding Critters

To add NPCs and monsters to your mod, select the Face icon from the Critters tab. Use the pull-down menu to select the subcategory of critter you want. (i.e., animals, monsters, undead, etc.) The picture shown in your view window will represent the subcategory you selected.

Click on the Select button beneath this window to see a list of the critters in that subcategory. You may then scroll through them using the Back and Next buttons. When you've chosen one, double click on it to select it and then left click in the Isometric view to place it. (Hint: C will toggle critters on and off.)

Editing

Editing lights, scenery, containers and critters is simple. Each tab (Critters, Environment, etc.) has an arrow icon available on it, simply click on this icon and you're ready to edit. You can move any of the things you have placed by left click and dragging them to a new location. (Hint: If you move a critter from where you originally dropped it down, you will need to right click and re-set the critters Day and Night Standpoints so that it will remain in its new location.) Right clicking on any of the objects you placed will bring up its editing options.

Setting Your Starting Position

Before you can play your mod you will need to set your starting position. First determine where you want Players to start in your mod. Once you have chosen a location, switch to the Isometric view, select the Arrow icon and hover over the area. Write down the coordinate numbers displayed under the Isometric and Top-down buttons. (For example 2053, 2050)

Now you need to open the MapList.mes file located in your Arcanum\modules\(your mod name)\rules directory. This is a text file and can be opened with notepad. You will be editing the start map information (line #5001). In place of the map name (the default is start), you will want to put the name of your map. Then replace the numbers to the right of your map name with the numbers you wrote down (in place of the numbers already listed). Save this file, and you are done.

Modding It Up

While your map is open in WorldEd, select Compress Module from the File menu. Arcanum will then create a .dat file for your mod and place it in the mods directory. You can email this .dat file to your friends or place it up on web sites for people to download.

To play it, all they'll need to do it drop it into their mods directory. When they start Arcanum, they'll need to select Options from the Main Menu and scroll through their mods until they find yours, click Done and start up a game. It's that simple.

Overview

You’ve laid out some buildings, added scenery, linked in a dungeon and filled it with monsters… now what? How about populating that town? Or adding some quests? Are your stores lacking shopkeepers? Well, we’re here to help.

In this installment of Mod Building we are going to cover some of the details involved in giving life to your NPCs. We’ll touch on placement and manipulation, dialog creation and basic scripting. As with our previous installment, a playable module has been included and will operate with both the demo and retail versions of Arcanum.

To further aid you in creating your mods, we have also included a downloadable .zip of The Dungeon Crawl in its uncompressed state. With this you can look through the supporting dialog, script and message files to see exactly how the different elements of the mod were created.

NPC Placement and Manipulation

To add NPCs and monsters to your mod, select the Face icon from the Critters tab. Use the pull-down menu to select the subcategory of critter you want. (i.e., animals, monsters, undead, etc.) The picture shown in your view window will represent the subcategory you selected. Click on the Select button beneath this window to pull up a list of the critters in that subcategory. You may then scroll through them using the Back and Next buttons. When you’ve chosen one, double click on it to select it and then left click in the Isometric view to place it. You can switch to the Arrow icon to move or edit the critters that have been placed.

Day & Night Stand Points

Day and night standpoints determine where your NPCs initial standpoint is during the day and night. When day changes to night, the NPC will walk from its day standpoint to its night one and will stay there until night switches to day. The NPC will walk between the day and night standpoints as long as they are within 30 tiles of each other. If they are farther than 30 tiles apart, the NPC will teleport between the two, rather than walk. (Hint: If an NPCs day or night standpoint is on the hotspot of a bed, the NPC will sleep in the bed for that cycle.)

Wandering and Waypoints

NPCs can do one of three things while at a day or night standpoint. They can remain stationary, which leaves them in the exact same spot until the day/night cycle changes. They can wander, which has them wander about in a 6 by 6 tile area until the day/night cycle changes. Or they can have set waypoints, which is a predetermined path they loop around until the day/night cycle changes.

Getting your NPC to remain stationary, wander or follow waypoints is set by right clicking on the NPC and selecting Edit. Clicking on the Flags button will bring up a list of checkable options for that particular NPC. If Wanders or Wanders in Dark are checked, the NPC will wander during the day or night. If waypoints day or waypoints night are checked, the NPC will follow their waypoints. If all of these options are unchecked, the NPC will remain stationary.

Waypoints are set by right clicking your NPC and selecting waypoints. Once you have selected waypoints, you simply left click out a path for your NPC to follow, making sure it ends near the beginning so that the path can loop. (Hint: It is a good idea to keep your waypoints within about 15 tiles of each other.) As you click, consecutively numbered tiles will appear allowing you to see your path. Right clicking will end the waypoints.

Equipping Your NPC

To equip your NPC, begin by placing the items, armor, weapons, ammo, etc. that you want your NPC to have onto the ground near them. When you are ready, simply drag and release the items onto your NPC. The items will disappear from view and be placed into the NPC’s inventory. If you hold down the shift key while dragging an item onto an NPC, they will wield that item. (Hint: This is how you dress your NPCs) To remove the items from an NPC, right click on them and select Poop. All items, both wielded and those in inventory will appear on the ground beneath the NPCs feet.

Substitute Inventories

Substitute inventories are inventories that are stored in a separate container, rather than on your NPC. Once linked to an NPC, a substitute inventory will respawn every 24 to 48 hours as long as that NPC remains alive. Substitute inventories are used primarily for shopkeepers.

To set up a substitute inventory, begin by creating your NPC. (Hint:You may equip your NPC with whatever personal items you wish, they will not be displayed when bartering if they have a substitute inventory.) Next create a container (such as a barrel or chest) and give it an inventory source (such as herbalist or elven trader). Now right click on the container and select Remember for Substitute and then right click on your NPC and select Set Substitute Inventory. That’s it.

Making Your NPC Care

Once you’ve set up your NPC in their house, given them items, and stored their valuables in a chest, how do you make them care about their stuff? Well, you begin by right clicking on your NPC and selecting Edit. Beneath the Unknown name of your NPC is their Internal name. (Hint: Internal names are pulled from the gameoname.mes file located in your mods oemes directory.) Select an Internal name for your NPC from the pull-down menu and then hit OK on your edit screen. Then right click on your NPC and select Remember for Notify. And lastly go to all doors, windows and containers that belong to that NPC, right click on them, and select Notify NPC. Now if anyone tries to destroy these items, or fails at picking a lock on one of them, your NPC will take notice.

Dialog

Arcanum dialog files are simple text files that are saved off with a .dlg extension in the dlg directory of a mod. Dialog can be anywhere from simple, to insanely complex. A basic shopkeeper dialog can consist of four very basic lines, while a follower with many different interactions and story elements can be upwards of 1500 (right Chad?). Let’s begin by taking a look at a basic shopkeeper dialog, and then we’ll cover the different fields and what they do.

{1}{G:}{G:}{}{}{}{}
{2}{B:}{}{1}{}{0}{}
{3}{T:9}{}{1}{}{0}{}
{4}{E:}{}{1}{}{0}{}

The dialog above is for the general store shopkeeper in The Dungeon Crawl mod. It contains 4 lines and each line is made up of 7 bracketed fields. The first field contains the line number. The second field has 2 uses; as an NPC line, it contains the response the NPC would say to male players, and as a PC line it contains the dialog options that the PC would be allowed to choose from. The third field also has 2 uses; as an NPC line, it contains the response the NPC would say to female players and as a PC line it is usually left blank. The fourth field is for intelligence checks. (Hint: A 1 would mean everyone would see the line, a 5 would mean only those with intelligence of 5 and above would see the line and a –4 would mean that only those with 4 or less intelligence would see the line.) The fifth field is used for testing purposes. The sixth field is where you place your “go to” line number and the final field is your result field.

Notice also that the dialog example above doesn’t really contain any “dialog”. When making Arcanum, we created many simplified codes that would call generated dialog from the engine. So rather than having to type a completely different greeting at the beginning of each dialog, we simply input G:. The G: parameter calls out to the engine and generates an appropriate greeting based upon the PCs race, gender, reputations and even followers. Likewise B: generates a line of dialog leading to barter, T: is for training (T:9 means that this shopkeeper can offer you Apprentice training in skill #9, which is Haggle.) and E: generates a generic exit line. You can download a list of generic dialog codes and their meanings from the downloads section here: WorldEditor Docs

So if your PC walked up to a shopkeeper with the above dialog and clicked on him in a game, the shopkeeper would greet you (from the G: line) and then you would have three responses you could choose from. The first would be a barter line, the second a line asking for training and the third would be an exit line so that you could leave dialog. Notice the 0 in the “go to” field for each PC response. This means that no matter which line the PC chose, once the barter or training or speaking of the exit line was complete, dialog would end.

Now let’s take a look at a little more complex dialog file. This is the dialog for the bartender in The Dungeon Crawl mod.

{1}{G:}{G:}{}{}{}{}
{2}{I'd like a drink please.}{}{5}{}{6}{}
{3}{Me wan' drink.}{}{-4}{}{6}{}
{4}{T:8, 3}{}{1}{}{0}{}
{5}{E:}{}{1}{}{0}{}
{6}{Sure buddy. That will be 10 coin.}{No problem lady. That will be 10 coin.}{}{}{}{}
{7}{Here you go.}{}{5}{$$10}{10}{}
{8}{Uh... here.}{}{-4}{$$10}{10}{}
{9}{F:}{}{1}{}{0}{}
{10}{Here you are sir... Enjoy. [He hands you a drink.]}{Here you are miss... Enjoy. [He hands you a drink.]}{}{}{}{}
{11}{Thank you. [You drink it down.]}{}{5}{}{-2}{}
{12}{Uh... T'anks. [You drink it down.]}{}{-4}{}{-2}{}
{13}{Can I get you anything else, sir?}{Can I get you anything else, miss?}{}{}{}{}
{14}{Another drink, please.}{}{5}{}{6}{}
{15}{Me wan 'nuthur drink.}{}{-4}{}{6}{}
{16}{T:8, 3}{}{1}{}{0}{}
{17}{E:}{}{1}{}{0}{}

Lines 1, 6, 10 and 13 are spoken by the NPC because they contain dialog in both the second and third set of brackets. (Hint: to make NPC lines stand out from PC lines you can place a tab at the beginning of them.) The remainder of lines are PC response lines. Let’s take a look at line 7. Notice the $$10 in the 5th set of brackets (the test field). This means that the PC will only see this line if they have at least 10 coin on them. If the PC speaks line 7, the NPC will then speak line 10. At this point the PC will only be able to speak line 11, but notice the “go to” number in the 6th bracket of that line is a negative number. This means that when the PC chooses line 11, the dialog will call out to line 2 of the bartender’s script, and perform whatever actions it tells it to do. In this case the script will cast a spell on the player (making them slightly drunk) and then reinitiate the conversation at line number 13.

Scripting

Scripting in Arcanum is an incredibly powerful tool. It can be used to initiate dialog, to set off a chain of events when the PC reaches a certain town, to teleport the PC from one place to another and much, much more. ScrMaker is the tool we created for making scripts and is located in your Arcanum directory. All scripts made for a mod should be stored in that mod’s scr directory and the name of each script needs to start with a numeric value.

Actions vs. Conditions

Each line of a script is either an action or a condition. Actions tell the script to do something, whether it be Teleport triggerer to X, Y or grant one fate point to triggerer, there are a large number of actions to choose from. Conditions are just that, conditions. They are placed before actions and determine whether the action is performed or not. Once you have selected a condition, you will be prompted to select 2 actions, one for if the condition is true and one for if it is false. For instanced, If it is daytime THEN Teleport triggerer to X, Y, ELSE do nothing is an example of a conditional line.

Default Actions

Everything in Arcanum has a default action. When clicked on doors open, people float generic greetings and chests open, when attacked doors take damage and then break, when approached monsters attack, etc. These are very important to know in scripting because all scripts need to end with one of two commands; Return and RUN Default or Return and SKIP Default. Using Return and RUN Default means that once the script executes, the item will perform its default action (so a door with a use script would perform whatever tasks the script directed and then open). Using Return and SKIP Default means that once the script executes, the item will NOT perform its default action (so a door with a use script would perform whatever tasks the script directed and then not open).

Attachment Points

All items, containers, NPCs, monsters and weapons contain script attachment points. They are accessed by right clicking on the item and selecting Edit and then clicking on the Scripts… button. This will bring up a list of script attachment points. There are attachment points for examining the item, using the item, destroying the item, initiating dialog, dying, entering and exiting combat mode and many, many more. You can have a different script on each attachment point if you need to (although that would be a very complex person or item!). To attach a script, simply select the attachment point you want and then input the script number in the Script field. Click on OK and the script is attached. That’s all there is to it.

Dialog Scripts

All dialog files need a corresponding script (scr) file. The script must have the exact same name as the dialog (dlg) file to work correctly and will be attached to the NPC at the Dialog attachment point. Most dialog scripts will be very simple, containing only 2 action lines.

Dialog 1

Return and Skip Default
Return and Skip Default is used, as the default action for dialog is to float generic greetings. (Hint: While editing a dialog script, you can select Dialog and then Edit from the menu to quickly access that script’s corresponding dialog file.)

In Conclusion

We realize that this is a very basic introduction to dialog and scripting, and that many of you will still have questions. To further aid you in mod making, we are making the uncompressed version of The Dungeon Crawl module available for download in a zip file. This will allow you to go through the dialogs and scripts contained in The Dungeon Crawl so that you can gain a better understanding of how to create dialog and scripts and what they are capable of.

Please remember, before you install the new module, be sure and completely delete your existing The Dungeon Crawl.dat and its corresponding mod directory.

Sharon Shellman
Troika Games

Оставьте свой комментарий, при желании. Вопросы, если возникнут, задавайте, при наличии времени/возможности — ответим в соответствующей теме Форума. И пусть всё проходит, время не имеет значения, поскольку:
Arcanum жив!arcanum смайликarcanum смайлик
Добавить комментарий

Для комментирования материалов регистрация на сайте не нужна. Правила публикации: наличие здравого смысла. Спам удаляется, Email комментаторов не публикуется.



arcanum-expansion

Примечания к материалам раздела:

Arcanum: Of Steamworks and Magick Obscura
  • Авторство работ указывается на страницах описания модификаций или в дистрибутивах. При необходимости внести коррективы в этот вопрос: есть Обратная связь. Неточности/недоразумения (с авторством) на сайте могут быть, приносим извинения, если это случилось.
  • Просьба: сообщать о неработающих или «битых» ссылках.
  • Мы не планировали выкладывать все моды (и/или модули) Arcanum: Of Steamworks and Magick Obscura. Только с клубными доработками, русскоязычные и «вымирающие виды». Время течёт. Возможно, соберётся полная коллекция модов и модулей. В следующей жизни.
  • Выражаем благодарность всем нашим одноклубникам, принимавших участие в формировании «коллекции»: Gentle_Giant, gamer_777, T’e’MHbIu`, Positiff, Crevan, aRUSt, Thorn, NeOn и многим другим. Спасибо Вам!
  • Если у вас появятся вопросы или предложения — на нашем Форуме вам, возможно, ответят на вопросы и обсудят предложения. Можно также оставить Комментарии или отправить письмо через форму Обратной связи.
Arcanum: Of Steamworks and Magick Obscura