Skip to content

[Items.xml] tags default settings and examples

Eduardo Dantas edited this page Jun 15, 2023 · 3 revisions

StackSize tag

In the commit introduces the ability to configure stack sizes for items in the items.xml file. Each item now includes a stacksize attribute, specifying the maximum number of items that can be stacked together. The stack size is limited to 255, and if an item exceeds this limit, it will be added to a new stack. The provided example demonstrates the effect of stack sizes

Allows you to configure stack sizes in items.xml

	<item id="22721" article="a" name="gold token" plural="gold tokens">
		<attribute key="weight" value="1"/>
		<attribute key="stacksize" value="50"/>
	</item>
	<item id="22722" article="a" name="copper token" plural="copper tokens">
		<attribute key="weight" value="20"/>
		<attribute key="stacksize" value="100"/>
	</item>
	<item id="22723" article="a" name="platinum token" plural="platinum tokens">
		<attribute key="weight" value="20"/>
		<attribute key="stacksize" value="250"/>
	</item>

Please note that the stack size is limited to 255, and any items exceeding this limit will be placed in a new stack. NOTE: If an amount greater than 255 is entered, a console warning will be issued indicating that it is not possible.

The provided example demonstrates the effect of stack sizes, such as when creating 1000 brown mushrooms, which are organized into multiple stacks as depicted in the accompanying image.

image