NOTE: You are browsing an archive of the Super Mario Bros. X forums from July 21, 2014.

Super Mario Bros. X Forums

Forums for SMBX
It is currently Sat Jan 20, 2018 4:59 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: SMBX NPC Code List
PostPosted: Thu Jan 02, 2014 8:33 am 
Offline
Cecil
Cecil
User avatar

Joined: Sun Dec 01, 2013 2:16 pm
Posts: 759
How to use: add the wanted codes with their values on their own lines. Create a .txt file in the graphics folder for the level and name it after the NPC (if you want to apply codes to Goomba, name the .txt file as NPC-1). Example:

playerblocktop=0
nofireball=1
jumphurt=1
score=6

The player would be able to walk on the Goomba, the Goomba would be invulnerable to fireballs, the Player would get hurt on top of it and the Goomba would add 1000 points to the player's total points when killed.

Here's the list of possible NPC codes. When applying 1 or 0, 1 means yes and 0 means no.

gfxoffsetx=[+/- numbers] (moves the graphic in the x direction)
gfxoffsety=[+/- numbers] (moves the graphic in the y direction)
width=[+ numbers] (NPC's width)
height=[+ numbers] (NPC's height)
gfxwidth=[+ numbers] (graphics width)
gfxheight=[+ numbers] (graphics height)
score=[1-12] (score you get by killing: 10 100 200 400 800 1000 2000 4000 8000 1up 2up 5up)
playerblock=[1,0] (makes NPCs act like blocks to the players)
playerblocktop=[1,0] (makes the player able to stand on the NPC)
npcblock=[1,0] (makes the NPC act like a block to other NPCs)
npcblocktop=[1,0] (makes NPCs able to stand on the NPC)
grabside=[1,0] (gives the player the ability to grab NPCs from the side)
grabtop=[1,0] (gives Mario the ability to grab NPC's like shy guys)
jumphurt=[1,0] (if set to 1, the player gets hit from landing on the enemy)
nohurt=[1,0] (if true the NPC doesn't hurt you)
noblockcollision=[1,0] (if true the NPC doesn't interact with blocks)
cliffturn=[1,0] (if true enemy turn on a cliff)
noyoshi=[1,0] (if true you can't eat the NPC)
foreground=[1,0] (if true the NPC is in front of everything)
speed=[+/- numbers] - how fast the NPC moves (the number is what the speed is multiplied by: 0 = no speed, 1 = default, 2 = twice as fast as default, 3 = thrice as fast etc.* Negative values make it move backwards.)
nofireball=[1,0] (if true the NPC can't be killed by fireballs)
nogravity=[1,0] (if true the NPC walks in the air)
frames=[+ number] (sets the number of frames the NPC should have)
framespeed=# - how fast the NPC animates (0-7 are eighths of the default speed, 8 is the default speed and 9 and bigger are the default speeds multiplied**)
framestyle=[0,1,2] (names the style the frames should switch***)
noiceball=[1,0] (if true enemy can't freeze when an ice ball touches it)

*Speed value clarification:
Spoiler: show
      speed=0 - the NPC stands still. If the player is able to stand on this NPC (playerblocktop=1), the NPC acts like a conveyor belt to the player (and other NPCs).
      speed=1 - does no change to the NPCs speed. It's like multiplying the speed by 1 which does nothing if you know maths at all.
      speed=2 - makes the NPC twice as fast as the original speed.
      speed=3 - makes the NPC thrice as fast as the original speed (and so on).

    So, basically, the value you put to the speed= code is the number that the speed is multiplied by.

Also, some people like to use decimals (e.g. 1.5) in the speed= NPC code, because without them you can't change the NPCs speed to other than 200%, 300%, 400% etc. and, what's more important, you can't make the NPC slower. E.g. with the value 0.5 you can make the NPC two times slower, and with 1.5 you can make the NPCs speed one and half times higher. Decimals work on some people, but on a good portion of people, they make the level crash on load.

So, do not use decimals in NPC codes. It causes crashing on some people. Thank you.

**Frame speed value clarification:
Spoiler: show
      framespeed=1 - eight times faster than the original frame speed.
      framespeed=2 - four times faster than the original speed.
      ...
      framespeed=4 - two times faster than the original speed.
      ...
      framespeed=8 - normal. No changes to the framespeed.
      ...
      framespeed=16 - half as fast as the original framespeed.

    So, if you're good at maths, you can see that the framespeed= values are eights of the original frame frequencies. 1 makes it 8 times faster, 8 does nothing and 16 makes it twice as slow. So, in percentage, the values would go like this:

      framespeed=1 - 800%
      framespeed=2 - 400%
      framespeed=3 - 267% (rounded)
      framespeed=4 - 200%
      framespeed=5 - 160%
      framespeed=6 - 133% (rounded)
      framespeed=7 - 114% (rounded)
      framespeed=8 - 100%
      framespeed=9 - 89% (rounded)
      framespeed=10 - 80%
      framespeed=11 - 73% (rounded)
      framespeed=12 - 67% (rounded)
      framespeed=13 - 62% (rounded)
      framespeed=14 - 57% (rounded)
      framespeed=15 - 53% (rounded)
      framespeed=16 - 50%

***Framestyle number meanings:
Spoiler: show
    framestyle=0 - acts like a goomba, means, both left and right movement use the same sprite.
    franestyle=1 - the NPC have sprites for both left and right, the first half of the sprite sheet is for left movement, the later half is for the right movement.
    framestyle=2 - NPC has both left and right movement, and upside down movement for when the NPC is grabbed (such as the SMB2 enemies).

Also, the value 0 on the NPC codes with a "no" beginning won't do anything. EXCEPT:
  • Most SMB2 enemies can be made vulnerable to fireballs by applying nofireball=0.
  • The donut block and conveyor belt NPCs can be made hurtful by applying nohurt=0.

_________________
Valtteri
Image Image Image
Image
I also have a graphics pack now! viewtopic.php?f=31&t=1386
YouTube channel: http://www.youtube.com/user/ValtteriValtteri24


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Sun Jan 05, 2014 1:37 pm 
Offline
Pokey
Pokey
User avatar

Joined: Sat Dec 21, 2013 5:32 am
Posts: 212
Location: Steam, playing dota or something
As far as decimals crashing for people, I'm curious if replacing the periods with commas would fix it. I know some other languages switch the two. If some people whose PCs crashes when using periods could try that, it might help to find if there is a solution.

_________________
ImageImageImage
Play and upvote my contest RPG, Daughter of Sunlight!

Image
<Nien> holy shit I live under a cactus .


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Sun Jan 05, 2014 7:10 pm 
Offline
Cecil
Cecil
User avatar

Joined: Sun Dec 01, 2013 2:16 pm
Posts: 759
FallingSnow wrote:
As far as decimals crashing for people, I'm curious if replacing the periods with commas would fix it. I know some other languages switch the two. If some people whose PCs crashes when using periods could try that, it might help to find if there is a solution.

It doesn't work. SMBX doesn't recognize commas.

_________________
Valtteri
Image Image Image
Image
I also have a graphics pack now! viewtopic.php?f=31&t=1386
YouTube channel: http://www.youtube.com/user/ValtteriValtteri24


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Thu Jan 16, 2014 8:36 am 
Offline
Lakitu
Lakitu
User avatar

Joined: Fri Dec 20, 2013 9:39 pm
Posts: 433
Location: Pangasinan, Philippines
Also, the way SMBX recognizes if there are periods or not could be based on your keyboard layout, I think...

_________________
Image
ImageImageImageImage
Forum: http://futurenyancat2002.prophpbb.com/
"F*ck you Einstein! Let's make a level with water + lava!" ~FutureNyanCat2014, 05/05/14
FutureNyanCat2002: Big Fan of Valtteri Since 2013


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Thu Jan 16, 2014 10:48 am 
Offline
Cecil
Cecil
User avatar

Joined: Sun Dec 01, 2013 2:16 pm
Posts: 759
There is no other solution. You just mustn't use decimals if you want everyone to be able to play your level.

_________________
Valtteri
Image Image Image
Image
I also have a graphics pack now! viewtopic.php?f=31&t=1386
YouTube channel: http://www.youtube.com/user/ValtteriValtteri24


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Sat Jan 25, 2014 6:20 pm 
Offline
Banned
User avatar

Joined: Mon Dec 30, 2013 9:05 pm
Posts: 89
What the hell doso boolean mean?

_________________
Don't Be Afraid To Take a Shot Than To Take A Shot Being Afraid - Bj007pro

Great Forum to talk about Nearly Anything - chillaxforum.proboards.com


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Sat Jan 25, 2014 6:42 pm 
Offline
Cecil
Cecil
User avatar

Joined: Sun Dec 01, 2013 2:16 pm
Posts: 759
Boolean means 1 (or higher) for yes and 0 for no. My original list had it explained in a simple way but somebody felt the need to make it look more complex than it really is.

_________________
Valtteri
Image Image Image
Image
I also have a graphics pack now! viewtopic.php?f=31&t=1386
YouTube channel: http://www.youtube.com/user/ValtteriValtteri24


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Wed Mar 05, 2014 5:46 pm 
Offline
Swooper
Swooper

Joined: Thu Dec 26, 2013 6:49 pm
Posts: 104
Location: I was born, in Romania, but I'm currently in Italy.
Valtteri wrote:
FallingSnow wrote:
As far as decimals crashing for people, I'm curious if replacing the periods with commas would fix it. I know some other languages switch the two. If some people whose PCs crashes when using periods could try that, it might help to find if there is a solution.

It doesn't work. SMBX doesn't recognize commas.


Actually, my computer is XP and can read decimals with commas. It can't read those with periods. Thanks to that I couldn't play 3 whole episodes :oops:

_________________
My computer is broken...no, seriously. At least I can visit the forums with my parents' computer :P


This is why Mario made trip Yoshi:


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Wed Mar 05, 2014 6:32 pm 
Offline
Cecil
Cecil
User avatar

Joined: Sun Dec 01, 2013 2:16 pm
Posts: 759
icemario12 wrote:
Actually, my computer is XP and can read decimals with commas. It can't read those with periods. Thanks to that I couldn't play 3 whole episodes :oops:

That's surprising. Replacing the periods with commas does not fix the crashing problem for me.

_________________
Valtteri
Image Image Image
Image
I also have a graphics pack now! viewtopic.php?f=31&t=1386
YouTube channel: http://www.youtube.com/user/ValtteriValtteri24


Top
 Profile  
 
 Post subject: Re: SMBX NPC Code List
PostPosted: Sat Mar 29, 2014 8:15 pm 
Offline
Lakitu
Lakitu
User avatar

Joined: Tue Dec 24, 2013 3:23 pm
Posts: 438
Location: Florida
http://stackoverflow.com/questions/6428670/how-to-fix-an-application-that-has-a-problem-with-decimal-separator

This might have to do with why
Not sure as to how much of this applies to VB6 but I know that in .NET I have to be careful with decimals and such.

_________________
<BTB> but we arent gonna respect the fact he asked us not to post smbx anywhere



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Back to Super Mario Bros. X