- CloudFounder & Administrator
- Posts : 2722
Gold : 50799
Likes : 102
Super Mario Bros. X NPC-Code Guide (IN PROGRESS)
11/5/2011, 8:50 am
Hello, and welcome to the Super Mario Bros. X NPC Code Guide. First, you'll need to have NotePad, a windows application that can be found from the start menu, then ''Accessories." There are many different NPC Codes, but all of them will be discussed/explained here. A full list of codes and explanations can be found here:
- Super Mario Bros. X NPC Codes:
- gfxoffsetx= [use positive and negative numbers] Moves the graphic up while it is in motion.
gfxoffsety= [use positive and negative numbers] Moves the graphic down while it is in motion.
width= [use positive numbers] Specify the NPC's width in pixels. This property refers to defeating the enemy, or being attacked by it.
height= [use positive numbers] Specify the NPC's height in pixels. This property refers to defeating the enemy, or being attacked by it.
gfxwidth= [use positive numbers] Specify the NPC's width in pixels. If you only use the width property, the graphic will not fit into the frame.
gfxheight= [use numbers] Specify the NPC's height in pixels. If you only use the height property, the graphic will not fit into the frame.
score= [1 to 12] This affects the score that you'll get from defeating enemies. Use these as the score: 10, 100, 200, 400, 800, 1000, 2000, 4000, 8000, 1UP, 2UP, 5UP.
playerblock= [use 0 or 1] If set to 0, the player will be hurt if he/she runs into the enemy. If set to 1, the enemy can push you as they walk/fly/swim.
playerblocktop= [use 0 or 1] If set to 0, the enemy will act normal. If set to 1, the player will be able to stand on top of it.
- yosher fan 64Standard Member
- Posts : 80
Gold : 46600
Likes : 1
Re: Super Mario Bros. X NPC-Code Guide (IN PROGRESS)
3/11/2012, 1:39 pm
This file is meant to help you when dealing with custom npcs codes, it was made by "Blue" and "Redigit":
While the feature is implimented in SMBx. It is not part of the actual programs user interface. All custom NPCs are set just like custom graphics and are done manualy by the user creating a file in the game folders. In the folder for the level you wish to use a custom NPC in, you will create a file with notepad (a program that comes with your computer) that is named the same exact as the graphic file of the NPC you wish to alter.
For example: If you wish to make a goomba not able to be stomped, you would do the following.
Create a new .txt file in the desired levels folder.
Name the .txt file npc-1
Open that file and then place the following text in it.
playerblock=1
jumphurt=0
and then save the file.
Now in the level in question, the goomba will no longer be able to be stomped.
The following flags can be placed in the .txt file to effect the npc. If you want to set a flag to yes, put =1 and for no =0
NPC Player/World Interactions Flags
grabtop= Can Mario pick it up and carry it?
grabside= Can Mario grab this from the side and carry it?
jumphurt= Will Mario get bounce if he jumps on the top of this NPC?
playerblock= Will the player treat this NPC like a block?
playerblocktop= Can the player stand on this NPC?
npcblock= Will other NPCs treat this NPC as a block?
npcblocktop= Will other NPCs walk on this NPC's head?
noblockcollision= Passes through blocks.
cliffturn= Will it turn around when it comes to an edge, rather than falling off?
nohurt= Will not hurt the player if set to 1.
noyoshi= If yoshi can't eat it, set this to 1.
nofireball= Setting to 1 prevents fire from harming this NPC.
noiceball= Setting to 1 prevents ice from freezing this NPC.
nogravity= Is uneffected by gravity if set to 1.
speed= How fast it moves. (Percentage) 0=0% 1=100% 2=200%
score= How many points the NPC should give you upon its death/collection. Score can be set to any number from 0-13. Each gives a different amount of points listed below.
0 give 0 points
1 gives 10 points
2 gives 100 points
3 gives 200 points
4 gives 400 points
5 gives 800 points
6 gives 1000 points
7 gives 2000 points
8 gives 4000 points
9 gives 8000 points
10 gives a 1up
11 gives a 2up
12 gives a 3up
13 gives a 5up (anything higher than 13 will produce a 5up as well.)
NPC Appearance Flags
foreground= This will be drawn in front of other sprites if set to 1.
frames= How many frames the sprites animation uses for a single direction.
framespeed= How fast the frames of the sprites animation change. 8 is Normal.
framestyle= 0=No Directional Sprites, 1=Left and Right movement, 2=Left and Right movement and inverted (upsidedown) if Held.
gfxoffsetx= Moves the graphic in a specific direction (X) -1 is up, 1 is down.
gfxoffsety= Moves the graphic in a specific direction (Y) -1 is left, 1 is right.
width= The NPCs hitbox width (in pixels)
height= The NPCs hitbox height (in pixels)
gfxheight= Only set if sprite height is different than Hit box height.
gfxwidth= Only set if sprite width is different than Hit box width.
--------------------------------------------------------------------------------------------------------
This is a list of every custom NPC command in SMBX. Good luck with your NPCs and I hope that this topic reduces confusion.
I copied this from a txt file. made by blue and redigit
While the feature is implimented in SMBx. It is not part of the actual programs user interface. All custom NPCs are set just like custom graphics and are done manualy by the user creating a file in the game folders. In the folder for the level you wish to use a custom NPC in, you will create a file with notepad (a program that comes with your computer) that is named the same exact as the graphic file of the NPC you wish to alter.
For example: If you wish to make a goomba not able to be stomped, you would do the following.
Create a new .txt file in the desired levels folder.
Name the .txt file npc-1
Open that file and then place the following text in it.
playerblock=1
jumphurt=0
and then save the file.
Now in the level in question, the goomba will no longer be able to be stomped.
The following flags can be placed in the .txt file to effect the npc. If you want to set a flag to yes, put =1 and for no =0
NPC Player/World Interactions Flags
grabtop= Can Mario pick it up and carry it?
grabside= Can Mario grab this from the side and carry it?
jumphurt= Will Mario get bounce if he jumps on the top of this NPC?
playerblock= Will the player treat this NPC like a block?
playerblocktop= Can the player stand on this NPC?
npcblock= Will other NPCs treat this NPC as a block?
npcblocktop= Will other NPCs walk on this NPC's head?
noblockcollision= Passes through blocks.
cliffturn= Will it turn around when it comes to an edge, rather than falling off?
nohurt= Will not hurt the player if set to 1.
noyoshi= If yoshi can't eat it, set this to 1.
nofireball= Setting to 1 prevents fire from harming this NPC.
noiceball= Setting to 1 prevents ice from freezing this NPC.
nogravity= Is uneffected by gravity if set to 1.
speed= How fast it moves. (Percentage) 0=0% 1=100% 2=200%
score= How many points the NPC should give you upon its death/collection. Score can be set to any number from 0-13. Each gives a different amount of points listed below.
0 give 0 points
1 gives 10 points
2 gives 100 points
3 gives 200 points
4 gives 400 points
5 gives 800 points
6 gives 1000 points
7 gives 2000 points
8 gives 4000 points
9 gives 8000 points
10 gives a 1up
11 gives a 2up
12 gives a 3up
13 gives a 5up (anything higher than 13 will produce a 5up as well.)
NPC Appearance Flags
foreground= This will be drawn in front of other sprites if set to 1.
frames= How many frames the sprites animation uses for a single direction.
framespeed= How fast the frames of the sprites animation change. 8 is Normal.
framestyle= 0=No Directional Sprites, 1=Left and Right movement, 2=Left and Right movement and inverted (upsidedown) if Held.
gfxoffsetx= Moves the graphic in a specific direction (X) -1 is up, 1 is down.
gfxoffsety= Moves the graphic in a specific direction (Y) -1 is left, 1 is right.
width= The NPCs hitbox width (in pixels)
height= The NPCs hitbox height (in pixels)
gfxheight= Only set if sprite height is different than Hit box height.
gfxwidth= Only set if sprite width is different than Hit box width.
--------------------------------------------------------------------------------------------------------
This is a list of every custom NPC command in SMBX. Good luck with your NPCs and I hope that this topic reduces confusion.
I copied this from a txt file. made by blue and redigit
Permissions in this forum:
You cannot reply to topics in this forum