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)
(new tutorial!)
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
{{Incomplete}}
 
 
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.
 
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.
  
Line 18: Line 17:
 
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.
 
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:'''
+
'''Current tutorials:''' (these have yet to be updated for v0.9.9.5)
  
 
*[[Modding:Tutorial/Basic Syntax and Definitions|Basic Syntax and Definitions]]
 
*[[Modding:Tutorial/Basic Syntax and Definitions|Basic Syntax and Definitions]]
Line 24: Line 23:
 
**[[Modding:Tutorial/Game Objects|Game Objects]]
 
**[[Modding:Tutorial/Game Objects|Game Objects]]
 
**[[Modding:Tutorial/Custom Items|Custom Items]]
 
**[[Modding:Tutorial/Custom Items|Custom Items]]
 +
**[[Modding:Tutorial/Custom Beings|Custom Beings]]
 +
**[[Modding:Tutorial/Designing AI|Designing AI]] (incomplete)
  
*Example Modules
+
*Example Modules: Singular
 
**[[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]]
 +
*Example Modules: Episodic
 +
**[[Modding:Tutorial/Building an Episode|Building an Episode]] (the basics)

Latest revision as of 04:24, 25 January 2012

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: (these have yet to be updated for v0.9.9.5)

Personal tools