Page 2 of 2
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Sun Jul 10, 2022 3:39 pm
by BrokenAce
I just tried this out in Beta 4 and it does absolutely nothing. What gives? Am I missing something?
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Sun Jul 10, 2022 3:46 pm
by Ness-Wednesday
BrokenAce wrote:
I just tried this out in Beta 4 and it does absolutely nothing. What gives? Am I missing something?
Did you try loading the API in a local Lua file?
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Sun Jul 10, 2022 5:07 pm
by BrokenAce
Ness-Wednesday wrote: ↑Sun Jul 10, 2022 3:46 pm
BrokenAce wrote:
I just tried this out in Beta 4 and it does absolutely nothing. What gives? Am I missing something?
Did you try loading the API in a local Lua file?
What's an API? If that's an alternate name for the code itself then yes I have tried that.
Edit: Never mind, just me being a noob. Turns out just I forgot to put the Require in my luna.lua.
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Sun Jul 10, 2022 5:16 pm
by deice
BrokenAce wrote: ↑Sun Jul 10, 2022 5:07 pm
What's an API? If that's an alternate name for the code itself then yes I have tried that.
just for the record, i believe they mean "library" and not "API". an API is something else entirely.
in any case, if creating a file called "luna.lua" in the episode/level folder and placing
inside doesn't work then it's hard to say what the problem might be if you have no other libraries loaded which could be interfering.
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Wed Aug 24, 2022 8:09 pm
by BrokenAce
Yoshi Milkman wrote: ↑Sun Sep 13, 2020 6:55 pm
A fix to this would be greatly appreciated
JamesR624 wrote: ↑Wed Jul 29, 2020 3:18 pm
This is awesome but I do wanna mention that it seems to really mess up "slippery physics". Now anything with the slippery property is more like slime. It INCREASES friction with this patch on as opposed to decreasing which is what it's supposed to do.
I actually found a fix for this; if you change 0x3C to 0x0A on the 25th line, it'll disable the patch for players who are touching ice. However, since this is an edit to the slope-sliding patch, it also comes at the sacrifice of smooth slope sliding. There's probably a way to have both "fixes" active at once, if you know your way around the code (unfortunately I don't).
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Sat Jan 07, 2023 9:36 pm
by MarioChallengerX2
Uh, I'm blind. I can't tell what's different here. Is it speed? Or smoother control?
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Sun Jan 08, 2023 9:05 am
by MrDoubleA
MarioChallengerX2 wrote: ↑Sat Jan 07, 2023 9:36 pm
Uh, I'm blind. I can't tell what's different here. Is it speed? Or smoother control?
Faster acceleration and deceleration. Also, you decelerate in the air.
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Wed Feb 21, 2024 11:03 pm
by NoMoreStars
Has anyone been able to recreate SMW-esque physics using this? And if so, what variables should be changed?
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Thu Feb 22, 2024 12:00 am
by mariobrigade2018
BrokenAce wrote: ↑Wed Aug 24, 2022 8:09 pm
Yoshi Milkman wrote: ↑Sun Sep 13, 2020 6:55 pm
A fix to this would be greatly appreciated
JamesR624 wrote: ↑Wed Jul 29, 2020 3:18 pm
This is awesome but I do wanna mention that it seems to really mess up "slippery physics". Now anything with the slippery property is more like slime. It INCREASES friction with this patch on as opposed to decreasing which is what it's supposed to do.
I actually found a fix for this; if you change 0x3C to 0x0A on the 25th line, it'll disable the patch for players who are touching ice. However, since this is an edit to the slope-sliding patch, it also comes at the sacrifice of smooth slope sliding. There's probably a way to have both "fixes" active at once, if you know your way around the code (unfortunately I don't).
If you want a jank-ish fix for this, then you go to line 25 and add this:
after player:mem(0x3C, FIELD_BOOL). this won't play nice when jumping/falling off of slippery tiles, and it won't feel exactly like the normal ice physics, but hey, ice worlds are now a possibility.
Re: playerphysicspatch.lua - smbx controls like gunk
Posted: Thu Feb 22, 2024 2:31 am
by Just_Thomas
I've only just come across this find here. It actually looks as if you can imitate the SMB1 (Lost Levels) behavior a little, doesn't it? Is the default configuration already recommended or would there even be recommendations on how to change it?
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Thu Feb 06, 2025 9:24 pm
by Emral
Since my chocolate contest level I've been chipping away at a 2nd flavor of this script.
Introducing playerphysicspatch shmoove mode.
https://pastebin.com/r4bdCxTN
This variant of the script comes with a few changes.
- The aerial idle deceleration defaults to no deceleration.
- The script overwrites the use of Defines.walkspeed and Defines.runspeed, dynamically altering them to let you exceed the run speed cap.
-- It is possible to exceed the run speed cap by sliding, hitting bumpers, hitting springs, using starman, clear pipes, barrels, and other things that mess with your x speed
This variant of the script comes with a few bug.
- If you jump up into a slope the game freaks the fuck out and I don't know why and if someone smart is reading this and bored, please help me AAAAA
So if that bothers you just make sure to use it in a level without a lot of slopes for now lol
enjoy!
i've also added a new section to the bottom of the first post for configs! if you've ever customized physicspatch and really liked how it felt, leave a reply and i'll add it to the first post!
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Thu Feb 06, 2025 11:56 pm
by madman
ooooh, this was already one of my favorite scripts, thanks for the update
edit: I'm getting a 404 on pastebin, "This paste has been deemed potentially harmful. Pastebin took the necessary steps to prevent access on February 6, 2025, 11:26 pm CST. If you feel this is an incorrect assessment, please contact us within 14 days to avoid any permanent loss of content."
could be I just need to be patient to wait for it to get approved idk
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Fri Feb 07, 2025 12:53 am
by mariobrigade2018
madman wrote: ↑Thu Feb 06, 2025 11:56 pm
ooooh, this was already one of my favorite scripts, thanks for the update
edit: I'm getting a 404 on pastebin, "This paste has been deemed potentially harmful. Pastebin took the necessary steps to prevent access on February 6, 2025, 11:26 pm CST. If you feel this is an incorrect assessment, please contact us within 14 days to avoid any permanent loss of content."
could be I just need to be patient to wait for it to get approved idk
Could be the case. I downloaded it before it got taken down, so I'll keep it here until whatever happened gets resolved:
https://drive.google.com/file/d/1WZMvoe ... sp=sharing
Added in 1 minute 52 seconds:
anyways, I notice that for some reason it doesn't look like it's multiplayer compatible, so that may be the next thing I'll try to tackle.
EDIT: There is now a new update to the uncapped physics patch, so go download that in the first post. This is kept here for archival purposes.
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Fri Feb 07, 2025 8:50 am
by Emral
i contacted pastebin about the issue... thanks for the backup
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Fri Feb 07, 2025 12:33 pm
by mariobrigade2018
Emral wrote: ↑Fri Feb 07, 2025 8:50 am
i contacted pastebin about the issue... thanks for the backup
Yea no problem.
Something I did note is that the player animation acts like they're walking when running. I'm pretty sure that because of the defines change, so what I want to know is if there's any way to override the normal animation.
Added in 10 minutes 12 seconds:
also forgot to ask this but how is it "Fucked up on slopes!!!! SOMEONE HELP ME!!! OH NO!!!"
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Sat Feb 08, 2025 12:16 am
by Marioman2007
mariobrigade2018 wrote: ↑Fri Feb 07, 2025 12:43 pm
Something I did note is that the player animation acts like they're walking when running. I'm pretty sure that because of the defines change, so what I want to know is if there's any way to override the normal animation.
Setting Defines.player_walkspeed and Defines.player_runspeed to WALKSPEED and RUNSPEED in onTick seems to fix the animation.
One bug I found is that the player is unable to fly with the leaf and tanooki suit.
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Sat Feb 08, 2025 1:20 am
by mariobrigade2018
Marioman2007 wrote: ↑Sat Feb 08, 2025 12:16 am
mariobrigade2018 wrote: ↑Fri Feb 07, 2025 12:43 pm
Something I did note is that the player animation acts like they're walking when running. I'm pretty sure that because of the defines change, so what I want to know is if there's any way to override the normal animation.
Setting Defines.player_walkspeed and Defines.player_runspeed to WALKSPEED and RUNSPEED in onTick seems to fix the animation.
Doing that won't add the extra speed the star or slope gives you.
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Sat Feb 08, 2025 6:33 am
by Emral
mariobrigade2018 wrote:
also forgot to ask this but how is it "Fucked up on slopes!!!! SOMEONE HELP ME!!! OH NO!!!"
you clip into upwards slopes and straight up pass through upwards semisolid slopes. i think slopes just simply arent made for these kinds of speeds but i dont know the source code well enough to make sense of it.
Anyway here's a new link that fixes multiplayer, pspeed and run animation. I added a new flag: "lenientPSpeed". If you enable this, the flight timer doesn't instantly deplete when landing without sufficient speed. It is a mode more lenient than basegame SMBX, and you might find it fun. It is disabled by default.
https://pastebin.com/HJ8jMeKA
Re: playerphysicspatch.lua - now in 2 flavors
Posted: Sat Feb 08, 2025 1:16 pm
by mariobrigade2018
Emral wrote: ↑Sat Feb 08, 2025 6:33 am
mariobrigade2018 wrote:
also forgot to ask this but how is it "Fucked up on slopes!!!! SOMEONE HELP ME!!! OH NO!!!"
you clip into upwards slopes and straight up pass through upwards semisolid slopes. i think slopes just simply arent made for these kinds of speeds but i dont know the source code well enough to make sense of it.
I see. Well today, MDA showcased a WIP Sonic in the SMBX discord, so it may help you with the slopes whenever it comes out? Not sure.
Emral wrote: ↑Sat Feb 08, 2025 6:33 am
Anyway here's a new link that fixes multiplayer, pspeed and run animation. I added a new flag: "lenientPSpeed". If you enable this, the flight timer doesn't instantly deplete when landing without sufficient speed. It is a mode more lenient than basegame SMBX, and you might find it fun. It is disabled by default.
https://pastebin.com/HJ8jMeKA
Just tested the update. Multiplayer and the leaf now work, but the run animation is still not playing properly. Also really appreciate the new settings. Very nice customizability option for this.