Tools: Objects Tool and Other Objects

Now that we have our floor layout finished we will add some objects. There are many objects in the game all with different properties. These values are set in the lua\objects.lua file, so they can be altered if desired. Some of these values determine whether an object has drag (can be walked over but slows player), is solid, is movable, creates shadows, etc. For our module we are making right now we will simply use a basic wall object.The Object tool is very similar to the Paint tool. Select the Object tool by cycling with N and M until your cursor looks like a little box with a circle in it. This is the Object Tool.You will notice that below this box there looks to be a blue grating on the floor. While the blue grating is an object you can place which has drag, I painted a couple of these plus a ladder using the Paint tool to spruce up the room a bit. Since they are textures and not objects though, they have no properties and therefore have no effect on the player.Again the keys are visible by holding tab, and control will apply the multiplier just like it did with the Paint tool. To start, lets bring up the palette with spacebar.You can scroll through the palette using W and S, the mouse is used to actually highlight an object, you will see that these objects are all named and have specific boundaries applied. By clicking an object you will select it, there is no box select like the texture palette. For our walls I am going to use a simple grayblue wall (named sein_sinine in the palette). Placing objects works almost identically to placing textures and are manipulated in the same way. The only difference is that objects have properties applied to them. Below you can see I have started placing down walls on one side of the room, simply adjusting the rotation as I go.If we return to game mode by hitting escape and walk around to the other side we can see that this wall object will create the FOV Shadows that limit your vision in game. This is a good start!Lets say I am in a hurry to finish the walls, I am going to finish the rest of the room using the multiplier. By doing this i can cover far more area much quicker, although this is somewhat sloppy. I can easily go back and touch up the unneeeded objects later. The shot below shows the rest of the walls finished, I have turned on the bounding boxes by pressing F11 so you can see how the objects are simply overlapped to create complete walls.We should take a look and see how it looks in game, and see if there are any gaps we need to fill. By pressing escape you can quickly return to game mode and walk around.This looks alright for now. Next we are going to add some objects that you CANNOT place using the Object tool, this is where the Canvas module comes in handy.-------------If you didn't already, move your camera with the arrow keys over to this section of the Canvas. You can see the coordinates in the upper left if you are having trouble finding it. This little space contains some of the most essential non-placeable objects you will use in a module.The first special type of object we need to learn about is the Node. The node is essential to create functional mods and there are multiple types with various purposes. Nodes are used by the level generation code to put together the level when the player starts the game. Without them the level will not be assembled correctly, and many of the random elements of the game will be missing.Nodes have a number variable in the level generation code that correspond to their type and purpose.0 = module connection point1 = ordinary item spawn point2 = rare item spawn point3 = module boundary point4 = patrol pointPlus Secrets, Map Markers and Camera Angles which do not have a number assigned.Because they are so important, we will cover each one and its in-game graphic so you can learn how to begin using them.Node: Module connection pointValue: 0----------------These little rectangular boxes are one of the most essential parts of how the level generation works. The level generator will load the selected modules for a level and then assess their connection points and orientation, these are essentially the places where each module snaps together. A connection point is required in any instance where your module may possibly connect to another. For our sample room we are working on we will need two of these. The line pointing outwards faces where another module should connect. We will look at these in our module in just a bit.Node: Module boundary pointValue: 3----------------These boundary points are not used in every module, they are more of a safety measure. By placing boundary points in your module the level generator will create a polygon by connecting all of these points that tells the level generator that it CANNOT place another module within these points. This is mainly used for very large or oddly shaped modules so that the level generator does not accidentally place two modules that intersect incorrectly.Node: Ordinary item spawn pointValue: 1---------------This node is used to generate ground items such as ammo or canned food by the level generator. Just because you place one does not mean that an item will ALWAYS spawn there, you can place the item manually if you want it to always be available.Node: Rare item spawn pointValue: 2---------------This node is used to spawn a rare item, it is mainly used in the game for spawning the loot that is in secret areas.Node: Patrol PointValue: 4--------------These nodes are used to spawn random enemies. The enemies that can appear hear are dictated by the objects.lua file in the specific levels folderNode: Secret AreaValue: N/A--------------These nodes are used to trigger the secret area found message, define a module as a secret area, and also add to the score at the end of the level.Node: CameraValue: N/A-------------This node is used to adjust the orientation of the camera when auto rotation is turned on. The line will dictate the orientation of the camera when the character passes over this node.Node: Map MarkerValue: N/A-------------This node is used to place a big white dot on the map after its been found by the player. This is how the teleporters are shown on the map.Thats a lot of info! For now we will copy and paste 4 boundary nodes, 2 connector nodes, and 2 doors from the palette.