[Mod] Show bones [showbones]

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

[Mod] Show bones [showbones]

by ExeterDad » Post

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.
Last edited by ExeterDad on Sun Sep 04, 2016 00:12, edited 1 time in total.

User avatar
bigfoot
Member
Posts: 203
Joined: Fri Sep 02, 2016 23:31
GitHub: bigfoot547
IRC: bigfoot547 or bigfoot
In-game: bigfoot547 or bigfoot
Location: Somewhere between polar bears and penguins.

Re: [Mod] Show bones [showbones]

by bigfoot » Post

+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!

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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

User avatar
Onyx
Member
Posts: 132
Joined: Fri Sep 25, 2015 08:36
In-game: Onyx
Location: On your planet

Re: [Mod] Show bones [showbones]

by Onyx » Post

Hi,

This mod is very well thought out and very useful to players. Keep it up!
"One chunk, two chunks, three chunks..."

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Show bones [showbones]

by Krock » Post

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 :)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Show bones [showbones]

by azekill_DIABLO » Post

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.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Show bones [showbones]

by azekill_DIABLO » Post

lol derp.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: [Mod] Show bones [showbones]

by duane » Post

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.
Believe in people and you don't need to believe anything else.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Show bones [showbones]

by Byakuren » Post

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.
Every time a mod API is left undocumented, a koala dies.

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

Re: [Mod] Show bones [showbones]

by everamzah » Post

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!

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] Show bones [showbones]

by hajo » Post

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.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Show bones [showbones]

by azekill_DIABLO » Post

i would prefer them to turn white or grey when old. Red should be the indicaion that they will soon become old.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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 :)

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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?

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Show bones [showbones]

by azekill_DIABLO » Post

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.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

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.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Show bones [showbones]

by azekill_DIABLO » Post

okay, but i think the frsh bones should be red, then orange, then nearly orange grey, and finally white.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
harmony
Member
Posts: 410
Joined: Tue Jun 20, 2017 22:16
IRC: ynomrah
In-game: ynomrah
Location: 고향 ^-^

Re: [Mod] Show bones [showbones]

by harmony » Post

Omg you made this mod? Lol I never knew that
저는 방탄소년단 를 사랑해요!!! 아미!! 김남준,김석진,민윤기,정호석,박지민,김태형,전정국,방탄소년단!
저는 블랙핑크 를 사랑해요!!! 블링크!! 김지수,김제니,박채영,리사(ปราณ ปริ ยา มโน บาล)

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Show bones [showbones]

by azekill_DIABLO » Post

if the name of the thread is [mod], i think it is :P
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: [Mod] Show bones [showbones]

by texmex » Post

Nice mod! A bit too "Terminator-like" waypoints for my taste but good nonetheless.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Show bones [showbones]

by ExeterDad » Post

texmex wrote:"Terminator-like"
Ha ha! That's awesome :D

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] Show bones [showbones]

by ManElevation » Post

Neat!
My Public Mods! Discord: Rottweiler Games#3368

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest