- Aug 18, 2022
When playing with a mod giving player a button to transform a unit into other civil's unique unit (by calling lua function InitUnit() and kill() to replace the original one) in multiplayer game, the game automatically reloads whenever a non-host player press that button and end his turn, and the action is canceled, the. Log says "DBG: Received a sync request for unit () which does not exist locally!". These 2 methods seems to be calling CvLuaUnit::lKill() and CvLuaPlayer::lInitUnit() in dll, but upgrading a unit with CvUnit:oUpgrade() which also kill and spawn a new unit of next era by calling the backend function of CvLuaUnit::lKill() and CvLuaPlayer::lInitUnit() in class CvUnit and CvPlayer dose not trigger resync in multiplayer. Does anyone know how to fix this?