## Summary Adds comprehensive RunUO → ModernUO migration documentation and Claude AI skills to help shard owners and script authors convert RunUO 2.7 code to ModernUO. - **10 migration skills** (`dev-docs/claude-skills/migrate-from-runuo/`) — system-by-system conversion guides (foundation, serialization, timers, gumps, packets, property lists, commands/events, persistence, items/mobiles, systems/engines) - **12 reference docs** (`dev-docs/runuo-migration-docs/`) — deep-reference with before/after examples, API mapping tables, edge cases, and gotchas - **Updated existing skills** — `modernuo-timers`, `modernuo-serialization`, and `modernuo-threading` now document that `Serialize()` runs on background threads and timers are not thread-safe - **Updated `CLAUDE.md`** — added migration skill lookup table ### Key migration patterns covered - Manual `Serialize()`/`Deserialize()` → source-generated `[SerializableField]` - `Packet` class hierarchy → static `SpanWriter`/`SpanReader` methods - `Timer` subclasses → `TimerExecutionToken` fire-and-forget - `Gump` → `StaticGump<T>`/`DynamicGump` with builders - `EventSink.WorldSave` → `GenericPersistence` - `ObjectPropertyList` → `IPropertyList` with string hole rules - Universal changes: naming (`m_` → `_`), `[Constructable]` → `[Constructible]`, logging, spatial queries
1.7 KiB
1.7 KiB
| name | description |
|---|---|
| migrate-commands-events | Trigger: when converting RunUO command registration, EventSink handlers, or event delegate patterns. Covers: event name changes, delegate removal, Configure vs Initialize. |
RunUO -> ModernUO Commands & Events Migration
When This Activates
- Converting
EventSinksubscriptions - Converting event handler signatures
- Moving from
Initialize()toConfigure() - Converting WorldSave/WorldLoad events to GenericPersistence
Conversion Steps
- Change
Initialize()toConfigure()for event registration - Remove delegate constructors:
new LoginEventHandler(OnLogin)->OnLogin - Rename events:
Login->Connected,Logout->Disconnected - Update signatures:
OnLogin(LoginEventArgs e)->OnConnected(Mobile m) - WorldSave persistence -> convert to
GenericPersistence(see migrate-persistence skill)
Event Mapping
| RunUO | ModernUO |
|---|---|
EventSink.Login |
EventSink.Connected (Action) |
EventSink.Logout |
EventSink.Disconnected (Action) |
EventSink.WorldSave |
EventSink.WorldSave (Action -- no args) |
EventSink.Crashed |
EventSink.ServerCrashed |
new XXXEventHandler(method) |
method (direct reference) |
Commands (Minimal Changes)
Commands use the same CommandSystem.Register() API. Main change: use Configure() for registration.
See Also
dev-docs/runuo-migration-docs/07-commands-events.md-- detailed migration referencedev-docs/events.md-- complete ModernUO event systemdev-docs/claude-skills/modernuo-events.md-- ModernUO events skilldev-docs/claude-skills/modernuo-commands-targeting.md-- ModernUO commands skill