Mod Example: Bulletin Board Base

From Avorion Wiki
Jump to: navigation, search

This mod is a base for easily adding bulletin board missions through mods.

About[edit | edit source]

Players won't see exactly what this mod is doing (or that it even exists), but it helps modders and gives them a way to better add bulletin board missions.

It adds a new script bulletinboardmissions.lua to entities that have the bulletinboard.lua script attached. The bulletinboardmissions.lua script has several categories for missions that it selects from, depending on the kind of station it was attached to, such as Military, Trade, etc.

When the bulletinboardmissions.lua script updates, it randomly adds or removes missions from matching categories to the bulletin board script.

The Mod Example: New Mission uses this mod as a dependency to easily add a new mission to the game's bulletin boards.

  • bulletinboard.lua Extends the script's initialize() function to add the bulletinboardmissions.lua script.
  • bulletinboardmissions.lua Core script of this mod that can be extended by other mods to add missions depending on category

modinfo.lua[edit | edit source]

  • serverSideOnly = false This mod introduces a new Entity script, and those have to be present on client and server.
  • clientSideOnly = false Client side only is impossible, since new scripts are added through this mod, which is only possible on the server.
  • saveGameAltering = true The mod adds a new script data/scripts/entity/bulletinboardmissions.lua whose path will be saved into the database. Once the mod is disabled, the script is no longer existant and the savegame will be slightly corrupted (not unplayable though).

Workshop Link[edit | edit source]

See Also[edit | edit source]