Item Table

Item Table V1

What is Item Table?
Item Table can be used to add items to a unit type and then randomly drop an item from the Table. Or in other words make a loot table for a unit type using triggers.

Features:
25 diffrent unit types (can be easily changed, just change the array size that currently are at 25)
10 items per unit type(can be easily changed, just change the array sizes that currently are at 10)
4 diffrent drop types:
Standard: drops an item based on the chance inputed in the drop item action. All items have an even chance of dropping.
Item Individual: drops an item based on the item individual chance inputed in the add item to Item Table action and based on the chance inputed in the drop item action.
Unit Individual: drops an item based on the units individual chance inputed in the create item table for unit type. All items have an even chance of dropping.
Item and Unit Individual: combines Item Individual and Unit individual.

Actions:
Item Table Init:
Initializes the Item Table drop trigger that comes standard with this library. If you use your own drop trigger don't call this function.
Add Item to Unit Type Item Table:
Adds an item to a specific unit types item table.
Remove Item from Item Table:
Removes an item from a specific unit types item table. Usefull if you want a unit type to stop dropping a special item or clear up a space for a new item.
Create Item Table for Unit Type:
Creates an item table for a specified unit type this is needed before you add items to a unit type.
Drop Item:
Drops an item from the unit types item table, different drop types can be selected and will change how the items drop.
Drop Multiple Items:
Same as Drop Item, but can drop upto an amount of items. Note this doesn't mean that there will always drop 2(for example) items, it will drop upto 2 items so 0-2 items will be dropped.

Functions:
Get Unit Index(you should almost never have any use for this):
Gets the unit types index from the place where it's stored.
Get Item Index(just here if you want to check the items index):
Gets the item index in a specific item table.
Unit Type has Item Table:
Checks if a unit type has an item table linked to it.
Get Items in Item Table:
Gets the total amount of items in a unit types item table.

Credits:
Utility Library by Daxxar
Unit Pool by s3rius


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    28033
  • Created
    Dec 6, 2010
  • Last Released File
    Dec 6, 2010
  • Total Downloads
    842
  • License

Categories

Members

Recent Files