JavidPack / SummonersAssociation

Summoners Association mod for tModLoader
https://forums.terraria.org/index.php?threads/summoners-association.30041/
8 stars 7 forks source link

[TODO] make API for SlotsFilledPerUse in 1.3 + add it back in 1.4 #13

Closed direwolf420 closed 1 year ago

direwolf420 commented 2 years ago

Currently there is no way of reliably getting the amount of minion slots occupied by using a weapon once, as we don't know its innate behavior. In vanilla, we know, such as Optic Staff summoning 2 minions of 0.5 slots each, averaging 1 slot per use. Spider Staff too, with 0.75 slots per use. In modded however, we have to rely on data from tmls side, such as ItemID.Sets.StaffMinionSlotsRequired[item.type], which only accepts int, meaning it wont work for minions below 1 slot. A weapon that summons a single minion with 0.5 slots per use for example (Calamity Herring Staff) HAS to have it set to 1 otherwise it wont work properly) My suggestion is to expand the current SlotsFilledPerUse approach we use for Spider Staff and expand it to modded minions, and use the aforementioned set as a fallback (in 1.4 it was removed as that weapon was changed to 1 slots per use).

Implementation wise it probably needs to go with the compatibility layer of MinionModel (not ItemModel, that ones not available to API) and it's calls.

BriceFable commented 1 year ago

Heya. I believe it was I who reported that issue, last year, back in 1.3! I'd just like to point out that it's still there. The minion summon books still consider any minion from other mods (using Calamity here) to be 1 slot, even if they take 0.5 or 2. The minion count below the minimap works well however.

direwolf420 commented 1 year ago

Just to clarify: This change is made on 1.4.4 only, 1.3 and 1.4(.3) are not getting these changes. Technically the change was made by TML itself hence why the need for an API call was not necessary