Skip to content
Super Hackio edited this page Aug 23, 2023 · 6 revisions

NPCs in GLE have been greatly overhauled to include more flexability and functionality. This page details all of the "Non NPC Specific" changes.

MBST

GLE has not changed anything with the MSBT files. These work as normal

MSBF

Note: This MSBF section only applies to GLE-V3 and up

As of GLE-V3, most NPC characters now use Global functionality for their MSBF functions. The values that are in the tables in this section belong in the 2 byte Parameter field of the respective nodes.

Branches

These MSBF nodes are used to check if certain conditions have been met. The table below details each option that the GLE's Global Branch Function provides:

Name Value Description
DEFAULT 0x0___ If chosen, this branch will always default to FALSE, EXCEPT when the specific NPC object overrides it with it's own unique functionality. (See the Affected NPCs table)
COIN 0x1VVV If chosen, this branch will check your current coin count (your stocked coins if you are in a hubworld).
Returns TRUE if you have the exact amount or more.
Replace VVV with the number of coins the player needs.
PURPLECOIN 0x2VVV If chosen, this branch will check your current purple coin count.
Returns TRUE if you have the exact amount or more.
Replace VVV with the number of purple coins the player needs.
STARPIECE 0x3VVV If chosen, this branch will check your current starbit count (your stocked starbits if you are in a hubworld).
Returns TRUE if you have the exact amount or more.
Replace VVV with the number of starbits the player needs.
HEALTH 0x4VVV If chosen, this branch will check your current health.
Returns TRUE if you have the exact amount or more.
Replace VVV with the amount of health the player needs.
STARS 0x5VVV If chosen, this branch will check your current star count.
Returns TRUE if you have the exact amount or more.
Replace VVV with the number of stars the player needs.
ELEMENT 0x6VVV If chosen, this branch will check your current Element Mode (aka Powerup).
Returns TRUE if you have the requested Element Mode.
Replace VVV with the Element Mode to check for.
PROGRESS 0x7VVV If chosen, this branch will do a Progress Check using the same BCSV that ScenarioSwitch uses (reused for Memory reasons).
Returns TRUE if the Progress Check was successful.
Replace VVV with the BCSV entry index to use.
RESERVED 0x8___ Reserved.
Returns TRUE.
RESERVED 0x9___ Reserved.
Returns TRUE.
RESERVED 0xA___ Reserved.
Returns TRUE.
RESERVED 0xB___ Reserved.
Returns TRUE.
RESERVED 0xC___ Reserved.
Returns TRUE.
RESERVED 0xD___ Reserved.
Returns TRUE.
RESERVED 0xE___ Reserved.
Returns TRUE.
HOOK 0xFCCC If chosen, this branch will always default to TRUE, EXCEPT when external code has hooked into this.
Replace CCC with whatever value the hooked code expects.
You may want to use the first C as a "function type" and the other 2 C's as a "function parameter" in the external code.

Events

These MSBF nodes are used to perform actions. The table below details each option that the GLE's Global Event Function provides:

Name Value Description
DEFAULT 0x0___ If chosen, this event will always auto-complete itself right away, EXCEPT when the specific NPC object overrides it with it's own unique functionality. (See the Affected NPCs table)
TAKEOUTSTAR 0x1000 If chosen, the caller will attempt to spawn a Power Star. If the caller does not have a TakeOutStar in it's memory, then this event will auto-complete itself right away.
Note: The TakeOutStar variable must be within 0x160 and 0x260 in the object memory.
MESSAGEPARAM 0x200V If chosen, this event will replace an upcoming message parameter with the requested value. Replace V with one of the following:
0 = Star Count
1 = Starbit Count
2 = Coin Count
3 = Purple Coin Count
4 = Current Score. (requires a valid score)
FORCEKILLGROUNDRACE 0x3000 If chosen, kills the player the same way losing a minigame would.
SCENERESTART 0x4000 If chosen, the current stage will be restarted.
SCENECHANGE 0x5VVV If chosen, the Main Zone's ChangeSceneListInfo is accessed and the stage is changed.
Replace VVV with the BCSV index.
ADDCOIN 0x6VVV If chosen, forces the player to collect the provided number of coins.
Replace VVV with the number of coins.
ADDSTARPIECE 0x7VVV If chosen, forces the player to collect the provided number of starbits.
Replace VVV with the number of starbits.
REMOVECOIN 0x8VVV If chosen, removes coins from the player. Note that this does NOT ensure that the player has the requested number of coins.
Replace VVV with the number of coins.
REMOVESTARPIECE 0x9VVV If chosen, removes starbits from the player. Note that this does NOT ensure that the player has the requested number of starbits.
Replace VVV with the number of starbits.
NPCINFORMATION 0xA00V Use this if you intend to have an informational box appear.
Replace V with one of the following:
0 = Start the information internal nerve
1 = Wait for the internal nerve to finish.
RESERVED 0xB___ Reserved.
Finishes immidiately.
RESERVED 0xC___ Reserved.
Finishes immidiately.
RESERVED 0xD___ Reserved.
Finishes immidiately.
RESERVED 0xE___ Reserved.
Finishes immidiately.
HOOK 0xFCCC If chosen, this event will always auto-complete itself right away, EXCEPT when external code has hooked into this.
Replace CCC with whatever value the hooked code expects.
You may want to use the first C as a "function type" and the other 2 C's as a "function parameter" in the external code.

Animations

These MSBF nodes are used to trigger animations within the NPC that uses them.

Using this requires a BCSV inside ZoneInfo called NPCAnimeFunc.bcsv.
You can download a pre-made BCSV here.

Affected NPCs

This table details how NPCs were affected by this GLE feature set.

Note: The names used are the internal class names, not the object names. This means that if you don't see an NPC here, it uses one of the classes in this table. (Example: BigSignBoard uses SignBoard)

Legend:

  • Default = The behaviour is hardcoded and not changed by GLE.
  • GLE Global = The behaviour has been replaced with the GLE's global function.
  • GLE Global+ = The original behaviour still exists, but has the GLE global function added on top of it.
  • N/A = There is no behaviour for the function in this NPC.
  • XXXXX = See the "Other Information" column.
NPC Name Branch Function Event Function Animation Function Other Information
BombHeiRed GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Caretaker GLE Global GLE Global GLE Global The original functions were completely replaced
You will have to use the functionality provided by the GLE Global Branch Function, the GLE Global Event Function, and the GLE Global Animation Function
CaretakerHunter GLE Global+ GLE Global+ GLE Global The GLE Global functions have been added to the original behaviour
Dreamer N/A Default N/A This NPC remains unchanged by GLE
SuperDreamer N/A Default N/A There is a new Obj Arg 7 which determines which stars will be turned bronze when you use this guide (this allows for multiple guides in one level)
GliBirdNpc N/A N/A N/A This NPC cannot be talked to
HoneyBee GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
HoneyQueen GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Kinopio GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
KinopioBank GLE Global+ GLE Global+ N/A The GLE Global functions have been added to the original behaviour
KinopioPostman XXXXX XXXXX XXXXX This NPC has been removed and cannot be used
KoopaNpc N/A N/A N/A This NPC cannot be talked to
LuigiTalkNpc GLE Global GLE Global+ GLE Global The Event Functionality has been kept from the original game, and the GLE Global function has been added in addition
MameMuimuiAttackMan Default Default GLE Global The animations now use the GLE's Global Animation Function
Meister GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
It's worth noting that none of the special behaviour from the original game are here, as this object was completely re-implemented
Moc GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Monte GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
It's worth noting that at Scene Start, the model will remain in a T-pose.
Peach GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
In addition, the Parasol was fixed to not be visible at Scene Start.
Penguin GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
PenguinCoach GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
PenguinMaster GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Pichan GLE Global+ GLE Global+ GLE Global The animations now use the GLE's Global Animation Function
The Branch and Event functions of the original game are still intact, and have the GLE Global functionality added.
PichanRacer Default Default GLE Global The animations now use the GLE's Global Animation Function
PlayAttackMan GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Rabbit GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Rosetta GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Due to some leftover code, this NPC can spawn a star using the GLE's Global Event Function
ScoreAttackMan Default Default GLE Global The animations now use the GLE's Global Animation Function
Signboard GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
Tico GLE Global GLE Global+ N/A The original event function was kept intact, even though it's useless.
TicoBaby N/A N/A N/A This NPC cannot be talked to
TicoBig GLE Global GLE Global GLE Global This NPC uses all the GLE Global functions
TicoFatCoin Default Default N/A See the page for TicoFat
TicoFatStarPiece N/A Default N/A See the page for TicoFat
TicoRail N/A N/A N/A This NPC cannot be talked to
TicoShop Default Default N/A This NPC remains unchanged by GLE
TicoShopDice Default Default N/A This NPC remains unchanged by GLE
TogepinAttackMan Default Default GLE Global The animations now use the GLE's Global Animation Function
TrickRabbit N/A N/A N/A This NPC remains unchanged by GLE

Caretaker

Gearmos have had all specific MSBF functionality removed (it was overwritten by the global functions since it was the largest set of functions) However, all the functionality that the gearmo would've had, is present in the Global Flow Function set.

Note: As this is the case, you will need to replace the vanilla MSBF nodes completely, else the game will crash or freeze... Or softlock.

LuigiTalkNPC

As of GLE-V2, you can now play as Luigi!

There are a couple of different ways to play as Luigi:

  • Switch to Luigi by setting a ChangeSceneListInfo entry's player field entry to 1 (to force luigi) or 2 (to switch between bros).
  • Start the game as Luigi by setting the "Player" value in GameSettings.bcsv to "Luigi".

Luigi can also be used as an NPC, however, the object LuigiIntrusively does not spawn. Use LuigiTalkNpc instead.
As an added bonus, Luigi's messages can be registered to cutscenes now.

Note: LuigiTalkNpc needs an activated SW_APPEAR in order to spawn.

SuperDreamer

As of GLE-V3, SuperDreamer is now operational, with a brand new Obj Arg 7.

Obj Arg 7: INT32 "Power Star Mask". Determines which power stars turn to bronze when using this instance of SuperDreamer.

  • -1 = All Stars (default)
  • 0 = No Stars
  • 001 = Star 1
  • 002 = Star 2
  • 004 = Star 3
  • 008 = Star 4
  • 016 = Star 5
  • 032 = Star 6
  • 064 = Star 7
  • 128 = Star 8

(You can add these values together if you want more than just one star to turn to bronze. Ex: 003 = Stars 1 & 2)

Clone this wiki locally