Commit graph

3276 commits

Author SHA1 Message Date
813ba0cd20 #W# Added: Added more farm plots to the farm spawner system. 2026-09-27 20:09:29 -04:00
0d3b637a45 #W# Added: Farm spawner system. 2026-09-27 18:38:26 -04:00
21286e8660 #W# Spawns: Tweaked some Overworld spawn amounts. 2026-09-27 15:35:31 -04:00
b94e0d634d #W# Change: Change Veridia's map rule set. 2026-09-27 12:56:07 -04:00
a9bec503a5 #W# Spawns: Overworld common monster spawns done. 2026-09-27 12:43:50 -04:00
accb38d7d2 #W# Spawn: Added low tier mobs to the dynamic spawner. 2026-09-26 20:15:54 -04:00
3578b6c1a8 #W# Spawn: Overworld mob forts/camps/cemeteries spawned. 2026-09-26 19:33:18 -04:00
895e18149a #W# Spawn: Overworld animal spawn is done. 2026-09-26 18:06:20 -04:00
180d5ee93d #W# Work: Added all the Overworld mob spawn regions. 2026-09-26 15:34:28 -04:00
393198aad4 #W# Work: Teleporter and go menu work. 2026-09-25 11:33:55 -04:00
1f1f87ae4c #W# Work: Teleporter work. 2026-09-24 19:08:00 -04:00
0e34941a85 #W# Spawns: All town spawns are done. 2026-09-24 14:11:30 -04:00
528eacc3e9 #W# Spawns: Spawning Town NPCs and Critters. 2026-09-24 11:35:36 -04:00
01c0676c7a #W# Save: Just a quick save. 2026-09-23 17:20:43 -04:00
f8483bd4ef #W# Spawns: Bastion town critters. 2026-09-23 17:08:38 -04:00
e5e34296ab #W# Spawns: Doing some NPC spawns. Added Info folder to keep track of some things. 2026-09-23 16:53:11 -04:00
428f7c4c1d #W# Spawns: Still tweaking the Dynamic Spawners. 2026-09-23 14:27:13 -04:00
484fbb6512 #W# Spawns: Working on a Biome spawn system. 2026-09-23 13:02:12 -04:00
14be34d8f1 #W# Work: Teleporter work. 2026-09-22 20:07:37 -04:00
b8d25b7641 #W# Work: Go menu work. 2026-09-22 19:02:38 -04:00
b8de94d5ec #W# Work: Region and GO work. 2026-09-22 15:11:22 -04:00
5b6463a4a9 #W# Added: Full Spellboooks are now spawnable. 2026-09-21 14:45:13 -04:00
db6fe5cec3 #W# Work: Dungeon/Towns go menu done. Classic dungeon Regions done. 2026-09-21 14:42:20 -04:00
3f7fb5d849 #W# Work: Go menu work. 2026-09-21 10:43:01 -04:00
e977355953 #W# Settings: Changed some modernuo.json settings. 2026-09-21 10:25:16 -04:00
bc133c7f59 #W# Cleanup: Removed default OSI go menu locations. 2026-09-21 10:20:53 -04:00
98b2a9d817 #W# Cleanup: Removing default OSI spawns 2026-09-21 10:19:49 -04:00
625b9eee1b #W# Added: Expa's Exile Hunter Bestiary system 2026-09-21 10:16:46 -04:00
86d28f32a2 #W# Added: Innate weapon abilities. 2026-09-21 10:15:27 -04:00
16612c9658 #W# Decor: Removed default OSI decorations. Added Deco for new towns. 2026-09-21 10:13:07 -04:00
e5c9068a23 #W# Change: map-definitions set. 2026-09-21 10:06:21 -04:00
58ebc86b6f #W# Fix: Boat wrapping is working. 2026-09-21 10:04:48 -04:00
e2cee3ce9f #W# Added: Autostable. Script to Umounts/Remounts in certain regions. 2026-09-21 10:02:09 -04:00
0a4d972af6 #W# Added: Added some custom regions. 2026-09-21 10:01:24 -04:00
40dd003fa8 #W# Change: Change new character start locations. 2026-09-21 09:59:08 -04:00
8621281ddc #W# Tweak: Changed Run script. 2026-09-21 09:54:22 -04:00
c8a376c104 #W# Tweak: Necro books are now be equiped. 2026-09-21 09:51:37 -04:00
2cfa8c8a9c #W# Change: Mobs are hidden until player has line of site. 2026-09-21 09:48:08 -04:00
128a40e2c0 #W# Change: Spinning wheels and looms process the entire stack. 2026-09-21 09:38:11 -04:00
373369c28e #W# Change: Walking over farmable crops auto harvests them and puts it in your backpack. 2026-09-21 09:33:39 -04:00
16bd0c8269 #W# Change: Mining now only produces the large graphic. 2026-09-21 09:30:20 -04:00
dcfaced31e #W# Change: Harvesting (mining, lumberjacking, fishing,) continue until complete. 2026-09-21 09:19:24 -04:00
4170f92bdc #W# Added: [ESA command exports all spawners on the map. [IS </path/*.json> imports spawners from specified file. 2026-09-21 09:08:13 -04:00
ec93eeb4fb #W# Change: [decorate now looks in Overword/Underworld Folders. 2026-09-21 09:03:07 -04:00
6388a96fa9 #W# Change: [Go menu now uses 1 file Data/go.json. It also excepts a 'map' destination. 2026-09-21 09:00:23 -04:00
3aeeb3705b #W# Initial Commit: Sovereign Realm 2026-09-21 08:54:33 -04:00
Kamron Batman
24bcfee554
feat(network): lean base pools (#2641)
Some checks failed
Build / Build (MacOS 15) (push) Has been cancelled
Build / Build (MacOS 26) (push) Has been cancelled
Build / Build (AlmaLinux 10) (push) Has been cancelled
Build / Build (Debian 12) (push) Has been cancelled
Build / Build (Debian 13) (push) Has been cancelled
Build / Build (Fedora 44) (push) Has been cancelled
Build / Build (CentOS 10 Stream) (push) Has been cancelled
Build / Build (CentOS 9 Stream) (push) Has been cancelled
Build / Build (Ubuntu 26) (push) Has been cancelled
Build / Build (Ubuntu 22) (push) Has been cancelled
Build / Build (Ubuntu 24) (push) Has been cancelled
**Follow-on to #2639 (merged). References a local IORingGroup `1.0.13-preview.11` pack until 1.0.13 (modernuo/IORingGroup#15) is published; do not merge before that switch.**

## Summary

Consumes IORingGroup's lean base pools (modernuo/IORingGroup#15): both network pools now start with one slab, grow a slab at a time with the population, and trim idle slabs back after quiet periods.

- Fixes the transport's send-pool cap: previously only 1024 of the 4096 connections could get a send buffer; connection 1025 was closed at accept.
- Network memory at boot drops from about 96 MB to about 10 MB at the defaults; a full 4096 logged-in connections is about 1.25 GB of base buffers plus the growth budget.
- New settings: `network.initialBufferSlabs` (default 1; slabs of each pool held from boot and the trim floor) and `network.maxBufferSlabs` (default 128; divides the connection maximum into slabs, 32 connections per slab). Both are coerced with a warning; the same value feeds the ring table and the manager so they cannot drift.
- The Debug-only maintenance line includes base-pool capacity and releases.
- `dev-docs/server-requirements.md` rewrites the network memory story and adds the two settings.

## Pre-auth buffers

Every connection starts on the transport's platform-minimum buffers (4 KB receive, 4 KB send) instead of the base pools. It is promoted to full-size buffers (64 KB receive, `network.sendBufferSize` send) when the game server verifies its account — the point where `NetState.Account` is assigned in the `GameServer_AwaitingGameServerLogin` or `GameServer_LoggedIn` state, so a verdict that lands after the parser has moved on still promotes. Nothing ever moves back. The login-server pass stays on the small buffers for its whole lifetime.

Before credentials verify, nothing promotes: the 4 KB send ring is the entire pre-auth send budget, and a connection that overruns it is dropped as exhausted, exactly as the receive side drops a packet header declaring more bytes than the receive buffer can hold (new guard in `HandlePacket`; it also closes the old 65535-byte edge on 64 KB buffers). The stock login sequence sends under 2 KB. After credentials verify, the send path promotes on demand if it ever needs to (unbudgeted, outside the memory ceiling and the shrink bookkeeping — promotion is not growth), and the oversize-packet guard waits on a pending receive promotion or retries a stalled one once for a verified account before disconnecting. A completion that fills the receive buffer arms no receive, so `HandleReceive` now calls `RingSocket.ResumeReceive()` after the parse loop — at 4 KB a burst of small packets fills the buffer in one completion.

Net effect: a flood of unauthenticated connections tops out at about 32 MB across the full 4096-connection cap where the platform minimum is 4 KB (the transport's retained slabs and the base pools used by logged-in players are separate), and never allocates a base-pool slab.

Platform note: on Windows Server 2012 R2 / 2016 the transport's legacy mapping path floors at 64 KB: the pre-auth receive pool is off there (its base is 64 KB), while the pre-auth send buffer starts at 64 KB under the 256 KB base. The server logs the effective sizes at startup.

## Testing

Server.Tests (905) and UOContent.Tests green on the preview pack (one pre-existing `FamiliarAITests` failure from #2644 reproduces on `main`, tracked separately). New tests cover both coercions, that the ring's registration table equals `RequiredRegisteredBuffers` for the configured values, promotion on game-server auth and on a late account, no promotion on the login server, pre-credential overrun ending in exhaustion, post-credential on-demand promotion, the oversize-packet guard through loopback (error, wait, retry with an account, and a promotion made pending mid-parse), and receiving again after a burst fills the initial buffer.
2026-09-20 00:24:15 -07:00
Robert Dickey
9d9e672a09
fix(ai): make debug-message cooldown comparisons wraparound-safe (#2659)
When an AI debug-message cooldown crosses the signed tick-counter boundary, DebugInterpolatedStringHandler can emit before the deadline or suppress a message after it. Both constructors compare absolute tick values.

Use subtraction-based deadline comparisons in both constructors, following dev-docs/tick-counts.md. This is a two-line production change; message formatting, cooldown duration, and gameplay behavior are unchanged.

Adds 35 regression cases exercising the actual handler and DebugSayFormatted:
- Both constructor overloads, with debugging enabled and disabled.
- Before/at/after deadlines on positive and negative clocks.
- Future and expired deadlines across signed wraparound.
- Cooldown rearming across wraparound and buffer clearing.
- A compiler-generated interpolated call through the public extension method.

Validation on Linux / .NET 10, based on clean upstream 35e3a31b4:
- Release build: 0 warnings, 0 errors.
- New tests against unchanged production code: 28 passed, 7 failed.
- With the fix: 35 passed, including without client map data (no skips).
- Selected AI/pet suites: 134 passed / 7 failed before; 141 passed / 0 failed after.

Tests use synthetic entities; no running shard or world saves. The faulty comparisons were reverified on upstream main before submission. Windows execution remains unverified. The tests exercise explicitly assigned deadlines; deadline initialization is outside this patch.

Addresses only the DebugInterpolatedStringHandler comparison item in #2627; it does not close the other audit items.
2026-09-19 09:59:00 -07:00
Kamron Batman
12b0886cef
fix(feature-flags): custom flags no longer throw; removing a flag restores its real default (#2654)
Two bugs found while reworking #2653.

**Custom flags throw.** `SyncStaticFlag` is a switch expression with no discard arm, so any key that has no static behind it throws `SwitchExpressionException`. `[FeatureFlag mykey create <category> <desc>` crashes in `CreateOrUpdateFlag`, and once such a key is in `flags.json`, every boot's `SyncAllStaticFlags()` throws mid-iteration — caught and logged as "Failed to load feature flags", but stock flags later in dictionary order never sync. Added `_ => enabled`.

**Removing a flag turns some features on.** `RemoveFlag` hardcoded `SyncStaticFlag(flagKey, true)`. For `speedhack_detection` and `insurance` the real default is `false` / `insurance.enable`, so deleting the flag enabled the feature. It now syncs the removed flag's `DefaultEnabled`, which #2653 seeds from the static.

Verified: `dotnet build Projects/UOContent/UOContent.csproj -c Release`, 0 `CS` diagnostics (post-build copy to `Distribution/` was blocked by a running server instance).
2026-09-18 19:25:39 -07:00
Kamron Batman
f211607d63
perf(ai): make IsEnemy the single authority for Honor/Ethereal Voyage (#2655)
## Summary
Profiling with thousands of creatures in range of each other showed `BaseAI.IsInvalidFactionTarget` checking Ethereal Voyage and active Honor on every acquisition candidate and then calling `BaseCreature.IsEnemy`, which checked both again. This makes `IsEnemy` the single authority and removes the duplicate per-pair work.

## Changes
- **`BaseCreature.IsEnemy`**: the Ethereal Voyage check sat below the `m is not BaseCreature` early return, so it never reached players — the only mobiles that cast it. It is hoisted next to the Honor veto. `GetMaster()` was called three times per creature pair (inside `Ethics.Player.Find(m, true)` and twice at the bottom); it is now computed once.
- **`BaseAI.IsInvalidFactionTarget`**: reduced to `IsFriend` / `IsEnemy` / `CanBeHarmful`. The removed `Combatant != m` Honor exception was dead code — `IsEnemy` vetoed Honor unconditionally on the following line.
- **`Ethics.Player.Find`** / **`TransformationSpellHelper.GetContext`**: small simplifications on the same path.

## Behavior
- `ShouldAcquireOnApproach` and `OnAggressiveAction` only consult `IsEnemy`, so movement-triggered acquisition now respects Ethereal Voyage for players (previously a player under Ethereal Voyage walking past a monster was still acquired on approach).
- `BaseFactionGuard.IsEnemy` does not call base, so faction guards no longer skip honoring/voyaging enemy-faction players. Accepted: both mechanics describe monsters, not guards.
- `HealerAI`/`BerserkAI`/`PredatorAI` (`bFacFriend`) callers are unaffected — `IsFriend` already required a `BaseCreature`, so players were excluded before these checks ran. `MilitiaFighter`/`MilitiaCanoneer` return `false` for all players, so they are unaffected too.

## Testing
- `dotnet build` clean.
- Pure predicate reorder; no new tests.
2026-09-18 19:22:22 -07:00