Lore And Lutes Editting Tutorial 1.00 (11/13/2002) Written By: Andy Stone
Lore And Lutes By: Andy Stone (astone42@attbi.com) Visit: http://loreandlutes.sourceforge.net for more information. See copying.txt or copying for licensing information.


Changes (Document Versions):

1.0: Initial document.

What the Lore And Lutes Is:

Lore and lutes is an adventure\RPG game similar in style to Ultima. L&L was designed as a gaming engine. That means rather than hard being hard coded and compiled in C++ L&L is a collection of several data files that are executed through the L&L engine. This design leaves a great bit of flexibility, so that creating another game is as simple as editting these data files. It would be entireley possible, although rather undesirable, to create an entire RPG game using nothing but a good text and hex editor. Thankfully though, I've gone to all the trouble of creating an easy to use and powerful editor which generates these RPG data files for you. Using this simple editor you can create your own RPG games.

Anyways before you start delving into the editor I suggest you actually play what exists of Lore And Lutes to give you some idea of what the editor is currently capable of doing.

The editors main features are:

*Map editting, tile and object placment *Object scripting using an object oriented scripting language called LOOP. *Terrain, map physics, editting

Starting off by plotting terrains:

To start using the L&L editor the first thing you should do is start placing terrains. If you press the space key you will plot the current terrain, you can tell what the current terrain is by looking at the console on the right side of the screen. If you want to change the current terrain press the TAB key, use the arrow keys to select what terrain you want, and press space to select it.

You can move around the map by using the arrow keys or the mouse, its suggested you mostly use the keyboard though. You might find these features useful for terrain placement:

Pen mode: Press the 'p' key to turn on/off the pen mode. If pen mode is on then when you move using the arrow keys the current terrain is automatically plotted below the cursor. Remember to turn pen mode off by pressing the 'p' key.

Fill: Press the 'x' key to preform a fill operation using the current terrain.

If you press the number keys you will plot rectangles, increasing as the number you press increases, of the current terrain. Specifically the number represents the radius of an inscribed circle within the rectangular area to fill with the current terrain - 1/2 tile. Just press them to figure out how it works though, you'll get it.

Saving

If you want to save the current map at any time depress the 's' key. Quit by pressing 'q' and enterint 'y' for the popup message. Next run lrun and you should notice the changes you made on the map. If you have ledit and lrun in seperate directories make sure to copy the games/ directory from ledit over the games/ directory from lrun.

Getting Help

When L&L reaches more mature stages you should be able to acess a help file for the specific screen (part) of the editor you're on quickly by depressing the 'H' key. Currently if you press the 'h' key within the map editor (where you start out) you'll get a simple help screen. The console to the right side of the screen displays some basic information about the editor you're currently in. If you manage to get yourself stuck on some weird screen of the L&L editor and don't know where you are you can usually back up by pressing the Escape key.

Terrain Editting

If you want to change the behavoir of a terrain (e.g. make it possible to walk over water) press the tab key, select the terrain you wish to change the behavoir of, and press the 'e' key. Doing this will bring up an editting form. In it are the values of several variables effecting how terrains work. To change a value highlight what you want to change by using the arrow keys and press enter. The values\selections you can change\use for a terrain include:
Image:          What image file (.png, .bmp, .jpg) this terrain will draw on the screen
                when seen. Pressing enter will bring up a file chooser allowing you
                to pick another image file. To use the file chooser simply use the
                arrow keys to change selections and the enter or space key to pick one.
Edit Image:     This feature currently isn't implemented, it will bring up a 3rd party
                image editor, such as the GIMP, which will allow you to edit the
                image used by this terrain.
Color Red:      The R value of an RGB color value which is used to represent this terrain.
                This color is used for drawing zoomed out views of the map known as
                gem view. For example set the color of water to blue, grass to green,
                dirt to brown, etc.
Color Green:    The G value of this RGB color.
Color Blue:     The B value of this RGB color.
Light:          How light interacts with this terrain:
                (1): No Effect:         The player can see through this terrain.
                                        Examples: Grass, roads, dirt, ground.
                (2): Block Light:       Block light from the player
                                        Examples: Walls, Big mountains
                (3): Illuminate:        Make this terrain always visible no matter what.
                                        Examples: Magical items
                (4): Small Torch:       This terrain will generate a little light around it.
                                        Example: Candles
                (5): Torch              This terrain will generate some light around it
                                        Examples: Torches, light posts
                (6): Lighthouse effect  This terrain will generate a circular segment
                                        of light rotating around it. In other words a
                                        light house effect. The example is self evident.
Descr:          The terrain description, what is displayed in the console to the right
                when the player (L)ooks at this terrain.
All mobility obptions below:
        The mobility options describe what types of vehicles can move over this terrain
        and in what directions. Choosing one will bring up a more detailed list of
        choices. If you're editting something go ahead and choose this, the screen that
        shows up will describe how this vehicle can enter and exit onto this terrain.
        The normal ticks options: Is an abritraty timing value. Each map has a certain
                                  number of ticks per minute which is set in another
                                  options screen.
        Damage/Chance of Damage: Specifies how many hit points (HP) will be taken if
                                 this terrain is moved on to by the player or another
                                 creature. The chance of damage specifies the % chance.

To exit the mobility editor or the terrain editor press the escape key. To get out of any editor in fact press the escape key, remember this fact, its important!

Editting Vehicles:

While editting terrains there was a list of mobilities for specific vehicles. The default ones include: Walk, Boat, Climb, etc. You can change the vehicles in a game by going to the vehicle editor by pressint the 'F3' key.

The map centric nature of an L&L game

A Lore and Lutes game is composed into several maps, each which include 100x100 terrain tiles.

Map Information:

You can change the properties of a map by entering the map information editor. Press the 'i' key. Once in you can edit these properties:

Description: A helpful description used while editting. This description serves

                only to help you keep track of what map is what.
Music File:     Will allow you to choose which (.mid, .mp3, or .mod) file will be played
                in the background while the player is on this map. Currently this option
                hasn't been programmed in yet.
Terrain File:   Will let you choose which terrain set this map willl use. Currently this
                option hasn't been programmed in yet.
Ticks Per Min:  The number of arbitrary timing units (ticks) are in 1 game minute.
                The default is 100. You may want to change the ticks per minute to a higher
                rate for maps that are zoomed in (cities, villages) and to a lower rate
                for maps that aren't (outside maps). This makes the game timing more
                realistic.
Default Player X: Where the player will normally enter the map from unless otherwise
                  specified.
Default Player Y: Where the player will normally enter the map from unless otherwise
                  specified.
Max Monsters:           Not currently programmed in.
Chance of Monsters:     Not currently programmed in.
Map to North:           What map the player will move to when he exists the north border
North Border:           Which Y value the north border is associated with. You should
                        normally set this to zero.
North Effect:           Currently not programmed in. Will show what graphical special
                        effect is shown when the player moves off the map.
Map to South:           Similiar to Map To North but for the south.
South Border:           Similiar to Map To South but for the south. Normally should be set
                        to 99.
Sorth Effect:           Not programmed in. Effect for when the player exists south.
Map to West:            Similiar to Map To North but for the south.
West Border:            Which X value the west border is at. Normall should be 0.
West Effect:            Not programmed in. Effect for when the player exists west.
Map to East:            Similiar to Map To West but for the east.
East Border:            Similiar to Map To west but for the east. Normally should be set
                        to 99.
East Effect:            Not programmed in. Effect for when the player exists east.

Changing Maps

If you want to change the current map you're editting press the 'm' key. Next choos a map. If you want to create a new map choose "-- [New Map] --" Be careful to save the current map before switching to a next one. I'll probably set the game to auto save before switching later but for now be aware of this!

You may also use the more than or less than keys (< and > or , and .) to switch to the previous and next maps respectively.

Placing Prebuilt Objects

Terrains are all nice, and cool, and stuff, but a game just isn't spiffy without objects! (Yes you can qoute me on that). Anyways, objects are things in your game that have an interactive element to them, such as signs, NPCs, monsters, etc. In Lore and Lutes there are three styles of objects:

Monsters

Monsters haven't fully been implemented yet so I'm not going to discuss them yet. If you're adventurous you can explore what I have programmed so far with mosters by pressing the 'F6' key.

Scripted Units

Scripted units are the single most powerful entity of Lore And Lutes, they can be used to accomplish tons of things, and are very flexible. Why? Because Scripted Units are scripted! They are programmed using a language called LOOP which includes a series of commands describing how the object ineracts with the player and the world around it.

Using prebuilt scripted units

Before you start building your own units though its best go use some prebuilt ones to grasp the idea of these units. Press the 'o' key. A message will pop up asking if you want to place an instance from the Global class set or the Local set. I'll describe the difference betwix these two sets later. For now choose the global set by pressing 'g'. You will be prompted to choose a class. Select the sign class and press enter. Next you'll be asked to enter an identifier. The identifier is just something you name your object by. Something like "MySign" or "AGoodSign" whatever will help you remember what this object is for. Be aware that no two objects within a map may have the same identifier though. If you enter an illegal one (one that already exists) you'll be prompted to enter another identifier. Anyways just call it something! Next you'll be whisked away to a file chooser. Here you get to choose which image you'll use for your object, being a sign and all, I suggest you enter the objects/ directory (directories are specified by the blue font) and you choose the "Sign.png" image.

And whoop de whoo! You've got a sign!

But if you ran the game as is this sign would be rather boring, you haven't written anything on it yet. To change the properties of a scripted unit, the properties for the sign in this case, select it and press enter. You can change these values:

Identifier:     The identifier, which you entered earlier.
Image:          The image, which you entered earlier
Edit Image:     <Not yet implemented>
Class:          Class, you change which class this instance uses. (e.g. Sign, Scroll...)
<Edit Daily Route>:     <Not yet implemented>

Next there are options for various variables that are programmed within the script. In the case of the sign there's a text option. Select it, you'll go to a text editor. Within the editor type:

"Hi, I'm a sign!"

Press escape twice to return to the main editor, save by pressing 's', exit by pressing 'q' and 'y'. The run the L&L runner (lrun) copy the games/ folder if neccessary. Then look at your sign by approaching it, pressing 'l' and then entering the direction of the sign. If you see "Hi, I'm a sign!" in the right cnosole then you've just placed an object! Congrats!

That said go ahead and experiment with some of the other prebuilt objects.

Making Your Own Object

<Tutorial to come later!>

Items

Items haven't been programmed yet but they will be objects which can be carried by a scripted unit or the player through inventory.

Conclusion

L&L is still in its Alpha stages but currently has lots of power. I'd be interested to hear what you think of L&L so far. So drop me a line at astone42@attbi.com, thanks! Also be sure to check out the L&L website every month or two which is at: http://loreandlutes.sourceforge.net