Climbing speed and other player physics

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
Spudly
Shy Guy
Shy Guy
Posts: 6
Joined: Sun Mar 17, 2024 3:37 am

Climbing speed and other player physics

Postby Spudly » Fri Apr 26, 2024 9:48 pm

Is there a script that allows you to edit the values of player physics? i.e climbing speed (characters climb very slowly)

Just_Thomas
Spike
Spike
Posts: 265
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

Re: Climbing speed and other player physics

Postby Just_Thomas » Sat Apr 27, 2024 3:18 am

Spudly wrote:
Fri Apr 26, 2024 9:48 pm
Is there a script that allows you to edit the values of player physics? i.e climbing speed (characters climb very slowly)
I could not find anything about climbing and I - still - feel like
Defines.player_runspeed
Defines.player_walkspeed
- apart from setting to 0 - are currently broken, as they do not really work
(to dev team: I tried both level and "project" luna file and it simply does not work anymore, as it used to be with beta 4).

Anyway:
https://docs.codehaus.moe/#/reference/d ... t-settings
This is available. It does not require any coding experience. You simply copy these lines into your luna file and state your desired values there.

(Script -> LunaLua Script).
Level Local -> whatever is for THAT one single level
Level Global -> the code here does apply for all your levels in your project (your know these directories within the worlds folder, e.g. like
C:\Programms\SMBX2-beta5\worlds\myProject

(if you have a single level project only, it it does not matter where you put your code in)

World Map Script -> World Map releated stuff (e.g. jukebox -> to play custom music on the world map or customPowerups Script to properly transmigrate custom powerups on the world map to an other level, but this is just for information right now, just so you've heard/read it before).

For example, you can probably simulate the SMB1 (Lost Levels) feeling with the right combination of these values (which is not known to me, in case you ask).

It's probably inevitable that your head will start to spin at the beginning, depending on how much programming experience you have. If you get to grips with it a little, even if it's just looking at other projects or NPCs, you'll get over it in time. I don't know whether you're more of a level designer or programmer type.

deice
Volcano Lotus
Volcano Lotus
Posts: 549
Joined: Fri Jul 23, 2021 7:35 am

Re: Climbing speed and other player physics

Postby deice » Sat Apr 27, 2024 6:51 am

Spudly wrote:
Fri Apr 26, 2024 9:48 pm
Is there a script that allows you to edit the values of player physics? i.e climbing speed (characters climb very slowly)
the climbing speed is hardcoded into the physics (just like for example the spin jump height), there is no simple way to modify it without completely reimplementing the base game's climbing mechanics

Just_Thomas
Spike
Spike
Posts: 265
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

Re: Climbing speed and other player physics

Postby Just_Thomas » Sat Apr 27, 2024 7:22 am

deice wrote:
Sat Apr 27, 2024 6:51 am
Spudly wrote:
Fri Apr 26, 2024 9:48 pm
Is there a script that allows you to edit the values of player physics? i.e climbing speed (characters climb very slowly)
the climbing speed is hardcoded into the physics (just like for example the spin jump height), there is no simple way to modify it without completely reimplementing the base game's climbing mechanics
Would it be possible to intercept whether the player character is currently on a ladder (certain BGOs) or on a vine (certain NPCs), for example, and change the movement speed until they leave it again?

deice
Volcano Lotus
Volcano Lotus
Posts: 549
Joined: Fri Jul 23, 2021 7:35 am

Re: Climbing speed and other player physics

Postby deice » Sat Apr 27, 2024 9:32 am

Just_Thomas wrote:
Sat Apr 27, 2024 7:22 am
Would it be possible to intercept whether the player character is currently on a ladder (certain BGOs) or on a vine (certain NPCs), for example, and change the movement speed until they leave it again?
yes, that's exactly how you'd go about doing it. i don't have the time to provide an example as it's a bit more involved, but using the 1.3 source code i linked as a reference should be able to give someone an idea of how to implement it.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari