NPC Code List

Come here for solutions regarding bugs or difficulties with playing or designing levels or episodes, as well as tutorials and general information and discussion.

NPC Code List

PostPosted by castlewars » Sat Nov 15, 2014 2:08 pm

NPC Code List


To use NPC modifier flags, first you need to open a Notepad document (save it under the number of the NPC you are modifying) and enter any number of NPC codes in, a different one on a new line. Here is an example:

playerblocktop=0
noiceball=1
jumphurt=1
score=5

This makes an NPC damage the player if stomped on and immune to ice balls. Defeating it awards the player with 800 points.

Here is the complete list:


gfxoffsetx=(+ve/-ve numbers): Moves the graphic in the X direction at the speed specified (-ve number left, +ve number right)
gfxoffsety=(+ve/-ve numbers): Moves the graphic in the Y direction at the speed specified (-ve number up, +ve number down)
height=(+ve number): Specifies the hitbox height of the NPC.
width=(+ve number): Specifies the hitbox width of the NPC.
gfxheight=(+ve number): Specifies the NPC sprite height.
gfxwidth=(+ve number): Specifies the NPC sprite width.
score=(+ve number): The score received from killing an NPC:

SPOILER:
0 gives 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 1-Up
11 gives a 2-Up
12 gives a 3-Up
13 gives a 5-Up (anything higher than 13 gives the player a 5-Up as well.)


playerblock=(boolean 0/1): If set to 1, it allows the player to treat the NPC like a block.
playerblocktop=(boolean 0/1): If set to 1, it allows the player to stand on the NPC.
npcblock=(boolean 0/1): If set to 1, it allows other NPCs to treat the NPC like a block.
npcblocktop=(boolean 0/1): If set to 1, it allows other NPCs to stand on the NPC.
jumphurt=(boolean 0/1): If set to 1, stomping on the NPC will kill it, and you will bounce off it.
grabtop=(boolean 0/1) If set to 1, it allows the player to pick up the NPC by standing on it and pressing the Duck and Run buttons.
grabside=(boolean 0/1): If set to 1, it allows the player to grab the NPC from the side.
nohurt=(boolean 0/1: If set to 1, the NPC will be unable to hurt you.
cliffturn=(boolean 0/1: If set to 1, the NPC will turn around when it reaches the end of a ledge.
noblockcollision=(boolean 0/1): If set to 1, the NPC will pass through blocks.
noyoshi=(boolean 0/1): If set to 1, Yoshi will be unable to eat the NPC.
foreground=(boolean 0/1): If set to 1, the NPC stays in front of all objects in the level.
nogravity=(boolean 0/1): If set to 1, the NPC moves in the air.
nofireball=(boolean 0/1): If set to 1, the NPC cannot be hurt by fireballs.
noiceball=(boolean 0/1): If set to 1, the NPC cannot be frozen by ice balls.
frames=(+ve/-ve number) Dictates the number of frames an NPC uses for a single direction.
speed=(+ve/-ve number): Dictates how fast the NPC moves, as here:

SPOILER:
speed=0: The NPC does not move.
speed=1: The NPC moves at the standard speed.

Anything above 1 makes the NPC move at that many times its standard speed. For example, if you make an NPC at speed=5, then it will move at 5 times its standard speed. A negative number makes the NPC move backwards.

Some level creators modify speed flags using decimals. It's handy if you want to exact the speed the NPC moves, but it is risky. It might cause a level to crash.


framespeed=(+ve number): How fast the frames of the NPC change:

SPOILER:
framespeed=1: Makes the framespeed eight times as fast.
framespeed=2: Makes the framespeed four times as fast.
framespeed=4: Makes the framespeed twice as fast.
framespeed=8: This is the standard framespeed for NPCs.
framespeed=16: Makes the framespeed twice as slow.

You should find out that the framespeed settings are eighths of the original framespeed. 4 means twice as fast and 16 is twice as slow. So, to add a custom framespeed, divide or multiply 8 by the number you want to increase/decrease the framespeed. For example, if you want to make an NPC 3 times as fast, divide 8 by 3 - 2.7 (rounded to 1 dp). If you want to make an NPC 3 times as slow, multiply 8 by 3 - 24.


framestyle=(0, 1, 2): Decides how the frames switch for the NPC.

SPOILER:
framestyle=0: Both left and right movement use the same sprites.
framestyle=1: The NPC has different sprites for both left and right movement.
framestyle=2: Same as framestyle=1, but allows upside-down movement for when the NPC is grabbed.
99.9% of everyone that is on this forum have a sig. If you're part of the 0.1% that doesn't, put this in your- Oh, shoot!



THE GREAT CASTLE ADVENTURE (REMAKE!)

Give this link a click to go to my NEW YouTube channel! Subscribe if you want!



Using custom graphics doesn't mean your level becomes "good". It's about how you use them.

Image

Join http://smbediting.prophpbb.com if you haven't done so!
User avatar
castlewars
Blooper
Blooper
 
Posts: 519
Joined: Tue Jul 31, 2012 7:21 am
Location: Google it, stalkers.
Current Project: The Great Castle Adventure REMAKE!

Re: NPC Code List

PostPosted by Natsu » Sat Nov 15, 2014 2:12 pm

Sticking this topic as it is useful to those who are interested in playing with NPC's behaviour and such.
Deleting a post doesn't delete an action,
if you did something wrong it shall remain as something you did wrong.
This also applies to sheets of paper, if you wrinkle them,
they won’t go back to it’s previous state no matter what you do.
While that is reality, you can compensate it being better,
not everything is lost, nothing is lost to begin with.
Do everything you can to become a better user, it’s not too late!
User avatar
Natsu
Amazing Flying Hammer Bro.
Amazing Flying Hammer Bro.
 
Posts: 4197
Joined: Mon Aug 27, 2012 5:02 pm
Location: Uruguay


Return to Software Information

Who is online

Users browsing this forum: No registered users and 0 guests

cron