Avorion Wiki
Advertisement

This mod introduces a simple inventory item that gives credits to a player on usage.

About[ | ]

creditcard.lua[ | ]

Represents the credit card item inventory item that can be added to the player's inventory.

  • item.stackable = true The item can be stacked in the inventory
  • item.depleteOnUse = true The item will be removed from the inventory after it was used
  • function create(item, rarity) The function that is called when a new object of this type is created by the game
  • function activate(item) The function that is called when the object is used by the player

modinfo.lua[ | ]

  • serverSideOnly = false The mod adds a new inventory item to the game, and the client has to be able to display tooltips, so the client has to know about it. Also: Localization.
  • clientSideOnly = false Client side only is impossible, since new inventory items have to be created and added on the server.
  • saveGameAltering = true The mod adds a new script data/scripts/items/creditcard.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 =[ | ]

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

Workshop Link[ | ]

See Also[ | ]

Advertisement