[Mod] Item Limit [item_limit]

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

[Mod] Item Limit [item_limit]

by LMD » Post

Item Limit (item_limit)

A mod limiting items in player inventories.
How unfair ! That player has more apples than I can count !
- me, playing Minetest
Problem solved by this mod.

About

Help can be found under config_help.md in the same folder as this.
Depends on modlib and default.
Please note that this mod may not work along well with other mods overriding on_node_drop or the item entity.
Licensed under the MIT License. Written by Lars Mueller alias LMD or appguru(eu).

Symbolic Representation

Image


Links
  • GitHub - sources, issue tracking, contributing
  • Discord - discussion, chatting
  • Minetest Forum - (more organized) discussion
  • ContentDB - releases (cloning from GitHub is recommended)

Configuration

Locations

JSON Configuration : /config/item_limit.json
Text Logs : /logs/item_limit/.json
Explaining document(this, Markdown) : /item_limit/config_help.md
Readme : /item_limit/Readme.md

Default Configuration

Located under /item_limit/default_config.json

Code: Select all

{
  "player_inventory_lists": ["main", "craft"],
  "limits" : {
    "by_item_name" : {},
    "by_group_name" : {}
  },
  "disable_item_override" : false,
  "disable_node_drop_override" : false,
  "disable_on_craft" : false,
  "disable_on_inventory_action" : false,
  "disable_itemlimit_skip" : false
}
Usage


player_inventory_lists

A list. Specifies which inventory lists should be taken into account for item limits.
For instance, it makes almost no sense and is not recommended to include the craft preview list.
By default only the main inventory("main") and the crafting grid("craft") are considered.

by_item_name

Limits items in the player's inventory by their name.
Key is the full item name, like default:dirt.
Value is the maximum amount that may be in a player's inventory, as number.

by_group_name

Works similar to by_item_name, but instead of the per item, items are limited based on their group.
If you, for example, wanted to limit the maximum amount of sticks in a player's inventory, you can use stick, the full group name, as key.

disable_on_craft

Disable dropping items which may not be taken directly when crafted. If set to true, the player will have to manually drop the items he can't put into his inventory.

disable_itemlimit_skip

Disable the itemlimit skip privilege, which allows players to ignore the item limit.

Other disable_* flags

Disable several barriers disallowing players to exceed their item limit, such as the item override(player can exceed limit through picking up items), the on_node_drop override(player can exceed limit through digging nodes), etc.

It is not recommmended to set these to true.
My stuff: Projects - Mods - Website

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests