[Mod] Beware the Dark [bewarethedark]

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by Nathan.S » Post

rename the folder to bewarethedark.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

vincentux
Member
Posts: 33
Joined: Thu Mar 17, 2016 12:16
GitHub: vincentux
Location: France
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by vincentux » Post

Great, it works!
Thank you for the speed of the answer and the mod itself ;)

xerus
New member
Posts: 2
Joined: Thu Jun 20, 2019 14:22
GitHub: xerus2000
In-game: xerus

Re: [Mod] Beware the Dark [bewarethedark]

by xerus » Post

Hey, could you add this mod to the content db please?

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by FreeGamers » Post

I had some issues with this mod running in a multiplayer server where the hudbars would not load sometimes for players. Also, sometimes, when using hudbars in statbar_bar mode (or whatever its called), the mod would generate errors saying the 9/20, 8/20 etc, bars texture could not be loaded. The standard configuration "out of the box" with this mod is a bit too fast in my opinion. But can easily be tweaked to suit taste.

Eventually, I found this fork done by tacotexmex that seems to be a simplified fork of this mod.
https://github.com/tacotexmex/nyctophobia
The code is a bit simplified and its still compatible with hudbars. It seemed more stable for me and did not generate error messages and consistently loaded. However, when crawling my server log, I did notice that there was at least one server crash generated from it at one point.

At this point, I'm retiring this set of game modifier from my server and instead relying on mob spawning and general darkness to present a threat from darkness.
Last edited by FreeGamers on Wed Jun 26, 2019 12:04, edited 1 time in total.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Beware the Dark [bewarethedark]

by texmex » Post

IIRC I threw that mod together in a jiffy, sorry. What was the crash message?

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by FreeGamers » Post

texmex wrote:IIRC I threw that mod together in a jiffy, sorry. What was the crash message?
This is what was in my log:

Code: Select all

2019-06-25 11:59:27: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '' in callback environment_Step(): ...hare/games/minetest/mods/lib_player/nyctophobia/init.lua:50: attempt to compare nil with a number
2019-06-25 11:59:27: ERROR[Main]: stack traceback:
2019-06-25 11:59:27: ERROR[Main]:       ...hare/games/minetest/mods/lib_player/nyctophobia/init.lua:50: in function <...hare/games/minetest/mods/lib_player/nyctophobia/init.lua:41>
2019-06-25 11:59:27: ERROR[Main]:       /usr/share/games/minetest/builtin/game/register.lua:419: in function </usr/share/games/minetest/builtin/game/register.lua:399>
2019-06-25 11:59:27: ERROR[Main]: stack traceback:
Also, I wanted to clarify: I'm move away from this style mod due to game direction reasons on my server, not because of this error message. I think darkness and mobs should be enough in my server to discourage free trekking through darkness. I think some players found the mod a bit confusing. I sort of enjoy it, but am going to see how the server goes without it for a bit.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Beware the Dark [bewarethedark]

by twoelk » Post

I wonder if this could be used to let cold biomes create damage if you don't wear your woolen armour.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by FreeGamers » Post

texmex wrote:IIRC I threw that mod together in a jiffy, sorry. What was the crash message?
Hey Tex, I'm experimenting with your version of this concept, but I can't figure out how to make it apply a reduced speed to the player instead hurting them. I've tried the physics override function but it doesn't seem to apply any effects.

Essentially, I'd like to override lines 55-57

Code: Select all

			if sanity == 0 then
					player:set_hp(player:get_hp() - 1)
end
To something that

Code: Select all

if sanity == 0 then
       player:set_physics_override({
            speed = 0.5, -- set speed to 50% of its original value
        })
    end,
source: https://rubenwardy.com/minetest_modding ... ysics.html
But it doesn't do anything. I'm a bit novice at this. I know I need to tell the code to set that on a specific player name.
Eventually, if the concept and mechanic works well, I'd like to play some horror sound effects to the player and perhaps apply a image overlay or vignette. I like the extra challenge and light requirements this type of concept adds. But it always felt a bit weird and unrealistic. Why would darkness hurt someone? So, I've been trying to find an alternative debilitation for it (speed and jump reductions).
I understand override physics is probably more complicated than this though? I've been struggling to apply functions to a specific player. Is there somewhere I can learn more about this?
Spoiler
2019-07-21 05:42:24: ERROR[Main]: ...hare/games/minetest/mods/lib_player/nyctophobia/init.lua:50: in function <...hare/games/minetest/mods/lib_player/nyctophobia/init.lua:41>
2019-07-21 05:42:24: ERROR[Main]: /usr/share/games/minetest/builtin/game/register.lua:419: in function </usr/share/games/minetest/builtin/game/register.lua:399>
2019-07-21 05:42:24: ERROR[Main]: stack traceback:
Last edited by FreeGamers on Sun Jul 21, 2019 13:59, edited 1 time in total.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Beware the Dark [bewarethedark]

by texmex » Post

Good thinking, FreeGamers. Better slow the player down than hurting directly. Disorientation is probably closer to the reality of experiencing nyctophobia rather than the feeling of being smacked in the head and slowing down the player should convey that feeling better.

So to the point: when modifying player physics such as speed the Minetest engine can’t handle multiple overrides, so if you have a single other mod also doing it, it fails. Therefore you need a layer in between all physics-modifying mods and the engine. The first one I know of was playereffects by Wuzzy, but imo player_monoids is better. Lately though I’ve implemented most such things through LATE mod effects.

But player_monoids is probably what you want at this point. Just make sure all other mods modifying player physics also use it.

I should look over those errors too.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by FreeGamers » Post

texmex wrote: But player_monoids is probably what you want at this point. Just make sure all other mods modifying player physics also use it. I should look over those errors too.
OK. I saw, sometime ago, in your github, that you were working converting a potions pack to LATE (late_potions and herbs). I tried that potions pack out, which still depended on player_monoids and player_effects. it was a really nice pack. I'll probably add it to my game if I could settle on a effects API and raise its cost to match the effects benefit.

I've held off choosing a status API because there seemed to be a few around here that have fractured support. But player_monoids was the one I've been hovering around since it seemed to be the most supported or at least supported by that potions pack I tried and liked. Is that why you suggested it?

Anyways, I'm interested in perusing the nyctophobia mechanic further. What next steps should I take? I guess I'll be awaiting a version with a fix of whatever is happening. I can provide additional testing and logs if needed. I'd like to say this crash mostly happens with multiple players in game, but that's just subjective. I don't remember the conditions from the last crash a couple weeks ago. I had disabled this mod and reactivated it this morning and had a few players join.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Beware the Dark [bewarethedark]

by texmex » Post

I’ve completely forgotten about the potion mod conversion (it has no new commits at all yet).

Choosing status API depends on whether you want a minimalist approach like monoids or a maximalist one like LATE, I suppose. Personally I love LATE and reimplementing nyctophobia mod with it would probaby nullify the multiplayer crash bug completely since I suspect bad multiplayer handling on my part in the current one.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Beware the Dark [bewarethedark]

by FreeGamers » Post

The only things I've looked at have been the potions plugin. I was also going to look at an old mod called "witchcraft" to see if it had any content that could be interesting for players to make effect potions. But I currently have no server dependencies on any player effect modifier API. They're disabled for now and I haven't committed towards any mod or API.

Eventually, I may end up using an API to create some sort of special armors that give player effect bonuses, but that is a bit ahead of me. Truthfully, I haven't seen many things using or depending on LATE but a lot of the mods that use playereffects or playermonoids seem to be a bit old (although there isn't anything inherently wrong with that). I'm not familiar enough with the API solutions around here or how they work to really contribute towards a decision for this. I'm all ears if you want to talk about it more via messaging, and I'd be willing to help out in any ways that I can. I'm a novice programmer as I've only started to cut my teeth with programming through Minetest projects this Summer. Although I've had some C++ programming classes during University. My tech expertise has been centered towards systems administration.

Potions and effects could be fun for players. I'm also interested in the light/darkness mechanic. I think your correct in surmising that it's likely due to the implementation of multiplayer portion of that mod because I've never really seen it crash when only one player was active.

By the way, I noticed in the "herbs" repo in your git, the effect of eating a psychoactive mushroom trys to incur a hallucinogenic effect on the player. It seems to change color of the skybox a few times and there is a reference to a skull texture in the code, but I havent been able to make it appear for the player. Perhaps that segment from herbs be re-purposed towards the nyctophobia project.

I'm not sure if Ben (the OP) is still around, he hasn't seemingly made a post since around this time last year. I could probably attempt to get bewarethedark to not throw texture errors, but getting it to do player effects would likely be much harder for me as I attempt to learn an effect API. It may be better to use your fork for the alternative effects of disorientation we discussed.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

jonadab
Member
Posts: 35
Joined: Tue Mar 24, 2020 04:14
GitHub: tsadok
IRC: jonadab
In-game: jonadab

Re: [Mod] Beware the Dark [bewarethedark]

by jonadab » Post

Clearly, this needs to be combined with the mod that makes torches burn out over time.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests