[Mod] Beware the Dark [bewarethedark]
- 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]
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
Check out my website, and brand new Minetest Modding Course
-
- Member
- Posts: 33
- Joined: Thu Mar 17, 2016 12:16
- GitHub: vincentux
- Location: France
- Contact:
Re: [Mod] Beware the Dark [bewarethedark]
Great, it works!
Thank you for the speed of the answer and the mod itself ;)
Thank you for the speed of the answer and the mod itself ;)
Re: [Mod] Beware the Dark [bewarethedark]
Hey, could you add this mod to the content db please?
- 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]
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.
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
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Beware the Dark [bewarethedark]
IIRC I threw that mod together in a jiffy, sorry. What was the crash message?
- 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]
This is what was in my log:texmex wrote:IIRC I threw that mod together in a jiffy, sorry. What was the crash message?
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:
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft
-
- 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]
I wonder if this could be used to let cold biomes create damage if you don't wear your woolen armour.
- 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]
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.texmex wrote:IIRC I threw that mod together in a jiffy, sorry. What was the crash message?
Essentially, I'd like to override lines 55-57
Code: Select all
if sanity == 0 then
player:set_hp(player:get_hp() - 1)
end
Code: Select all
if sanity == 0 then
player:set_physics_override({
speed = 0.5, -- set speed to 50% of its original value
})
end,
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:
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
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Beware the Dark [bewarethedark]
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.
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.
- 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]
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.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.
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
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Beware the Dark [bewarethedark]
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.
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.
- 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]
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.
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
-
- Member
- Posts: 35
- Joined: Tue Mar 24, 2020 04:14
- GitHub: tsadok
- IRC: jonadab
- In-game: jonadab
Re: [Mod] Beware the Dark [bewarethedark]
Clearly, this needs to be combined with the mod that makes torches burn out over time.
Who is online
Users browsing this forum: No registered users and 21 guests