Deliverator
Graphical Hackificator
Latest: Dune Wars now *seems* to be fully working in multiplayer. You need to install Dune Wars 1.9.1 and then the 1.9.1.2 patch. Would love any feedback on your multiplayer experiences/testing, good or bad.
--------------
I abandoned rebuilding Dune Wars using RevDCM 2.83 as base in favour of using Better BUG AI. In the process of working on the RevDCM merge I had a good look into the changes that were made to get multiplayer working in that mod. There seem to be a few areas that might need attention to get Dune Wars working in multiplayer.
1. In RevDCM 2.83, all persistent Python data seems to be stored inside a BugCore object called RevData. A number of Python files refer to this including a MultiplayerEnforcer that ensures RevData is sync'ed at the beginning of a game (as far as I can tell). It makes sense that you need to be careful how you handle persistent data in order have everything in sync.
2. I asked Lemmy101, what he did to get Multiplayer working in RevDCM 2.83 and he said the main issue was with using modNetMessage and dialogs (which Dune Wars has e.g. landing stages and homeworld screen):
From PM:
"Well the main things I fixed in RevDCM were involving when there was some kind of player choice in a dialog that needed to be sent via a mod net message in the python script to be applied on the other player's PC's, it didn't bear in mind the fact that the player who sent the message also gets the message. As I remember there was some kind of auto UI based python script that handled sending the net messages when the player clicked a choice or clicked OK. This system was ALSO calling the thing the netmessage does on the otherside, meaning it got called twice, once by the direct call, and the other by the netmessage.
OR it could be the other way around. They may have ASSUMED they got the message they sent, when they didn't. And perhaps I made it call them directly.
I can't remember which way around, but the main issues revolved around this."
If the same approach can be taken to net messages in Dune Wars perhaps that would help.
3. Lemmy101 also did some work to ensure AI Autoplay works in Multiplayer - this might not be required for Dune Wars.
From PM:
"The only actual DLL changes I made, IIRC, was fixing AI Autoplay to work multiplayer, so really if you look in Revolutions.py you should see most of the changes I made in comment tags, it should be quite trivial to transfer those fixes to yours if you search for lemmy101."
4. Bringing code out of Python into the DLL may help with some issues for example Afforess brought the Inquisition code into the DLL reducing the Python functionality before RevDCM 2.83.
5. There is a reported issue with the 1.8 version of Dune Wars that unit combat causes OOS errors which might need to be addressed. See the end of this old multiplayer thread.
Update: This was caused by an issue with BULL described in this thread.
Moving to the Better BUG AI base has simplified Dune Wars code more, but multiplayer still has issues even in Better BUG AI apparently. Anyway, I thought I'd share the information I have found so far.
--------------
I abandoned rebuilding Dune Wars using RevDCM 2.83 as base in favour of using Better BUG AI. In the process of working on the RevDCM merge I had a good look into the changes that were made to get multiplayer working in that mod. There seem to be a few areas that might need attention to get Dune Wars working in multiplayer.
1. In RevDCM 2.83, all persistent Python data seems to be stored inside a BugCore object called RevData. A number of Python files refer to this including a MultiplayerEnforcer that ensures RevData is sync'ed at the beginning of a game (as far as I can tell). It makes sense that you need to be careful how you handle persistent data in order have everything in sync.
2. I asked Lemmy101, what he did to get Multiplayer working in RevDCM 2.83 and he said the main issue was with using modNetMessage and dialogs (which Dune Wars has e.g. landing stages and homeworld screen):
From PM:
"Well the main things I fixed in RevDCM were involving when there was some kind of player choice in a dialog that needed to be sent via a mod net message in the python script to be applied on the other player's PC's, it didn't bear in mind the fact that the player who sent the message also gets the message. As I remember there was some kind of auto UI based python script that handled sending the net messages when the player clicked a choice or clicked OK. This system was ALSO calling the thing the netmessage does on the otherside, meaning it got called twice, once by the direct call, and the other by the netmessage.
OR it could be the other way around. They may have ASSUMED they got the message they sent, when they didn't. And perhaps I made it call them directly.
I can't remember which way around, but the main issues revolved around this."
If the same approach can be taken to net messages in Dune Wars perhaps that would help.
3. Lemmy101 also did some work to ensure AI Autoplay works in Multiplayer - this might not be required for Dune Wars.
From PM:
"The only actual DLL changes I made, IIRC, was fixing AI Autoplay to work multiplayer, so really if you look in Revolutions.py you should see most of the changes I made in comment tags, it should be quite trivial to transfer those fixes to yours if you search for lemmy101."
4. Bringing code out of Python into the DLL may help with some issues for example Afforess brought the Inquisition code into the DLL reducing the Python functionality before RevDCM 2.83.
5. There is a reported issue with the 1.8 version of Dune Wars that unit combat causes OOS errors which might need to be addressed. See the end of this old multiplayer thread.
Update: This was caused by an issue with BULL described in this thread.
Moving to the Better BUG AI base has simplified Dune Wars code more, but multiplayer still has issues even in Better BUG AI apparently. Anyway, I thought I'd share the information I have found so far.