class Struct
package tool.mod.script
Static variables
Static methods
staticcreateAndAddRoomsBetween (_typeName:String, _groupName:String, _count:Int, _startName:String, _ends:Array<String>, _minSpawnDistance:Int):Array<RoomNode>
Creates _count room randomly with the type passed as a parameter within the group of rooms passed as parameter and add it between _startName and one of the Ends
Parameters:
_typeName | type name of the room to be created. Valid type names are found in the roomType table from data.cdb |
---|---|
_groupName | name of the group of rooms to select from. Valid group names are the separators in the room table from data.cdb. Enter an empty group name ("") to ignore group |
_count | number of room to create with this configuration |
_start | starting room name for the insertion |
_ends | list of possible ending room name to pick from as end of the "between" part |
_minSpawnDistance | minimum distance between rooms to respect. |
Returns:
an array containing the created rooms
staticcreateCross (_roomName:String):RoomNode
Creates a random crossing room with the name _roomName
Parameters:
_roomName | name of the crossing room to create |
---|
Returns:
the newly created room
staticcreateExit (_targetLevelName:String):ExitNode
Creates a random exit room
Parameters:
_targetLevelName | name of the level where the door leads. Should be either one of the id found in table level of the data.cdb or the file name of a struct script |
---|---|
_exitTitle | optional name that will appear above the exit door |
_exitColor | optional color for the exit door's glow |
Returns:
the newly created room
staticcreateExitFromGroup (_targetLevelName:String, _exitGroupName:String):ExitNode
Creates an exit room randomly selected from the room group passed as a parameter
Parameters:
_targetLevelName | name of the level where the door leads. Should be either one of the id found in table level of the data.cdb or the file name of a struct script |
---|---|
_groupName | name of the group of exit rooms to select from. Valid group names are the separators in the room table from data.cdb |
_exitTitle | optional name that will appear above the exit door |
_exitColor | optional color for the exit door's glow |
Returns:
the newly created room
staticcreatePerkShop (_maxPerkCount:Int):RoomNode
Creates the perkshop
Parameters:
_maxperkCount | maximum number of perk the player can have at this point |
---|
Returns:
newly createdRoom
staticcreateRoomFromGroup (_groupName:String):RoomNode
Creates a room randomly selected from the room group passed as a parameter
Parameters:
_groupName | name of the group of rooms to select from. Valid group names are the separators in the room table from data.cdb |
---|
Returns:
the newly created room
staticcreateRoomWithType (_typeName:String):RoomNode
Creates a room randomly with the type passed as a parameter
Parameters:
_typeName | type name of the room to be created. Valid type names are found in the roomType table from data.cdb |
---|
Returns:
the newly created room
staticcreateRoomWithTypeFromGroup (_typeName:String, _groupName:String):RoomNode
Creates a room randomly with the type passed as a parameter within the group of rooms passed as a parameter
Parameters:
_typeName | type name of the room to be created. Valid type names are found in the roomType table from data.cdb |
---|---|
_groupName | name of the group of rooms to select from. Valid group names are the separators in the room table from data.cdb |
Returns:
the newly created room
staticcreateRunicZDoor (_roomNode:RoomNode, _runesNeeded:Int, _rooms:Array<RoomNode>):Void
Creates a Z door that can be opened with boss cells. The sub level automatically creates between 0 and 2 combat rooms
Parameters:
_roomNode | Room where the Z Door leads |
---|---|
_runesNeeded | Number of boss cells needed to open the ZDoor |
_rooms | List of rooms where the Z door should be created. |
Returns:
the newly created room
staticcreateRunicZDoorWithCombatCount (_roomNode:RoomNode, _runesNeeded:Int, _combatRoomCount:Int, _rooms:Array<RoomNode>):Void
Same as createRunicZDoor but specifies the number of combat room.
Parameters:
_roomNode | Room where the Z Door leads |
---|---|
_runesNeeded | Number of boss cells needed to open the ZDoor |
_combatRoomCount | Number of combat room that need to be created |
_rooms | List of rooms where the Z door should be created. |
Returns:
the newly created room
staticcreateShopWithType (_merchantType:MerchantType):RoomNode
Creates a room shop with the specified merchant type.
Parameters:
_merchantType | type of merchant, can be : Actives; Heals; Weapons; Talismans; |
---|
Returns:
the newly created room
staticcreateSpecificExit (_targetLevelName:String, _exitRoomName:String):ExitNode
Creates the exit room specified by its name as parameter.
Parameters:
_targetLevelName | name of the level where the door leads. Should be either one of the id found in table level of the data.cdb or the file name of a struct script |
---|---|
_exitRoomName | name of the exit room to create. The list of room name can be found in the room table in the id column of data.cdb and be of type "Exit" |
_exitTitle | optional name that will appear above the exit door |
_exitColor | optional color for the exit door's glow |
Returns:
the newly created room
staticcreateSpecificRoom (_roomName:String):RoomNode
Creates the room specified by its name as parameter.
Parameters:
_roomName | name of the room to create. The list of room name can be found in the room table in the id column of data.cdb |
---|
Returns:
the newly created room
staticcreateTeleportAfter (_roomNode:RoomNode):RoomNode
Insert a teleport after a given room
Parameters:
_roomNode | Room after which the teleport has to be added |
---|
Returns:
the newly created room
staticcreateTeleportBefore (_roomNode:RoomNode):RoomNode
Insert a teleport before a given room
Parameters:
_roomNode | Room before which the teleport has to be added |
---|
Returns:
the newly created room
staticcreateTimedBranch ():RoomNode
Creates a branch in the level graph with a timed door
Returns:
the newly created room Be carefull that a timedDoor has to be specified in the levelProps to use this. Else it will raise an error.
staticcreateTimedBranchBefore (_roomNode:RoomNode):RoomNode
Creates a branch in the level graph with a timed door before the node passed.
Parameters:
_roomNode | first room to be closed by the timed door |
---|
Returns:
the newly created room Be carefull that a timedDoor has to be specified in the levelProps to use this. Else it will raise an error.
staticgetRoomByName (_roomName:String):RoomNode
Find a room by its name and return it
Parameters:
_roomName | name of the room to look for |
---|
Returns:
the room if found, else returns null
staticshuffleArray<T> (_array:Array<T>):Void
Shuffles an array with the seeded random of the struct. It's accessible without the Struct.
Parameters:
_array | array to shuffle |
---|