Banner
Summer C3 2020 begins in:
1 DAY, 5 HOURS, 34 MINUTES AND 2 SECONDS
Views: 836,021,086
Time:
14 users online: batmanbro, Darolac, Dispace, Dynamo128,  KevinM, kyasarintsu, LOLRyan2006 the Goombud, PokerFace, Rykon-V73,  Scrydan, Superdjsteve54,  Tahixham, The_gam3r_98,  XenonZed - Guests: 33 - Bots: 261 Users: 45,600 (3,260 active)
Latest: batmanbro
Tip: Even though good graphics may make people interested in your hack, what really counts is how fun it is to play.Not logged in.
Useful codes for NPCs
Forum Index - Sunken Ghost Ship - Old Contests & Events - SMWCX - Useful codes for NPCs
Pages: « 1 » Thread Closed
Hi.

Here's some useful codes for when decide to "customize" your NPC, the steps for this are pretty easy, here's how to manage.

Just create a text file with the same name of the NPC you will customize. Here's an example, see the npc-274.gif? Just create a text file with the same name (npc-274.txt). Also, remember to past the file in a folder with the same name of your level, or just put in the same directory of your level, both ways works fine.

I'll list the codes used for the NPC customization:

Code
gfxoffsetx=# 
(moves the graphic used by the NPC in the X direction)
you can use "-" to make it negative

gfxoffsety=# 
(moves the graphic used by the NPC in the Y direction)
you can use "-" to make it negative

Code
width=# 
(npc's width, it's recommended to use the same number of the width of the npc's graphic)

height=# 
(npc's height, it's recommended to use the same number of the height of the npc's graphic)

gfxwidth=# 
(graphics width, it's recommended to use the same number of the width of the graphic)

gfxheight=# 
(graphics height, it's recommended to use the same number of the height of the graphic)

Code
score=# 
(change it 1 to 12, the score you get by killing is/are:)

10/100/200/400/800/1000/2000/4000/8000/1UP/2UP/5UP

It changes per number.

Code
playerblock=# 
(use 0 for no action and 1 to make the npc act like blocks for the player)

npcblock=# 
(use 0 for no action and 1 to make the npc act like blocks for another npcs)

Code
playerblocktop=# 
(use 0 for no action and use 1 to make the player able to stand on the npc, as them do with shyguys)

npcblocktop=# 
(use 0 for no action and use 1 to make the npcs able to stand on the npc)

Code
grabside=#
(use 0 for no action and 1 to give the player ability to grap the npc from the side)

grabtop=#
(use 0 for no action and 1 to give the player ability to grap the npc from the top like shyguys)

Code
jumphurt=#
(use 0 for no action and 1 to make the npc hurtable when jumps on them)

Code
nohurt=#
(use 0 for no action and 1 to make the npc unable to hurt you in all ways)

Code
noblockcollision=#
(use 0 for no action and 1 to make the npc able to cross solid blocks and objects)

Code
cliffturn=#
(use 0 for no action and 1 to make the npc able turn when reaching a cliff as the red koopa does)

Code
noyoshi=#
(use 0 for no action and 1 to make the npc unable to be eated by yoshi)

Code
foreground=#
(use 0 for no action and 1 to make the npc have more priority than blocks, backgrounds and other npcs)

Code
speed=#
(it sets the speed of the npc)
you can use "-" to make the npc walk for the opposite direction

Code
nofireball=#
(use 0 for no action and 1 to make the npc unable to be killed by fireballs)

noiceball=#
(use 0 for no action and 1 to make the npc unable to be killed or hitted by iceballs)

Code
nogravity=#
(use 0 for no action and 1 to make the npc able to float and/or walks in the air)

Code
frames=#
(use this for set the number of frames the npc will have)
note: take a look in the npc graphics and/or create a new one

Code
framespeed=#
(it sets the speed of the frame animation)
you can use "-" to make it negative

Code
framestyle=#
(it sets the frame animation style of the npc, here's the guidelines:)

0 = acts like a smb3 goomba, using the same tilemap to make the left and right movement.

1 = the npc has the common left and right movement, it's the recommended to use.

2 = similar at 1, but when the npc is grabbed the does a upside down movement when grabbed.

Here's an example of how you have to manage this:

Code
noiceball=1
speed=2
framespeed=4
width=16
height=32
gfxwidth=32
gfxheight=16

Remember it's just an example, I just managed an enemie with a SMW Koopa structure right now, unable to be killed or hitted by iceballs, anyway, good luck creating or customizing your own NPC.
Originally posted by ShadowPhoenix

Here's an example of how you have to manage this:

Code
noiceball=1
speed=2
framespeed=4
width=16
height=32
gfxwidth=32
gfxheight=16



If you're going to have an example, try not to have something that wouldn't work. The hitbox would extend above the graphic in that one.

You also might want to reorganized the list of codes because you started with the least likely used code someone would use and you should have all the graphic codes in the same place.

These flags can be found in the editor help file that come with SMBX, and they are organized in a very logical way. It's accessible using F1 from the editor.

Here ia a example I have:
Code
nohurt=1
npcblocktop=1
playerblocktop=1
noiceball=1
nofireball=1
noyoshi=1
npcblock=0

I used these codes to turn a hopping koopa into a safe npc you can stand on.
~~~Septentrion Signature Space~~~
Pages: « 1 » Thread Closed
Forum Index - Sunken Ghost Ship - Old Contests & Events - SMWCX - Useful codes for NPCs

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy