Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Feature flags

bevy_mettle

FeatureDefaultEnables
attributeYesAttributes: bevy_mettle_attribute as bevy_mettle::attribute. Adds AttributePlugin to MettlePlugins.
effectYesEffects: bevy_mettle_effect as bevy_mettle::effect. Adds EffectPlugin to MettlePlugins. Turns on attribute.
abilityYesAbilities: bevy_mettle_ability as bevy_mettle::ability. Adds AbilityPlugin to MettlePlugins. Turns on effect.
lightyearNoPrediction over lightyear: bevy_mettle_lightyear as bevy_mettle::lightyear. Adds MettleNetPlugin to MettlePlugins, which then goes after lightyear’s plugins. Turns on ability.

bevy_mettle_core is always there, as bevy_mettle::core: gameplay tags, curves and conditions, and the Mettle schedule. MettleCorePlugin and MettleContentPlugin are always in MettlePlugins, and MettleContent holds what the enabled parts define: tags and curves always, effects with effect, abilities and grants with ability.

The prelude brings in every enabled part’s prelude, with MettlePlugins, MettleContent, ContentLoaded and ContentRejected. Core’s brings the schedule: Mettle, MettleSet, MettleSystems and MettleCorePlugin. That’s the derives and the app traits (AttributeApp, TagApp, EffectApp, BehaviourApp, AbilityApp); the specs (EffectSpec, AbilitySpec); every registry and its numbers (TagRegistry and TagId, CurveRegistry and CurveId, AttributeRegistry, EffectRegistry and EffectId, AbilityRegistry and AbilityId, and the rest); the data types with their AnyEffect and AnyAbility names; and the replicas, ModifiersReplica among them. AnyCurve, AnyAttribute, AnyBehaviour, AnyExecution, AnyCalculation and AnyRoute are in their crates’ modules, for code that writes those ids out.

The parts

The parts’ crates have no features of their own. Each depends on the parts before it: bevy_mettle_effect on bevy_mettle_attribute, bevy_mettle_ability on both, and bevy_mettle_lightyear on all three.