[MAPScript] Civ4 - Request of Mirroring Grid map

P&nny

Warlord
Joined
Sep 1, 2007
Messages
217
Hello,


As part of the alive and thriving community of Civ4/BTS players, I was wondering if anyone could be of any help with what shouldn't be too much of a complication request :

We would like to have our favorite map for long games (Grid / GridBeta map) mirrored so that each of the starting players (usually 8 -4x2 lands, or 9 -3x3-) could have the same area of land as the other players.

I've been through the code of both BetaGrid and FM_Mirror_Inland (the map of which we want to re-use the mirroring feature) extensively but have unfortunately failed to merge the 2 together.


I'm sure the mergin of the 2 pieces should be very doable with anyone with actual sensitive skill in Python (which I haven't); we, as a community of BTS multiplayers, would be very, very grateful of any help you can give.
If you can help through the code, try to merge it, or simply recommend anyone or any name / e-mail of person we could contact...that would be very welcome !

We could go to an IT resource but the helper kinda need to have BTS installed otherwise it doesn't really work for the beta-testing...


Both BetaGrid and FM_Mirror are available in here :

https://docs.google.com/file/d/0B_uS4JkeZ8X6bnpBdE5kUmVVZVU/edit



Thanks for any tips !

Moderator Action: Questions either in the SDK/Python subforum or the main forum, -> therefore moved.
 
Ok, not a lot of answer on the topic but couple of contact by e-mails,
So here are a few more informations :

The grid (GridBeta2) map is a map that is always played in toroidal and very well suited for long mutiplayer games as it present each player with it's own area of land (1/9 of the land if 9 players like in the picture), which itself is surrounded by sea.
Each player 'square' of land is linked by a bridge in each cardinal direction, which means 1 north, 1 east, 1 west and 1 south bridges, so (in a 9 players config) you get to have 4 neighbourghs. Effectively, each player feel as if he is in the center of the world since it's toroidal wrap.


What my request is all about, is to get each region (so each 1/9 of the map, or 1/6 of the map if six plauyer etc) to get to be EXACTLY the same. So if a player as a cow 5 tiles east and 2 tiles south of his starting position, well everybody gets the same.

The regions are very clearly defined in the python iof Gridbeta2.py, so this should be easily spottable.
I highly suggest re-using the logics build in FM_Mirrror inland, which proves to be by far and large the best mirror map we have so far, so use the procedure of mirroring in there to replicate the exact same "regions" square in Grid map script.


As far as function goes, I'm unfortunately no expert but the "def mirrorMap()" function of the FM_Mirror map looks very relevant (line 1256 of the FM_Mirror map).
I'd assume using part of this next or within the "def generatePlotsByRegion(self):" of Grid (line 260) could to the trick. It wouldn't need to loop the logic for each region, just copy-pasting all plots would be enough, of course it'd need to do the same for features (forest, hills) and resources (the "regular" ones or the "forced" balanced ones).


Hope that make sense !

Please shout if you got any advises, contacts etc ;)
 

Attachments

  • Civ4ScreenShot0076.JPG
    Civ4ScreenShot0076.JPG
    194.2 KB · Views: 117
Hello, the script is done,

I let you do all the quality tests to see if there are some bugs (PM me if you find some). Then if all is ok, just share the map in the map script sub forum.

Tcho!
 

Attachments

Wow awesome Sto (i am one of Penny mate) :)

Launched some test game and it seems working perfectly, thank you.
 
Hello, the script is done,

I let you do all the quality tests to see if there are some bugs (PM me if you find some). Then if all is ok, just share the map in the map script sub forum.

Tcho!

W-O-W

You're genius !
I couldn't believe my eyes when I received a notification mail in my inbox, had to text moineau to have a look...couldn't wait up :D


I loaded the map several times and it was 100%, absolutely, magically, perfect every single time !

Very very good job, I looked at the code and there is quite a lot of things in there you've put/changed, I'm impressed, that was very high delivery !


Thanks a million, we'll play this a lot ! :)
 
Back
Top Bottom