Difference between revisions of "Modding:Tutorial"

From DoomRL Wiki

Jump to: navigation, search
(tutorial isn't completely done but should be close enough, need review anyway)
(added "The Infinite Arena" (still needs links))
Line 27: Line 27:
 
*Example Modules
 
*Example Modules
 
**[[Modding:Tutorial/Constructing a Map|Constructing a Map]] (the basics)
 
**[[Modding:Tutorial/Constructing a Map|Constructing a Map]] (the basics)
**[[Modding:Tutorial/Recreating_Hell's_Arena|Recreating Hell's Arena]]
+
**[[Modding:Tutorial/Recreating Hell's Arena|Recreating Hell's Arena]]
 +
**[[Modding:Tutorial/The Infinite Arena|The Infinite Arena]]

Revision as of 20:33, 3 October 2011

Under Construction!
This page is still undergoing development by one or few members. It is highly recommended that you do not edit anything here until this tag is removed.

Welcome to the DoomRL modules tutorial. The objective of this guide is to explain how to develop your own modules for DoomRL as easily and as accurately as possible: therefore, its scope is fairly limited and will only cover basic techniques in customizing objects, maps, and game events. However, it is written at the level of one who has little to no background knowledge of programming languages, and so is ideal for a player who doesn't understand the fundamentals of scripting. Anyone who has the ambition to create a unique and enjoyable game out of the DoomRL engine should use this as a tool to get started.

Modifying DoomRL content is done through lua, a scripting language designed to communicate with a variety of other computer languages. (You can find out more about lua by following this link.) As such, a great deal of what can be done for the purpose of DoomRL modding is handled by the API, or application programming interface, which allows a modder to issue commands that are sent to the DoomRL engine (written in Pascal). The formatting and syntax is relatively simple and flexible, so there are a number of ways to write code in lua that will produce the same outcome. We will use a particular format, although alternatives will be explained as they come up.

Writing lua code yourself is done in a text editor. What text editor you use depends on your operating system: for Windows, it is Notepad. It is suggested that you use a more advanced text editor that handles formatting more effectively. One such text editor (that is free) is NotePad++, which includes a number of options for easy-to-read and easy-to-write code. Creating a lua file in this manner is as simple as renaming the file with a .lua extension (rather than .txt, for example): NotePad++ itself can save its text files as lua scripts.

Whenever example code is used in this tutorial, it will be displayed using a special formatting, as shown below:

This is an example sentence.
All spaces/symbols are shown completely          like so.
In addition, html formatting <b>cannot</b> work here.
However, certain words (for in or and, etc) as well as formats are colored;
--comments in the language are given using two dashes;
'and strings are expressed' between "single or double quotes".

Much of the tutorial is written in this format, as it is far easier to diplay lua without the default formatting of Wikimedia getting in the way.

Current tutorials:

Personal tools