As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Map balancing and editing tool

So, I've been toying with the idea for some time of making a simple map viewer and/or editor for worldbuilder saves. So I decided to drum together something real quick. Behold my advanced map viewer:

[Image: pb3_2.png]

That is the PB3 map, read straight from the worldbuilder file.

More usefully, I added a Balance Checker that does a breadth-first traversal from each player's starting position to determine each player's sphere of influence. The program then counts the various resources found within that sphere, and calculates other useful metrics such as the total food potential of the sphere.

[Image: pb3.png]

I think this could be a useful tool for balancing maps, and I'd also like to add some bulk editing operations that are missing in the WorldBuilder program.

Here's another example of the tool in action, using a Lakes map. The screenshots are from the 1.0 version with crappy graphics.

[Image: lakes.png]

[Image: lakes_balance.png]

For those not playing PB4 there's an interesting analysis of the PB4 map in the PB4 lurker thread as well.

Discuss.
I have to run.
Reply

Releases:

Latest release, version 1.09. Has a revamped user interface.

The source code is now available here:
https://github.com/novice-rb/civ-tools

If somebody wants to contribute by adding functionality or creating a proper UI that would be very welcome.
I have to run.
Reply

Known bugs:

[strike]1. Balance report fails with index out of bounds exception if there are more players than teams. (So in other words if the map is for a teamer game).[/strike] Fixed in version 1.06.
I have to run.
Reply

Where can one actually get this tool, if it is avalibile?
Reply

Kuro Wrote:Where can one actually get this tool, if it is avalibile?

Okay, I won't be a killjoy, here's the current version.
http://dl.dropbox.com/u/15215428/MapEdit...Editor.zip

But be warned that it's something I whipped together in a couple of hours and is woefully incomplete as yet. The program will crash if it encounters unknown contents in the worldbuilder file, such as Player colors it hasn't seen before.
I have to run.
Reply

Does it need to be in a specific location? It's crashing for me as soon as I click Open Map. (Win7 32bit)
Reply

novice Wrote:But be warned that it's something I whipped together in a couple of hours and is woefully incomplete as yet. The program will crash if it encounters unknown contents in the worldbuilder file, such as Player colors it hasn't seen before.

Or, um, the instant I push any buttons (Windows 7, 64 bit). Depending on how much work you intend to do, feel free to PM me for more details, or just ignore it and I'll just work without it.
EitB 25 - Perpentach
Occasional mapmaker

Reply

Darrell mentioned in one of the other threads that this would be a really cool thing to integrate into a map script, so I'll copy my thoughts on that in here. Building on your notion of a sphere of influence, you could basically create a map script that would generate highly balanced yet potentially quite asymmetric maps. One way to do it could be something like this:

1. Randomly place a set of N starting positions, with a reasonable minimum spacing.

2. Compute the Voronoi diagram for the map based on those N points. If some of the cells end up with what you deem to be too many or too few neighbors, try again from step 1.

3. For each of the N starting positions, generate an equal-sized random land shape contained within its Voronoi cell, constituting its sphere of influence. Depending on map parameters, you could ensure that the land within each cell touches the land within each neighboring cell, or enforce the opposite restriction, creating a continents map.

4. Place resources and terrain in a balanced way within each sphere of influence.

If you want swathes of wilderness, you could optionally achieve this by generating some number of "phantom" starting positions, treated in the same way as the others, except that you don't actually place a player there when you're done. That could unbalance things though, since some players could have easier access to the wilderness than others.
If you know what I mean.
Reply

SevenSpirits Wrote:Does it need to be in a specific location? It's crashing for me as soon as I click Open Map. (Win7 32bit)

Oops, there was a dll missing. I zipped it together in an "installation package", here:
http://dl.dropbox.com/u/15215428/MapEdit...Editor.zip
I have to run.
Reply

novice, this is awesome...
Current games (All): RtR: PB80 Civ 6: PBEM23

Ended games (Selection): BTS games: PB1, PB3, PBEM2, PBEM4, PBEM5B, PBEM50. RB mod games: PB5, PB15, PB27, PB37, PB42, PB46, PB71. FFH games: PBEMVII, PBEMXII. Civ 6:  PBEM22 Games ded lurked: PB18
Reply



Forum Jump: