[Mod] Run & Fast [runfast]

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] Run & Fast [runfast]

by everamzah » Wed Aug 31, 2016 15:39

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.
Attachments
screenshot_20160903_102642_1.png
screenshot_20160903_102642_1.png (55.08 KiB) Viewed 4177 times
Last edited by everamzah on Sat Sep 03, 2016 19:38, edited 4 times in total.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Thu Sep 01, 2016 09:47

good
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Thu Sep 01, 2016 15:43

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!
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: [Mod] Run & Fast [runfast]

by MineYoshi » Thu Sep 01, 2016 22:01

+100!
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Fri Sep 02, 2016 02:35

Satiation amount is saved between server restarts now, by way of set_width(). Sprinting won't work if hungry.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Sat Sep 03, 2016 10:23

everamzah wrote:azekill_DIABOLO!

This is persecution.
"ever mah zah"
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Sat Sep 03, 2016 14:10

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.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Sat Sep 03, 2016 15:25

nice but at which speed?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Sat Sep 03, 2016 15:44

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.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Sat Sep 03, 2016 17:51

ok nice! conflicts with any mod?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Sat Sep 03, 2016 19:37

No conflicts, no dependencies.
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Fri Sep 16, 2016 14:35

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.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Fri Sep 16, 2016 16:21

you only try multiplayer? :P
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Sat Sep 17, 2016 11:14

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.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Run & Fast [runfast]

by rubenwardy » Mon Sep 19, 2016 01:06

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
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Mon Sep 19, 2016 01:16

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*
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Thu Oct 06, 2016 03:53

Update: Now with extra crispy *CRUNCH* sound!
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Thu Oct 06, 2016 11:38

for what? :D
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Run & Fast [runfast]

by everamzah » Thu Oct 06, 2016 12:45

azekill_DIABLO wrote:for what? :D


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

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Run & Fast [runfast]

by azekill_DIABLO » Thu Oct 06, 2016 15:37

Cool! Does it burps too?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: [Mod] Run & Fast [runfast]

by Fixerol » Wed Nov 09, 2016 16:21

 

mase
Member
 
Posts: 39
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [Mod] Run & Fast [runfast]

by mase » Sun Feb 26, 2017 16:12

Does it conflict with BlockMen's hungermod? I have 2 different hungerbars if I use both mods.
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Run & Fast [runfast]

by taikedz » Sun Feb 26, 2017 16:52

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?
 

mase
Member
 
Posts: 39
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [Mod] Run & Fast [runfast]

by mase » Sun Feb 26, 2017 16:54

So I don't need the hungermod when using this mod?
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Run & Fast [runfast]

by taikedz » Sun Feb 26, 2017 16:56

Correct.

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


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 6 guests

cron