Skip to Content
JFG-StudioThe example world

The example world: Zephyra

Zephyra is Studio’s example project and the best template to learn from. It’s a galaxy of its own, the Zephyra Expanse, with three planets, five new levels and an edit of a stock level. It uses nearly every feature: squads that lock doors, a key door, a reskinned enemy, talkers, a finale, custom music, weapon tuning and planets that appear one after another. All of its geometry, textures and music are drawn and synthesized by a script, so it contains no game data.

Open it

The project is in Studio’s repo at samples/zephyra.jfgproj. Open it with File › Open project…, or:

jfgstudio gui samples\zephyra.jfgproj

To play it straight away (from the Studio folder):

studio.bat test samples\zephyra.jfgproj --level forest_portal

That starts the game in Goldwood’s first level with only this pack loaded; the portal is just ahead. Use --level landing, caverns or arena to start in the world’s own levels, and --start-point 1 for the far end of a level.

To make your own pack from it, copy the whole folder, change id and name in project.json (your own mod id), and start changing levels. The generator script samples/make_example_world.py rewrites the sample from scratch, so edit your copy, not the sample.

What’s in the project

FolderIn Zephyra
geometry/landing.glb, caverns.glb, arena.glb, glacia.glb, nimbus.glb: the five levels’ models
levels/Six levels: the five above, and forest_portal, an edit of Goldwood’s stock Forest First
kinds/fire_ant: a BlueAnt with fiery textures
galaxies/expanse: the Zephyra Expanse, home planet Zephyra
planets/zephyra, glacia, nimbus
music/Three OGG tracks
triggers.jsonTwelve triggers: intros, a talker, a finale, the planet completions
weapons.jsonWeapon 0 (the starting gun) fires faster with faster bolts
scripts/zephyra.lua, a hand-written script that logs how long you take

The route

Forest First (stock, edited)

The pack adds an exit to Goldwood’s first level without replacing it: a portal with a blue glow, a light just ahead of the new-game start point. In Studio it’s the level forest_portal, made with Edit a stock level… (its own objects show in a dim blue and can’t be selected). See Change a stock level.

Zephyra Landing

Zephyra Landing from above: a walled green field, a river, ramps and the north gate
Zephyra Landing. The BlueAnt squad is selected; its door is the north gate.
  • A river with a stone bridge, and crystal outcrops for cover.
  • East: a ramp up to a plateau with a chest (the machine gun) and a scout’s note: a talker that tells its story a line at a time (a talk trigger with a lines action).
  • West: a long ramp up to a ledge with the yellow key, needed in the next level.
  • North: a BlueAnt squad holds the gate. The gate opens when all three are dead.
  • A small glow by the pad is the portal home to Goldwood.
The yellow key selected on its ledge; the Inspector shows Coloured key with size 64
The yellow key on the west ledge. Its door in Ember Caverns has keyLock 2: yellow key.

Ember Caverns

Ember Caverns: an orange lava lake with a stone causeway and plaza
Ember Caverns: a lava lake (it burns), a causeway and a plaza.
  • A Fire Ant squad on the plaza: the pack’s own enemy kind (below), and a ZombieAnt squad on the far shore.
  • A chasm with a deadly drop (a kill floor) and a narrow bridge.
  • The north door needs the yellow key. Crates for cover, orange lights, the lava slowly flowing (a texture scroll).

Sky Arena

  • A floating arena over a deadly drop. A stone screen hides the entry, with cover walls and four pillars.
  • A BigShieldAnt squad and a Cyborg squad both lock the final gate. When it opens, a door opens trigger shows a message, changes the music, and spawns full health next to you.
  • Behind the gate, the victory exit completes Zephyra and leads on to Glacia.

Glacia and Nimbus

Glacia: a snow field with a frozen lake, ice pillars and walls
Glacia: snow around a frozen lake, ice pillars, an ant squad on the lake and Cyborgs in the north.
Nimbus: three round islands over a red kill floor joined by bridges
Nimbus: three islands over a deadly drop. Reaching the last one completes it.

Every level has a way back: start point 1 is at the far end, by the exit that leads back.

How the pieces are built

The galaxy and its hidden planets

The three planets are on the pack’s own galaxy, the Zephyra Expanse. On the planet map the player switches to it with R and back with L.

PlanetOpensEntry level
Zephyra (home)discovered: once its level was entered (through the portal)Zephyra Landing
Glaciaonce Zephyra was completedGlacia
Nimbusonce Glacia was completedNimbus

Each planet’s levels are its region (the levels’ Planet), so the Sky Arena’s victory exit, Glacia’s pad and Nimbus’s way home show the game’s stats screen before the next planet, and each planet greets the hero with its name. Zephyra’s three levels share one region: moving between them shows nothing.

A world counts as completed when a trigger’s complete planet action runs: Zephyra’s is the victory trigger at the arena’s exit, Glacia’s the pad on the rise. See A galaxy of your own.

The Level Graph: each level with its exits and where they lead, then the planets' entry levels
The Level Graph lists every exit and where it leads, then each planet's entry level.

The Fire Ant

The Kinds window for Fire Ant: base BlueAnt, size 1.00, ten replaced texture slots
The Fire Ant kind: the BlueAnt's model and behaviour with ten new textures.

A kind is a stock enemy with your textures at your size. The pack carries only the ten PNGs; the port builds the model and definition from each player’s own game. The caverns’ squadron spawns Fire Ants because its kindFields name the kind. See A new enemy look.

Triggers and the finale

The Triggers window: the portal trigger and the landing intro
Each level greets you with a message; the scout's note, the fire ants' warning and the finale are triggers too.
TriggerWhenThen
the portallevel start, Forest Firstmessage
landing intro (and one per level)level startmessage
scout’s notetalk, by the chest, every timelines (one per visit)
fire antsenter an area in the cavernsmessage
both squads downdoor opens (the arena’s gate)message, music, spawn full health by the hero
victoryenter the exit areamessage, complete planet Zephyra, fade the fog
glacia complete, nimbus completeenter the finish areascomplete planet

Thin air: the weapon tweak

The Weapons window: Weapon 0 marked changed, other weapons collapsed
Weapon 0, the starting gun, fires faster (delay 8) with faster bolts (speed 140).

A script of its own

scripts/zephyra.lua sits beside the triggers: it logs each level and how long you take to reach the arena’s finale. Open it in the Scripts window.

The Scripts window with zephyra.lua and the port's API reference below it
The Scripts window: one tab per .lua file, with the API listed below.
Last updated on