## 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
45 lines
2 KiB
Markdown
45 lines
2 KiB
Markdown
---
|
|
name: migrate-systems
|
|
description: >
|
|
Trigger: when converting multi-file RunUO engines or systems (crafting, spawners, economy, quests) to ModernUO.
|
|
Covers: system mapping, conversion order, file organization, cross-reference handling.
|
|
---
|
|
|
|
# RunUO -> ModernUO Multi-File System Migration
|
|
|
|
## When This Activates
|
|
- Converting RunUO systems with multiple interdependent files
|
|
- Converting custom engines (crafting, spawners, economy, quests)
|
|
- Organizing RunUO `Scripts/Custom/` code into ModernUO structure
|
|
|
|
## Conversion Order
|
|
1. **Data types / enums** -- Just naming and namespace changes
|
|
2. **Persistence classes** -- `EventSink.WorldSave` -> `GenericPersistence`
|
|
3. **Core entities (Items/Mobiles)** -- Full serialization migration
|
|
4. **Gumps** -- Convert to `DynamicGump`/`StaticGump`
|
|
5. **Commands** -- Usually minimal changes
|
|
6. **Packets** -- Convert to `SpanWriter` if custom packets exist
|
|
7. **Entry point** -- Update Configure/Initialize registration
|
|
|
|
## File Organization
|
|
| RunUO | ModernUO |
|
|
|---|---|
|
|
| `Scripts/Custom/MySystem/` | `Projects/UOContent/Engines/MySystem/` or `Projects/UOContent/Systems/MySystem/` |
|
|
| `Scripts/Items/X.cs` | `Projects/UOContent/Items/{Category}/X.cs` |
|
|
| `Scripts/Mobiles/X.cs` | `Projects/UOContent/Mobiles/{Category}/X.cs` |
|
|
| `Scripts/Gumps/X.cs` | `Projects/UOContent/Gumps/X.cs` |
|
|
|
|
## Configuration Migration
|
|
| RunUO | ModernUO |
|
|
|---|---|
|
|
| XML config files | `ServerConfiguration.GetOrUpdateSetting()` or `JsonConfig` |
|
|
| Custom .cfg parsing | `ServerConfiguration` for simple, `JsonConfig` for complex |
|
|
|
|
## Testing
|
|
After converting: `dotnet build`, fix errors, test [add for items, verify gumps, check persistence across save/restart.
|
|
|
|
## See Also
|
|
- `dev-docs/runuo-migration-docs/10-systems-engines.md` -- detailed system migration patterns
|
|
- `dev-docs/configuration.md` -- ModernUO configuration system
|
|
- `dev-docs/claude-skills/modernuo-configuration.md` -- ModernUO configuration skill
|
|
- All other migrate-* skills for system-specific guidance
|