A magical sceptre for Hytale that fires chain lightning at mobs — right-click a target and the bolt jumps to up to 5 nearby enemies within 8 blocks, dealing decreasing damage with every hop.
A magical sceptre for Hytale that fires chain lightning at mobs — right-click a target and the bolt jumps to up to 5 nearby enemies within 8 blocks, dealing decreasing damage with every hop.
This is first and foremost a proof of concept I built to learn the Hytale Plugin API while it's still in early access. I'm a Java dev, not a 3D / VFX artist — I don't know how to author proper custom assets (models, particle systems, SFX). Everything visual here reuses builtin Hytale assets:
Items/Weapons/Wand/Wood.blockymodelSplash systemISS_Weapons_Wand set→ The visuals are placeholder and the plugin is rough around the edges. If you're a 3D artist, VFX artist, sound designer, or Hytale plugin dev and want to make this look great — please reach out. Issues, PRs, or a quick email are all welcome.
hytale-chain-lightning-<version>.jar into your server's Plugins/ folder./item give flow (item id chain_lightning_sceptre).Interaction, EntityEffect, ParticleUtil, EffectControllerComponent).Player right-clicks mob
│
▼
ChainLightningSceptreInteraction.firstRun(Secondary)
│
├─ Cooldown gate (4s)
├─ HytalePlayerRayCaster ──> primary target ref
├─ HytaleEntitySource ──> nearby entity snapshot
│
▼
ChainResolver.resolve() (pure Java, JUnit-tested)
│ BFS over hops, max 5 targets, max 8 blocks/hop
▼
ChainHit list
│
├─ ChainDamageApplier.apply() ──> dégressive damage per hop
└─ HytaleVfxEmitter.playChainEffects()
├─ ParticleUtil.spawnParticleEffect("Splash", pos) (direct broadcast — bypasses client-side effect dedup)
└─ EffectControllerComponent.addEffect("Chain_Hit_Effect") (blue tint, 0.05s)The chain-resolver is decoupled from Hytale via small interfaces (RayCaster, EntitySource, ChainEntity), so the algorithm is unit-tested without a running server. Hytale-bound adapters live in sceptre/.
5/5 SpawnParticleSystem packets per cast every time, but the early-access Hytale renderer appears to throttle/cull duplicate systemId particles at nearby positions. Likely a client-side issue, can't fix from the plugin.Splash is functional but not electric. A proper arc/branch particle would sell the fantasy.src/main/java/com/mythlane/chainlightning/src/test/java/ (pure algorithm, no server needed)../gradlew shadowJar # fat jar
./gradlew test # unit testsGenuinely open to help. If any of these match you:
.blockymodel).Splash.Open an issue, send a PR, or email [email protected].
Made by Mythlane
License to be decided. Ping [email protected] for questions.
0 Comments