LunaLua icon indicating copy to clipboard operation
LunaLua copied to clipboard

Reserve item fix

Open Supermario1313 opened this issue 9 months ago • 5 comments

Pretty self explanatory, dropped reserve items no longer have their height hardcoded to 32, it is instead set to the height NPC config field. 2025-04-05_04_29_28

Supermario1313 avatar Apr 05 '25 03:04 Supermario1313

I'd personally want to see some way to disable this (though that'd depend a bit on the mission of X2 which the community will hopefully think through in the coming weeks).

ds-sloth avatar Apr 05 '25 04:04 ds-sloth

Was this bug actually used as a mechanic in some level?

Supermario1313 avatar Apr 06 '25 19:04 Supermario1313

Unlikely. If the new X2 team wants TheXTech to be used as the reference implementation of the SMBX 1.3 standard (I wouldn't complain!) then no disable mechanism would be needed.

But as far as I'm aware, people do currently use X2 to do things like TAS SMBX 1.3 episodes, or to research SMBX 1.3 logic. This bugfix would make that a bit harder.

ds-sloth avatar Apr 06 '25 20:04 ds-sloth

A bit late to the conversation (apologies for that), but at least in my opinion it's definitely worth having a Misc.SetReserveItemHeightFix(bool) function. I can think of two episodes that put larger NPCs in the player's reserve box (MaGLX3 and Bestified), though I don't remember if the height crunch mattered for gameplay in either case. Nonetheless, I do agree with allowing to disable it for speedrun and research purposes as ds mentioned, as well as any users who might want a deliberate glitch/jank aesthetic in their levels/episodes.

From a cursory look at ffi_misc.lua, it seems like most of the Misc functions for 1.3 bug fixes are wrappers for LunaLuaSet_Fix(bool) functions? So if it's not too much trouble, please do expose this fix in the same way as the others have been.

rixithechao avatar Apr 09 '25 01:04 rixithechao

Here's an updated version of ffi_misc.lua with Misc.SetReserveItemHeightFix(bool).

Supermario1313 avatar Apr 09 '25 11:04 Supermario1313

Ahh, you meant merge here, right. I was thinking the main X2 repo over on Gitlab. I don't have the perms to merge on this repo, but yeah, the test build you gave me seems to work.

A gif recording of a test level I threw together to confirm that Misc.SetReserveItemHeightFix(bool) properly toggles the fix.

So whoever can merge this PR, they've got my go-ahead to do so.

rixithechao avatar Apr 30 '25 15:04 rixithechao