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

Notes:SpongeBob SquarePants: Battle for Bikini Bottom (GameCube, PlayStation 2, Xbox)/COND

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Notes:SpongeBob SquarePants: Battle for Bikini Bottom (GameCube, PlayStation 2, Xbox).

A Conditional (COND) allows you to set up a boolean condition, evaluate the condition at any time during the game, and send different events depending on whether the condition is True or False. It basically acts like an if-then-else statement used in many programming languages, and is very useful to implement logic into levels without having to mess with the source code.

A common use for Conditionals in BFBB is with toll gates and clams, which check your current spatula or shiny object count. If you have enough, the condition is True and whatever events are defined for True are then called (playing the "tada" sound, opening the gate, making the floating digits invisible, etc.). If you don't have enough, the condition is False and whatever events are defined for False are then called (showing the "you need ### spatulas/shiny objects" textbox).

Events

ID Name Description
0x003C Evaluate Evaluates the condition. If true, sends True to self. If false, sends False to self.
0x003D True Received after Evaluate if the condition is true.
0x003E False Received after Evaluate if the condition is false.

Format

offset size type description
Header
0x00 4 int Asset ID
0x04 1 byte Asset Type ID (0x1F for COND)
0x05 1 byte Number of Events
0x06 2 short Unknown Flags
Condition
0x08 4 int Value to compare to
0x0C 4 int Variable ID
  • 4329EFFD - CNTR current value
  • 1E42996C - asset visible state?
  • 9653DA31 - global collectible count
  • D6FCCFE7 - global shiny object count
  • C7E0F71C - global spatula count
  • D1FEEEE2 - global sock count
  • 18249056 - global Patrick spatula count?
  • 84D4A26D - global music volume
  • 1E0EEB55 - global sfx volume
  • 3B93C93F - global vibration mode
  • 29600EB0 - global sound mode
0x10 4 int Operator
  • 0 - Equal to (==)
  • 1 - Greater than (>)
  • 2 - Less than (<)
  • 3 - Greater than or equal to (>=)
  • 4 - Less than or equal to (<=)
  • 5 - Not equal to (!=)
0x14 4 int Asset ID (optional)
Event List
0x18 Event[] Event List