Page 1 of 1

[Mod] Run & Fast [runfast]

PostPosted: Wed Aug 31, 2016 15:39
by everamzah
Description: Singular mod to conditionally allow for sprinting, heart regeneration based on food eaten.
License: LGPL v2.1+
Depends: None

Image

Git repository is located at https://github.com/everamzah/runfast
Download

Info:
  • Hold Use (AUX1, Default [E]) to sprint. Sprinting won't work if hungry, stand still to regain stamina.
  • Eating food increases satiation (hunger bar), poison hurts player and reduces satiation by half.
  • Edibles will not be consumed if already sated.
  • Hearts will optionally be regenerated when sated, default true. When false, eating additionally heals hearts.
  • Damage is dealt once starving.
  • HUD can be set to hide meters.
  • The hungrier you are, the faster your stamina drains (sprint time).
  • Sprint meter disappears when full, a la bubble (breath) bar.

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Sep 01, 2016 09:47
by azekill_DIABLO
good

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Sep 01, 2016 15:43
by everamzah
Added a download link to post. Removed chat messages, so that screenshot is outdated. Have yet to persist stamina/satiation values between sessions.

Thanks for the reply, azekill_DIABOLO!

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Sep 01, 2016 22:01
by MineYoshi
+100!

Re: [Mod] Run & Fast [runfast]

PostPosted: Fri Sep 02, 2016 02:35
by everamzah
Satiation amount is saved between server restarts now, by way of set_width(). Sprinting won't work if hungry.

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 03, 2016 10:23
by azekill_DIABLO
everamzah wrote:azekill_DIABOLO!

This is persecution.
"ever mah zah"

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 03, 2016 14:10
by everamzah
The funny thing is that I originally wrote only "azekill" and went back after to add _DIABOLO, because I wasn't sure your preference. Heh.

As for this mod, I think it's just about done. Sprinting doesn't seem to work with enable_damage = false, though, so that can be fixed.

The sprinting meter (stamina) goes down faster the hungrier you are.

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 03, 2016 15:25
by azekill_DIABLO
nice but at which speed?

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 03, 2016 15:44
by everamzah
Full satiation = 0.1 stamina drain
Minimum satiation = 1.0 stamina drain

Stamina recharges at 1 point per tick if not moving, and 0.1 point per tick if moving but not sprinting.

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 03, 2016 17:51
by azekill_DIABLO
ok nice! conflicts with any mod?

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 03, 2016 19:37
by everamzah
No conflicts, no dependencies.

Re: [Mod] Run & Fast [runfast]

PostPosted: Fri Sep 16, 2016 14:35
by everamzah
The meters are offset when damage is disabled, now. I didn't realize before that this mod didn't work in singleplayer, so I added a note on join.

I don't know why it doesn't work in singleplayer. It's funny I never tried that mode.

Re: [Mod] Run & Fast [runfast]

PostPosted: Fri Sep 16, 2016 16:21
by azekill_DIABLO
you only try multiplayer? :P

Re: [Mod] Run & Fast [runfast]

PostPosted: Sat Sep 17, 2016 11:14
by everamzah
Yes, I only try multiplayer. I rarely, if ever, use the singleplayer tab, and have strong reservations against it. If I want to play singleplayer, I still use the server tab.

In my opinion, the singleplayer tab ought to be replaced with a Profiles tab, in order to associate named configurations with their player's profile; turning a single Minetest instance into a multi-user program.

Re: [Mod] Run & Fast [runfast]

PostPosted: Mon Sep 19, 2016 01:06
by rubenwardy
I can't see any problems, reading the code. It's possible that it's due to the hacky way of using set_width on an inventory to save satiation, but doubtful. If I remember I'll take a look at this when I have time tomorrow

Re: [Mod] Run & Fast [runfast]

PostPosted: Mon Sep 19, 2016 01:16
by everamzah
It's my mistake. I was wrong, it's not exclusive to singleplayer. Oddly, it's only when the mod is enabled after the world has already been spawned, that satiation and set_width aren't working.

Edit: So now that I look at it, it almost seems obvious. It's relying on register_on_newplayer, but if the world was already spawned, or rather the player already exists, then that won't occur. Will have to fix this.

Edit2: I fixed it. It had nothing to do with singleplayer, and everything to do with my novice modding. *smile*

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Oct 06, 2016 03:53
by everamzah
Update: Now with extra crispy *CRUNCH* sound!

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Oct 06, 2016 11:38
by azekill_DIABLO
for what? :D

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Oct 06, 2016 12:45
by everamzah
azekill_DIABLO wrote:for what? :D


What is the sound for? It plays whenever you consume something.

Re: [Mod] Run & Fast [runfast]

PostPosted: Thu Oct 06, 2016 15:37
by azekill_DIABLO
Cool! Does it burps too?

Re: [Mod] Run & Fast [runfast]

PostPosted: Wed Nov 09, 2016 16:21
by Fixerol

Re: [Mod] Run & Fast [runfast]

PostPosted: Sun Feb 26, 2017 16:12
by mase
Does it conflict with BlockMen's hungermod? I have 2 different hungerbars if I use both mods.

Re: [Mod] Run & Fast [runfast]

PostPosted: Sun Feb 26, 2017 16:52
by taikedz
Yes it will conflict.

This mod tries to manage hunger and hp regeneration and so do BlockMen's hunger and tenplus1's hudbars

All 3 allow running

Is there a reason you wanted to use both?

Re: [Mod] Run & Fast [runfast]

PostPosted: Sun Feb 26, 2017 16:54
by mase
So I don't need the hungermod when using this mod?

Re: [Mod] Run & Fast [runfast]

PostPosted: Sun Feb 26, 2017 16:56
by taikedz
Correct.

However I would also recommend using tenplus1's hudbars mod - tjis mod and BlockMen's mod are no longer maintained.