Commit Graph

2993 Commits

Author SHA1 Message Date
Aaron Kimbrell
aae65d971d doc: README: time based turn round
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:54:07 -06:00
Aaron Kimbrell
87e3e9b38d fix(platforms): a time based mover turned round restarts the stretch's clock, as the client
Turned round between two waypoints, the client's platform calls ProcessStateChange for the waypoint it was heading
to, which zeroes the time travelled: it then takes the whole stretch's time at the whole stretch's speed from where it
is, going past the waypoint by as far as it had come. DLU kept the time already travelled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:53:40 -06:00
Aaron Kimbrell
c55519cf2f doc: README: Fire Temple boss activators, rock timers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:38:53 -06:00
Aaron Kimbrell
3c0858578f fix(njhub): Fire Temple rocks restart their timers as the Lua's AddTimerWithCancel
L_FIRE_TRANS_ROCKS and L_FIRE_TRANS_ROCKS_MANAGER use AddTimerWithCancel: a timer started again replaces the running
one instead of running twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:38:38 -06:00
Aaron Kimbrell
641685f04a feat(scripts): L_FIRETEMPLE_BOSS_ACTIVATORS_SERVER
The boss room's rail activators: used once built, they work as rail activators and tell the boss manager (group
BossManager) their spawner node (ActivatorUsed, param1 = spawner_node_id).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:37:41 -06:00
Aaron Kimbrell
08112d3125 doc: README: Fire Temple boss fight
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:26:14 -06:00
Aaron Kimbrell
6136922ff4 feat(scripts): L_BOSS_MANAGER_SERVER
The Fire Temple boss fight: intro celebration and camera, the centre portal and the tornado, four elemental phases
whose portal moves between its spawner's nodes and is hit by riders of the element's rail, the middle celebration,
Garmadon stunned and a wave of spinner enemies each fifth of his health, then the end bouncer. The client's
CelebrationCompleted carries no celebration id, so the manager branches on the celebration it started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:19:49 -06:00
Aaron Kimbrell
ff782b9641 feat(scripts): scripts can listen for the riders of a rail activator
A rail activator whose rail_path is the arrival's path tells the scripts subscribed to it
("PlayerRailArrivedNotification", the Lua's notification request) that a rider reached a waypoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:16:41 -06:00
Aaron Kimbrell
501ab8b58b doc: README: spawner node calls, CelebrationCompleted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:01:41 -06:00
Aaron Kimbrell
8e90b9a65d feat(messages): CelebrationCompleted, and scripts can listen for a player's celebration ending
The client sends CelebrationCompleted with no payload when a celebration ends; scripts subscribed to the player
("CelebrationCompleted", the Lua's notification request) hear it. As the message carries no celebration id, a script
that needs it remembers which one it started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:01:20 -06:00
Aaron Kimbrell
9a1e74426a feat(spawner): spawn at a node by index, and the node index of a spawned object
For the Lua's SpawnerSpawnNewAtIndex and the spawnNode of SpawnedObjectLoaded (the Fire Temple boss manager moves its
portal between the nodes of its spawner).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:01:20 -06:00
Aaron Kimbrell
0af990d0c3 doc: README: Fire Temple waves room
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:40:46 -06:00
Aaron Kimbrell
046cb9902d feat(scripts): L_WAVES_MANAGER_SERVER, and scripts can listen to another object's FireEvents
Entity::Subscribe takes "FireEvent" (the Lua's notification request on FireEvent): the subscriber's script hears
every FireEvent the object is sent (NotifyFireEvent). The Fire Temple waves manager uses it to hear its spinners being
sent SpawnedEnemiesDead, which the spinners send to their own group once their enemies are dead (level config
name_deactivated_event / group_deactivated_event). LEVEL:GetCinematicInfo is the camera path's time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:40:23 -06:00
Aaron Kimbrell
932b01b683 doc: README: Garmadon tornado
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:29:33 -06:00
Aaron Kimbrell
0393034a02 feat(scripts): L_BOSS_GARMADON_TORNADO
The Fire Temple boss's tornado: a moving platform on a random BossTornadoPath_ path, a new one at each path's end;
it smashes the faction 130 quick builds it touches, casts skill 1741 on players it touches and drops bombs (LOT 16891)
on a random player in the boss game space, sooner for the later elements. Its proximity is a 24 x 30 x 24 box for the
Lua's cylinder (12 round, 30 high).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:29:28 -06:00
Aaron Kimbrell
c07e23f7bb doc: README: vendor buy costs, spawn on smash by network name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:21:40 -06:00
Aaron Kimbrell
87873a7b11 fix(spawner): spawn on smash for a network named by spawner name
A spawner with spawnsGroupOnSmash and spawnNetNameForSpawnGroupOnSmash
naming a zone spawner network only logged when an object of that
network died, so quick builds behind crates (Fire Temple rooms and
waves, Aura Mar bouncers) never appeared. A spawner with no_auto_spawn
now spawns when an object of the named network dies, as the group
paths already did. A spawner without no_auto_spawn is not linked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:18:07 -06:00
Aaron Kimbrell
fb1edd52f3 fix(vendor): check every buy cost before taking any
A purchase removed its crafting items before it checked coins and the
alternate currency, so a player short on either lost the items and
still got PURCHASE_FAIL. Coins, the alternate currency and every
crafting item (summed per LOT) are now checked first, and only taken
when all are there. A failure still sends only PURCHASE_FAIL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:17:28 -06:00
Aaron Kimbrell
e209894e79 doc: README: Fire Temple chests, zone script, event counter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:54:56 -06:00
Aaron Kimbrell
a83eb3c1ba feat(scripts): L_EVENT_COUNTER_UTIL
A counter worked by the events its config names, firing its max and min events at their groups (three Fire Temple
objects use it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:47:54 -06:00
Aaron Kimbrell
a30f3bf904 feat(scripts): L_ZONE_FIRE_TEMPLE_SERVER
Each player gets the activity close button; it asks to confirm leaving, and yes takes the button away and sends the
player to their last zone that is not an instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:45:47 -06:00
Aaron Kimbrell
4f18578c1f feat(scripts): L_ELEMENTAL_CHESTS_SERVER
The Fire Temple chests drop their loot matrix and coins from currency table 132 at level 1 for the player, and set
the flag their precondition targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:44:44 -06:00
Aaron Kimbrell
299003d962 doc: README: Fire Temple kill counter, spinner volumes, door indicators
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:37:34 -06:00
Aaron Kimbrell
ecd67f9d35 feat(scripts): L_DOOR_INDICATOR_SERVER
Either named event lights the Fire Temple door indicator's flame (FlameOn), as the Lua does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:32:10 -06:00
Aaron Kimbrell
6ad3168659 feat(scripts): L_KILL_COUNTER_UTIL and the Fire Temple spinner volumes
The kill counter counts its spawn networks' deaths (or the events its config names) to max and back to min and fires
the limit events at their groups. L_BSPINNERS_VOL and L_DSPINNERS_VOL extend it: at max each player in the volume sees
the room's cinematic and 2 s later the rail quick build's network is activated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:32:10 -06:00
Aaron Kimbrell
1e69647eca doc: README: platforms round 8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:20:39 -06:00
Aaron Kimbrell
5a0b88a0a2 test(platforms): Fire Temple millstones turn as the client turns them
MillstoneC keeps turning one way through full laps; MillstoneB takes the short way back (178 degrees), as the
client's shortest-arc angular velocity does. Real waypoints from firetemple.luz.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:20:05 -06:00
Aaron Kimbrell
73f18fc5bf fix(platforms): rotate_while_idle chooses the subcomponent when all types are set false
As the client: a rotater when true, else a mover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:14:40 -06:00
Aaron Kimbrell
908d1954bd fix(njhub): falling tiles play their sounds as live did
Shaking once stepped on, landing at waypoint 1 (the shaking stops), rising when sent back, stopped at waypoint 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:14:40 -06:00
Aaron Kimbrell
ab589ef276 feat(messages): StopNDAudioEmitter
Server to client, as live sent it: fading out, no emitter id, the event GUID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:07:45 -06:00
Aaron Kimbrell
4db019de91 doc: README: waypoint actions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 05:17:35 -06:00
Aaron Kimbrell
f5a4dfab9a test(movement): movement AI and pathfinding serialize nothing
The client's movement AI and pathfinding control components read no
replica data; NPC movement reaches it through the physics component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 05:17:19 -06:00
Aaron Kimbrell
cc7a1b3640 feat(ai): shared Lua AI runs its waypoint actions
Objects on the Lua AI (unless Set.SuspendLuaMovementAI) get the
waypoint's actions in Arrived, in order with empty values nil, run them
in the WayPointEvent state and send ContinueWaypoints themselves; the
movement AI only waits for it. The actions the Lua hands on run through
the movement AI's handlers. isLastPoint is the path's last waypoint on
every path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 05:15:04 -06:00
Aaron Kimbrell
2473d3dccd feat(movement): waypoint actions run like the client's movement AI
A waypoint with any actions holds the object there until ContinueWaypoints;
one without never does. The actions run in order until one pauses (bounce,
stop, delay, emote, femote or an unknown name), the wait counts down, the
rest run, and then ContinueWaypoints sends it on (not at the end of a once
path). Any new GoTo, Stop or path ends the wait, so a later
ContinueWaypoints does nothing.

Handlers added or brought in line: bounce (two waypoints on, arc there,
5 s), stop (StopMoving), groupemote, emote/femote (wait for the animation,
PlayEmote of the number), teleport, pathspeed (below 0 is 0, 0 stands it),
removeNPC (KillOBJS proximity, 1 s), DeleteSelf/removeself (1 s), killself
(silent), spawnOBJ (pathset/SpawnedVar, then silent death), playSound.
Names match exactly, values are read like _wtoi/_wtof, lists split on ,;:

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 05:15:04 -06:00
Aaron Kimbrell
7256db7efa doc: README: shared Lua AI waypoints, Follow and custom state
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:54:19 -06:00
Aaron Kimbrell
09d686e98d feat(ai): shared Lua AI keeps facing its FaceTarget
FaceTarget with keepFacingTarget turned once. The binding now keeps
turning to the target each frame while it is more than 5 degrees off,
until the next GoTo, FollowTarget or StopPathing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:54:10 -06:00
Aaron Kimbrell
c96d645b94 feat(ai): shared Lua AI custom state
Port o_Main's customState: a script that defines
onTemplateCustomStateEnter or onTemplateCustomStateArrived gets the
state, and its enter and arrived hooks run as LuaAIScript virtuals.
Pets and helpers stay unported: no original script turns them on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:50:19 -06:00
Aaron Kimbrell
9df7deb468 feat(ai): shared Lua AI Follow state and name override
Port o_Movement's Follow state (Set.FollowActive): the Followers
proximity, the faction 7 line and its PointInLine / Imfollowing vars,
the flip emote and the follow at radius 3, speed 3. loadOnce now applies
Set.OverRideName; the binding only logs SetName, which DLU does not send
yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:46:28 -06:00
Aaron Kimbrell
06e9778076 feat(ai): shared Lua AI waypoint paths and template timers
Port o_WayPointEvents and the waypoint parts of o_mis, o_StateCreate and
o_onEvent: Set.WayPointSet / attached_path / groupID, the WayPointEvent
state and its actions, SavedWP and the last point detaching the path, the
startpath fire event and SetStoreTimmer / CancelTemplateTimers. The
binding reports MovementAIComponent waypoints as arrivals without
actions, since the movement AI already runs the waypoint commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:42:38 -06:00
Aaron Kimbrell
81795a0420 doc: README: shared Lua AI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:51:03 -06:00
Aaron Kimbrell
154f53004f test(ai): shared Lua AI transitions, radii, tether and wander timing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:50:50 -06:00
Aaron Kimbrell
cf940f13f9 feat(scripts): Medusa and snake parts run the shared Lua AI
The Medusa (LOT 6602) wanders 25 round its spawn, aggroes within 15,
chases to 8 at double speed, casts its skill every cooldown and tethers
home at 50; the parts are Passive guards. Their Set tables replace the
values put on the combat and movement AI before, which they have no rows
for. The parts' onTimerDone and onDie replace the shared ones as in the
original.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:50:50 -06:00
Aaron Kimbrell
8a7768ae37 feat(ai): LuaAIScript runs the shared Lua AI on an entity
A script base whose original requires the shared Lua AI: StartLuaAI from
OnStartup with the Set table; proximity, hits, timers, deaths and
notifications go to the machine, arrivals come from the movement AI
finishing a GoTo or follow, and the tether is checked every frame. Moves,
skills, immunity and health go through the movement AI, skill and
destroyable components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:50:36 -06:00
Aaron Kimbrell
5334953fe6 feat(ai): shared Lua AI state machine ported from the original scripts
The State/o_StateCreate/o_Main/o_mis/o_onEvent/o_Movement AI that the
original server scripts run with loadOnce, getVarables, CreateStates and
oStart: Idle, Meander, aggro, tether, GoHome, combat, AiDisable, AiEnable
and Dead, fed by the scripts' Set table and driven through a Host
interface so it runs without an entity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:50:36 -06:00
Aaron Kimbrell
549e8821dd doc: README: Medusa port
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:23:08 -06:00
Aaron Kimbrell
34cdb67439 test(scripts): Medusa notify chain, part spawns, follow and AI settings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:22:51 -06:00
Aaron Kimbrell
a75623b41d feat(scripts): Medusa and its five snake parts ported from the original
L_WILD_MEDUSA.lua (LOT 6602) loads the snake parts 6564-6568 at +-5
around it; each part (L_WILD_snake_01..05.lua) joins the group, follows
the part before it (radius 4.5, speed 1, keepFollowing) and on its
death tells the group, turning the next part to faction 4 with its
effect. Part 5 starts hostile and glows red; the chain ends with the
Medusa. The Set tables are put on the combat and movement AI the way
the Lua AI uses them. OverrideFriction is a client-side message only,
so it is a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:22:51 -06:00
Aaron Kimbrell
cdd5b6b94f feat(ai): FollowTarget with radius, speed and keepFollowing; AI value setters
MovementAIComponent::FollowTarget(target, radius, speed, keepFollowing)
halts within the radius and walks after the target again once it is
out of it; without keepFollowing the follow ends on arrival. The old
overload is FollowTarget(target, 0, 1, true) and behaves as before.

Setters for the wander settings (radius, speed, chance, delay range)
and the combat ones (hard tether radius, attack radius, pursuit speed)
that the Lua AI's Set table overrides.

BaseCombatAIComponent's proximity entities start as null, so one
whose constructor returns before making them no longer frees garbage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:22:51 -06:00
Aaron Kimbrell
2be8488f2b doc: README: shooting gallery re-port
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:54:52 -06:00
Aaron Kimbrell
9914deb9ce test(scripts): shooting gallery scoring, streaks, waves and timers
Streak bonus and marks, the reward model percent, wave scores and the
summary string, the original's random path quirks, spawn times, GF's
data, activity timer names with '_' and restarts, the wave timers
(EndWave<n> to SpawnWave<n + 1>, the last wave to GameOver), misses and
super charged shots, and the super charge pausing between waves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:54:26 -06:00