A remake of the classic Wizardry video games

Copyright Eric Pietrocupo

E-Mail: ericp@lariennalibrary.com

Wizardry Legacy

WL Adventures

Maze Event system

Filed in: Development.DVevent · Modified on : January 27, 2015, at 01:54 PM - Visits 1381

The event system is composed of multiple section. This page will not list all the possible events that can be triggered in the game but rather how they will work and how they are used. For more details about each event, look at the list in the reference section when it will be available.

From the maze

The maze tile has a field for holding an event number between 0-255. This will be the ID of the event. There will be up to 255 event per adventure, but consider that the same event can be reused. For example, all stair up events in the game could be the same. No need to duplicate those events unless you want each of them to have a different flavor text. I think that should be more than enough for the need of the game. I counted the number of events in Wizardry V excluding the fact that some could be duplicated and I end up with something between 200 and 250 events. So I think it should be enough.

When a party encounter an event, it use this event number to search into the database and get the event information. Then it will look for the trigger, it determines how the event is triggered. For example, an event could be triggered by entering a tile, looking at a specific wall, searching the area, using an item, etc. Once the event is trigered, it starts the procedure below.

The event system follow an if-then-else structure like in programming:

   WHEN trigger is valid
   IF the lock event is PASSED successfully
      THEN execute the pass event
      ELSE execute the fail event

Event Lock

The lock event is something that will prevent the pass event from occuring. Sometimes there are no lock event, so it is passed automatically and the pass even is resolved. For example, a chute trap is automatic, the player does not have to chose or face a challenge before falling in a chute. Else a simple yes/no question could be a lock event. Yes makes the party pass, while No makes the party fail.

Most of the time there are actually a challenge. The hidden lock event ask the party to hold a specific key item in their inventory to pass the even else they fail. Riddle is also another form of lock.

The lock even has 2 numeric variables identified as key and var. Most of the time, the required key is placed in the key field and the var field is dependent on the event itself. There are also 2 string variables called msg and str. Msg contains the message displayed to the user, while the str variable is dependent on the type of event.

note aboute key items: All items has a key field which contains a unique number. If an items has any number different than 0, it's a key item and it can be used by any lock event. Any item can be a key from useless items to pieces of equipment.

Pass/Fail events

The events that can be triggered after passing or failling the lock event are exactly the same. Those kind of events are the consequences that happens: positive or negative. It can include gaining an item, exiting the maze, moving in a direction, teleporting to another destination, hitting a trap, etc.

There are 4 numeric variables for each of the pass and fail event. Their usage depends on the type of event triggered. The are also each have 2 strings, one for the message and another for the variable.


So this structure makes it possible to create various kind of events by using a limited set of events. Here are some example of familiar events found in wizardry (message display are not specified):


   WHEN move in
   IF automatic pass
      THEN move to floor below
      ELSE do nothing

Area locked

   WHEN move in
   IF hidden key check passed
      THEN do nothing
      ELSE move backward

Trade item

   WHEN move in
   IF KEY item available and Question answer = yess
      THEN remove item, gain item
      ELSE do nothing

Locked Door

   WHEN open door east
   IF ask user to use item or lockpick pass
      THEN move forward
      ELSE do nothing

Traped Chest

   WHEN search room
   IF lockpick or use key pass
      THEN gain item
      ELSE trigger trap

Note about message string format: I am currently working on this issue, but to force a carriage return in the messages, the "\n" character must be used (trying to make it work). Consider that message need to have a minimum width to look good, and a maximum length to be readable on the screen. A max width of 80 characters per line is recommended and Up to 3 lines can be used. The message string cannot contains more than 240 characters.

<< Maze Data Structure | Table of contents | Maze Encounter >>

Powered by PmWiki and the Green skin