siege

GrabbedItemLocation

class GrabbedItemLocation
BAG = siege.GrabbedItemLocation.BAG
BAGSLOT = siege.GrabbedItemLocation.BAGSLOT
CUSTOM = siege.GrabbedItemLocation.CUSTOM
GADGET = siege.GrabbedItemLocation.GADGET
GEAR = siege.GrabbedItemLocation.GEAR
HAND = siege.GrabbedItemLocation.HAND
NONE = siege.GrabbedItemLocation.NONE
QUICKBAR = siege.GrabbedItemLocation.QUICKBAR
RESERVE = siege.GrabbedItemLocation.RESERVE
SKILL = siege.GrabbedItemLocation.SKILL
TOOLBAR = siege.GrabbedItemLocation.TOOLBAR

PauseLocation

class PauseLocation
Custom = siege.PauseLocation.Custom
Focus = siege.PauseLocation.Focus
None = siege.PauseLocation.None
Option = siege.PauseLocation.Option
PauseNoPlayers = siege.PauseLocation.PauseNoPlayers
Steam = siege.PauseLocation.Steam

PlayMode

class PlayMode
Creative = siege.PlayMode.Creative
Easy = siege.PlayMode.Easy
Hardcore = siege.PlayMode.Hardcore
Normal = siege.PlayMode.Normal

SkillType

class SkillType
Active = siege.SkillType.Active
Passive = siege.SkillType.Passive

ActiveTalent

class ActiveTalent
gainPoints(amount)
Parameters:amount (int) –
get(skillName)
Parameters:skillName (str) –
Return type:EngineSkill
getLevelCap()
Return type:int
getPointsToLevel()
Return type:int
getSkills()
Return type:SkillList
has(skillName)
Parameters:skillName (str) –
Return type:bool
isMaxLevel()
Return type:bool
purchaseSkill(player, skill)
Parameters:
icon
level
name
onSkillChanged
points
stored

Camera

class Camera
__init__(arg2)
Parameters:arg2 (RenderSystem) –
attachTo(arg2, arg3, arg4, arg5)
Parameters:
reset()
setPosition(arg2)
Parameters:arg2 (Vector) –
entity
movement
position
windowSize

CharacterInfo

class CharacterInfo
body
customizations
level
name
playtime
Tracks playtime in seconds

ContentData

class ContentData
components
name
persistent

ContentDataMap

class ContentDataMap
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –

Cooldown

class Cooldown
__init__(key, duration)
Parameters:
  • key (str) –
  • duration (int) –
__init__(arg2)
Parameters:arg2 (Cooldown) –
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
duration
key

CustomizationInfo

class CustomizationInfo
read(arg2)
Parameters:arg2 (DataStream) –
write(arg2)
Parameters:arg2 (DataStream) –
content
group
hsl

CustomizationInfoList

class CustomizationInfoList
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –
append(arg2)
Parameters:arg2 (object) –
extend(arg2)
Parameters:arg2 (object) –

DynamicStat

class DynamicStat
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
adjust(value)
Parameters:value (float) –
Return type:float
adjustMax(value)
Parameters:value (float) –
Return type:float
get()
Return type:float
getMax()
Return type:float
getRaw()
Return type:float
getRawMax()
Return type:float
hasMax()
Return type:bool
isFull()
Return type:bool
mod(value[, isMultiplier=False])
Parameters:
  • value (float) –
  • isMultiplier (bool) –
Return type:

int

mod(key, value[, isMultiplier=False])
Parameters:
  • key (str) –
  • value (float) –
  • isMultiplier (bool) –
set(value)
Parameters:value (float) –
setMax(value)
Parameters:value (float) –
unmod(uid)
Parameters:uid (int) –
unmod(key)
Parameters:key (str) –
fullName
isVisible
name
onChange
onChangeMax

EngineSkill

class EngineSkill
__repr__()
Return type:str
getCost()
Return type:int
getLevelCap()
Return type:int
isMaxLevel()
Return type:bool
canRepeatUse
cooldown
costs
getDescription
getIcon
getModifiers
getName
icon
isAvailable
isUsable
level
name
onActivate
onDeactivate
onUse
type
unlockLevel

Entities

class Entities
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –
append(arg2)
Parameters:arg2 (object) –
extend(arg2)
Parameters:arg2 (object) –

Entity

class Entity
__eq__(entity)
Parameters:entity (Entity) –
Return type:bool
__getattr__(attr)
Parameters:attr (str) –
Return type:object
__init__(name, id, content, persistent)
Parameters:
  • name (str) –
  • id (int) –
  • content (Content) –
  • persistent (bool) –
__neq__(entity)
Parameters:entity (Entity) –
Return type:bool
__repr__()
Return type:str
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
add(component)
Parameters:component (Component) –
destroy([unload=False])
Parameters:unload (bool) –
get(componentType)
Parameters:componentType (str) –
Return type:Component
get(cid)
Parameters:cid (int) –
Return type:Component
getName()
Return type:str
getPosition()
Return type:Vector
getRender()
Return type:RenderComponent
has(componentType)
Parameters:componentType (str) –
Return type:bool
has(cid)
Parameters:cid (int) –
Return type:bool
hasRealm()
Return type:bool
isContentEntity()
Return type:bool
isDestroyed()
Return type:bool
isPlayer()
Return type:bool
remove(component)
Parameters:component (Component) –
remove(componentType)
Parameters:componentType (str) –
setInitialPosition(position)
Parameters:position (Vector) –
setName(name)
Parameters:name (str) –
setPosition(position)
Parameters:position (Vector) –
components
content
id
layer
loopWidth
name
onDestroyed
persistent
realm
realmUid

EntityManager

class EntityManager
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
addComponent(entity, definition)
Parameters:
  • entity (Entity) –
  • definition (object) –
associate(contentObject)
Parameters:contentObject (object) –
Return type:Content
create([components=[]])
Parameters:components (Content) –
Return type:Entity
destroy(entity)
Parameters:entity (Entity) –
destroyCreatedCharacter(entity)
Parameters:entity (Entity) –
get(arg2)
Parameters:arg2 (int) –
Return type:Entity
getContentEntity(contentName)
Parameters:contentName (str) –
Return type:Entity
getContentEntity(content)
Parameters:content (Content) –
Return type:Entity
getDefinition(cid)
Parameters:cid (int) –
Return type:object
getDefinition(type)
Parameters:type (str) –
Return type:object
hasDefinition(cid)
Parameters:cid (int) –
Return type:bool
hasDefinition(type)
Parameters:type (str) –
Return type:bool
initialize()
reloadContentEntities(content)
Parameters:content (Content) –
removeComponent(entity, component)
Parameters:
requestCid(componentType, definition)
Parameters:
  • componentType (str) –
  • definition (object) –
Return type:

int

reset()
contentComponents

EntitySet

class EntitySet
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__contains__(arg2)
Parameters:arg2 (Entity) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –
add(arg2)
Parameters:arg2 (Entity) –
clear()
has(arg2)
Parameters:arg2 (Entity) –
Return type:bool
remove(arg2)
Parameters:arg2 (Entity) –

Game

class Game
__getattr__(attr)
Parameters:attr (str) –
Return type:object
abort(error)
Parameters:error (str) –
broadcastMessage(message)
Parameters:message (str) –
cleanup()
exit()
getMousePosition()
Return type:PixelVector
getSubsystem(subsystem)
Parameters:subsystem (str) –
Return type:Subsystem
getSystem(system)
Parameters:system (str) –
Return type:object
hasSystem(system)
Parameters:system (str) –
Return type:bool
initialize()
isOnTick()
Return type:bool
openUrl(url[, forceBrowser=False])
Parameters:
  • url (str) –
  • forceBrowser (bool) –
pause(arg2)
Parameters:arg2 (PauseLocation) –
registerComponent(name, factory)
Parameters:
registerSubsystem(subsystem, subsystemName, component)
Parameters:
  • subsystem (Subsystem) –
  • subsystemName (str) –
  • component (str) –
registerSubsystem(subsystem, subsystemName, components)
Parameters:
registerSystem(subsystemName, system)
Parameters:
  • subsystemName (str) –
  • system (object) –
reinitialize()
requestTextInput(description, maxCharacters, currentText, isPassword, callback)
Parameters:
  • description (str) –
  • maxCharacters (int) –
  • currentText (str) –
  • isPassword (bool) –
  • callback (object) –
reset()
resume(arg2)
Parameters:arg2 (PauseLocation) –
sendMessage(arg2, arg3)
Parameters:
setMousePosition(arg2)
Parameters:arg2 (PixelVector) –
sleep(arg2)
Parameters:arg2 (int) –
unregisterSubsystem(subsystemName)
Parameters:subsystemName (str) –
unregisterSystem(subsystemName)
Parameters:subsystemName (str) –
static get()
Return type:Game
achievements
args
audio
configDirectory
content
data
entity
events
file
gui
hasFocus
hasInputFocus
isPaused
network
onUnregistration
onUpdate
particles
profiler
renderCursor
scene
state
steamUid
version

GrabbedItem

class GrabbedItem
__eq__(arg2)
Parameters:arg2 (GrabbedItem) –
Return type:bool
__init__(item)
Parameters:item (GrabbedItem) –
__nonzero__()
Return type:bool
read(arg2, arg3, arg4, arg5)
Parameters:
write(arg2, arg3, arg4)
Parameters:
bagIndex
customLocation
elapsed
entity
index
item
location
reserve
slot

Integrity

class Integrity
static checkModule(arg1)
Parameters:arg1 (object) –
Return type:bool
static checkPath(arg1)
Parameters:arg1 (str) –
Return type:bool
static create(arg1)
Parameters:arg1 (list) –
static isEnabled()
Return type:bool
static isValid()
Return type:bool
static load()

InventoryItem

class InventoryItem
__eq__(arg2)
Parameters:arg2 (InventoryItem) –
Return type:object
__init__(content[, quantity=1])
Parameters:
  • content (Content) –
  • quantity (int) –
__init__(contentName[, quantity=1])
Parameters:
  • contentName (str) –
  • quantity (int) –
__init__(entity[, quantity=1])
Parameters:
  • entity (Entity) –
  • quantity (int) –
__init__(entity, contentName[, quantity=1])
Parameters:
  • entity (Entity) –
  • contentName (Content) –
  • quantity (int) –
__init__(item)
Parameters:item (InventoryItem) –
__ne__(arg2)
Parameters:arg2 (InventoryItem) –
Return type:object
__nonzero__()
Return type:bool
__repr__()
Return type:str
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
getContentId()
Return type:int
pack(stream, contentStash)
Parameters:
read(stream, contentStash, entityManager)
Parameters:
swap(item)
Parameters:item (InventoryItem) –
unpack(stream, contentStash, entityManager)
Parameters:
write(arg2, stream, contentStash)
Parameters:
static stackItems(base, held, entityManager)
Parameters:
Return type:

bool

content
entity
quantity

ItemGenus

class ItemGenus
__init__(content[, quantity=1])
Parameters:
  • content (Content) –
  • quantity (int) –
__init__(contentName[, quantity=1])
Parameters:
  • contentName (str) –
  • quantity (int) –
__init__(entity[, quantity=1])
Parameters:
  • entity (Entity) –
  • quantity (int) –
__init__(entity, contentName[, quantity=1])
Parameters:
  • entity (Entity) –
  • contentName (Content) –
  • quantity (int) –
__init__(item)
Parameters:item (ItemGenus) –
genus

ToolItem

class ToolItem
__eq__(arg2)
Parameters:arg2 (ToolItem) –
Return type:bool
__init__(item)
Parameters:item (InventoryItem) –
__init__(talent, skill)
Parameters:
__nonzero__()
Return type:bool
__repr__()
Return type:str
getCooldown()
Return type:Cooldown
getIconPath(player)
Parameters:player (Player) –
Return type:str
isItem()
Return type:bool
isSkill()
Return type:bool
pack(stream, contentStash)
Parameters:
read(arg2, stream, contentStash, entityManager, player)
Parameters:
unpack(stream, contentStash, entityManager, player)
Parameters:
write(arg2, stream, contentStash)
Parameters:
skill
talent

ItemBag

class ItemBag
__init__(arg2)
Parameters:arg2 (int) –
__init__(arg2, arg3)
Parameters:
  • arg2 (int) –
  • arg3 (int) –
__init__(arg2, arg3)
Parameters:
  • arg2 (int) –
  • arg3 (Entity) –
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
add(entity, quantity)
Parameters:
  • entity (Entity) –
  • quantity (int) –
Return type:

int

addToEmptySlot(entity, quantity)
Parameters:
  • entity (Entity) –
  • quantity (int) –
Return type:

int

canAdd(entity)
Parameters:entity (Entity) –
Return type:bool
clear()
clear(index)
Parameters:index (int) –
decrement(index, quantity)
Parameters:
  • index (int) –
  • quantity (int) –
fullDirty()
get(index)
Parameters:index (int) –
Return type:InventoryItem
getContentQuantity(content)
Parameters:content (Content) –
Return type:int
hasContent(content)
Parameters:content (Content) –
Return type:bool
hasUniqueItem(entity)
Parameters:entity (Entity) –
Return type:bool
isEmpty()
Return type:bool
isEmpty(index)
Parameters:index (int) –
Return type:bool
pack(stream, contentStash)
Parameters:
read(stream, contentStash, entityManager)
Parameters:
remove(entity, quantity)
Parameters:
  • entity (Content) –
  • quantity (int) –
Return type:

int

remove(entity, quantity)
Parameters:
  • entity (Entity) –
  • quantity (int) –
Return type:

int

resize(size)
Parameters:size (int) –
set(index, item)
Parameters:
stack(entity, quantity)
Parameters:
  • entity (Entity) –
  • quantity (int) –
Return type:

int

unpack(stream, contentStash, entityManager)
Parameters:
write(arg2, stream, contentStash)
Parameters:
entity
index
items
onChange
openSlots
size

ItemList

class ItemList
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –
append(arg2)
Parameters:arg2 (object) –
extend(arg2)
Parameters:arg2 (object) –

Locale

class Locale
static get(text)
Parameters:text (str) –
Return type:str
static getEscaped(text)
Parameters:text (str) –
Return type:str
static getFont(name)
Parameters:name (str) –
Return type:str
static getLocale()
Return type:str
static getLocales(arg1)
Parameters:arg1 (Packages) –
Return type:dict
static has(text)
Parameters:text (str) –
Return type:bool
static setLocale(locale, packages)
Parameters:
  • locale (str) –
  • packages (Packages) –

Player

class Player
applySubstitutions(substitutions, hsl, paths)
Parameters:
attachHeldItems([removeAnimationHandler=True])
Parameters:removeAnimationHandler (bool) –
attemptEquip(slot, item)

Attempts to equip the item to the player.

Parameters:
  • slot (str) – Name of the equipment slot.
  • item (InventoryItem) – The item to equip. If successful this item contents is swapped with the item currently equipped in the specified slot.
Returns:

Whether the item was successfully equipped or not.

Return type:

bool

canEquip(slot, item)

Checks to see if an item can be equipped by the player.

Parameters:
  • slot (str) – Name of the equipment slot.
  • item (InventoryItem) – The item to check if it is equippable.
Returns:

Whether the player can equip item or not.

Return type:

bool

canSplitItem(item[, quantity=1])
Parameters:
Return type:

bool

getHarvestPower(arg2)
Parameters:arg2 (ToolComponent) –
Return type:int
getPath()
Return type:str
getSplitItemQuantity(item, quantity)
Parameters:
Return type:

int

getToolPower(arg2)
Parameters:arg2 (ToolComponent) –
Return type:int
getToolReach(arg2)
Parameters:arg2 (ToolComponent) –
Return type:int
isAggressive()
Return type:bool
isPassive()
Return type:bool
loadInfo(contentStash, entityManager, playerPath[, setupEntity=True])

Loads the character information from the provided path.

Parameters:
save(arg2, fileManager, contentStash, writers, asynchronous)

Saves the character to file.

Parameters:
  • arg2 (FileManager) –
  • fileManager (ContentStash) – (FileManager) The file manager (game.file).
  • contentStash (EntityManager) – The ContentStash provided by Game.
  • writers (ObjectMap) – A dictionary of {str: callable}. The callable should have the following signature (player, stream).
  • asynchronous (bool) – Set to true to force asynchronous file writing, false otherwise
setup(contentStash, entityManager, entityId)
Parameters:
showUseItem(position, index, slot, toolItem[, swapBackOnAnimationFinish=True])
Parameters:
  • position (Entity) –
  • index (Vector) –
  • slot (bool) –
  • toolItem (ToolItem) –
  • swapBackOnAnimationFinish (bool) –
swapHeldItems()
connectedTime
(Clock) Tracks the amount of time the player has been connected to this world.
data
(dict) Container for miscellaneous player data.
directory
Directory the character is saved into.
dirty
(bool) Tracks if the player has data that needs to be sync’d from the server to client.
entity
(Entity) The Entity instance for the Player.
flipPlacedItems
(bool) Whether or not placed items by player are flipped horizontally.
grabbed
(GrabbedItem) The item the player currently has grabbed with the mouse.
info
lastUsedItemTimer
(Clock) Tracks time since last used item.
mode
(PlayMode) The mode the Player is in.
movement
(Vector) The distance moved over the last few seconds.
needsItemRestoration
networkId
(NetworkId) The NetworkId associated with this player.
onGrabbedChange
(GameEvent) Invoked with (player, previousGrabbed, grabbed) when grabbed changes.
temp
(dict) Container for temporary miscellaneous player data.
timeSinceLastUsedItem
(int) Amount of time elapsed (ms) between the use of the previous and currently used item.
uid
(int) Unique id for the given world the Player is in.
useTimer
(Timer) Tracks the amount of time until the player can use an item again.
viewport
(PixelRect) The player’s viewport. The area of the world that the player currently sees.
viewportSize
(PixelVector) Size of the player’s viewport.

Profiler

class Profiler
disable()
enable()
finish()
log([name=''])
Parameters:name (str) –
start(name[, parent=''[, isStandalone=False]])
Parameters:
  • name (str) –
  • parent (str) –
  • isStandalone (bool) –
enabled
netProfile

PythonImporter

class PythonImporter
clearModuleDependencies(arg2)
Parameters:arg2 (str) –
deepCopyModuleDict(arg2)
Parameters:arg2 (object) –
Return type:object
getModuleDependencies(arg2)
Parameters:arg2 (str) –
Return type:StringSet
static get()
Return type:PythonImporter
blacklist

SceneManager

class SceneManager
getActive()
Return type:object
transition(arg2)
Parameters:arg2 (str) –
active

Scenes

class Scenes
GAMEPLAY = 'Gameplay'
LOGO = 'Logo'
MENU = 'Menu'

Skill

class Skill
__init__(name, type, icon, costs, unlockLevels)
Parameters:
  • name (str) –
  • type (SkillType) –
  • icon (str) –
  • costs (list) –
  • unlockLevels (list) –
__repr__()
Return type:str
canRepeatUse
cooldown
getDescription
getIcon
getModifiers
getName
icon
isAvailable
isUsable
name
onActivate
onDeactivate
onUse
staminaCosts
type

StatList

class StatList
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –
append(arg2)
Parameters:arg2 (object) –
extend(arg2)
Parameters:arg2 (object) –

StateManager

class StateManager
getCurrent()
Return type:int
reset(arg2)
Parameters:arg2 (Game) –
setInput(arg2, arg3)
Parameters:
onStep
TIMESTEP_TIME = 15

Talent

class Talent
__init__(name, icon, levels)
Parameters:
  • name (str) –
  • icon (str) –
  • levels (list) –
icon
levels
name
onLevelUp
skills

Damage

class Damage
__call__(id, amount, life, time)
Parameters:
  • id (str) –
  • amount (int) –
  • life (int) –
  • time (int) –
Return type:

bool

current(id)
Parameters:id (str) –
Return type:int

TimerSystem

class TimerSystem
add(time, callback[, isPrecise=False[, isExitJob=False]])
Parameters:
  • time (int) –
  • callback (object) –
  • isPrecise (bool) –
  • isExitJob (bool) –
Return type:

int

cancel(arg2)
Parameters:arg2 (int) –
clear()
completeOnExit()
getTime(arg2)
Parameters:arg2 (int) –
Return type:int
update(arg2)
Parameters:arg2 (int) –