Mod Example: Upgrade

From Avorion Wiki
Jump to: navigation, search

This mod shows how to add a new System Upgrade to the game. A new upgrade script is added, and the upgrade is added to the upgrade generator, so that it will be created as loot drops as well.

About[edit | edit source]

  • upgradegenerator.lua Extends the vanilla upgrade generator and tells it about the new script

superhyperspace.lua[edit | edit source]

Script that represents the actual upgrade. In this case, it's a slightly modified (boosted) variant of the vanilla hyperspacebooster.lua upgrade.

modinfo.lua[edit | edit source]

  • serverSideOnly = false Mod has to be present on client and server, since new Upgrade scripts are added. Also: Localization.
  • clientSideOnly = false Mod has to pe present on client and server, since new Upgrade scripts are added. Also: Localization.
  • saveGameAltering = true The mod adds a new script data/scripts/systems/superhyperspace.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).

Localization[edit | edit source]

In the data/localization/ folder you can find an example for a German localization of texts that appear in the mod.

Workshop Link[edit | edit source]

See Also[edit | edit source]