Zum Hauptinhalt springen

Vehicle Definition

Vehicle Definition

Definition of a vehicle type, including visual model, stats, fuel and combat.

Felder

FeldTypStandardBeschreibung
visualVehicleVisual—Visuel attaché au porteur du véhiculeVarianten:bettermodelbtcmobsdisplayvanilla
bettermodel (1)
FeldTypStandardBeschreibung
modelIdVar<String>—Identifiant du modèle BetterModel
btcmobs (1)
FeldTypStandardBeschreibung
mobIdString—Identifiant du mob BTCMobs
display (3)
FeldTypStandardBeschreibung
materialMaterialMINECARTItem affiché comme véhicule
scaleFloat1.0Facteur d'échelle du modèle
yOffsetDouble0.0Décalage vertical par rapport au porteur, en blocs
vanilla (1)
FeldTypStandardBeschreibung
entityTypeEntityTypePIGType d'entité affiché comme véhicule
movementVehicleMovementType?GROUNDType de déplacement : terrestre, aquatique, amphibie ou volantWerte:GROUNDWATERAMPHIBIOUSAIR
statsVehicleStats—Movement stats
VehicleStats (4)
FeldTypStandardBeschreibung
maxSpeedVar<Double>0.5Vitesse maximale tolérée, en blocs par tick. Au-delà, le serveur corrige la position
maxHealthVar<Double>100.0Points de vie du véhicule
maxShieldVar<Double>50.0Bouclier absorbé avant les points de vie
gravityVar<Double>0.08Gravité appliquée au porteur, 0 pour un véhicule qui flotte
fuelVehicleFuelSettings—Fuel configuration
VehicleFuelSettings (3)
FeldTypStandardBeschreibung
maxFuelVar<Double>100.0Capacité du réservoir
consumptionRateVar<Double>0.1Carburant consommé par seconde de conduite
allowedFuelsList<FuelItem>empty—
FuelItem (3)
FeldTypStandardBeschreibung
itemItem—Item accepté comme carburant
fuelAmountDouble20.0Carburant apporté par un plein
amountInt1Nombre d'items consommés par plein
combatVehicleCombatSettings—Combat configuration
VehicleCombatSettings (12)
FeldTypStandardBeschreibung
maxStaminaVar<Double>100.0Stamina maximale
staminaRegenRateVar<Double>5.0Stamina régénérée par seconde
attackStaminaCostVar<Double>5.0Stamina consommée par une attaque
baseAttackDamageVar<Double>4.0Dégâts d'une attaque de base
attackCooldownVar<Int>20Délai entre deux attaques (ticks)
attackRangeVar<Int>4Portée d'une attaque (blocs)
chargeBuildRateVar<Double>20.0Charge accumulée par seconde en sneak
chargeMeterMaxVar<Double>100.0Charge maximale
chargeMinimumFractionVar<Double>0.5Charge minimale requise pour déclencher (fraction du max)
chargeDamageMultiplierVar<Double>3.0Multiplicateur de dégâts d'une charge à pleine puissance
chargeRadiusVar<Double>2.0Rayon d'impact d'une charge (blocs)
collisionDamageVar<Double>0.0Dégâts infligés par collision, multipliés par la vitesse (0 = désactivé)
progressionVehicleProgression—Progression : niveaux, courbe d'XP et bonus de stats
VehicleProgression (4)
FeldTypStandardBeschreibung
maxLevelInt10Niveau maximum atteignable
baseXpDouble100.0XP requise pour passer du niveau 1 au niveau 2
xpGrowthDouble1.0Exposant de la courbe d'XP — 1.0 pour une progression linéaire
statBonusPerLevelDouble0.05Bonus de stats par niveau au-dessus de 1 — 0.05 = +5% par niveau
repairVehicleRepairSettings—Coût de réparation
VehicleRepairSettings (3)
FeldTypStandardBeschreibung
itemItem—Item consommé pour réparer
amountVar<Int>1Nombre d'items consommés par réparation
healthPerRepairVar<Double>20.0Points de vie rendus par réparation
abilitiesList<Ref<VehicleAbilityEntry>>emptyCapacités que ce véhicule peut activer

How to use it​

One definition per vehicle type. Players own instances of it; the definition's id is what the saved data refers to, so do not delete or recreate a definition that players already own.

  • movement picks the carrier and physics: GROUND (server moved, blocked in liquids), WATER, AMPHIBIOUS (boat, client simulated) and AIR (flying carrier). stats.gravity of 0 makes the carrier float.
  • visual is one of display (an item, with scale and yOffset), vanilla (an entity type, AI disabled), bettermodel (modelId, can depend on a fact or placeholder) and btcmobs (mobId). The default is a MINECART display. A player skin chosen with Set Vehicle Skin replaces the modelId of a bettermodel visual only.
  • stats.maxSpeed is a validation ceiling in blocks per tick, not an acceleration: the server moves the vehicle back when it goes faster. maxHealth and maxShield set the damage pool; shield is spent first.
  • fuel: maxFuel is the tank, consumptionRate is per second of movement, allowedFuels lists the items a refuel can consume (fuelAmount per amount items).
  • progression: with the defaults (baseXp 100, xpGrowth 1.0) level 1 needs 100 XP, level 2 needs 200, and so on; every level above 1 adds statBonusPerLevel (5%) to speed, health and shield.
  • combat: maxStamina and staminaRegenRate feed the attack and abilities; collisionDamage multiplies the vehicle speed to damage living entities it hits, 0 disables it.
  • repair is the item and amount consumed by Repair Vehicle, and the health restored.
  • abilities lists the Vehicle Ability entries this vehicle can use.

Fields typed as variables can read a fact or placeholder of the driver.