Recent content by LyarSoft

  1. LyarSoft

    CIV5MPDLL: dll for solving multiplayer sync problems

    Source and usage at https://github.com/llyyaa/CIV5MPDLL/
  2. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    I have a solution now allowing anyone to invoke any lua function on all the clients by providing its name to solve the sync problem. See my new thread for detail.
  3. LyarSoft

    CIV5MPDLL: dll for solving multiplayer sync problems

    This is based on whoward's DLLVMCv97. When executing custom UI functions, call instance:SendAndExecuteLuaFunction("CvLuaUnit::l#FunctionName#", Arguments) instead of calling the function itself to execute that function on all the clients in a multiplayer game, which will not cause re-sync. Usage...
  4. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    I think reflection scheme is all I need, which allows you to invoke any function by its name. I'm working on it now. If sucess, we can call something like "player:SendExecute("InitUnit", Arguments...)" to execute the mentioned function on all the clients.
  5. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    Unit Upgrade and other "official" functions dont have their own way of syncing, they are calling Send... methods on CPP side. For example upgrade is calling SendDoCommand() with argument COMMAND_UPGRADE
  6. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    It seems that the NetSyncTool you mentioned is utilizing ICvEngineUtility1::SendSellBuilding() in ICvDLLUtility.h. This function can only send 2 32-bit-integers. Although the reciever function CvDllNetMessageHandler::ResponseSellBuilding() has a third argument PlayerTypes, it is always fixed to...
  7. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    More precisely, it is not the method invoking itself causing desync. CIV5 maintains lists (actually a CPP container named "set" that ensures no duplicate elements are inserted) of units/cities/plots and other game objects on all the players' PC. At the end of each turn the game will ask all the...
  8. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    My solution is nothing to do with lua-side. It seems that most of the lua extension setter methods (or methods starting with "lChange") will cause desync , my solution is to use gDLL->sendFoundReligion to send arguments for those send methods since it is capable of sending 7 32-bit-integers and...
  9. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    Well it seems that all the unit operations done in an "official" way are sent to the class CvDllNetMessageHandler of non-host players and sent by some methods in macro defined object gDLL or other dll interfaces on host. By doing this, any unit operations (and buildings maybe) are sent to all...
  10. LyarSoft

    Non-host player calling InitUnit() and kill() lua functions causing re-sync in multiplayer game

    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...
Top Bottom