.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Utility: IdUpdater: Image based province definition updater (http://forum.shrapnelgames.com/showthread.php?t=49063)

elmokki August 17th, 2012 08:49 AM

IdUpdater: Image based province definition updater
 
If you have ever edited a map file to add or remove provinces, you know how removing or adding a province will make the definitions go haywire (unless it's done to the top righternmost province)

Yeah. I hate that too. In big maps it's easy to forget a province dot from some province and notice it too late or accidentally have two dots in some province. Those things generally mean redoing most of the map definitions. I'm pretty happy I haven't made those mistakes in a while. Similiarly if you're editing a map to add or remove provinces it'll break the definitions.

What this tool does is scan both old and new image for the white spots and finds out both the old and the new province number for the spot in that specific place. Then it writes a new .map file where any province that was found from the new image is refrenced with the province number it has in the new image.

It supports following .map file commands:
#specstart
#start
#nostart
#neighbour
#terrain

It does NOT support defining gods. I was lazy. All #setland and #land related commands listed on manual before the god stuff should be removed properly though when provinces are removed too, but I didn't test that.

Like all the other crap I've coded for Dom3, it'll work on Windows, Linux and OSX as long as you have a new enough Java Runtime Enviroinment installed. For OSX and Linux the magic phrase is something like "java -jar idupdater.jar" since java by default hates console and thus double clicking the .jar probably won't work.

You can find it from here:
http://koti.kapsi.fi/elmokki/dom3/mods/idupdater-v2.zip

Also check out a tutorial at http://z7.invisionfree.com/Dom3mods/...?showtopic=939

elmokki August 17th, 2012 06:18 PM

Re: IdUpdater: Image based province definition updater
 
I had to release a new version.

- There was a bug that made province ids calculate wrongly when removing provinces from maps.
- Province name definitions weren't correctly updated
- Added support for most #land/#setland stuff (anything except god stuff)
- #imagefile is automatically updated to whatever is supplied as argument when the program asks for the new image file.

Gandalf Parker August 18th, 2012 11:11 AM

Re: IdUpdater: Image based province definition updater
 
Another great app. Thanks.

If it doesnt recognize a command does it leave it in place?
Thats one of my big gripes with the Dom3 map editor is that it removes things I painstakingly put in

elmokki August 19th, 2012 04:55 AM

Re: IdUpdater: Image based province definition updater
 
I wrote a longer text thing but:

It will write every single line in a .map file - possibly modified if needed - except:
- Anything that references to a province number will be skipped if the province was removed
- Anything under province commands and commander commands in the mapping manual except #land and #setland will be skipped after a #land or #setland was skipped due to a removed province until a new #land or #setland is encountered. I think these commands will be also skipped if they are in the file before any #land or #setland.

This means that a bad placement of god definitions COULD remove all the commander commands used in defining the gods. God defining scenarios that need editing are in a minority anyway, so just cut the definitions, run the tool and paste them back in. Or alternatively put them after #land/#setland stuff and make sure the last #land/#setland won't be removed.

Gandalf Parker August 24th, 2012 11:11 AM

Re: IdUpdater: Image based province definition updater
 
Ahh I see the inherent problems with that.

Even better than I hoped for. Thank you for the extra effort.


All times are GMT -4. The time now is 08:11 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.