Dummy NPCs (SMBX)

From PGE Wiki
Jump to navigation Jump to search

Dummy NPCs are hidden SMBX NPCs with the following IDs: 0, 293, 294, 295, 296, 297, 298, 299, 300 and 302 (yes, NPC-301 surprisingly doesn't exist. It crashes SMBX upon loading). Those NPCs were meant to be reserved NPC slots for possible future updates, but unfortunately they never saw the light of day. Nobody knew about them until they were discovered and revealed online by h2643. These NPCs were later dumped by Kevsoft with the entire table of hardcoded settings of all the SMBX NPCs, and then they were added into all configuration packages for PGE by Wohlstand, so that these NPCs could be put in any normal SMBX level with PGE Editor.

Technical details

These NPCs are unused NPC slots which were defined by Redigit for some possible future SMBX updates. All their parameters are set to zero.

NPC-0 is used by cheats to simulate collisions at the same frame. For example, the cheat "iceage" will use NPC-0 and will set it to an ice ball. Then the cheat will call the internal function "collidesNPCWith" to execute the collision effect. Another easy way to get it is to just grab an empty herb.

How to use Dummy NPCs

We mentioned earlier that these dummy NPCs are programmed in SMBX, and they can be used anywhere. However, there's no way you can put these NPCs in an SMBX level through the SMBX Editor; Redigit didn't put them in any NPC selection tab (this goes to the "The Lakitus are throwing Lakitus!" tab as well). So if you want to see the dummy NPCs in your SMBX level, you must use PGE Editor with the latest "SMBX 1.3" configuration package installed.

There are some pre-cautions before using dummy NPCs, though:

  • These NPCs don't have their graphics in the "graphics" folder. That means that they will be invisible in-game. Make sure you use custom graphics for the NPCs, so that they can be seen.
  • If you want these NPCs to act more normal, create a NPC.txt file to define every supported parameter you want. Don't forget that every parameter for all these NPCs are zero.

If you're interested to learn about the behaviours of these NPCs, click on the links below.