[mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

Post Reply
User avatar
Blockhead
Member
Posts: 1623
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

[mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by Blockhead » Post

Riddance: Rid yourself of stuff you don’t want

Don’t like fire? Want to hide TNT from the creative menu? Maybe get rid of that
annoying biome from your favourite game or a useless chat command? You can do
all of these things with Riddance.

Riddance can rid you of:
  • Items - which means nodes, craftitems, and tools
  • Biomes
  • Chat commands
Riddance can also hide items from the creative inventory.

Important Links
Who and what is riddance for?

Riddance is for people that want to remove certain small things from their
world without needing to code and without needing to modify the mods that add
those undesired things.

Riddance is not a proper solution for more complicated tasks like preventing
people from using stuff without removing it entirely. Assume that players will
get their hands on any item hidden by riddance in some other way than via the
creative inventory, such as /give or their friends. Instead of relying on
security by obscurity, take the proper measures such as privilege checks.

Riddance is not a complete solution for existing worlds. You will need other
mods to remove unknown nodes and unknown items that it might cause. Deleting
biomes will probably result in discontinuities between old and new map
generation.

Riddance has no mod load order issues, Riddance runs after all the mods are
loaded. Riddance can run for any game or mod in Minetest, not just specific ones
like Minetest Game, Mineclone or Ethereal.

Configuring riddance

Riddance is configured with lists of things to rid and hide. You simply write a
list of the things, each separated by a comma, to rid/hide all of them in the
list. Spaces can optionally be used. For example to rid yourself of fire, flint
and steel, and TNT in Minetest Game, you would configure Ridding items in the
menu (riddance.rid_items technical name) like so:

fire:basic_flame,fire:flint_and_steel,tnt:tnt

You can show itemstrings (technical names) for all inventory items by enabling
Settings -> Graphics and Audio -> User Interfaces -> GUIs -> Append item name,
which if done via minetest.conf would be the line

tooltip_append_itemname = true

API

See the functions exported at the bottom of init.lua. There is no particular
benefit to using these if you already know what you are doing, barring some
future update like a riddance GUI.

Licence

Riddance is licensed under the BSD 3-Clause License, see LICENSE.txt for details.
Last edited by Blockhead on Tue Dec 05, 2023 04:14, edited 1 time in total.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
KiloCow
New member
Posts: 5
Joined: Mon Nov 28, 2022 18:55
Location: Germany

Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by KiloCow » Post

Wow, that was a fast realization of the idea discussed in MCL subforum. Thanks! I'll give it a try.

Update: Just tried it out and it works perfectly! Usage is very easy.

Preass
New member
Posts: 4
Joined: Tue Dec 20, 2022 18:04

Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by Preass » Post

Does this work on mobs?

User avatar
Blockhead
Member
Posts: 1623
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by Blockhead » Post

Preass wrote:
Tue Dec 20, 2022 18:16
Does this work on mobs?
Unlike items there is no straightforward way to delete mobs. Theoretically you can delete the entity definitions associated with the mobs. I will try to work on deleting mobs from Mobs Redo, Mobkit and Creatura but that's going to take some time as I need to test things thoroughly.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Info

by TenPlus1 » Post

@Preass - Mobs Redo API has a command for server owners that lets you clear mobs '/clear_mobs'

User avatar
snoopy
Member
Posts: 263
Joined: Thu Oct 20, 2016 16:49
Location: DE, European Union

Rid your _world_ of unwanted stuff - Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by snoopy » Post

Oops?

May be used for some cleanup but may have the tendency to unwanted mayhem.

Why does it not clean a world from unknown nodes too?
Blockhead wrote:
Wed Nov 30, 2022 12:23
Riddance: Rid yourself of stuff you don’t want

Don’t like fire?
@Blockhead - Should be amended both in the topic and the header to "Rid your world of unwanted stuff" because that seems to be its true task, I presume.
TenPlus1 wrote:
Wed Dec 21, 2022 14:25
@Preass - Mobs Redo API has a command for server owners that lets you clear mobs '/clear_mobs'
@TenPlus1 - Much appreciated information and good to know. Thank you.

User avatar
Blockhead
Member
Posts: 1623
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Rid your _world_ of unwanted stuff - Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by Blockhead » Post

snoopy wrote:
Wed Dec 21, 2022 15:13
Oops?

May be used for some cleanup but may have the tendency to unwanted mayhem.

Why does it not clean a world from unknown nodes too?
That's not a job for riddance, it's a job for a mod like cleaner. Riddance is useful on its own if you set it up with a bit of testing and afterwards launch a brand new world. Maybe I will make a companion mod to riddance that cleans various things like how riddance can remove their registrations. For now there is cleaner and the functionality that Tenplus1 mentioned. You have to realise this mod is literally something I made in an hour or two (including posting it here and to ContentDB) to help someone in the Mineclone2 thread.
snoopy wrote:
Wed Dec 21, 2022 15:13
Blockhead wrote:
Wed Nov 30, 2022 12:23
Riddance: Rid yourself of stuff you don’t want
@Blockhead - Should be amended both in the topic and the header to "Rid your world of unwanted stuff" because that seems to be its true task, I presume.
You want to get pedantic? Well, riddance applies to all your worlds because Minetest doesn't natively do per-world configuration, so it would be "worlds" plural. And just because I am saying you are ridding yourself of something, that does not imply that thing is a part of you. In almost all uses of the phrase, the thing you rid yourself of is a possession or an unwelcome person, not something that is part of your body. So no, I don't need to amend it. I hope you learned something.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by LMD » Post

Here's a small script to get rid of unknown entities. Might fit into this mod.
My stuff: Projects - Mods - Website

User avatar
snoopy
Member
Posts: 263
Joined: Thu Oct 20, 2016 16:49
Location: DE, European Union

Good riddance - Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by snoopy » Post

Oopsy. Sorry, no pun intended.
Blockhead wrote:
Wed Dec 21, 2022 15:42
You want to get pedantic? Well, riddance applies to all your worlds because Minetest doesn't natively do per-world configuration, so it would be "worlds" plural. And just because I am saying you are ridding yourself of something, that does not imply that thing is a part of you. In almost all uses of the phrase, the thing you rid yourself of is a possession or an unwelcome person, not something that is part of your body. So no, I don't need to amend it. I hope you learned something.
Ah, so basically a "Good riddance" ...
;-)

Happy hacking and have fun.

User avatar
Mr. Rar
Member
Posts: 109
Joined: Tue Oct 04, 2016 20:13
GitHub: MrRar
In-game: MrRar

Re: [mod] Riddance [v0.0.1] - Rid yourself of unwanted stuff

by Mr. Rar » Post

Blockhead wrote:
Wed Dec 21, 2022 14:10
Preass wrote:
Tue Dec 20, 2022 18:16
Does this work on mobs?
Unlike items there is no straightforward way to delete mobs. Theoretically you can delete the entity definitions associated with the mobs. I will try to work on deleting mobs from Mobs Redo, Mobkit and Creatura but that's going to take some time as I need to test things thoroughly.
Theoretically you could hook minetest.add_entity() and return nil if there is an attempt to add an offending mob, but I bet some mods don't respect the fact that minetest.add_entity() can return nil so they will crash.
"Only in Christ do we find real love, and the fullness of life. And so I invite you today to look to Christ." - St. John Paul II

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests