Docs · Engineering reference
Ownership
docs/features/ownership.mdEdit on GitHub
LF_OrganizationManager — Feature/Organizations/ (verified 2026-10-11; ledger and invites 2026-11-08)
-
✅ A character founds one organization. The id comes from
PersistenceIdUtils, never an entity id. The founder invites and kicks. A member can leave. The founder cannot leave or be kicked. A second membership is refused. -
✅ The shared fund is a balance keyed by organization id, the same shape as
LF_BankAccount. Deposit credits it. Withdraw requires the withdraw rank and takes the whole amount or nothing. Buying an upgrade (extra storage, processing slot, parked vehicle) debits the configured price in one step or leaves the fund and the flag untouched. The price and the new flag are logged. -
✅ Cash moves only as MoneyStack through
LF_OrganizationPlayer. A short removal is returned to the character. A short payout puts the fund back. The personal ATM balance is not read or written. The desk isRoadmap_Org_DeskonStreet_Org.layerat288.9 0 255.7(org registry porch), using{6B7B7CCC74AACA67}Prefabs/Props/Furniture/Desk_01_short.et. The desk mesh origin is its back-right corner (bounds x -1.70..0, y 0..0.907, z 0..0.747), so the top is at y 0.907 and the props sit at x 287.6..288.6 (Roadmap_Org_Desk_Phone/Files/Notebooks/Clock,_Chair). -
✅ (2026-11-08, M1-17) The desk opens the registry ledger
LF_OrgLedger, a 1989 ledger page on the UI kit (the oldOrganizationMenu.layoutis gone). No organization: name field and "Sign and pay $250"; the fee (LF_OrgRules.FOUNDING_FEE) leaves carried MoneyStack and comes back if the registration is refused. Names: 3 to 32 letters, digits, spaces,- ' & ., unique ignoring case and outer spaces (LF_OrganizationManager.IsNameTaken). A member's page: name, rank, fund with deposit (and withdraw for the rank that may), the processing upgrade, the alley yard lease (LF_OrgHideoutLease, free, founder takes it), the member list (offline members by their record name), and Leave (not for the founder). Found, deposit, withdraw, buy, lease, and leave are refused unless anLF_OrganizationDeskActionstands withinLF_OrganizationPlayer.DESK_RANGE(5 m) (#EL-Org_TooFar; testsecurity/service-range). The page closes at 4 m from the desk, on death, and on MenuBack. Sounds: page turn on open, pencil on Sign, map close on close. LOGICorg/registry,org/invite-role. -
✅ (2026-11-08, M1-17) Invite and remove are face to face, in the
org_inviteslot of the player interaction menu (LF_OrgInviteRole, registered inLF_GameModeRoleplay.OnGameStart). A leader facing someone with no organization sees "Invite to " (offer,Gesture_Point); the invitee facing that leader sees "Join " and joins with one press (raised hand, hand-over sound); a leader facing a member sees "Remove from "; nobody can remove the founder. An offer is session state (LF_OrgInvites, not saved) and lapses after 2 minutes. The offer side reads the organization replicated on each character (LF_OrgReplication: id, name, rights bits, held offer; RplProps written on spawn, on change, and every 10 s); the server decides from the registry. Two-client proof:node agent-box/session.mjs org [--shot]. -
✅ (2026-11-23, GA-C5 #4214) Decline sits beside Join on the action list: slot
org_decline(LF_OrgDeclineRole,Feature/Organizations/LF_OrgInviteActions.c), shown exactly whenorg_invitereads Join.LF_OrgInvites.Declinedrops only the offer of the one faced (a wrong inviter or a lapsed offer is refused and logged); both players get a toast and the invitee's offer copy clears. All four entries (invite, join, decline, remove) areLF_PlayerRoleActionrows in the character's vanilla action list. LOGICorg/invite-actions. -
✅ (2026-11-12, #750a) Ranks are a ladder with a rights bitmask (
LF_OrgRights; bit =LF_EOrganizationPermission: withdraw, invite, kick, buy upgrade, manage ranks, use stash, and the reserved declare war, manage territory, spend fund). A new organization gets founder (every right), officer (invite, kick, declare war since #2769, stash) and member (stash); an invite joins on the bottom rung. Face to face, a member with manage ranks sees "Promote in " on a member whose next rung up is still below them and "Demote in " on one who has a rung below (org_promote/org_demoteslots,LF_OrgRankRole); nobody reaches their own rung or the founder's. Kick also needs the actor to outrank the target, so an officer removes members but not another officer. Every move is re-checked on the server (LF_OrganizationManager.Promote/Demote/Kick) and logged with the new rights. The ledger shows the rank's own name. The view replicates the ladder position. LOGICorg/rights. -
✅
ExportAll/ApplyAllreplace the cache, so a second apply does not compound the fund. The game-mode serializer writes these records at version 2, after survival. A version 1 save has no organization payload and does not clear a live fund. Version 3 appends hideout ownership after these records. Version 4 appends owned vehicles after the hideout records. Version 5 appends serving jail sentences after the vehicles. -
✅ (2026-11-12, #750a) Save version 27 appends
orgranks: each rank's whole rights mask and ladder order, keyed by organization id and rank id. Theorganizationsrecord layout is unchanged (its rank still saves four bools, bits 0-3 of the mask); the record version is 2. A version 26 or older save has record version 1: load turns the bools into masks (founder every right, any other rank its bools plus the stash), adds the officer rung, and keeps every member on their rank. PERSISTENCEorg/rights-persist;wt e2ecarries a founder, a promoted officer and a member across the restart. -
✅ World-end reset (2026-11-17 property review):
LF_OrganizationManager_StaticResetHookdrops the singleton, so a world loaded after another in one process no longer keeps the last world's organizations, members and funds (checked bymap/org-marks-character-id). -
🧪 (2026-11-22, #4213, gangs C2) Gang flag, stored and saved. Each organization flies one of 20 preset flags, numbered 1 to 20 (
LF_OrgFlags,Feature/Organizations/LF_OrgFlag.c); 0 is no flag.LF_OrgFlags.Set(server, a registered organization, 1 to 20) picks it;FlagOfreads it. A side table keyed by organization id, so the positionalorgsrecord does not move. Saved in theorgflagssection (LF_OrgFlagSavePayload, oneLF_OrgFlagRowper organization). After every load each organization flies a flag: one with no row takes the first free flag (the lowest no other registered organization holds), in organization id order, so a second load gives the same flags. A save from before the section (OnAbsent) keeps the live flags (none on a boot) and gives the rest the first free flag. With all 20 held, a new one shares flag 1 (warning). Nothing here refuses two organizations the same flag: the choosing rule (decision N21, the flag wall) decides. A row whose organization is not on the register is kept and counts for nothing. Nothing replicates yet. PERSISTENCEorg/flag-save;wt e2ecarries the e2e organization's flag 13. -
🧪 (2026-11-23, #4220, gangs C3, decision N21) Flag lock.
LF_OrgFlagRules(Feature/Organizations/LF_OrgFlagRules.c): the first gang keeps its flag.Pick(server) refuses a flag another organization holds while one of that holder's members is online; the holder offline, the pick goes through and both fly the flag.CanPickis the same check without the write, for the flag wall's "Taken by X (online)" line. When two organizations fly one flag and both have a member online,FliesPlainClothis true for the later one: its poles fly a plain cloth in the flag's colour (the pole reads it; nothing renders yet). "Online" is a list of character ids (PickLiveandFliesPlainClothLiveread the live players). "Later" is the claim order ofPickin this session; an organization with no claim yet counts as earlier, and a tie ranks by organization id, so after a restart a pair sharing a flag ranks by id until someone picks again (the order is not saved). Re-picking its own flag changes nothing. LOGICorg/flag-lock. -
🧪 (2026-11-23, #4449, gangs C4) Flag wall.
LF_OrgFlagWall(Feature/Organizations/LF_OrgFlagWall.c,LF_OrgFlagWallAction.c, prefabPrefabs/Organizations/LF_OrgFlagWall.et): the wall is the menu, no window. It stands the 20 sample flags (each screen, never a dedicated server) and carries 20 actions, one per flag, "Fly the flag". The action shows to a leader (the right to manage ranks, so the founder) and the server checks again:PickreturnsPICKED,KEPT(own flag),NO_ORG,NOT_LEADER,BAD_FLAGorHELD(the holder named in the toast), reusingLF_OrgFlagRulesandLF_OrgFlags. Samples come from prefab slotsgang_flag_01togang_flag_20, whose rows the pack writes (LF_PrefabSlots_Everon1989.conf); the core slot file lists none, soLF_OrgFlagWall.SamplePrefabreads the layered slot config itself, and the gang-pole card reuses it. Flag names are neutral core stringsLF-OrgFlag_Name_01..20that the pack overrides with the real names. Placed in a grid cell (flag-wall); the registry placement is a later card. WORLDorg/flag-wall-actions, packeveron/flag-wall-slots.
Houses — Feature/Houses/
- ✅ Init runs (2026-11-17 property review, WORLD
houses/identifier-init):LF_HouseManagerComponentand an editor-boundLF_KeyComponentnow set the INIT event mask, asLF_LockComponentandLF_VehicleKeyComponentdo. Before, a building never got its identifier or synced its doors, and an editor-bound house key (HouseKey_Matching_Debug) stayed unbound. - ✅ A keyed open keeps the lock (#2410, WORLD
houses/keyed-open-keeps-lock): the owner and a key holder pass a locked house door and the door stays locked, so a stranger after them is still refused. The server decides inSCR_DoorUserAction.CanBePerformedScript(LF_LockComponent.UserMayEnter); the owner's character key is replicated on the door so a client's prompt matches. OnlyLF_HouseManagerComponent.SetHouseLockedchanges a house's lock, and it re-syncs a door a breach or a lockpick opened. A door left open now closes itself (#2472). - ✅ Lock and unlock at the door (#2471, WORLD
houses/lock-action):LF_HouseLockActiononEL_Door_Base.etoffers#LF-HouseLock_Lock/#LF-HouseLock_Unlockto the owner and to a carried key holder (LF_LockComponent.UserMayEnter); a stranger does not see it. The server re-checks and refuses a forged request with[LFDebug:Houses], then flips the house throughLF_HouseManagerComponent.SetHouseLocked(saved, mirrored on every door). Not offered on a hideout door, on a door with no house manager, or while Houses is off. - ✅ A locked house door left open can be closed and closes itself (#2472, WORLD
houses/door-auto-close): on a locked house anyone may close an open door, only the owner or a key holder opens it (the server re-checks inPerformAction), and the server closes a door left open afterLF_HouseDoorClosedelay (the owner'shouses.doorCloseDelaySeconds, default 20 s, 0 turns it off, over 600 clamps to 600 with a warning;/configreloadapplies it to the next door that opens, #2505, WORLDhouses/door-delay-config). An unlocked house's door and a hideout door are untouched; the lock never changes. - ✅ Lock state, owner and carried keys survive a restart (#2410, PERSISTENCE
houses/registry-persist,houses/carried-key-persist,wt e2e):LF_Houseskeeps one row per house with a stable identifier (the editor identifier, orBindIdentifier) in thehousespayload (save version 46); a carried house key keeps the house it opens in theitemkeyspayload (version 47). A house with no editor identifier gets a per-boot id and is not saved (logged). Nothing assigns an owner in play yet (purchase flow). - ✅ Every house and car key shows its own name on every client (#2470, WORLD
houses/key-item-name):LF_KeyItemUIInfo(anSCR_InventoryUIInfoonHouseKeyItem.etandVehicleKey.et, soLF_PoliceCarKey.ettoo) builds "House Key [id]" / "Vehicle Key [id]" per item from the replicated identifier (#LF-ItemName_HouseKeyOf,#LF-ItemName_VehicleKeyOf); nothing writes the shared prefabUIInfoany more. A late joiner gets the identifier with the item. An unbound key shows the plain prefab name. No save change.
LF_Hideout — Feature/Hideouts/ (verified 2026-10-11)
-
✅ One building owned by one organization. Members unlock
Roadmap_Hideout_Doorat213 0 120. A non-member is refused and the refusal is logged. The door isEL_Door_Basewith the inheritedLF_LockComponent. The organization id is written onto that lock. The door does not callLF_Breachand does not add a secondActionsManagerComponent. -
✅ (2026-11-08, M1-17) An organization takes the yard (the door marked
m_bOrganizationHideout, idRoadmap_Hideout, found throughLF_Places; gate302.4 0 288since M1-25) with "Take the lease" on the registry ledger; taking it locks the gate. The gate prompt on a client compares the organization replicated on the character with the owner on the lock and shows#EL-Hideout_NotMemberto a non-member; the server still decides from the registry. -
✅
Roadmap_Hideout_Machineat216 0 120uses the existingLF_ProcessActiononItemProcessor_Base. It runs only when the player's organization owns the hideout and has the processing upgrade. Otherwise it refuses and logs. The recipe turns one cabbage into one RowanBerries stack, the configured contraband prefab. A chain machine with no hideout component still readsResourceChains.conf. -
✅ Hideout stash holds items (2026-11-08, M1-15, tests
hideout/stash,hideout/stash-save, ande2e/pass2-verify-loadacross a real two-boot restart).Roadmap_Hideout_Stash(now at312 0 296in the village) is an instance of the reusable prefabPrefabs/Props/Hideouts/LF_HideoutStash.et(the base-gameChest_01.xobchest, a crate was too small to notice): a real container (LF_HideoutStashStorageComponent, 200 kg) whose items are entities. Open storage asks the server (SCR_PlayerController.LF_RequestOpenStash); a member of the organization that owns the hideout (m_sHideoutIdonLF_HideoutStashStorageManagerComponent) gets the inventory, anyone else hears a refusal sound and gets the#LF-HideoutStash_NotMembertoast, and the refusal is logged (stash refused: not a member). The server also refuses a non-member moving an item out (HandleAccessValidation) or in (CanStoreItem).CanStoreItemhas no instigator, so it only takes an item from a living member's own inventory, the stash itself or a server spawn (restore,AddAmountseeding, a stack split, all insideLF_ServerInsertScope); an item in a vehicle, crate or body, or lying on the ground, is refused even for a member, who carries it first (#2574, #2584, WORLDhideout/stash-put-carrier; logstash <id> refused <prefab> from the ground). Membership and the rank's stash right (USE_STASH) are the key: an open or breached door does not open the stash. -
🧪 The server-insert bypass is per item (#2835, WORLD
inventory/server-insert-scope-aborted):LF_ServerInsertScope.Begin(item)opens the bypass for that one item only, and the stash and the locked-car gate askIsOpenFor(item). A script error betweenBeginandEndcannot leave a locked car or a stash open to other items, and the frame-end sweep closes what it left open (logserver insert scope left open for <n> item(s) by an aborted insert; closed). -
✅ Stash contents survive a restart through
LF_PersistentStorageComponentkeyedhideout:Roadmap_Hideout(not an entity id), so the stash keeps its items wherever the layer places it. See the placed-storage row under Carried inventory. -
✅
ExportAll/ApplyAllput the organization id and the lock flag back, and a second apply does not change them. The game-mode serializer writes these records at version 3. A version 2 save has no hideout payload and does not clear a live hideout. Player strings:#EL-Hideout_NotMember,#EL-Hideout_NoUpgrade,#EL-Hideout_Process,#LF-HideoutStash_Name,#LF-HideoutStash_Desc,#LF-HideoutStash_Title,#LF-HideoutStash_NotMember. -
✅ Organisations review fixes (2026-11-17,
docs/reviews/2026-11-17-orgs.md). The seven ledger requests and the ledger reply now have a listen-host path (#2525): the host's own ask calls its handler and the reply is applied directly when the server owns the character. The ledger no longer sells extra storage or the parked vehicle (LF_OrganizationManager.IsUpgradeWired): nothing reads those flags, so a crafted request burned the fund for nothing. A deposit that would pass the fund's int ceiling is refused (the cash goes back). The stash checks the rank'sUSE_STASHright, which the rank config could already take off. A hideout gate saved open queues the relock sweep on load, so a restart no longer leaves it open for anyone. Testsorganization/upgrade-unwired,organization/fund-overflow,hideout/stash-right,hideout/load-relock(LOGIC). The lease that never ends is #2533.
LF_PropertyConfig — Feature/Property/ (config only, #2647, slice P2 of #747)
- ✅ One config,
Configs/Property/LF_Property.conf, describes the plot catalogue (id, tier id, price), the house tiers and what each build stage needs. A tier has four stages in order (excavation: work only; foundation: gravel and cement bags; walls and roof: planks and bricks; doors and windows: planks and a door), each with work units and a list of prefab and count requirements, plusm_aShellPrefabs(the vanilla prefab shown after each stage).m_iRentIntervalHoursandm_iGraceHoursare 0 = owned outright (no rent in M8 wave 1). The core ships generic example plots; 1989 plots and prices are the pack's (#808). Nothing reads it in play yet. Getters (PlotPrice,StageCount,StageWork,RequirementCount,Requirement,ShellPrefab, ...) return 0, empty or null for an unknown id; a missing config logsLF_Debug.Error("Property", ...)and degrades to the same defaults. Testproperty/config(LOGIC). - ✅ A plot key equal to a house identifier is refused (#2783, merged, in-dev).
LF_Propertieskeys houses and plots in one table and a house wins, so such a plot would sell the house at the plot price. At config loadLF_PropertyConfig.RefuseHouseCollisionsdrops every plot whose key is a known house (LF_Houses), and a house that registers later drops the loaded plot (RefuseHouseId, called fromLF_Houses.Register); each logs[LFDebug:Property]at Error naming the key, and the house and the other plots are untouched. The validate checkvalidate-plot-house-idsfails a PR whose core or packConfigs/Propertyconf names a plot like a house identifier set on anLF_HouseManagerComponentor a doorLF_LockComponentin a layer or prefab. Testproperty/plot-house-collision(LOGIC). - ✅ Ledger asks are rate-limited; the test sign only leaves its own org (#2536, review items 30 and 31 of #2415,
merged, in-dev). View, Deposit, Withdraw, Leave and Lease now go through
LF_OrgLedgerGate(LF_OrganizationCharacter.c) on the existingPURCHASEbucket, the same as founding and upgrades (View walks every member, so a spammed ask cost a pass over the whole roster). The first refusal in a window logs[LFDebug:RateLimit]and toasts; a refused ask returns no page. The dev-gated test sign's Leave refuses withOTHER_ORG(#LF-TestOrgSign_OtherOrg) unless the player's org is the sign's own "Test Organisation", so it can never strip a real org of its founder. Testorganizations/ledger-rate(LOGIC). - 🧪 A hideout lease ends with its organisation's last member (#2571, part of #2533, merged, in-dev):
when the last member leaves or is kicked (
LF_OrganizationManager.Leave,LeaveDirect,Kick) the organisation publishesLF_OnOrganizationEmptied(Feature/Organizations/LF_OrganizationsEvents.c) andLF_Hideoutreleases every site it leases (ReleaseAllOf, logged[LFDebug:Hideout] released hideout=… reason=organization emptied: …). There is no disband verb (#2415), so this is the disband; the organisation record stays on the register.PushLocknow writes the lock's house identifier on every push, empty included: a released door reads Unowned to everyone (LF_HideoutDoorRules.View), former members no longer see Open, and an empty id matches no house inLF_HouseLockAction. Theorg_baseplace goes with the lease and another organisation can lease the site. Testhideout/lease-empty-org(WORLD). - 🧪 A hideout lease lapses after 14 real days with no member online (#2573, part of #2533, merged, in-dev):
each lease keeps the last time (unix seconds) a member of its organisation was connected, saved in the
leaseidlepayload (save version 50). A server sweep every 5 minutes (LF_Hideout.SweepIdle) restarts the clock of a lease whose organisation has a member connected (the site does not have to be visited) and releases a lease idle longer thanLF_OrgConfig.HideoutLeaseIdleDays()(owner keyorganizations.hideoutLeaseIdleDays, default 14, 0 = never), logged[LFDebug:Hideout] released hideout=… org=… reason=idle N days; the release frees the site like the emptied-organisation release. An old save seeds the clock at the first load, and a saved clock already past the limit at load (the server was down) gets one more day. Testpersist/hideout-lease-idle(PERSISTENCE). - 🧪 The ledger lets a holder give the lease up (#2572, part of #2533, merged, in-dev): a member whose rank holds
BUY_UPGRADEsees Give up the lease on the hideout row while the yard is theirs (LF_OrgLedger.HideoutAction; the same button is Take the lease when it is free). The ask isLF_AskOrganizationLeaseRelease/RpcAsk_LF_OrganizationLeaseRelease(LF_OrganizationCharacter.c, desk-only, PURCHASE rate bucket); the server callsLF_OrgHideoutLease.Release, which checks the right and that the organisation holds the lease and thenLF_Hideout.Release(..., "given up")(gate shut, held ground lost). A refusal (no right, not our lease, away from the desk) toasts the player and logs[LFDebug:Organizations] lease release refused: ...as a warning. Testorganization/lease-release(WORLD). - 🧪 Every organisation hideout door is a base site (#3408, part of #3339, merged, in-dev): the desk lease
no longer looks up one fixed place. Each
LF_HideoutDoorComponentwith organization hideout set marks itself throughLF_Hideout.MarkBaseDoor(place kindHideoutBaseDoor, its own hideout id); the first is still theOrgHideout/primaryplace contraband starts from. The desk offers an organisationLF_Hideout.BaseSiteFor: the base it already leases, else the first free site (primary first, then by id). The one-base-lease limit stays (#2816). Saves were already keyed by each door's own hideout id, so an old save loads unchanged. Testhideout/lease-per-site(WORLD). - ✅ (2026-11-19, #3410) Saint-Philippe has a registry: the site cabin
b49beside the workshop row holds a clerk's desk (LF_OrganizationDeskAction), an office chair and the war board (LF_OrgWarBoard.et), with a "Registry" plate on the outside wall (core signorg_registry). Fitted from theorgkit bytown fit saint-philippe orgintoPlace_saint-philippe_org.layer(place kindOrgDesk); a gang can now form on the island, not only in DebugWorld and the grid.