TheRedBrain / rpg-inventory

MIT License
1 stars 0 forks source link

RPG Inventory

Adds a new inventory screen with more equipment slots and other equipment related mechanics.

Installation

Requires

Highly recommended

New equipment slots

The new slots accessible in the inventory are:

The mod also adds additional slots which are not directly accessible. They are used in mechanics which are explained later.

New Keybindings and mechanics

Swap hand

Swaps the item in the hand slot with the item in the alternative hand slot

Swap offhand

Swaps the item in the offhand slot with the item in the alternative offhand slot

Sheathe Weapons

Puts the items in the hand and the offhand slot into their corresponding sheathed hand slots. When pressed again, swaps the items back

Toggle Two-handing Stance

Puts the items in the offhand slot into the sheathed offhand slot. When pressed again, swaps the item back. This is not possible, when the hand item is in the "non_two_handed_items" item tag. When the hand item is sheathed, the hand slot contains the item in the selected hotbar slot, like in vanilla. When the offhand item is sheathed, the offhand slot contains an empty item stack. On its own this is not very useful, it's designed to be used in combination with other mods like Better Combat Extension.

When a hand item is not sheathed, but the corresponding slot contains no item, the players hand is not empty. The item in the corresponding empty hand slot is held instead. The empty hand slots always contain a item called "Empty Hand Weapon". This is technically a weapon. When Better Combat is installed, this allows for unarmed combat.

Stamina Attributes Compatibility

Installing Stamina Attributes allows for swapping. sheathing and toggling the 2-handed stance to have configurable stamina costs/requirements.

Note: The vanilla 'Swap Item With Offhand' hotkey no longer has a function.

Using it when items where sheathed could duplicate items. Swapping items into the hotbar using the number keys still works.

Status Effect screen

Active and visible status effects are listed on the right side of the inventory screen. They are sorted by their category (harmful, beneficial and neutral). Effects can have a description (added by assigning a value to .description in the lang files), which is also displayed.

Food Overhaul Compatibility

Food Overhauls food effects are displayed in a separate list.

Unusable Items

Items in the "unusable_when_low_durability" item tag have the same behaviour as elytra. Instead of getting destroyed when losing all durability, they become unusable until they are repaired. Unusable items have a different translation key (default one + "_broken"). Inventory slots that contain unusable items have an overlay of a configurable colour. This can be disabled in the client config.

Additional Item Tooltips

These are separated into categories. Each category can be disabled in the client config.

Slot Tooltips

Equipment and trinket slots now have a tooltip. It is only shown when the slot and the cursor stack are empty. This feature can be disabled in the client config.

All trinket slots have a tooltip. It can be set in the lang file with this schema:

{
    "slot.tooltip.<group_name>.<slot_name>": "Test Slot"
}

When the string is empty, no tooltip will be shown.

Additional settings and features

The 2x2 crafting grid in the player inventory can be disabled.

Items in the "two_handed_items" item tag can only be used when the offhand is sheathed.

When "needs_two_handing_status_effect_identifier" is a valid status effect identifier, that status effect is applied when the item in the hand is in the "two_handed_items" item tag and the offhand is not sheathed.

When "no_attack_item_status_effect_identifier" is a valid status effect identifier, that status effect is applied when the item in the hand is not in the 'attack_items' item tag and the 'allow_attacking_with_non_attack_items' option is set to false.

When "building_mode_status_effect_identifier" is a valid status effect identifier and the player has that status effect, several mechanics are ignored.

The gamerule "canChangeEquipment" controls, whether items can be put into or removed from equipment slots.

When "civilisation_status_effect_identifier" is a valid status effect identifier and the player has that status effect items can be put into or removed from equipment slots, regardless of the gamerule "canChangeEquipment".

When "wilderness_status_effect_identifier" is a valid status effect identifier and the player has that status effect items can not be put into or removed from equipment slots, regardless of the gamerule "canChangeEquipment".

When the gamerule "destroyDroppedItemsOnDeath" is true and the vanilla gamerule "keepInventory" is false, the items in the players inventory are not dropped when they die. They are destroyed instead.

When "keep_inventory_status_effect_identifier" is a valid status effect identifier, that status effect is applied when an item in the "keeps_inventory_on_death" item tag is equipped (in an equipment, trinket or the offhand slot). When the player dies while having that status effect, all equipped items in the "keeps_inventory_on_death" item tag are destroyed. The rest of the inventory is kept, regardless of game rules and stuff like "Curse of Vanishing".

Various Status Effects Compatibility

All status effect identifier options default to status effects implemented by Various Status Effects.

Player Attribute Screen Compatibility

When the "Player Attribute Screen" mod is installed, a button to toggle the attribute screen is active in the RPG Inventory screen.

Additional Trinket slots

Trinket slots added by other mods or data packs are displayed and function like normal.