Battleship

Battleship hexcode glyph
Screenshot_20260706_001533.png

Screenshot_20260706_001533.png

Screenshot_20260706_001556.png

Screenshot_20260706_001556.png

Description

Battleship

video demonstration

Battleship is a mod that adds a Hexcode spell for dropping large prefab structures into the world. Its namesake spell summons a full battleship, but the underlying interaction is generic and can paste any prefab you point it at.

The project is primarily experimental and technical, built to explore Hexcode's glyph system, the interaction pipeline, and Hytale's prefab pasting APIs.


Implemented Features

🚢 Battleship Glyph

Hexcode spell glyph

The Battleship glyph is a Hexcode spell that drops a full battleship into the world wherever the spell lands.

Under the hood the glyph uses the Hexcode Interaction handler, which runs a custom HexSpawnPrefab interaction. That interaction resolves the prefab named in its config, works out where to place it, and pastes it into the world oriented to the direction the caster is facing.

Shape structure

  • Square as the base of the ship
  • Square as small atop the first
  • Square small next to the second
  • Line horizontal line extending as a gun from the small square

How to cast it

  1. Enter casting mode and draw the shape structure above to form the Battleship glyph.
  2. Give the glyph a target. The glyph has a target input slot, and the prefab spawns at whatever position that slot receives. The simplest setup is to place a Projectile glyph in front of the Battleship glyph and connect it through the Next slot, so the ship spawns wherever the projectile lands. Any glyph that produces a position works the same way.
  3. Cast the hex. When the target position comes through, the battleship is pasted at that location, rotated to your cardinal facing (north, south, east, or west depending on which way you are looking).

Config

The interaction is driven entirely from the glyph's config, so the same handler can spawn any prefab you point it at:

  • PrefabPath: the prefab to spawn. It accepts either the bare name (Battleship) or the full file name (Battleship.prefab.json). It is validated at load time, so a typo or a missing prefab is reported when the pack loads instead of silently failing on cast.
  • Force: when true the blocks are written directly and overwrite whatever is already there, which is what you want for a structure this large. When false it respects normal placement rules.
  • Offset: an optional block offset applied in the direction you are facing before the ship is placed, handy for nudging the anchor up or forward.

The volatility is intentionally cheap (a small instant cost and no drain) and it uses no mana, so during testing you can spawn it freely.

(GIF will come later)

The Battleship Team

profile avatar
  • 11
    Followers
  • 8
    Projects
  • 11.8K
    Downloads
Donate

More from ItsRiprodView all