TeamREPENTOGON / REPENTOGON

Script extender for The Binding of Isaac: Repentance
https://repentogon.com/
GNU General Public License v2.0
115 stars 11 forks source link

Custom item pools in itempools.xml #429

Closed calvinhobbes1010 closed 1 week ago

calvinhobbes1010 commented 3 months ago

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.

jsgnextortex commented 3 months ago

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.

epfly6 commented 1 week ago

Added, see 4885a4a