========================================================================
 Jedi Knight Level

 P51.GOB

 A lightsaber duel against Yun, the Dark Jedi, in a vaulted stone
 sanctum. He stands lit and waiting on the duel floor; the moment you
 step onto it he comes for you. Five hundred points of health, a yellow
 blade, a Jedi's jump and a circling guard -- and a green blade of your
 own from the first frame. This is a saber fight and nothing else: he
 throws no force powers.

 [cogfactory / p51-yun-duel]

 BUILD 1  --  2026-09-05
 sha256 014ec5ae5ff0d69ee89329d601a384b5

 This level is not made or distributed by LucasArts
 Entertainment Co.
========================================================================

THIS PACKAGE
------------------------------------------------------------------------
  P51.GOB          the level
  readme.txt       this file
  screenshot.jpg   what it looks like

INSTALLATION
------------------------------------------------------------------------
Drop P51.GOB into the `episode` folder of a Jedi Knight install (the one
that already has JK1.GOB in it) and pick it from the episode list.
Nothing else needs to change: the GOB carries its own level, cogs,
materials and sounds, and reads the stock resource/ for everything else.

On a libretro frontend, point the core at the GOB itself. It needs a
folder beside it holding `resource/` from a real install -- that is
where the retail data lives and none of it is in here.

CONTROLS
------------------------------------------------------------------------
  PLAY IT: New Game, and pick COG Factory p51 Yun Duel.
  You start with fists and a LIGHTSABER already drawn. Fire swings it.
  Walk east out of the antechamber and through the passage.
  THE DUEL STARTS WHEN YOU STEP ONTO THE DUEL FLOOR, and not before --
    Yun holds his ground until then, and he will not follow you back out.
  Two health packs in the north alcove, two shield rechargers in the south,
    a bacta tank and a health pack in the east. Retreat into one and he waits.
  KILL YUN to finish the mission.

NOTES
------------------------------------------------------------------------
  A DARK JEDI IS ONE BIT AND FIVE THINGS THAT ALL FAIL THE SAME WAY.
  typeflags 0x200 is SITH_AF_BOSS; the engine walks every thing at
  load and gives a jkPlayerInfo slot -- the thing that HOLDS a
  lightsaber polyline -- only to an actor carrying it. Miss it and the
  level either crashes at startup or, worse, boots perfectly and gives
  you an enemy who follows you around and does nothing. So do a
  missing puppet, a missing AI class, a pool that ran out and a cog
  that never ran. Every one looks identical from outside.

  THE COG CANNOT SWITCH THE BLADE ON. A script may hand a boss the two
  blade materials, the radii and the length, and set the SABERON flag
  -- but jkEnableSaber checks that its target is a PLAYER and silently
  ignores an actor. Only the AI can arm a boss blade, once per swing,
  and the animation's own markers turn the damage on and off inside
  the stroke. The saber has nothing to do with the `weapon=` field,
  which for Yun is a melee axe the AI never fires.

  HE HOLDS THE FLOOR. Yun's AI is disabled at level start and released
  when you cross into the arena, then disabled again if you leave it.
  That is boss-arena convention -- he does not chase you into the
  corridor -- and it is also what makes the level testable, because an
  enemy with a Follow instinct and seven units of sight otherwise ends
  up standing in whichever doorway a probe is walking through.

  THE ROOM IS TALLER THAN THE LIGHT. The duel hall is 2.10 units from
  floor to vault, against 1.40 in the original game's Yun room and
  0.90 in this campaign's tallest previous ceiling. The usual rig
  hangs one lamp under the ceiling with a range of 1.70, and 1.70 is
  less than 2.10 -- so the floor receives nothing at all and the room
  bakes flat, with no warning. It takes two tiers: a working tier at
  knee height for the duel and a vault tier that keeps the ceiling
  from reading as a hole.

  A 2.00-UNIT FLOOR RUNS OUT OF VERTICES BEFORE ITS WALLS DO. Every
  vertical cut on a wall runs the wall's full height, and the editor
  propagates the two new points into the floor and the ceiling that
  share the edge. Four doorways plus four trim bands is twenty of the
  twenty-four an engine surface may have; four carved portal panels on
  the arena walls would have been twenty-eight, and the editor said
  so. The portals moved to the four dead-end walls, which carry no
  openings.

WHAT IS IN THE GOB
------------------------------------------------------------------------
        92  episode.jk
     69192  jkl\p51yun.jkl
      2286  jkl\p51yun.manifest.json
      2478  cog\p51done.cog
      5046  cog\p51duel.cog
     32908  mat\p51ceil.mat
     32908  mat\p51dais.mat
     32908  mat\p51flor.mat
     32908  mat\p51gate.mat
     32908  mat\p51trim.mat
     32908  mat\p51wall.mat

    276542  bytes in 11 entries

CREDITS
------------------------------------------------------------------------
  Generated by tools/cogfactory in the openjkdf2_libretro tree.
  Geometry authored through SED (github.com/smlu/SED) over the
  cogfactory bridge.
  LucasArts did not make this. Jedi Knight is theirs; this is a fan-
  made level.

  The readme format is styled after SM Sith Lord's cog headers,
  because his are the ones everybody read.

========================================================================
