REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

Custom item pools in itempools.xml

Open calvinhobbes1010 opened this issue 1 year ago • 1 comments
trafficstars

With a number of mods (Fiend Folio, Samael, etc.) using special item pools, I feel like it would be very convenient for modders to be able to define their own custom item pools directly in itempools.xml. That way, they can pull items from such pools just like they would with a vanilla pool, without having to build the pool from scratch in Lua.

I'd imagine it would look something like this (using Fiend Folio's contraband dealer as an example):

<ItemPools>
	<Pool Name="dealer">
		<Item Name="Twinkle of Contagion" Weight="1" DecreaseBy="1" RemoveOn="0.1"/>
		<Item Name="GMO Corn" Weight="1" DecreaseBy="1" RemoveOn="0.1"/>
		<Item Name="Fraudulent Fungus" Weight="1" DecreaseBy="1" RemoveOn="0.1"/>
		(etc...)
	</Pool>
</ItemPools>

And much like with custom achievements, there'd be a function like Isaac.GetItemPoolIdByName that can be used when spawning collectibles.

calvinhobbes1010 avatar Apr 26 '24 22:04 calvinhobbes1010

On the xml-side support is already there, you can do content itempools.xml, but the game wont do anything with this pools. However, you should be able to access these with xmldata....I dont think it's worth using at the current state tho. But, yea, ofc we thought about this...the reason why it's not a thing is because itempools are trickier than you may expect.

jsgnextortex avatar Apr 27 '24 00:04 jsgnextortex

Added, see 4885a4a

epfly6 avatar Jul 18 '24 23:07 epfly6