Advertisement
Excitium

SMBX CNPC Codes

Oct 17th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.32 KB | None | 0 0
  1.  
  2. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  3. Guide to Custom NPCs
  4. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  5.  
  6. Written by Redigit and Blue, 2010
  7.  
  8.  
  9. This guide is meant to give a comprehensive guide for
  10. dealing with custom NPC codes.
  11.  
  12. While the feature is implemented in SMBX, it is not
  13. part of the actual program's user interface. All custom
  14. NPCs are set just like custom graphics and are done
  15. manually by the user creating a file in the game
  16. folders. In the folder for the level you wish to use a
  17. custom NPC in, you will create a file with notepad (a
  18. program that comes with your computer) that has the
  19. same exact name as the graphic file of the NPC you wish
  20. to alter.
  21.  
  22. For example: If you wish to make a goomba not able to
  23. be stomped, you would do the following.
  24.  
  25. 1. Create a new .txt file in the desired level's
  26. folder.
  27. 2. Name the file npc-1.txt
  28. 3. Open that file and then place the following text in
  29. it...
  30.  
  31. playerblock = 1
  32. jumphurt = 0
  33.  
  34. ...and then save the file.
  35.  
  36. Now in the level in question, the goomba will no longer
  37. be able to be stomped. You may also place it in your
  38. episode folder (if you have one) and it will affect ALL
  39. levels for it.
  40.  
  41. The following flags can be placed in the .txt file to
  42. affect the NPC. If you want the flags to be set to yes,
  43. put a 1 after the =. If you want them to be set to no,
  44. put a 0.
  45.  
  46. NPC Player/World Interaction Flags:
  47.  
  48. grabtop = Can Mario pick it up and carry it?
  49. grabside = Can Mario grab this from the side
  50. and carry it?
  51. jumphurt = Will Mario get bounce if he jumps on
  52. the top of this NPC?
  53. playerblock = Will the player treat this NPC like
  54. a block?
  55. playerblocktop = Can the player stand on this NPC?
  56. npcblock = Will other NPCs treat this NPC as a
  57. block?
  58. npcblocktop = Will other NPCs walk on this NPC's
  59. head?
  60. noblockcollision = Passes through blocks.
  61. cliffturn = Will it turn around when it comes to
  62. an edge, rather than falling off?
  63. nohurt = Set to 1 and it won't hurt you.
  64. noyoshi = Set to 1 and Yoshi won't eat it.
  65. nofireball = Setting to 1 prevents fire from
  66. harming this NPC.
  67. noiceball = Setting to 1 prevents ice from
  68. freezing this NPC.
  69. nogravity = Not effected by gravity if set to 1.
  70. speed = How fast it moves (in percentage)
  71. 0=0% 1=100% 2=200%
  72. score = How many points the NPC should give
  73. you upon its death/collection. Score
  74. can be set to any number from 0-13.
  75. Each gives a different amount of
  76. points listed below.
  77.  
  78. 0 gives 0 points
  79. 1 gives 10 points
  80. 2 gives 100 points
  81. 3 gives 200 points
  82. 4 gives 400 points
  83. 5 gives 800 points
  84. 6 gives 1000 points
  85. 7 gives 2000 points
  86. 8 gives 4000 points
  87. 9 gives 8000 points
  88. 10 gives a 1up
  89. 11 gives a 2up
  90. 12 gives a 3up
  91. 13 gives a 5up (anything higher than
  92. 13 will produce a 5up
  93. as well.)
  94.  
  95. NPC Appearance Flags:
  96.  
  97. foreground = This will be drawn in front of other
  98. sprites if set to 1.
  99. frames = How many frames the sprites animation uses
  100. for a single direction.
  101. framespeed = How fast the frames of the sprites
  102. animation change. 8 is Normal.
  103. framestyle = 0=No Directional Sprites, 1=Left and Right
  104. movement, 2=Left and Right movement and
  105. inverted (upsidedown) if Held.
  106. gfxoffsetx = Moves the graphic in a specific direction
  107. (X) -1 is up, 1 is down.
  108. gfxoffsety = Moves the graphic in a specific direction
  109. (Y) -1 is left, 1 is right.
  110. width = The NPCs hitbox width (in pixels)
  111. height = The NPCs hitbox height (in pixels)
  112. gfxheight = Only set if sprite height is different
  113. than Hit box height.
  114. gfxwidth = Only set if sprite width is different
  115. than Hit box width.
  116.  
  117. Good luck with your NPCs!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement