Hi, I’m having a persistent “Same UID” / forced disconnect issue when using MapLink + UniversalAPI together with DayZ Expansion AI on my cluster.
Setup
Cluster with at least two servers:
Sakhal (custom map)
Livonia (Enoch)
Mods in use (relevant):
MapLink
UniversalAPI
DayZ Expansion (including Expansion AI)
MapLink is configured with shared player data via UniversalAPI.
Problem
The problem only appears in these cases:
When I die to Expansion AI and press “Respawn”
Or: I die normally (fall / suicide), press respawn (works), then I disconnect, and when I try to reconnect I get kicked with a “Same UID” / “connection lost with host” type error.
If I manually delete my character data in MapLink / UAPI, I can join again without issues.
What the logs show
From AdminLog + server_console + MapLink log:
On reconnect, UniversalAPI returns my last state with:
Health = 0
Server = Sakhal
TransferPoint = ""
Example from MapLink log:
[INFO] 20:18:13 | Requesting Player Data from DataBase Call ID:3 - GUID: Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU=
[DEBUG] 20:18:13 | LoadPlayerFromDB - Success ID:3 - GUID: Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU=
[INFO] 20:18:13 | Add Player to PlayerQue Celma(...) Health: 0 PlayTime: 99.571 Server: Sakhal TransferPoint:
When UApiOnClientNewEvent fires, MapLink detects I’m dead and decides to spawn me fresh:
[INFO] 20:18:26 | MapLink :: UApiOnClientNewEvent @ <12722.451172, 0.000000, 6964.543945>
[INFO] 20:18:26 | Player Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU= IsAlive: false IsUnconscious: false IsRestrained: false on the API, spawning them fresh
[DEBUG] 20:18:26 | Removing Player from Queue Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU=
[INFO] 20:18:26 | Player Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU= Spawning Fresh
So UApiOnClientNewEvent returns false and lets the engine create a normal fresh respawn on the same server.
~15 seconds later, MapLink logs:
[INFO] 20:18:42 | OnDisconnect Player: NULL (NULL) they are fresh spawn PlayTime: 15.727
[INFO] 20:18:42 | Deleteing Player: NULL (NULL) cause they are fresh spawn PlayTime: 15.727
[DEBUG] 20:18:42 | HandleBody IsBeingTransfered Removing body
This is the same “fresh spawn” being disconnected, but MapLink receives it as Player: NULL (NULL) in its OnDisconnect handler.
In the AdminLog / console at this exact moment, I see something like:
The original connection (first dpnid) still in the login state machine.
A second connection (same GUID, same SteamID) trying to join.
The server kicks the first with “No packets from …”, then kicks the second with “Same UID” / “lost connection with host”.
So, from the engine’s point of view, it looks like two connections with the same UID overlap during the Expansion AI death/respawn flow when MapLink is active.
Extra observations
If I disable MapLink/UniversalAPI for that server, the Expansion AI death + respawn flow doesn’t cause this “Same UID” issue.
The problem does not happen when:
I die by a simple fall or suicide and stay in the same session (respawn works).
It does happen when:
I die to Expansion AI and instantly respawn, or
I die, respawn, disconnect, and then try to reconnect.
What we’ve tried in scripts
In missionserver.c (MapLink’s modded MissionServer), we added:
A helper to find an existing PlayerBase by PlayerIdentity.
In UApiOnClientNewEvent, when playerdata.IsAlive() == false OR playerdata.IsUnconscious() == true, we:
Look for any existing PlayerBase with that identity.
If found, we kill/delete it before returning false (so the fresh spawn happens without a leftover instance).
However:
On the problematic respawns, there is no existing PlayerBase in the world with that identity when UApiOnClientNewEvent fires (our debug log for “existing player instance” never appears).
The “Same UID” kick seems to happen at the login / network layer (dpnid) level, not because there are literally two PlayerBase entities alive in the world.
Summary
There seems to be a subtle interaction between:
Expansion AI’s death/respawn handling,
UniversalAPI’s saved state (IsAlive / IsUnconscious),
MapLink’s UApiOnClientNewEvent + fresh spawn logic,
and the DayZ login state machine,
which causes the server to think there are two concurrent logins with the same UID when a player dies and respawns (especially to Expansion AI), leading to a forced disconnect / “Same UID” situation.
It would be very helpful if you could review:
How MapLink / UniversalAPI handle the player state update on death & respawn (especially from Expansion AI),
The OnDisconnect / “fresh spawn” cleanup where the log shows OnDisconnect Player: NULL (NULL) they are fresh spawn,
And whether the API / MapLink should explicitly clear or update the saved player state before allowing a fresh spawn on the same server, to avoid this transient “duplicate UID” condition.
I can provide full AdminLog, script.log and MapLink logs if needed.
Hi, I’m having a persistent “Same UID” / forced disconnect issue when using MapLink + UniversalAPI together with DayZ Expansion AI on my cluster.
Setup
Cluster with at least two servers:
Sakhal (custom map)
Livonia (Enoch)
Mods in use (relevant):
MapLink
UniversalAPI
DayZ Expansion (including Expansion AI)
MapLink is configured with shared player data via UniversalAPI.
Problem
The problem only appears in these cases:
When I die to Expansion AI and press “Respawn”
Or: I die normally (fall / suicide), press respawn (works), then I disconnect, and when I try to reconnect I get kicked with a “Same UID” / “connection lost with host” type error.
If I manually delete my character data in MapLink / UAPI, I can join again without issues.
What the logs show
From AdminLog + server_console + MapLink log:
On reconnect, UniversalAPI returns my last state with:
Health = 0
Server = Sakhal
TransferPoint = ""
Example from MapLink log:
[INFO] 20:18:13 | Requesting Player Data from DataBase Call ID:3 - GUID: Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU=
[DEBUG] 20:18:13 | LoadPlayerFromDB - Success ID:3 - GUID: Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU=
[INFO] 20:18:13 | Add Player to PlayerQue Celma(...) Health: 0 PlayTime: 99.571 Server: Sakhal TransferPoint:
When UApiOnClientNewEvent fires, MapLink detects I’m dead and decides to spawn me fresh:
[INFO] 20:18:26 | MapLink :: UApiOnClientNewEvent @ <12722.451172, 0.000000, 6964.543945>
[INFO] 20:18:26 | Player Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU= IsAlive: false IsUnconscious: false IsRestrained: false on the API, spawning them fresh
[DEBUG] 20:18:26 | Removing Player from Queue Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU=
[INFO] 20:18:26 | Player Ra2z9ZyyJFpzKv10CL-iQ1DaWCOYCApVH0ycAvcJ7bU= Spawning Fresh
So UApiOnClientNewEvent returns false and lets the engine create a normal fresh respawn on the same server.
~15 seconds later, MapLink logs:
[INFO] 20:18:42 | OnDisconnect Player: NULL (NULL) they are fresh spawn PlayTime: 15.727
[INFO] 20:18:42 | Deleteing Player: NULL (NULL) cause they are fresh spawn PlayTime: 15.727
[DEBUG] 20:18:42 | HandleBody IsBeingTransfered Removing body
This is the same “fresh spawn” being disconnected, but MapLink receives it as Player: NULL (NULL) in its OnDisconnect handler.
In the AdminLog / console at this exact moment, I see something like:
The original connection (first dpnid) still in the login state machine.
A second connection (same GUID, same SteamID) trying to join.
The server kicks the first with “No packets from …”, then kicks the second with “Same UID” / “lost connection with host”.
So, from the engine’s point of view, it looks like two connections with the same UID overlap during the Expansion AI death/respawn flow when MapLink is active.
Extra observations
If I disable MapLink/UniversalAPI for that server, the Expansion AI death + respawn flow doesn’t cause this “Same UID” issue.
The problem does not happen when:
I die by a simple fall or suicide and stay in the same session (respawn works).
It does happen when:
I die to Expansion AI and instantly respawn, or
I die, respawn, disconnect, and then try to reconnect.
What we’ve tried in scripts
In missionserver.c (MapLink’s modded MissionServer), we added:
A helper to find an existing PlayerBase by PlayerIdentity.
In UApiOnClientNewEvent, when playerdata.IsAlive() == false OR playerdata.IsUnconscious() == true, we:
Look for any existing PlayerBase with that identity.
If found, we kill/delete it before returning false (so the fresh spawn happens without a leftover instance).
However:
On the problematic respawns, there is no existing PlayerBase in the world with that identity when UApiOnClientNewEvent fires (our debug log for “existing player instance” never appears).
The “Same UID” kick seems to happen at the login / network layer (dpnid) level, not because there are literally two PlayerBase entities alive in the world.
Summary
There seems to be a subtle interaction between:
Expansion AI’s death/respawn handling,
UniversalAPI’s saved state (IsAlive / IsUnconscious),
MapLink’s UApiOnClientNewEvent + fresh spawn logic,
and the DayZ login state machine,
which causes the server to think there are two concurrent logins with the same UID when a player dies and respawns (especially to Expansion AI), leading to a forced disconnect / “Same UID” situation.
It would be very helpful if you could review:
How MapLink / UniversalAPI handle the player state update on death & respawn (especially from Expansion AI),
The OnDisconnect / “fresh spawn” cleanup where the log shows OnDisconnect Player: NULL (NULL) they are fresh spawn,
And whether the API / MapLink should explicitly clear or update the saved player state before allowing a fresh spawn on the same server, to avoid this transient “duplicate UID” condition.
I can provide full AdminLog, script.log and MapLink logs if needed.