Description
Add a focused utility for modifying inventory definitions directly in the game cache, with bank capacity as the primary use case.
The bank capacity is stored in the cache inventory definition for ID 95. The project already has the necessary decoder, encoder, and cache-writing logic, but no simple tool for changing an inventory's length.
Requirements
- Accept a cache path, inventory ID, and new capacity.
- Read the existing inventory definition.
- Update only its
length.
- Encode and write the definition back to the cache.
- Preserve all existing inventory data and configuration.
- Validate the requested size and report errors clearly.
- Provide a dry-run or confirmation option before overwriting the cache.
- Document usage, including the bank inventory ID (
95).
- Keep the bank UI interaction range consistent with the new capacity.
- Handle existing player saves whose bank arrays use the previous capacity.
Relevant code
cache/src/main/kotlin/world/gregs/voidps/cache/config/decoder/InventoryDecoder.kt
cache/src/main/kotlin/world/gregs/voidps/cache/config/encoder/InventoryEncoder.kt
tools/src/main/kotlin/world/gregs/voidps/tools/InventoryDefinitions.kt
tools/src/main/kotlin/world/gregs/voidps/tools/convert/InventoryConverter.kt
data/entity/player/bank/bank.invs.toml
game/src/main/kotlin/content/entity/player/bank/BankOpen.kt
Acceptance criteria
A cache administrator can run one documented script to change the bank inventory capacity, verify the new length, and start the server without manually editing cache files.
Description
Add a focused utility for modifying inventory definitions directly in the game cache, with bank capacity as the primary use case.
The bank capacity is stored in the cache inventory definition for ID
95. The project already has the necessary decoder, encoder, and cache-writing logic, but no simple tool for changing an inventory'slength.Requirements
length.95).Relevant code
cache/src/main/kotlin/world/gregs/voidps/cache/config/decoder/InventoryDecoder.ktcache/src/main/kotlin/world/gregs/voidps/cache/config/encoder/InventoryEncoder.kttools/src/main/kotlin/world/gregs/voidps/tools/InventoryDefinitions.kttools/src/main/kotlin/world/gregs/voidps/tools/convert/InventoryConverter.ktdata/entity/player/bank/bank.invs.tomlgame/src/main/kotlin/content/entity/player/bank/BankOpen.ktAcceptance criteria
A cache administrator can run one documented script to change the bank inventory capacity, verify the new length, and start the server without manually editing cache files.