Author Topic: [RESOURCE] MiniGameSO Reference  (Read 2044 times)

This is for vanilla (no add-on) minigames. For a Slayer Minigame's added values/methods, check the Slayer source code.

Don't forget that a gamemode's default minigame is $DefaultMiniGame.
Code: [Select]
==>findclientbyname("axo").minigame.dump();
Member Fields:
  class = "MiniGameSO"
Tagged Fields:
  BotDamage = "1" //damage enabled for players/AIPlayers?
  BotRespawnTime = "5000" //AIPlayer respawn time in MS
  BrickDamage = "1"
  BrickRespawnTime = "30000" //fakekillbrick clear time in MS
  colorIdx = "0" //color of minigame's name (based on minigame menu colors?)
  EnableBuilding = "1"
  EnablePainting = "1"
  EnableWand = "0"
  FallingDamage = "1"
  InviteOnly = "0"
  lastResetTime = "352851" //not sure what this is based on, but it's probably the last SimTime of when the minigame got reset
  member0 = "17986" //1st member client, the 2nd member is member1/member[1] and so on
  numMembers = "1"
  owner = "17986" //owner client
  PlayerDataBlock = "38" //can be a PlayerData's name or ObjectID (NOT uiName)
  PlayersUseOwnBricks = "0"
  Points_BreakBrick = "0"
  Points_Die = "0"
  Points_KillBot = "1"
  Points_KillPlayer = "1"
  Points_KillSelf = "-1"
  Points_PlantBrick = "0"
  resetSchedule = "0"
  RespawnTime = "1000" //Player respawn time in MS
  SelfDamage = "1" //can players damage themselves?
  StartBall = "0" //ShapeBaseImageData of the sports ball that a player will spawn with, or 0 if there's none
  StartEquip0 = "65" //1st ItemData that players in the minigame are equipped with by default
  StartEquip1 = "75" //2nd ItemData
  StartEquip2 = "383" //3rd ItemData
  StartEquip3 = "910" //4th ItemData
  StartEquip4 = "862" //5th ItemData
  TimeLimit = "0" //time limit
  timeLimitSchedule = "0" //ScheduleID for the time limiter. This changes every time a message of how much time remaining is sent.
  title = "Axolotl\'s Mini-Game"
  UseAllPlayersBricks = "0"
  UseSpawnBricks = "1"
  VehicleDamage = "1"
  VehicleRespawnTime = "5000"
  WeaponDamage = "1"
Methods:
  addMember() - //add a client to the minigame, this will NOT add AIConnections
  addScheduledEvent() -
  bottomPrintAll() -
  cancelEvents() -
  centerPrintAll() -
  chatMessageAll() -
  chatMsgAll() -
  checkLastManStanding() -
  clearEvents() -
  clearNTObjectName() -
  delete() - obj.delete()
  dump() - obj.dump()
  dumpEvents() -
  endGame() - //Ends the minigame
  forceEquip() -
  getClassName() - obj.getClassName()
  getGroup() - obj.getGroup()
  getId() - obj.getId()
  getLine() -
  getName() - obj.getName()
  getTaggedField() - obj.getTaggedFieldCount(int idx)
  getType() - obj.getType()
  isMember() -
  MessageAll() -
  messageAllExcept() -
  onAdd() -
  onCameraEnterOrbit() -
  onCameraLeaveOrbit() -
  pickSpawnPoint() - //picks and returns a random transform based on the minigame's spawn points
  processInputEvent() -
  removeMember() - //remove a client from the minigame
  Report() - //prints the MiniGameSO's members and variables
  reset() -
  respawnAll() -
  save() - obj.save(fileName, <selectedOnly>)
  schedule() - object.schedule(time, command, <arg1...argN>);
  scheduleReset() -
  serializeEvent() -
  serializeEventToString() -
  setEnableBuilding() -
  setEnablePainting() -
  SetEventEnabled() -
  setName() - obj.setName(newName)
  setNTObjectName() -
  timeLimitTick() - //changes the time limiter scheduleID, returns the new time limiter scheduleID. if the timelimit is 0, then this resets the minigame.
  ToggleEventEnabled() -
  updateEnableBuilding() -
  updateEnablePainting() -
  updatePlayerDatablock() -
« Last Edit: February 24, 2013, 10:45:39 AM by Axolotl2 »

This is a nice reference to have around.

For a Slayer Minigame's added values/methods, check the Slayer source code.

For easy reference, here is a list of default Slayer minigame values and methods. I'll try to come back later and add comments for everything.

Code: [Select]
==>Slayer.Minigames.getObject(0).dump();
Member Fields:
  class = "Slayer_MinigameSO"
  superClass = "MiniGameSO"
Tagged Fields:
  allowDeadTalk = "1"
  allowMoveWhileResetting = "0"
  bKills_enable = "1"
  bKills_kSpree = "5"
  bKills_points = "1"
  BrickDamage = "1"
  BrickRespawnTime = "30000"
  chat_teamDisplayMode = "2"
  clearScores = "1"
  clearStats = "1"
  colorIdx = "3"
  CPTransitionColors = "1"
  creatorBLID = "11902"
  deathMsgMode = "1"
  editRights = "3"
  EnableBuilding = "1"
  EnablePainting = "1"
  EnableWand = "1"
  eorrDisplayTeamScores = "1"
  eorrEnable = "1"
  FallingDamage = "1"
  flyCam_playOnReset = "1"
  friendlyFireRespawnPenalty = "5000"
  gameMode = "13662"
  hostName = "HOST"
  InviteOnly = "0"
  isDedicatedStart = "1"
  isDefaultMinigame = "1"
  isResetting = "0"
  isSlayerMinigame = "1"
  isStarting = "0"
  lastResetTime = "218058"
  lateJoinTime = "-1"
  leaveRights = "2"
  Lives = "0"
  member0 = "13765"
  mode = "Slyr"
  nameDistance = "150"
  numMembers = "1"
  owner = "0"
  PlayerDataBlock = "38"
  PlayersUseOwnBricks = "0"
  Points = "0"
  Points_BreakBrick = "0"
  points_cp = "10"
  Points_Die = "0"
  points_friendlyFire = "-5"
  Points_KillPlayer = "1"
  Points_KillSelf = "-1"
  Points_PlantBrick = "0"
  prefs = "13534"
  preRoundSeconds = "0"
  resetRights = "3"
  resetSchedule = "0"
  respawnPenalty_FriendlyFire = "5"
  RespawnTime = "5000"
  respawnTime_brick = "30"
  respawnTime_player = "5"
  respawnTime_vehicle = "10"
  restrictOutputEvents = "1"
  roundStarted = "218.058014"
  SelfDamage = "1"
  spawnBrickColor = "-1"
  StartEquip0 = "65"
  StartEquip1 = "75"
  StartEquip2 = "383"
  StartEquip3 = "0"
  StartEquip4 = "0"
  TeamPrefs = "13609"
  Teams = "15560"
  time = "0"
  timeBetweenRounds = "10"
  timeLimitSchedule = "0"
  title = "Slayer"
  UseAllPlayersBricks = "0"
  UseSpawnBricks = "1"
  VehicleDamage = "1"
  VehicleRespawnTime = "10000"
  WeaponDamage = "1"
Methods:
  addMember() -
  addScheduledEvent() -
  bottomPrintAll() -
  broadcastMinigame() -
  cancelEvents() -
  canDamage() -
  canEdit() -
  canLeave() -
  canReset() -
  centerPrintAll() -
  chatMessageAll() -
  ChatMsgAll() -
  checkLastManStanding() -
  clearEvents() -
  clearNTObjectName() -
  commandToAll() -
  commandToAllSlayerClients() -
  createPathCamera() -
  Cycle() -
  delete() - obj.delete()
  dump() - obj.dump()
  dumpEvents() -
  endGame() -
  endRound() -
  forceEquip() -
  getClassName() - obj.getClassName()
  getFakeClient() -
  getGroup() - obj.getGroup()
  getGroupID() -
  getId() - obj.getId()
  getLine() -
  getLiving() -
  getMemberListSortedScore() -
  getName() - obj.getName()
  getPref() -
  getTaggedField() - obj.getTaggedFieldCount(int idx)
  getType() - obj.getType()
  isMember() -
  isResetting() -
  MessageAll() -
  messageAllDead() -
  messageAllExcept() -
  onAdd() -
  onCameraEnterOrbit() -
  onCameraLeaveOrbit() -
  onRemove() -
  onReset() -
  onStart() -
  pickSpawnPoint() -
  play2dAll() -
  postConfigLoad() -
  preConfigLoad() -
  preRoundCountdownTick() -
  processInputEvent() -
  removeMember() -
  Report() -
  reset() -
  resetBricks() -
  resetCapturePoints() -
  resetPrefs() -
  resetVehicles() -
  RespawnAll() -
  roundStarted() -
  save() - obj.save(fileName, <selectedOnly>)
  schedule() - object.schedule(time, command, <arg1...argN>);
  scheduleReset() -
  sendScoreListAll() -
  serializeEvent() -
  serializeEventToString() -
  setEnableBuilding() -
  setEnablePainting() -
  SetEventEnabled() -
  setName() - obj.setName(newName)
  setNTObjectName() -
  setPref() -
  setResetting() -
  Slayer_setPref() -
  startFlyThrough() -
  startRound() -
  timeLimitTick() -
  ToggleEventEnabled() -
  updateDefaultMinigame() -
  updateEnableBuilding() -
  updateEnablePainting() -
  updateEquip() -
  updateGamemode() -
  updateLives() -
  updateNameDistance() -
  updatePlayerDatablock() -
  updatePlayerScale() -
  updatePoints() -
  updateRespawnTime() -
  updateTime() -
  victoryCheck_Lives() -
  victoryCheck_Points() -
  victoryCheck_Time() -
  Win() -