Map Editing in Lugaru

From Wolfire Games Wiki
Jump to: navigation, search

Introduction

Lugaru is a great game but its map editor is very limited. Its strength, as well as its weakness, is in its simplicity; the map editor environment is no different from the actual game, except that you can modify your surroundings. It is very easy to use, but it is missing many advanced features and some basic ones. For instance, you can not position objects exactly by inputting coordinates. Instead, you can only instantiate objects on top of your character, which is not always an easy feat.

Note: This guide, while fairly comprehensive, does not cover everything. To get a full list of every console command, make sure you read the console guide.

Basics

Map Editor

Before you can edit maps you have to enter map editing mode. To do this you must turn on debug mode, load the map you want to edit (either through the console's Load command, or going to that map in the game), and press Shift-M to switch to map editor mode. You will notice that a lot of text appears in the bottom left of your screen, this provides essential information that you will need to pay attention to later. If there are enemies present on the map, they will stop moving and you will see some green and yellow lines, these tell the artificial intelligence how to patrol around the map. Finally, you will notice that you can fly around by holding down the jump key.

Opening and Saving

Lugaru has no "new map" command, so you must base your map off of a pre-existing one. To open a map, enter the console by pressing the tilde key (`) and type map filename where the filename is a map that must be inside the /Data/Maps folder in the Lugaru folder.

Saving a map is just as simple, just go to the console and type save filename, and your work will be saved into the Maps folder. If you use a name already used by another map in the folder it will be overwritten without warning. Make sure that that is what you want to do, an overwritten map can not be recovered.

Starting Position

When you save a map, the current position of your character will be saved to the file, and when you open it again you will be returned to that position. This is useful during production because you will be returned directly to the place you were working, but when you finish a map make sure you save the map with your character exactly where you want the player to start.

Terrain

Lugaru offers three different terrain types which also affect the look of objects on the map: grass, snow, and sand. To change the terrain type of your map, simply press 'J'. With each press, the world will be changed to the next terrain type in real time.

Building

The text in the bottom left corner shows you the settings that will be applied to the next object you place. Once you place an object, there is no way to alter it without deleting it and recreating it with new parameters.

Object Types

Lugaru has 12 different objects you can place on the map (not including players), and to make a good map you will probably want to use most of them. To cycle back and forth through available objects, press Shift-Left or Shift-Right; the text in the bottom left of your screen will change to reflect the object that you have selected.

Placing Objects

To place an object on the map, press 'M', and the currently selected object will be created at your character's feet. You can modify several aspects of an object, in addition to its type:

  • To set the rotation of the next object to be placed, press Left or Right.
  • To set the size, press Up or Down.
  • To set the tilt, press Control-Up or Control-Down.

Note: You can set the rotation or tilt of an object to be determined randomly upon placement if you lower its value below 0. Instead of a number, it display as "Random".

Deleting Objects

Removing an object from the map is just as easy as placing them, press Delete and the last object placed will be deleted. If you press Delete again, the object you placed previously will be deleted, and so on.

You can also delete the object closest to you by hitting Control Delete. Note that this won't work with the very first object created on the map.

Populating

Adding and Removing Characters

Press P to add a character, they will appear in the exact location of your character, run in the direction they are facing otherwise you will get stuck inside them. If you are stuck, roll out.

To delete the last character placed, press Shift-Delete (that's Shift-Backspace for Windows users). To toggle the race of the nearest character to you, press Shift-O (he will turn into Turner, press again and he will turn into a wolf). To change the creed and clothes of the nearest rabbit or wolf hit O.

  • The maximum number of enemies you can have on one map is 8 (plus yourself)

To change the state of a character, enter 'type sleeping', 'type sitting', or 'type active' into the console before placing a character.

Patrol Paths (Waypoints)

Movement in Lugaru is decided by a waypoint system. Each character follows a simple path between a series of dots. In the map editor, these dots are visible and are connected by convenient lines.

As you may have guessed, you can only place waypoints for the last character you placed, so make sure you decide on the character's patrol path before you add another player. Press Shift-P to add another point to a player's patrol path, being careful to avoid placing lines that go through objects such as blocks, trees, or hills.

Pathfinding

This helps characters find their way around difficult objects. If, during testing, you notice that your characters get stuck on a certain object a lot, you need to place pathfinding points to help them get around it. Press Control-P to place a pathfinding point. Its best to outline the object completely, so it is possible to get around both sides. You can cycle through pathfinding points with period/comma and delete them with shift period/comma.

Weapons

Shift-X cycles weapons for the nearest enemy. X cycles your weapon (you must be holding a weapon for this to do anything - you may have to give an enemy a weapon, and disarm him).

Weapons on the ground will be automatically deleted when you save and load the map.

Clothes and other Attributes

When you place a new player they inherit all your attributes. Health, power, speed, clothing, etc. are all duplicated. For a comprehensive guide to all of the attributes, make sure you read the console guide. There are numerous console commands that let you fine tune everything from the color of the sky, to whether or not a rabbit is sleeping. This is where the map editing guide stops and the console guide begins.

Campaign Editing

Once you have created a bunch of maps, you may want to add dialogue to build a campaign. Check the Dialogues section for how to add dialogues.

To create the campaign itself from the maps, edit the "main.txt" file, located with your "Campaigns" folder, inside your Lugaru folder. The layout of the file is very simple:

Campaign Levels: 31 
 
Level 1: 
Name: svenroad 
Description: Giant_Ruins_-_start_new_campaign! 
ChooseNext: 0 
NumNext: 1 
NextLevel: 2 
LocationX: 197 
LocationY: 370 
  • ChooseNext:

0 = Immediately load next level at the end of this one.

1 = Go back to the world map.

2 = Don't bring up the Fiery loading screen. Maybe other things, I've not investigated.

  • NumNext = 1

Set this to 0 on final level. As David said: he meant to add story branching, but he eventually hadn't.

  • For LocationX and LocationY :

Where your level will appear on the world map, as the number of pixels from the top left of Data/Textures/World.png.

In OS X, you can open the world map in GraphicConverter and activate the position display ("Window" menu) to easily check coordinates as you move the mouse on the map.