PDA

View Full Version : Subitems and isPack



Xarxus
December 20th, 2025, 14:09
Hey folks, I’m trying to figure out how subItems actually work. I noticed there’s an isPack function in the ItemManager, but I can’t find the object type anywhere in CoreRPG. Is the type something that’s left to whoever implements their own ruleset? If so, is isPack meant to handle composite items?

Are there any rulesets that actually use this?

superteddy57
December 20th, 2025, 15:40
the full function is located in ItemManager. and displays what it needs to return true for the item to be a pack. You can override the ItemManager.isPack function for it to check for other things. The main thing it looks for is the type to be a pack or it's subtype to be a pack. Then it will allow dropping of other items.

Xarxus
December 21st, 2025, 10:10
So if I define a type field and set it to "pack", I can handle sub‑items?

Ty for all

Moon Wizard
December 22nd, 2025, 23:22
You need to replace the ItemManager.isPack function to return true/false based on how you identify a "pack" item. (such as <type field value> == "pack")

Regards,
JPG

Xarxus
December 25th, 2025, 11:22
Ty Moon