Docs » API reference » Species

Species

A kind of Voxelmon: its essences, its moves, where it lives and what it evolves into. Covers the game's species and any a content pack adds.

A handle to something in the game. Once that thing is gone, its calls fail with Gone. You get one from Species.named(...), Species.all(), creature.species.

Methods

MethodDescription
fn id(&self) -> Result<i64>long id()Its lasting number (a content pack's species: its number while the server runs; keep it by name or key).
fn name(&self) -> Result<String>String name()Its name, such as LUNAPUP.
fn essence(&self) -> Result<Essence>Essence essence()Its first essence.
fn second_essence(&self) -> Result<Option<Essence>>Optional<Essence> secondEssence()Its second essence, if it has one.
fn rarity(&self) -> Result<Rarity>Rarity rarity()How often it appears in the wild.
fn temperament(&self) -> Result<Temperament>Temperament temperament()How it treats players.
fn habitats(&self) -> Result<Vec<Habitat>>List<Habitat> habitats()Where it lives.
fn locomotion(&self) -> Result<Locomotion>Locomotion locomotion()Walks, swims or both.
fn evolutions(&self) -> Result<Vec<Evolution>>List<Evolution> evolutions()What it becomes.
fn base_stats(&self) -> Result<Stats>Stats baseStats()Its stats before levels.
fn learns(&self) -> Result<Vec<LearnedMove>>List<LearnedMove> learns()The moves it learns, and at which levels.
fn named(name: &str) -> Result<Option<Species>>static Optional<Species> named(String name)A species by name (any case), or a content pack's by its key (pack:name).
fn by_id(id: i64) -> Result<Option<Species>>static Optional<Species> byId(long id)A species by number.
fn all() -> Result<Vec<Species>>static List<Species> all()Every species: the game's own, then the content packs'.

Move

A battle move: the game's own or a content pack's (moves/*.toml).

A handle to something in the game. Once that thing is gone, its calls fail with Gone.

MethodDescription
fn id(&self) -> Result<i64>long id()Its lasting number (a content pack's move: its number while the server runs).
fn name(&self) -> Result<String>String name()Its name.
fn essence(&self) -> Result<Option<Essence>>Optional<Essence> essence()Its essence, or none for a plain move.
fn power(&self) -> Result<i64>long power()How hard it hits (0 for a move that does not).
fn accuracy(&self) -> Result<i64>long accuracy()Its chance to land, in percent.
fn named(name: &str) -> Result<Option<Move>>static Optional<Move> named(String name)A move by name (any case), or a content pack's by its key (pack:name).

Evolution

What a species becomes.

Plain data, copied between the server and the plugin.

FieldDescription
into: SpeciesSpecies into()The species it becomes.
level: i64long level()The level it may evolve at.

LearnedMove

A move a species learns.

Plain data, copied between the server and the plugin.

FieldDescription
r#move: MoveMove move()The move.
level: i64long level()The level it is learned at.

Essence

One of the twelve essences: each strong against two and weak against two.

One of a fixed set of values.

ValueMeaning
Essence::AirEssence.AIRAir.
Essence::WaterEssence.WATERWater.
Essence::FireEssence.FIREFire.
Essence::EarthEssence.EARTHEarth.
Essence::DragonEssence.DRAGONDragon.
Essence::FrostEssence.FROSTFrost.
Essence::InsectEssence.INSECTInsect.
Essence::LightningEssence.LIGHTNINGLightning.
Essence::MetalEssence.METALMetal.
Essence::ShadowEssence.SHADOWShadow.
Essence::PlantEssence.PLANTPlant.
Essence::PoisonEssence.POISONPoison.

Rarity

How often a species appears.

One of a fixed set of values.

ValueMeaning
Rarity::CommonRarity.COMMONCommon.
Rarity::UncommonRarity.UNCOMMONUncommon.
Rarity::RareRarity.RARERare.

Temperament

How a species treats players.

One of a fixed set of values.

ValueMeaning
Temperament::FriendlyTemperament.FRIENDLYNever attacks.
Temperament::NeutralTemperament.NEUTRALAttacks when riled.
Temperament::AggressiveTemperament.AGGRESSIVEHunts players.

Locomotion

How a species moves.

One of a fixed set of values.

ValueMeaning
Locomotion::WalkLocomotion.WALKOn land.
Locomotion::SwimLocomotion.SWIMOnly in water.
Locomotion::AmphibiousLocomotion.AMPHIBIOUSOn land and in water.

Habitat

Where a species lives.

One of a fixed set of values.

ValueMeaning
Habitat::GrassHabitat.GRASSGrassland.
Habitat::SavannaHabitat.SAVANNASavanna.
Habitat::MudHabitat.MUDSwamp and mud.
Habitat::SandHabitat.SANDDesert.
Habitat::SnowHabitat.SNOWSnow.
Habitat::AutumnHabitat.AUTUMNAutumn woods.
Habitat::TaigaHabitat.TAIGATaiga.
Habitat::JungleHabitat.JUNGLEJungle.
Habitat::CoastHabitat.COASTBeaches.
Habitat::RockHabitat.ROCKPeaks and rock.
Habitat::FungalHabitat.FUNGALFungal isles.
Habitat::VolcanicHabitat.VOLCANICVolcanic land.
Habitat::MoorHabitat.MOORMoor.
Habitat::CaveHabitat.CAVECaves.
Habitat::LushCaveHabitat.LUSH_CAVEVerdant caves.
Habitat::FloodedCaveHabitat.FLOODED_CAVEFlooded caves.
Habitat::VolcanicCaveHabitat.VOLCANIC_CAVEVolcanic caves.
Habitat::IceCaveHabitat.ICE_CAVEIce caves.
Habitat::CrystalCaveHabitat.CRYSTAL_CAVECrystal caves.
Habitat::DungeonHabitat.DUNGEONDungeons.
Habitat::ShallowsHabitat.SHALLOWSShallow sea.
Habitat::ReefHabitat.REEFReefs.
Habitat::OpenSeaHabitat.OPEN_SEAOpen sea.
Habitat::LakeHabitat.LAKELakes.