As the client picks its script component's script: a non-empty
custom_script_server in the level config always replaces the
ScriptComponent row's script_name, not only a missing one or
scripts\empty.lua. An empty or missing custom script keeps the row's.
An object whose custom script has no C++ port now runs no script even
when its row script was ported; that is logged once per LOT at debug
level ("custom server script ... (not ported) replaces its row script").
No level object or spawner in the shipped zones has both a row script
and a different custom server script, so nothing there changes.
CppScripts::IsPorted: a name in the loader map or the excluded list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cannon gives its targets scripts/ai/ACT/SG_TARGET.lua as their
custom_script_server, but their own script row is the empty script, which
won. A custom server script now replaces the empty script too, and the
target script is ported:
- explode factor 2.5 at startup;
- its score is its spawn data's (the cannon scores a hit with it);
- at the last waypoint of its path it tells the cannon (FinishedPath, the
cannon spawns the next one, as after a hit) and, when its spawn data
says so, dies silently 1 s later (2 s on a moving platform), which is
no hit;
- at the other waypoints it may change speed (spawn data chance, whole
numbers between its least and most speed; only an object following
waypoints takes it).
The cannon's own end-of-path handling is gone; it now answers the
target's FinishedPath. The waypoint PlayAim action is not ported: no
path in the game has one. The spawn data has no time score.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 4a054406. The client's level editor builds a zone's objects
itself from its own files, so a world server that constructs none of them has no use.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
With -editmode 1 the world loads the zone file, terrain scene map, navmesh and
level revisions, but makes no level objects, carver blockers, spawners, spawner
networks, triggers, vanity objects or live event objects. The zone control
object stays with the zone's own template, as the client makes the same one
itself (LevelManager::LoadZoneControlObject); its server script
does nothing and a race track's does not take the player into a race. Such a
world lets in only accounts at editor_gm_level.
Plumbing only: no command starts an edit mode instance yet (docs/EditMode.md).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
DoObjectComponentLoad walks the client's load order and calls the type's
allocator from a table, like ObjectLoader2, instead of one 76-case switch.
Components with rules of their own have a static Allocator (the client's
LWOxComponent::Allocator); the rest share a registry allocator. The load
state moves to ObjectLoadState.h so the allocators can take it.
Construction bytes are identical for all 15,962 LOTs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client makes a script component for a registry script with a non-zero
id, or for a custom script in the config it is sent (LOT 176 never):
ApplyScriptComponentIfHasScript and LWOScriptComponent's allocator. A
character's script and a server-only custom_script_server stay on the
server and send nothing. The 5 LOTs whose registry script id is 0 (e.g. the
AG concert fan, LOT 3002: live sent no config and no script) lose the bit
the client never read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ScriptComponent row (server and client script) loads in
LoadDataFromTemplate and custom_script_server / custom_script_client in
LoadConfigData, out of Entity::Initialize, which only decides whether there
is one (a registry entry, a character or a custom script), as the client's
allocator does. Same scripts and bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minigame control (50) is an activity component in the client
(LWOMinigameComponent) and is made from the registry, so the zone control
object (LOT 2365, registry id 0) has one; it sends what an activity sends
(dirty, no players), not a fixed 0x40000000 (which nothing sent: the old
id > 0 check never made it). The zone's script on that object is server
only: the client makes no script component for it, so it sends nothing.
DLU's zone control construction now equals live's byte for byte (209
captures, e.g. GruntMonkey world2); the decoder reads 50 as an activity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* change network settings from vector to LwoNameValue
* move settings on Entity to managed memory
* Migrate more members
* chore: remove pointer leakage from raw ldf pointers
* feedback
* fix ci