pandorabox-io / pandorabox_custom

pandorabox server customization mod
https://pandorabox.io
MIT License
4 stars 8 forks source link

Replace death.lua with Death Markers mod? #28

Closed PeterNerlich closed 1 year ago

PeterNerlich commented 3 years ago

Hi! I was inspired by death.lua to fiddle around with the code and it grew into a thing which I think very well deserves to be a standalone mod. So I published it here: https://gitlab.com/PeterNerlich/death_markers Feel free to use it if you judge it a worthy replacement. In my opinion, these are the improvements over the current death.lua:

6r1d commented 3 years ago

Hi, thanks for making the mod! Is it compatible with other stuff on PandoraBox, like bone search? The idea sounds very nice if it is.

If you haven't tested that, I think it'll be possible to use test.pandorabox.io. Since it's a generic mod, how about adding a couple screenshots for normal and fading marker so the possible users can see the idea in action?

You'll need a license for the code, so there are no issues on PandoraBox, too. Something along the lines of this one.

S-S-X commented 3 years ago

https://choosealicense.com/ is nice and easy to understand

PeterNerlich commented 3 years ago

Death Markers is now licensed under GNU LGPLv3.

PeterNerlich commented 3 years ago

Is it compatible with other stuff on PandoraBox, like bone search? The idea sounds very nice if it is.

Since I kind of just expanded death.lua a bunch and the underlying mechanism didn't change, I'd be surprised if it wasn't compatible. I doubt something already manages a file minetest.get_worldpath().."/death_markers.json"? :smile:

S-S-X commented 3 years ago

Suggested change, not sure if I did think it through well enough so comments would be good PeterNerlich @OgelGames @BuckarooBanzay @6r1d https://gitlab.com/PeterNerlich/death_markers/-/issues/1

SwissalpS commented 2 years ago

I'd rather it didn't need .json file storage. If waypoints really need to be presereved over log-ins/reboots then the datastorage mod would be a possibility but nowadays one would use player meta. However, the suggested mod also overrides bones ... player could be offline ... other player digs .. problems, but doable.

Edit: I was looking at death.lua once again thinking about how to implement something similar when I saw this thread.

SwissalpS commented 2 years ago

I've been looking at the code and remembering an important condition we had agreed on back then: no loops through players at intervals. Now that pandorabox allows CSMs, this kind of fading markers could be dealt with on client side for those players that really want it. My suggestion, we add the hud-id of the serverside generated waypoint to player meta so CSMs can pick it up and modify as needed. CSMs couldn't override bones event handlers, but they wouldn't have any trouble comparing player pos with list of death-positions and could clear the markers that way.

SwissalpS commented 2 years ago

Just tried to make a proof-of-concept and realized that CSM can't access player meta, so the idea I posted in last post won't quite work.

Since mod channels also don't seem to work, a messy work-around would be to attach the hud-id to the chatmessage: "You died at x,y,z hud-id"

SwissalpS commented 2 years ago

The idea is a bit like the <blink> tag in html, fun to code but not so fun for users. Still I had fun coding this idea into a CSM.

BuckarooBanzay commented 1 year ago

https://github.com/pandorabox-io/pandorabox.io/issues/588