Page 1 of 1

[Mod] Show bones [showbones]

PostPosted: Sat Sep 03, 2016 19:55
by ExeterDad
Saves bones locations to text file. Then player can choose to locate bones via waypoints

Showbones

This mod saves the locations of player bones in a text file "database" in the world directory. Player can use new chat command "/showbones" to show waypoints that are visible anywhere in world showing the direction and distance to all recorded bones up to the server limit (3 by default). Waypoints are removed and updated as player, or other players dig them. If player is online when another player digs thier bones, a chat message will appear letting him/her know of the crime. :)

If a player has left more than the server limit (default 3) of bones lying around the world, the oldest ones are removed from the world as the new one is created. Waypoints are numbered 1 - server limit. The newest/latest bones would be 1. Bones waypoints may be hidden by using the /showbones chat command again.

This mod was created in hopes of relieving the frusteration of players and admins trying to locate lost bones. There is also the added bonus that server admins will no longer need to clean up messy, discarded bones from all around the server. This mod will only track bones lost from the time of install. It also will not track bones placed from inventory.

License: Source code LGPL 2.1
Credits: PilzAdam - The creator of the bones mod. Some code copied (on_punch function) for a needed override.
And to Rubenwardy. His awesome modding book and this datastorage snippet that I based my storage off of.

Adds chat command: /showbones Adds privilege: None at this time

Dependencies: bones

Code quality: I don't want to talk about it. I'm completely new at lua.

Download zip from Github: https://github.com/ExeterDad/showbones/ ... master.zip
Browse code: https://github.com/ExeterDad/showbones

A quick screenshot recycled from another post. Taken at sunset to see waypoint text easier.
Image

I guess this is my first mod that actually does something. I don't claim to know how to lua, so please be kind when reporting bugs or code improvements. I've much to learn and this was a fun exercise.

Re: [Mod] Show bones [showbones]

PostPosted: Sat Sep 03, 2016 21:22
by bigfoot547
+100
I tried your mod and I think it is very good!

P.S. Your code looks good!

EDIT: The bone "pruning" works very well!

Re: [Mod] Show bones [showbones]

PostPosted: Sat Sep 03, 2016 21:30
by ExeterDad
bigfoot547 wrote:+100
I tried your mod and I think it is very good!

P.S. Your code looks good!

EDIT: The bone "pruning" works very well!

Thanks for the feedback. I'm all smiles :D

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 07:17
by Onyx
Hi,

This mod is very well thought out and very useful to players. Keep it up!

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 07:35
by Krock
Worst mod ever. Everybody would find their bones easily and not leave any (maybe) worthful stuff inside.
Without this mod it was much easier to find some interesting items in the bones!!¨111¨!!
-----

Just kidding. Already lost my whole inventory items sometimes because I was not able to find my death position again. This mod will know the position whenever I can't find my bones, nice :)

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 13:36
by azekill_DIABLO
Just kidding. Already lost my whole inventory items sometimes because I was not able to find my death position again. This mod will know the position whenever I can't find my bones, nice :)


yeah, nice mod.

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 14:49
by ExeterDad
Krock wrote:Worst mod ever. Everybody would find their bones easily and not leave any (maybe) worthful stuff inside.
Without this mod it was much easier to find some interesting items in the bones!!¨111¨!!
-----

Just kidding. Already lost my whole inventory items sometimes because I was not able to find my death position again. This mod will know the position whenever I can't find my bones, nice :)

Ha! That was awesome Krock! I read that on my cellphone while zoomed so I didn't see the kidding part until much later. I was totally going to remove you from my Christmas Card mailing list. lol

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 14:51
by azekill_DIABLO
lol derp.

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 18:17
by duane
Very nice.

I don't understand why we do corpse runs in minetest anyway. The only thing they were ever good for was delaying people reentering pvp battles. Since the Ultima days, pretty much everyone has agreed that it was a bad idea to let player killers loot corpses. Most games now just start you back at a previous save/spawn point, with your equipment.

Personally, I just delete the whole bones mod and don't worry about it.

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 20:07
by Byakuren
I think it depends on the overall gameplay direction. Just because looting was bad in some games, it doesn't necessarily mean it's bad for all games, but a game where pvp is meant to be a focus might benefit from giving incentives to killing. Ultima clearly tries to discourage frequent player killing, so it's not a wonder that they would take a design direction that removes some rewards from it. I agree though that it probably does not contribute to servers where there isn't meant to be significant fighting.

Re: [Mod] Show bones [showbones]

PostPosted: Sun Sep 04, 2016 20:28
by everamzah
To the victor goes the spoils.

Bones mod doesn't need to be deleted in 0.4.14-dev, as there is now a bones_mode setting to disable it.

This mod looks important, perhaps should be directed to minetest_game!

Re: [Mod] Show bones [showbones]

PostPosted: Mon Sep 05, 2016 22:51
by ExeterDad
If anyone is using this mod for a server or a world that has multiple players... I discovered a bug that crashes the server if a player digs another players bones that is offline. It was a misnamed variable by me. It's fixed now.

Also I added a feature from my mental roadmap. When online, and someone digs your bones, there are several different random notification chat messages that will be announced.

Re: [Mod] Show bones [showbones]

PostPosted: Tue Sep 20, 2016 01:52
by ExeterDad
Fixed a bug where sometimes Bones waypoints weren't removed immediately when bones were dug.
Feature added - The colors of the Bones waypoint texts reflect the age of your bones according to when they can be looted by others. Green, Yellow and Red. Red can be looted.

I set up three bones in this screenshot. And took the pic after a yellow one turned red and I didn't notice. The texts in the waypoints also vary according to age (fresh, aging and old).
Image

Re: [Mod] Show bones [showbones]

PostPosted: Fri Oct 21, 2016 10:38
by hajo
ExeterDad wrote:Saves bones locations to text file. Then player can choose to locate bones via waypoints
..
If a player has left more than the server limit (default 3) of bones lying around the world, the oldest ones are removed

It would be nice if empty bones would be removed first,
or more generally, those where the contents have the least value.

Re: [Mod] Show bones [showbones]

PostPosted: Fri Oct 21, 2016 17:36
by azekill_DIABLO
i would prefer them to turn white or grey when old. Red should be the indicaion that they will soon become old.

Re: [Mod] Show bones [showbones]

PostPosted: Fri Oct 21, 2016 23:11
by ExeterDad
hajo wrote:
ExeterDad wrote:Saves bones locations to text file. Then player can choose to locate bones via waypoints
..
If a player has left more than the server limit (default 3) of bones lying around the world, the oldest ones are removed

It would be nice if empty bones would be removed first,
or more generally, those where the contents have the least value.

That's a very good suggestion. If a player were to die too many times trying to find the lost bones loaded with important loot, it's very possible the older bones with the loot would be removed leaving the recent ones that could possibly have nothing.
I've haven't had the opportunity to try code related to inventory, but it doesn't seem like it would be too hard for me to figure out. I'm not tempted to try to determine what items in the bones have the most "value", but counting and comparing used slots doesn't seem too hard and shouldn't be too heavy.

Thanks so much for your imput :)

Re: [Mod] Show bones [showbones]

PostPosted: Fri Oct 21, 2016 23:20
by ExeterDad
azekill_DIABLO wrote:i would prefer them to turn white or grey when old. Red should be the indicaion that they will soon become old.

I chose these colors as I believe (I could be wrong) these colors have the same meaning with traffic signals, pressure gauges, and many other items worldwide.
However I am very open to considering a different color scheme as long as it is intuitive to a average player.
What would you suggest for the color of bones that are fresh?

Re: [Mod] Show bones [showbones]

PostPosted: Sat Oct 22, 2016 10:06
by azekill_DIABLO
fresh bones: black, medium aged bones: grey, old bones : greywhite, recoltable: bright white!

may not be a greyt idea. but i think it's the most significant thing for me.

Re: [Mod] Show bones [showbones]

PostPosted: Sat Oct 22, 2016 16:38
by ExeterDad
azekill_DIABLO wrote:fresh bones: black, medium aged bones: grey, old bones : greywhite, recoltable: bright white!

may not be a greyt idea. but i think it's the most significant thing for me.

So I gave your color suggestions a try and am not crazy with the results lol
Fresh bones with black text are a bear to find in a cave or in the dark.

Re: [Mod] Show bones [showbones]

PostPosted: Sun Oct 23, 2016 10:04
by azekill_DIABLO
okay, but i think the frsh bones should be red, then orange, then nearly orange grey, and finally white.