If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Poker Night at the Inventory

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Poker Night at the Inventory

Developer: Telltale Games
Publisher: Telltale Games
Platforms: Windows, Mac OS X
Released internationally: November 22, 2010


CodeIcon.png This game has unused code.
DevTextIcon.png This game has hidden development-related text.
GraphicsIcon.png This game has unused graphics.
SoundIcon.png This game has unused sounds.


You have been invited to play poker with a hyperkinetic rabbity thing, an egotistical wrestle man, a violent mercenary, and a very hardcore gamer. The gameplay itself is rather mediocre, but the real hook is the hilarious dialogue between the characters.

The free items for Team Fortress 2 didn't hurt either.

Sadly, the game would get delisted from digital storefronts likely due to similar circumstances as its successor in May 2019

Debug Functions

Like most Telltale games, there is code for a debug mode, found in the gametable.lenc file in the archive named 0_5.ttarch.

GameTable.GetDebugMode = function(self)
  return self.debugMode
end
GameTable.SetDebugMode = function(self, bDebug)
  self.debugMode = bDebug
end

The game's 1_CelebrityPoker_pc_data.ttarch, contains a file dedicated to debugging named debug_celebritypoker.lenc. Other files also relating to debug materials found in the same archive is debug.imap, debug_cards.scene, and logic_debug.prop.

require("CelebrityPoker.lua")
require("CardRenderer.lua")
require("CameraManager.lua")
local GameModule = Import("Game.lua")
local CardModule = Import("Card.lua")
local GameClass = GameModule.Game
local Card = CardModule.Card
local kScript = "Debug_CelebrityPoker"
local kScene = "debug_cards.scene"
local kStartCardX = -1.1793409585953
local kStartCardY = 0.79785197973251
local kStartCardXMultiplier = 0.15000000596046
local kStartCardYMultiplier = 0.18823300302029
local kCommCardStartX = 1.1691279411316
local kCommCardStartY = -0.34747499227524
local kButtons = {"text_max", "text_strongbad", "text_heavy", "text_tycho", "text_player"}
local playerCards = {
{}, 
{}, 
{}, 
{}, 
{}}
local cardObjects = {}
local communityCards = {}
GameObject = GameClass()
local mSelectedPlayer, mSelectedPlayerButton = nil, nil
local UnselectPlayers = function()
  -- upvalues: kButtons , mSelectedPlayer , mSelectedPlayerButton
  for i,player in ipairs(kButtons) do
    AgentSetProperty(AgentFind(player), "Text Background", false)
  end
  mSelectedPlayer = nil
  mSelectedPlayerButton = nil
end

local SelectCard = function(button)
  -- upvalues: mSelectedPlayer , communityCards , kCommCardStartX , kStartCardXMultiplier , kCommCardStartY , playerCards , kStartCardX , kStartCardY , kStartCardYMultiplier , mSelectedPlayerButton , UnselectPlayers
  local name = AgentGetName(button)
  button.selected = true
  if mSelectedPlayer == nil then
    if #communityCards >= 5 then
      return 
    end
    table.insert(communityCards, name)
    AgentSetPos(button, Vector(kCommCardStartX - #communityCards * kStartCardXMultiplier, kCommCardStartY, 2.7499990463257))
  else
    table.insert(playerCards[mSelectedPlayer], name)
    local numCards = table.getn(playerCards[mSelectedPlayer])
    AgentSetPos(button, Vector(kStartCardX - (numCards - 1) * kStartCardXMultiplier, kStartCardY - (mSelectedPlayer - 1) * kStartCardYMultiplier, 2.7499990463257))
  if numCards == 2 then
    end
    AgentSetSelectable(mSelectedPlayerButton, false)
    UnselectPlayers()
  end
end

local GetCardFromName = function(name)
  -- upvalues: cardObjects
  local index = tonumber(string.sub(name, 6))
  return cardObjects[index]
end

local RestoreCard = function(button)
  -- upvalues: playerCards , kButtons , kStartCardX , kStartCardY , kStartCardYMultiplier , communityCards , kCommCardStartX , kStartCardXMultiplier , kCommCardStartY
  AgentRestore(button)
  button.selected = false
  local name = AgentGetName(button)
  local bFoundCard = false
  for i,playerCardTable in ipairs(playerCards) do
    for j,card in ipairs(playerCards[i]) do
      if name == card then
        table.remove(playerCards[i], j)
        AgentSetSelectable(AgentFind(kButtons[i]), true)
        bFoundCard = true
      end
    end
    if bFoundCard and playerCards[i][1] then
      AgentSetPos(AgentFind(playerCards[i][1]), Vector(kStartCardX, kStartCardY - (i - 1) * kStartCardYMultiplier, 2.7499990463257))
    end
  end
  if not bFoundCard then
    local shift = false
    for i,card in ipairs(communityCards) do
      if name == card then
        table.remove(communityCards, i)
        shift = true
      end
      if shift then
        AgentSetPos(AgentFind(communityCards[i]), Vector(kCommCardStartX - i * kStartCardXMultiplier, kCommCardStartY, 2.7499990463257))
      end
    end
  end
end

local DoRound = function()
  -- upvalues: kScene , playerCards , GetCardFromName , communityCards
  SceneHide(kScene, true)
  SceneAdd("ui_overlay_player.scene")
  SceneAdd("adv_celebrityPokerRoom.scene")
  Yield()
  LookatBoxManager_Initialize()
  GameObject:GetTable():InitRound()
  for i = 1, 5 do
    local hand = GameObject:GetTable().players[i]:GetHand()
    if playerCards[i][1] then
      local card = GetCardFromName(playerCards[i][1])
      hand:AddHoleCard(card)
      GameObject:GetTable():GetDeck():RemoveCard(card)
    end
    if playerCards[i][2] then
      local card = GetCardFromName(playerCards[i][2])
      hand:AddHoleCard(card)
      GameObject:GetTable():GetDeck():RemoveCard(card)
    end
  end
  local cards = GameObject:GetTable():GetCommunityCards()
  for i = 1, #communityCards do
    local card = GetCardFromName(communityCards[i])
    cards:AddCommunityCard(card)
    GameObject:GetTable():GetDeck():RemoveCard(card)
    for i = 1, 5 do
      GameObject:GetTable().players[i]:GetHand():AddCommunityCard(card)
    end
  end
  local state = 1
  if #communityCards == 3 then
    state = 2
  else
    if #communityCards == 4 then
      state = 3
    end
  else
    if #communityCards == 5 then
      state = 4
    end
  end
  CameraManager_SetActiveCamera()
  GameObject:GetTable():DoRound(0, state)
end

Debug_CelebrityPoker = function()
  -- upvalues: Card , cardObjects
  GameObject:Initialize()
  GameMode()
  GameLogicSet("logic_game.prop")
  CursorSet("cursor_off.prop")
  CursorHide(false)
  InputMapperActivate("debug.imap")
  InputMapperActivate("celebrityPoker.imap")
  local i = 1
  for suit = 1, 4 do
    for rank = 2, 14 do
      local card = Card(rank, suit)
      table.insert(cardObjects, card)
      CardRenderer_Render(AgentFind("card_" .. i), card)
      i = i + 1
    end
  end
  GameObject:GetTable():SetDebugMode(true)
  SceneAdd(kUIScene)
  Yield()
  ChorePlay("ui_status_show.chore")
  ChorePlay("ui_player_show.chore")
end

Debug_OnMouseL = function(event)
  local button = Buttons_OnPress(event, SceneFind("debug_cards.scene"))
end

Debug_OnMouseLUp = function(event)
  -- upvalues: mSelectedPlayerButton , UnselectPlayers , kButtons , mSelectedPlayer , DoRound , SelectCard , RestoreCard
  local button = Buttons_OnRelease(event, SceneFind("debug_cards.scene"))
  if button then
    local name = AgentGetName(button)
    if string.find(name, "text_") then
      if mSelectedPlayerButton == button then
        UnselectPlayers()
      end
    else
      UnselectPlayers()
      AgentSetProperty(button, "Text Background", true)
      for i,player in ipairs(kButtons) do
        if name == player then
          mSelectedPlayer = i
          mSelectedPlayerButton = button
        end
      end
    end
  elseif name == "button_doRound" then
    DoRound()
  elseif not button.selected then
    SelectCard(button)
  else
    RestoreCard(button)
  end
end

Debug_SetCards = function(iDeck)
  -- upvalues: Card
  CardRenderer_SetCurrentDeck(iDeck)
  local i = 1
  for suit = 1, 4 do
    for rank = 2, 14 do
      local card = Card(rank, suit)
      CardRenderer_Render(AgentFind("card_" .. i), card)
      i = i + 1
    end
  end
end

CelebrityPoker_OnMouseL = function(event)
  local button = Buttons_OnPress(event, SceneFind("ui_overlay_player.scene"))
  if button then
    GameObject:OnMouseL(button)
  end
end

CelebrityPoker_OnMouseLUp = function(event)
  local button = Buttons_OnPress(event, SceneFind("ui_overlay_player.scene"))
  if button then
    GameObject:OnMouseLUp(button)
  else
    GameObject:OnMouseLUp()
  end
end

CelebrityPoker_OnMouseRollOn = function(event)
  Buttons_OnRollOn(event, SceneFind("ui_overlay_player.scene"))
end

CelebrityPoker_OnMouseRollOff = function(event)
  Buttons_OnRollOff(event, SceneFind("ui_overlay_player.scene"))
end

SceneOpen(kScene, kScript)

Unused Dialogue

Several unused voice lines are in the game's data, and can be extracted with the Telltale Speech Extractor program.

Max

Max has the most unused sounds of any character in the game.

Check-check-double-check!

Would have been used when Max checks.

I'm gonna check. Yep. Still here.

Another checking dialogue.

You'll take it and you'll like it!

Would've been used upon being the last to fold.

[239153176]
Animation=
Extra=
Category=MAX
Speech=[Remember that part of him IS actually made of money] {confused1}Actually, my small intestine {happy1}IS clogged with a roll of Sacajawea dollars I wanted to smuggle into Canada...

This line uses developer text relating to the dialog.

Heavy

Meant for when Heavy folds, as he says "No" in Russian. (The alt in the filename suggests this.)

[239153158]
Animation=
Extra=
Category=HEAVY
Speech={furious1}[Offended, no one knows why] WHAT?! I AM NOT MOONLIGHTER!

The speech portion of the file also shows developer text about the dialog.

Tycho

Whoever knocks me out of the tournament is the proud new owner of that slightly-used garment.

Implies that Tycho was originally going to buy-in with his sweater. In-game, he buys-in with a watch. Thought, Tycho and even the host didn't reply to the players that whoever knocks him out will receive his watch.

Host

An alternate take of the Host/Winslow's line "The player has...".

Murder Scenario

Host: It appears there has been... a MURDER!

Max: Remember, kids: Crying is an invitation to the crypt.

Host: Just goes to show that anything can happen at the Inventory.

Max: Uhh... you know there's an actual dead guy here, right?

These lines were either meant for an additional bonus or for a promotional game at PAX where the people would make scenes to find out who committed a murder at the Inventory.

Unused Textures

Hmmm...
To do:
There might be more. Also, what appears to be leftover textures from Sam & Max are in the game.

Pnati env street.png
A photo of the main street from Sam & Max: Beyond Time and Space is in the game's files.

Pnati holdem cards.png
Leftover graphics pertaining to Telltale Texas Hold 'Em, Telltale's first game, coincidentally.

Pnati obj 105nametags.png
Bob's name tags from Sam & Max.

Pnati obj dust.png
A strange collage of magazine pages that don't seem to be used anywhere. Its internal name is obj_dust.

Unused Easy Difficulty

The file pokerconstants.lenc found in the 0_4.ttarch archive is where the difficulty select is stored. It mentions an easy difficulty that goes unused, as you can only select Normal or Hard.

kDifficulty_Hard = 3
kDifficulty_Medium = 2
kDifficulty_Easy = 1

Unused Save Slots

The file mainmenu.lenc found in the archive 1_CelebrityPoker_pc_data.ttarch mentions being able to use three save slots, despite only one being used in the final, and it doesn't function like most other Telltale games.

local kPlayGameButton1Name = "ui_menu_PlayGame_SaveGame1_title"
local kPlayGameButton2Name = "ui_menu_PlayGame_SaveGame2_title"
local kPlayGameButton3Name = "ui_menu_PlayGame_SaveGame3_title"
local kPlayGameButtonStartName = "ui_menu_PlayGame_buttonContinue"

Hidden Developer Messages

Throughout the game's files are various developer messages that are used in print commands, possibly in a log window during development.

Found in gametable.lenc in the same archive as the debug mode.

GameTable.GetNextNonBustedPlayer = function(self, player)
  local allPlayers = self.players
  local index = table.find(allPlayers, player)
  local startIndex = index
  local nextPlayer = nil
  repeat
    index = index + 1
    if #allPlayers < index then
      index = 1
    end
    if startIndex == index then
      Print("NO NEXT NON-BUSTED PLAYER, aborting")
      return nil
    end
    nextPlayer = allPlayers[index]
  until not nextPlayer:IsBusted()
  return nextPlayer
end
GameTable.IsCalledAllIn = function(self)
  if self.edgeCaseAllInBigBlindHasLessThanSmallBlind then
    return true
  end
  if #self:GetActivePlayers() == 2 and self.bigBlindAllIn and self.smallBlindStillCanAct then
    return false
  end
  local anyAllIns = false
  local numNotAllIn = 0
  for i,player in ipairs(self:GetActivePlayers()) do
    if player:IsAllIn() then
      anyAllIns = true
    end
    if player:GetChips() > 0 then
      numNotAllIn = numNotAllIn + 1
    end
  end
  if anyAllIns and numNotAllIn <= 1 then
    Print("NO BETTING, ALL IN IS CALLED")
    return true
  end
  return false
end

Dummy File

dummy.prop, a simply named dummy file, is present in the files.

Test Files

There are two test files in the 1_CelebrityPoker_pc_data.ttarch file, poker_backgroundtest.d3dmesh and poker_backgroundtest.prop.