Rhye's Syndrome

In the API, under the CyMessageControl class, you find this:

So, whenever this method is invoked, it causes a ModNetMessage game event that can be detected in the Event Manager/Handler:
Code:
	def onModNetMessage(self, argsList):
		'Called whenever CyMessageControl().sendModNetMessage() is called - this is all for you modders!'
		
		iData1, iData2, iData3, iData4, iData5 = argsList
All you basically need to do, is to portion the instructions for what you wanna do into the five data values. Passing a CyUnit instance could, for example be expressed as the PlayerType and the Unit ID. Because then you can rebuild the object with CyPlayer.getUnit(). If you enumerate the Python effects in your mod you can use another data slot as the identifier for what you wanna do with the rest of the values. (Like identifying the PlayerType and the Unit ID as a newly created unit.)

The question is if you can pass other than integer values in a Mod Net Message. Because being able to pass arrays of values would be far more potent!

edit; Man, fiddling with this sort of thing is exactly what I like about programming. Too bad I don't have the time go try this stuff myself!


Oh cool, Baldyr. That's neat. I'll think certainly consider a Synthesis:Mp later then.
 
That's all I wanted to hear. :goodjob:
 
To be honest, there probably doesn't need to be a separate multiplayer version. Just fix congresses and similar events, figure out a new system for civ switching or disable it, and take those custom game options that need to be on and take them off the custom game screen (by changing bVisible to 0). A lot of stuff could be done by checking if it's an MP game or not. This would also allow the custom game screen to be enabled.
 
My thinking exactly. :agree:
 
Well one way to play Multiplayer (pseudo Multiplayer I suppose) is using the shortcut to switch civs while in cheat mode. I forgot what the cheat was though....

Of course, this is only hot seat.
 
Top Bottom