Skip to content

ItemsBundlesModule

Max S edited this page Aug 19, 2015 · 1 revision

Items and Bundles

Overview

The items module provides access to ingame items and their various groupings. The item is a container for item attributes. You can define item attribute types in the editor and then add/edit item attributes of the items. The items can have a type, a slot (can be used for wearable items) and a group (can be used for grouping the items in ingame shop). You can also bundle items into item bundles. These bundles can be assigned to other items so, for example, putting the bundle item into the inventory will convert the item into the items in a bundle.

Shop and inventory modules are based on the items module.

Editor

Through the editor you can create and edit the item types, item groups, item slots, item attribute types, the items themselves and item bundles. The main editor page has a menu for these in the center block. Item groups are in the next block that edits the shop since they are primarily used in the shop. Most of these are straightforward, there's no need to describe every page. There are a couple things worth mentioning.

The first one concerns the item image. You can upload a file for it using the upload form on the edit item page. The uploaded file will be put into the "client/items/" directory of the editor (it needs to be created and have proper permissions set) and named "<item ID>.swf".

The second one allows displaying the item attributes as strings on the edit item page and editing them with the use of dropdown lists. For example, if you have an item attribute that contains effect ID, you can have the item attribute on a page showing the effect name string instead of the default ID number. If you click on the edit attribute link, you will see a form with the dropdown list of effects instead of default text field with effect ID. This is done through editor subscriptions and described in detail at the Editor Subscriptions page.

The third one is that changing or creating any items, items slots, etc will trigger a reload on the game servers. It is not advisable to delete the items on a running server since this will break all containers that point to it.

Slave server

The slave server items module is called snipe.slave.modules.ItemModuleCore. It gives access to items and item groups. Note that all methods return ItemProtoClass. This is not actually a class but a type definition that points to either the core item prototype class or your project's that should extend the core class. The actual core class is called snipe.slave.data.ItemProtoCore.

The item bundles module is called snipe.slave.modules.BundleModuleCore. It gives access to item bundle contents.

Clone this wiki locally