I've found a question for visual script editing software tool for creating game behavior logic, but I am looking for something more flexible. I would like to configure the tool to make it produce code that I need. I use Lua for creating quests in my mmorpg game, but every time there is need of creating a new quest I feel like writing the same code all the time. I'd like to allow my co-workers to do this job in some easy way. The easiest way I can think of would be some sort of making graphs that would represent the quest, and fill all the nodes with different if statements and game texts or procedures like spawning mobs.

Is there any tool that I could use for this purpose?


2 Answers 2


Programming Role-Playing Games with DirectX walks through creating what the author calls a "Mad Lib Script System", complete with the editor and the module of the engine that is created over the course of the book. It would surely take some tweaking and doesn't generate LUA so it might be totally unrelated to what you need, but on the other hand, its functionality sounds a lot like what you describe: It takes a dictionary of different possible actions, and then scripts can be created which are just lists of the actions with the blanks filled in, like a Mad Lib. It's made to be extremely user friendly.

Here is a screenshot. I could not find the code online but it does come in full on the book's CD-ROM and of course is explained over the course of one of the chapters of the book (Chapter 10). (this is a Windows executable, but I ran it in Wine to take the screenshot, thus the Mac titlebar and old Windows 2000 look)

Mad Lib Script Editor


I would probably create your own editor. You can use C# or something similar to create a very simple windows application.

If you want to abstract away from having to script things using text, you can take a graphical approach (i.e. using buttons to add a goal). The only things that I would have as textual input are conditions, values, etc.

Firstly, I'd look over your LUA scripts, find the common elements and isolate them.

Then look at all the possible actions or goals that make up a quest and add a combo box with all those possible actions.

So for example, the quest is to kill 10 zombies, the workflow I would imagine is this:

  1. Select "Kill" from Goals combo box
  2. Another combo box appears with a list of enemies, select "Zombie"
  3. Enter the condition in the condition textbox, so add "10".
  4. Click "Add Goal"
  5. The "Kill 10 Zombies" goal is added to the Quest listbox
  6. If you want to change the sequence, just have some "Move up", "Move down" buttons

After you've finished "building" your quest like this, you can then just click the "Compose Script" button and it'll map all the actions you have listed to your LUA code, including the common stuff that you have in every script.

Hope that helps.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .