[Mod] Modified Physics, Sprinting, Hunger [sneak_jump]

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

[Mod] Modified Physics, Sprinting, Hunger [sneak_jump]

by jas » Thu Mar 22, 2018 23:21

Hello! This is a quick mod I made to enable modified physics only while holding down the Use key (default [E]). Includes optional stamina drain and hunger.

Download or View
LGPL 2.1+

Video showing some movements using this mod: https://www.youtube.com/watch?v=6CdSJ9T1_aw

Features:
  • Sound for eating
  • Silent footsteps while sneaking
  • Toggle sneak jumping by depressing the sprint key
  • Optional stamina/sprinting & satiation/hunger with heart regeneration
  • HUD meters
  • Bandage item for restoring hearts immediately

Image
Last edited by jas on Thu Apr 19, 2018 12:38, edited 4 times in total.
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Sat Mar 24, 2018 04:14

Updated. Added optional stamina with configuration settings:
Code: Select all
sneak_jump.stamina_drains (Stamina drains) bool true
sneak_jump.drain_rate (Stamina drain rate) float 0.1
sneak_jump.fill_rate (Stamina fill rate) float 0.25
sneak_jump.speed (Sneak jump sprint speed) float 1.5
sneak_jump.jump (Sneak jump height) float 1.25
sneak_jump.gravity (Sneak jump gravity) float 0.95
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Sun Mar 25, 2018 05:15

Updated to show bubbles in the correct place when damage is enabled but stamina is not.
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Sun Mar 25, 2018 15:08

Added hunger. It's optional, and the starvation rate is adjustable (see settingtypes.txt).

Ps. I forgot to mention there's a bandage to repair hearts. I'm going to add a very slow regen now.
PPs. Added heart regeneration when sated.
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Mon Mar 26, 2018 06:48

Updated:
Limit item eat amount, fix bugs. …
Hunger bar is lowered if hearts are off.
Stamina is lowered if satiation is low.
Damage taken frequency is reduced if not sated.
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Tue Mar 27, 2018 08:24

Updated. Digging, sprinting, and moving around now take fewer hunger points.
 

User avatar
googol
Member
 
Posts: 75
Joined: Mon Dec 09, 2013 09:23
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Fri Apr 13, 2018 09:17

Thank you.

I updated the mod to increase [stamina] drain rate depending on how hungry the player is. I'm not terribly happy with the code, I hope it's alright. At full satiation, the player can sprint longer, now.

I'll likely also change the fill rate to be lower if the player is moving.
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics [sneak_jump]

by jas » Wed Apr 18, 2018 14:13

jas wrote:I'll likely also change the fill rate to be lower if the player is moving.


Done.

Update: Also, here's a video showing some movements using this mod: https://www.youtube.com/watch?v=6CdSJ9T1_aw
 

User avatar
googol
Member
 
Posts: 75
Joined: Mon Dec 09, 2013 09:23

Re: [Mod] Modified Physics, Sprinting, Hunger [sneak_jump]

by googol » Thu Apr 19, 2018 06:17

Maybe when the player jumps the stamina should decrease to?
I am groot!
 

User avatar
jas
Member
 
Posts: 216
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Modified Physics, Sprinting, Hunger [sneak_jump]

by jas » Thu Apr 19, 2018 09:06

Hm, right now the stamina only decreases when jumping if holding the sprint key. In fact, that's the only time stamina is ever depleted. It would be interesting to decrease stamina when jumping. (Actually, the stamina is depleted down to zero if starved.)

Another idea I'm thinking about is implementing a cooldown timeout, such that if the player totally runs out of stamina, they have to wait for it to fully recharge before it can be used again. I should also lessen the effect of the "stamina fill rate when moving" multiplier.

Okay, I've created three issues on the GitHub issue tracker. Thank you googol, it's a good suggestion and one that touches on a bigger aspect: what else besides sprinting does stamina relate to?

https://github.com/jastevenson303/sneak_jump/issues

Update: The player is now silent while sneaking, making no footstep sounds. Secondly, there's now a crunch sound that plays at various pitches when eating. Update #2: Players are now physical, unless they're dead, then they're not until they respawn.
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 4 guests