Re: SMBX2 Beta 5 RELEASE! ➡️ Discussion & bugs here!
Posted: Mon Feb 05, 2024 6:39 am
As far as b4 stuff breaking goes, Hatters now throw an error when spawning from a block.
Forums for SMBX
https://www.smbxgame.com/forums/
Hey, how did you get this bug?
congrats, you guys are geniuses, well done! You really do know the games really well. I'll just leave this pile of shame here.Global: Added walkpaststair - If true, player and NPCs approaching this stair (semisolid slope) block while grounded will walk past instead of up
Huh? No! Of course not! I was one of the first folks to get the update, and I did notice that, but I'm not sure.Emral wrote: ↑Mon Feb 05, 2024 9:13 amHey, how did you get this bug?
Did you by chance transform the custom npc cannons into basegame cannons? If so, that's not supported and might be the reason for this bug. Please place the NPC from scratch. Could this be the same thing for your earlier screenshot about the fire spitting piranha plants?
Believe me, it's not as obvious as you think. Especially when it comes to extra settings-related issues like this that we on the dev team have trouble reproducing.
I’ll redownload and see if anything changed.Emral wrote: ↑Mon Feb 05, 2024 5:54 pmBelieve me, it's not as obvious as you think. Especially when it comes to extra settings-related issues like this that we on the dev team have trouble reproducing.
Could you put both of the trouble children into a singular level and send it over to me so I can test it out in an environment where the bug happens?
Ok, this bug only happens in one level. I'm going to transfer everything in there to see if it goes away.mariobrigade2018 wrote: ↑Mon Feb 05, 2024 6:24 pmI’ll redownload and see if anything changed.Emral wrote: ↑Mon Feb 05, 2024 5:54 pmBelieve me, it's not as obvious as you think. Especially when it comes to extra settings-related issues like this that we on the dev team have trouble reproducing.
Could you put both of the trouble children into a singular level and send it over to me so I can test it out in an environment where the bug happens?
Just_Thomas wrote: ↑Mon Feb 05, 2024 3:09 amThere you go, deIce came up with a solution
(thread: viewtopic.php?t=28731#)Code: Select all
local coinIDs = { 274 } -- add/remove coin ids here, comma-separated local function checkNPCSection(n) if(n:mem(0x12C, FIELD_WORD) > 0) then n.section = Player(n:mem(0x12C, FIELD_WORD)).section return end for i = 0, Section.count() - 1 do if(n.x >= Section(i).boundary.left and n.x + n.width <= Section(i).boundary.right and n.y >= Section(i).boundary.top and n.y + n.height <= Section(i).boundary.bottom) then n.section = i return end end local min_section = -1 local min_dist = -1 local nch = (n.x + n.width * 0.5) local ncv = (n.y + n.height * 0.5) for i = 0, Section.count() - 1 do local disth = 0.5 * (Section(i).boundary.left + Section(i).boundary.right) - nch local distv = 0.5 * (Section(i).boundary.top + Section(i).boundary.bottom) - ncv local cdist = disth*disth + distv*distv if(min_dist == -1 or cdist < min_dist) then min_section = i min_dist = cdist end end n.section = min_section end function onPostEventDirect(e) if(e == "P Switch - Start") then for _, v in Block.iterate() do for _, cid in ipairs(coinIDs) do if(v.isValid and v.layerName ~= "Destroyed Blocks" and v:mem(0x5C, FIELD_WORD) == cid) then local newnpc = NPC.spawn(cid, v.x, v.y, 0, true) checkNPCSection(newnpc) newnpc.layerName = v.layerName newnpc.deathEventName = v:mem(0x10, FIELD_STRING) newnpc.noMoreObjInLayer = v:mem(0x14, FIELD_STRING) newnpc.x = newnpc.x + (v.width - newnpc.width) * 0.5 newnpc.isHidden = v.isHidden v:remove(false) break end end end end end
Dude, that's like promising your wife you'll always love her and never leave her. No developer can promise that, it's completely impossible.JustinBieber96 wrote: ↑Sun Feb 04, 2024 7:08 pmHello, does the SMBX2 B4 episodes works in B5 engine without any glitches?
You know what they say:JustinBieber96 wrote: ↑Mon Feb 05, 2024 9:08 pmJust_Thomas wrote: ↑Mon Feb 05, 2024 3:09 amThere you go, deIce came up with a solution
(thread: viewtopic.php?t=28731#)Code: Select all
local coinIDs = { 274 } -- add/remove coin ids here, comma-separated local function checkNPCSection(n) if(n:mem(0x12C, FIELD_WORD) > 0) then n.section = Player(n:mem(0x12C, FIELD_WORD)).section return end for i = 0, Section.count() - 1 do if(n.x >= Section(i).boundary.left and n.x + n.width <= Section(i).boundary.right and n.y >= Section(i).boundary.top and n.y + n.height <= Section(i).boundary.bottom) then n.section = i return end end local min_section = -1 local min_dist = -1 local nch = (n.x + n.width * 0.5) local ncv = (n.y + n.height * 0.5) for i = 0, Section.count() - 1 do local disth = 0.5 * (Section(i).boundary.left + Section(i).boundary.right) - nch local distv = 0.5 * (Section(i).boundary.top + Section(i).boundary.bottom) - ncv local cdist = disth*disth + distv*distv if(min_dist == -1 or cdist < min_dist) then min_section = i min_dist = cdist end end n.section = min_section end function onPostEventDirect(e) if(e == "P Switch - Start") then for _, v in Block.iterate() do for _, cid in ipairs(coinIDs) do if(v.isValid and v.layerName ~= "Destroyed Blocks" and v:mem(0x5C, FIELD_WORD) == cid) then local newnpc = NPC.spawn(cid, v.x, v.y, 0, true) checkNPCSection(newnpc) newnpc.layerName = v.layerName newnpc.deathEventName = v:mem(0x10, FIELD_STRING) newnpc.noMoreObjInLayer = v:mem(0x14, FIELD_STRING) newnpc.x = newnpc.x + (v.width - newnpc.width) * 0.5 newnpc.isHidden = v.isHidden v:remove(false) break end end end end end
Dude, that's like promising your wife you'll always love her and never leave her. No developer can promise that, it's completely impossible.JustinBieber96 wrote: ↑Sun Feb 04, 2024 7:08 pmHello, does the SMBX2 B4 episodes works in B5 engine without any glitches?![]()
Thanks for the level. The cause is that you have extra settings files in this folder that overwrite the basegame extra settings files for the npcs that you've been experiencing errors for. Please either rename those extra settings files, or delete them.mariobrigade2018 wrote: ↑Mon Feb 05, 2024 7:35 pmHere's the level.
https://drive.google.com/file/d/1jCE3iI ... sp=sharing
...You can overwrite extrasetting files? Huh. Well, better start deleting them. Thanks for the help!Emral wrote: ↑Tue Feb 06, 2024 5:01 amThanks for the level. The cause is that you have extra settings files in this folder that overwrite the basegame extra settings files for the npcs that you've been experiencing errors for. Please either rename those extra settings files, or delete them.mariobrigade2018 wrote: ↑Mon Feb 05, 2024 7:35 pmHere's the level.
https://drive.google.com/file/d/1jCE3iI ... sp=sharing