PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Potion particles are no longer hidden by default

Open calcastor opened this issue 4 years ago • 3 comments
trafficstars

As described in the documentation on kits, potion particles are supposed to be disabled by default. Recently however, in observing game play on OCC, it would seem that something has changed to make them visible by default, which is unexpected/unintended behaviour.

I should note that I'm not entirely sure what situations in which potion particles have become visible, as in whether or not they're visible from a kit applied potion effect or a player consumed item like a golden apple or a potion. However it's my understanding that all potion particles, whether from kit applied effects or player consumed items, should not be visible at any time by default.

calcastor avatar Jun 05 '21 11:06 calcastor

Explained to @calcastor in-game that this only relates to potions directly applied to the player via a kit.

The potion-particles attribute to disable potion effects is in the kit module so would not extend to potion items or effects from other sources such as golden apples. For example, giving players infinite speed in a spawn kit and preventing particles (which works).

Pugzy avatar Jul 09 '21 07:07 Pugzy

@Pugzy this is not the case. You would assume that the potion-particles attribute would only apply to items in that specific kit but this actually disables potion particles entirely for the player the kit is applied to (or at least that's what's supposed to happen).

Right now it defaults to null instead of true. See: https://github.com/PGMDev/PGM/blob/405f5f784727898bc60baab4080aa627173e7d60/core/src/main/java/tc/oc/pgm/kits/KitParser.java#L120

Map makers can disable potion effects for items specifically by using ambient="true".

AustinLMayes avatar Jul 10 '21 04:07 AustinLMayes

I've done some testing to see how it works. I don't think this bug is existent (or maybe resolved) from my testing. Using this XML example, it seems to be consistent. I will document the ambient attribute as it looks like that was missing from the documentation, and might have caused all of this confusion to start with.

<!-- potion-particles must at least be enabled for any potion effects to show -->
<kit id="the-kit" force="true" potion-particles="true">
        <!-- ambient="false" ENABLES potion particles -->
        <item slot="1" material="potion" damage="3">
            <effect duration="10s" ambient="false">jump_boost</effect>
        </item>
        <!-- ambient doesn't work -->
        <item slot="3" material="golden apple" amount="5"/>
        <!-- potion particles won't appear at spawn -->
        <effect duration="5s" ambient="true">regeneration</effect>
</kit>

potion-particles="false" will still disable other applied potion effects like splash potions, golden apples, but these cannot be adjusted with the use of ambient.

CoWinkKeyDinkInc avatar Nov 09 '22 02:11 CoWinkKeyDinkInc