How to use these NPC Codes?

Description: Subforum dedicated to SMBX-38A - a fan-made remake of the original SMBX Engine, made by 5438A38A.
Forum rules: This is official Europan/American community for the SMBX-38A. Suggested to don't post stuff for this engine outside this subforum.
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

fnafan8888888888 M
Topic author, Duke
Duke
fnafan8888888888 M
Topic author, Duke
Duke
Age: 17
Reputation: 13
Posts: 135
Joined: 30 Jun 2019

Post #1by fnafan8888888888 » 7 Dec 2019, 3:01

There is some NPC Codes that I don't know what they do:

Frame Styles:
5-SMB Style(With Offset)
6-SMB3 Style(With Offset)
7-SMB2 Style(With Offset)
8-SMB Loop
9-SMB3 Loop
Z-Position (and Z-pos for BGOs): I know it makes the NPC more Background, but I need more details.
BlendMode
NoNPCCollision: What's the difference between it and "NPCBlockSide"?
ForceCheck
NoSectionWrap

So if someone could tell me their use, thanks for reading.

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 305
Posts: 686
Joined: 9 Nov 2015
Website

Post #2by Lx Xzit » 8 Dec 2019, 19:44

SMB Style(With Offset)
Offsets are used when the graphic of the NPC changes according its "advanced setting". For example, the Flag Pole and the Directional Platform (npc-305) use it.

SMB3 Style(With Offset)
It's the same as above but with the difference that you can set left and right facing sprites too. None of the NPCs use this code.

SMB2 Style(With Offset)
The same as above but you can set grabbing sprites too.

SMB Loop
It plays the frames from first to last, and then going back to the first frame. For example, the Rinka has 4 frames and it uses this framestyle, its frames are shown this way:
Spoiler
Image
Bubbles also use this framestyle.

9-SMB3 Loop
Same as SMB Loop but you can set facing left/right sprites. None of the NPCs use this.

Z-Position
It's the rendering priority, it's a value between 0 and 1. The lower the value is, the more render priority it has. For example, the player has a z-pos of 0.45 (or a near value, I don't remember) so if you set a bgo/npc a z-pos value lower than that, it will render over the player.

BlendMode
Known also as "Mixing mode". You can learn more about it here: https://en.wikipedia.org/wiki/Blend_modes
In a few words, blend mode is a way to rendering layers' over others. You may understand it better if you test the blend modes by yourself.

NoNPCCollision
It completely disables NPC Collision with other NPCs. NPCBlockSide just makes the NPC face the opposite direction when they collide with each other, but NoNPCCollision will completely remove collisions with other NPCs.

NoSectionWrap
When "Section Wrap" is enabled, if the NPC has "NoSectionWarp" set to true it won't be able to wrap to the opposite side of the section. (If you don't know what Section Wrap is, it means that when the player reaches the borders of the section it appears in the opposite side. Well is NPCs has NoSectionWrap enabled they won't appear on the opposite side of the section, and will go off-screen.)

About ForceCheck I haven't figure out what it does.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

fnafan8888888888 M
Topic author, Duke
Duke
fnafan8888888888 M
Topic author, Duke
Duke
Age: 17
Reputation: 13
Posts: 135
Joined: 30 Jun 2019

Post #3by fnafan8888888888 » 9 Dec 2019, 0:29

Z-Position
It's the rendering priority, it's a value between 0 and 1. The lower the value is, the more render priority it has. For example, the player has a z-pos of 0.45 (or a near value, I don't remember) so if you set a bgo/npc a z-pos value lower than that, it will render over the player.
Thanks a lot for the information, but I got another question about the "Z-Position", how to know the "Z-Position" for the (player, BGOs, NPCs, etc...), or where can I find their "Z-Positions",
Because when I set a number in "Z-Position" the NPC appears behind some BGOs and in front of other BGOs?

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 305
Posts: 686
Joined: 9 Nov 2015
Website

Post #4by Lx Xzit » 14 Dec 2019, 6:37

fnafan8888888888 wrote:how to know the "Z-Position" for the (player, BGOs, NPCs, etc...), or where can I find their "Z-Positions",
Because when I set a number in "Z-Position" the NPC appears behind some BGOs and in front of other BGOs?

There isn't a list of z-positions yet. However, you can check the z-position of NPCs and BGOs by looking at their "zpos" value, like this:

Code: Select all

v(a) = npc(1).zpos
v(b) = bgo(1).zpos

But you can't do this in blocks or players. (By the way, I think player's z-pos is a number around 0.45.)
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

fnafan8888888888 M
Topic author, Duke
Duke
fnafan8888888888 M
Topic author, Duke
Duke
Age: 17
Reputation: 13
Posts: 135
Joined: 30 Jun 2019

Post #5by fnafan8888888888 » 14 Dec 2019, 16:29

Lx Xzit wrote:
fnafan8888888888 wrote:how to know the "Z-Position" for the (player, BGOs, NPCs, etc...), or where can I find their "Z-Positions",
Because when I set a number in "Z-Position" the NPC appears behind some BGOs and in front of other BGOs?

There isn't a list of z-positions yet. However, you can check the z-position of NPCs and BGOs by looking at their "zpos" value, like this:

Code: Select all

v(a) = npc(1).zpos
v(b) = bgo(1).zpos

But you can't do this in blocks or players. (By the way, I think player's z-pos is a number around 0.45.)
OK, thanks.


Return to “Super Mario Bros. X by 38A (SMBX-38A)”

Who is online (over the past 5 minutes)

Users browsing this forum: 2 guests