Skip to content

Give NPCs, guilds, houses and fixtures their own GUID layouts - #164

Merged
GroaxyVRC merged 4 commits into
Open-Source-Free-Realms:mainfrom
GroaxyVRC:feature/guid-layout
Oct 28, 2026
Merged

GroaxyVRC merged 4 commits into
Open-Source-Free-Realms:mainfrom
GroaxyVRC:feature/guid-layout

Conversation

@GroaxyVRC

Copy link
Copy Markdown
Contributor

This should work close to how the original game did, FabledRealms.lua still has "hardcoded" guids they make more sense keeping it this way since the original game randomized them each server start, so everytime the server restarts they keep the same GUID no matter what. Housing, Fixtures, Scripted NPCs like wolves spawning should all use a randomized GUID based on the +1 system we already have. We can probably dumb this down a bit more so suggestions are always wanted.

@GroaxyVRC
GroaxyVRC force-pushed the feature/guid-layout branch from 6545c34 to 79270ff Compare October 27, 2026 06:58
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static ulong GetPrefixedGuid(GuidPrefix prefix, ulong id)
{
ArgumentOutOfRangeException.ThrowIfGreaterThan(id, MaxPrefixedId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll have to double check this, but make sure we have handling for anything we're throwing. I don't think we want anything throwing ever on a deployed server.

Just mentioning this in case there's an edge case that causes this (or any other new exceptions) to throw.

@ImAlko ImAlko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving pending the double check on exception handling

@GroaxyVRC

Copy link
Copy Markdown
Contributor Author

exception handling stuff will need to be another PR to clean up the repo and check for others.

@GroaxyVRC
GroaxyVRC merged commit 3b3aec3 into Open-Source-Free-Realms:main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants