-
class DropTableCategory¶
-
chance:
number
?¶ A number from 0-1 to determine the chance for the category to drop. Defaults to 1 (100%).
-
entries:
DropTableWeightedOption
[]?¶ Weighted items to choose from when the category does drop.
-
quantity:
integer
?¶ The amount to drop. Defaults to 1.
-
chance:
-
class DropTableWeightedOption¶
-
weight:
integer
¶ The weight of the item, e.g. if there are weights of 50 and 30, the former will drop 50/80 times.
-
quantity:
integer
?¶ The amount to drop. Defaults to 1.
-
weight:
-
class DropTable:
Component
¶ A drop table which tracks what items the actor should drop upon death.
-
categories:
DropTableCategory
[]¶
-
weights:
table
<DropTableCategory
,table
<integer
,integer
>>¶ Weights per category per entry.
-
__new(
self:DropTable
,
options:DropTableCategory
|DropTableCategory
[]
)¶
-
getDrops(self:
DropTable
, rng:RNG
):Actor
[]¶ Takes an RNG and returns a table of actors from the drop table.
Other members:
Inherited from
Component
:checkRequirements()
,getBase()
,getRequirements()
,owner
,requirements
Inherited from
Object
:_serializationBlacklist
,adopt()
,assertType()
,className
,deserialize()
,extend()
,instanceOf()
,is()
,isInstance()
,mixin()
,prettyprint()
,serializationBlacklist
,serialize()
-
categories: