Natural Wonders Mod Comp

The code that I gave works fine in multiplayer with soren random numbers. No out of sync for a huge amount of hours of game player. If you use the python random numbers the values are not stored between sessions.
 
If you use the python random numbers the values are not stored between sessions.

So? They must be synced between players at the start of a session otherwise no one would be able to play multiplayer over many sessions. As far as I know they do. E.G. C2C and it uses the python random number without problems.
 
I'm not familiar with those mods source code and in what context the python random numbers are used in those mods.

If you want a good explanation of out of sync issues you can look at this

http://forums.civfanatics.com/showthread.php?t=188460

My mod runs on top of kmod with various other modpacks integrated into the sdk, in addition to numerous changes I have made. The kmod makes changes to the sdk which have eliminated all out of sync errors as far as I can tell. The kmod source code is available on github if you want to look at the changes that have been made to improve out of sync issues.

I have used sorenrand extensively with no out of sync errors.

With regards to python if you use CyMessageControl( ).sendModNetMessage(int, int,int,int,int) for all events that occur on the local machine but should be in global scope then you can eliminate out of sync errors.

In summary the natural wonders mod was creating events on one players machine, but the other player's machine would have no idea that this event occurred, a result of calling gc.getPlayer when the wonder building was placed inside a new city built near a natural wonder. To force the other players machine to know that the event had occurred a net message needs to be sent. The soren random number used to place the wonders was not causing any out of sync issues as this was running in global scope not local scope, and thus all players machines are aware of where the wonders are. However building a city which called gc.getPlayer was running in local scope thus causing out of sync issues ( basically the wonder building that gets placed in the city on founding was the issue).

I have run many hours of my mod, incorporating the natural wonders mod since the changes I suggested above were made and it has run fine without any out of sync problems. All the code for the natural wonders mod works well, wonders are placed in cities and benefits accrue as the mod intends and the out of sync issue has been totally eliminated.
 
I'm not familiar with those mods source code and in what context the python random numbers are used in those mods.

If you want a good explanation of out of sync issues you can look at this

http://forums.civfanatics.com/showthread.php?t=188460

I am familiar with the CyMessageControl( ).sendModNetMessage(int, int,int,int,int) and we use it.

I was just confused as to why some people say get rid of sorenrand to remove OOS and others say only use sorenrand to get rid of OOS.
 
I've installed this and when I build a nearby city it gets the associated building. When the AI builds a nearby city it almost never gets the building. So, then I capture that city I don't have the building to trigger the bonus.

I've checked via the world builder and the AI city almost never gets the building.

All the code seems to be in place... Any ideas?
 
Good that you researched it. I thought that the building would disappear when the owner changed, i.e. the city recharged.

I'm afraid there aren't many programmers willing to modify code these days
 
I know how to beta-test stuff. I have tried some things but nothing works. The code also exists in C2C but it's significantly different and my python is simple not up to the job.
I accept that this is now 'pretty old', unfortunately I didn't discover it until recently and made a decision to try and incorporate it into my custom Neoteric game code.
Anyway, I've disabled it for now but it might get removed later.

Thanks for the reply.
 
Top Bottom