Wednesday, 28 December 2011

Weekly Break

More lua awesomeness
The more I work with lua - the more I love it. Its so flexible and dynamic, I feel that I made the perfect choice implementing it.

First van buren objective has been added into the game - Escape Cell Block 13 which completes immediately as the player leaves the map."Completes" is just a term right now as it only sets the mission status to a bogus number. I am going to have to decide how the system should work when completing an objective - keeping the objective and setting the status to an "end" number or removing the objective altogether. Im thinking of the latter, as the former would take unnecessary resources with already completed objectives.

Ive added a few events to the player intellect and objective to use with lua:
  • OnMapTransition (for the player intellect)
  • OnStatusChanged (mission status that is)
  • OnMissionEnd
Also in order to create a mission you must create the lua file as "mission0X.lua" in the Lua/Missions folder. This way you can use the command "addobj mission0X" when attempting to load it from the game console.

A command for loading maps has also been provided which can be used as "loadmap mapname". The engine will first search in the profile map folder to see if the player had previously entered the map, or simply load it from the default maps folder. Similar to the objectives, the maps must be placed in the default map folder.

Ive also fixed the pipboy objective window and it should show the correct updates. All the data for the objectives will be saved in the conversational database in order to make localizations later (that is if people are interested in modding this in their own language).

The problem which needs fixing at the moment is the objective status log. For some reason the log will not serialize the objective updates.

No comments:

Post a Comment