Skip to content

Cassette Beasts utility mod that replaces single-use item behavior with bulk-use logic—ideal for stackable consumables.

Notifications You must be signed in to change notification settings

gerousia/cb-inventory-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cassette Beasts Official Logo

Cassette Beasts – Inventory Plus Mod

Steam Workshop ModWorkshop

Utility mod that replaces single-use item behavior with bulk-use logic—ideal for stackable consumables.


Features

  • Bulk-use system
    Replaces single-use actions with a flexible bulk-use mechanic.

  • Helper functions
    Includes utility methods to simplify integration.

  • Minimal boilerplate
    Clean, modular design speeds up implementation.

  • Non-intrusive
    Does not modify core gameplay or existing save data.

Examples

Implementation

Prompting the Player for Stack Quantity

Integrate the MenuHelper.show_stack_box method within the item's custom_use_menu. This will present a stack selection dialog and return the player's chosen quantity amount.

func custom_use_menu(_node, _context_kind: int, _context, arg = null):
    
    ...

    # The selection range is defined by min_value (default: 1) and max_value (default: item_amount).
    # The selected amount will be returned once the player confirms their choice.
    var amount: int = yield(MenuHelper.show_stack_box(self, max_value, min_value), "completed")

    # Return any provided arguments, including the amount selected for consumption.
    return { "arg": arg, "amount": amount }

Consuming Items Based on Player Selection

Once the quantity is selected, consume the specified number of items by calling MenuHelper.consume_item in either the _use_in_world or _use_in_battle. The selected amount is passed as an argument.

func _use_in_world(_node, _context, arg):

    ...

    # Consumes the specified amount of the item.
    # A boolean flag controls whether a MessageDialog is displayed during the process.
    return MenuHelper.consume_item(self, arg["amount"], false)

Metadata

  • Mod ID: mod_inventory_plus
  • Save File Tags: none
  • Netplay Tags: none

About

Cassette Beasts utility mod that replaces single-use item behavior with bulk-use logic—ideal for stackable consumables.

Topics

Resources

Stars

Watchers

Forks