• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
hello. i tried following everything and creating a testmap first with this ProvinceDefs and got this error when running the tool:

uPZ4sPE.png


im a bit lost as to what i am doing wrong :-/
there are also no files created anywhere
 

Attachments

  • provinceDef.7z
    7,2 KB · Views: 1
Last edited:
or in all lines because when i deleted lines 7 and 8 the error tells me there is something wrong in line 6 ...

im also a bit unsure about is if the example-provinceDef.xls is up to date.

and what im most uncertain about is what i have to input and what i can leave blank for it to work

and do names of religions, kingdoms etc. have to exist somewhere else or will all fantasy names also work?

by the way: thank you for creating and maintaining this tool for 5 years now. people like you make the world a better place.
 
i added the column, pretty much just copy pasted ur first 6 counties ^^

now it created a lot of files but crashes when i start the mod (without other mods ofc)

i guess i will start with a more basic map just to get it started ... made a huge 8k map...

edit: another thing im fairly uncertain about is what exactly i have to write in the .mod - file

replace_path = "history/provinces"
replace_path = "history/titles"
replace_path = "common/landed_titles"

only these 3 or more? when i havent changed anything yet except the bare minimum
 
Last edited:
Mod crashes probably because of some files that ck2 needs that I don't provide. Also check the technology: Make sure to generate tech files that cover your start date. Mentioned numerous times in this thread, just search for it. replace_paths are covered in this tutorial (or the other one). Just use the ones I tell you to use in the Clans of Ireland thread.
 
I came up with a little bit of an improvement for the provinceDef file and workflow that should work for most mods. So I guess this is a mini tutorial of sorts. The idea is to bring in your entire provinces setup instead of breaking it up into smaller kingoms/duchys. The way I do this is by using different hue value for each duchy so this technique should work on any map with up to 360 duchies.

First thing I did is decide how many empires I'm going to have. In my mod I have 10 empires and I need an extra color for the oceans/rivers. So that's 11 groups. Then I divide 360 by 11 to get approximately 33 duchies per empire and assign the difference between the different hue ranges to different empires. Something like this:

Empire 1: hue 0-33 (reds to orange)
Empire 2: hue 34-65 (orange to yellow)
Empire 3: hue 66-98 (yellow to bright green)
Empire 4: hue 99-130 (greens)
Empire 5: hue 131-163 (grrens to turquoise blue)
Empire 6: hue 164-196 (turquise blue to light blue)
Oceans: hue 197-229 (light blue) you can technically get away with using just one hue value for all oceans and rivers instead you will never need a big range like this example.
Empire 7: hue 230-261 (blue to purple)
Empire 8: hue 262-294 (purple to pink)
Empire 9: hue 295-327 (pinks)
Empire 10: hue 328-360 (pink to red)

Then space the base colors our on the map as much as possible so similar colors aren't bordering each other. You can divide it further into specific kingdoms or however you want to group them. I did not divide them by kingdoms but started coloring them in based on duchys. So all counties within "duchy 1" of "empire 1" have a colour with hue "0" but different shade of the color. You keep moving forward duchy by duchy like that so all provinces in 2nd duchy have a hue of "1" and so on.

Then after you clear out your provinceDef file and paste in your list of colors using the color extractor batch file you should have something like this:

bklGUyo.png


Then select all of the red fields:
yIzxTIs.png


Then right click on "sheet 1" in bottom of your excel window and click "View Code"

A blank VBA macro window should open up. Paste the following code into the box and run it.

Code:
Sub Hue()
    For Each cell In Selection
        R = cell.Value
        G = cell.Offset(0, 1).Value
        B = cell.Offset(0, 2).Value
        
        Cells(cell.Row, 1).Resize(1, 5).Interior.Color = RGB(R, G, B)
        
        R = R / 255
        G = G / 255
        B = B / 255
        
        
        If (R >= G And R >= B) Then
            Max = R
        End If
        
        If (G >= R And G >= B) Then
            Max = G
        End If
        
         If (B >= R And B >= G) Then
            Max = B
        End If
    
        If (R <= G And R <= B) Then
            Min = R
        End If
        
        If (G <= R And G <= B) Then
            Min = G
        End If
        
         If (B <= R And B <= G) Then
            Min = B
        End If
        
        
        L = (Min + Max) / 2
        
        If L < 0.5 Then
            S = (Max - Min) / (Max + Min)
            Else
            S = (Max - Min) / (2 - Max - Min)
        End If
            
            If (Max = R) Then
            H = (G - B) / (Max - Min)
            End If
        
            
            If (Max = G) Then
            H = 2 + (B - R) / (Max - Min)
            End If
        
            
            If (Max = B) Then
            H = 4 + (R - G) / (Max - Min)
            End If
        
            
            H = H * 60
            
            If H < 0 Then
            H = H + 360
            Else
            H = H
            End If
        
        
         cell.Offset(0, 20).Value = H
        
    Next cell
End Sub

xpj8mGZ.png


What the macro will do is colour in columns "A" to "E" in the RGB colour specified in the excel document. And then calculate the "Hue" value and put in the "W" column in the document.

t1NW4eS.png


The last step is to select everything and sort by the hue. (and then by any other colour you want in case hue value is identical)

sVVqC4B.png


What you should be left with is something like this. Each hue value represents a separate duchy, and its all nice and tidy.

Hhs4rJ1.png


If you add colours/provinces or make any changes you can always select the relevant "R" cells and run the macro again. You will likely have to delete the hue column when you're actually running map filler tool. Hope this is handy to someone.
 
Great tool Jonstryker! however, i seem to have a weird problem, where only the 000_provinces_names is genereated, the mapfiller seems to run fine, but i see no definition.csv, or anything else really which is supposed to appear??
upload_2018-4-6_22-39-50.png upload_2018-4-6_22-40-39.png and i can't see the problem with the excel, atleast from comparing it to people with the same problem? can i possibly have missed something?

I hope i am not too late, and that i am not taking away your time on a problem which might be just me missing a detail everyone else has noticed :(
 
You're probably missing that column in the excel that everyone else seems to be missing too. Compare with the example file in the OP ;)

I must be blind, what is this Columm? I litterally can't see the difference :eek: am i going mad?

Edit; hang on, i think i might see what you mean now.. i'll write when i figure it out

Edit2; Oh i see! for thoose who don't realise, which i got stuck with too, i didn't notice that over time. and that there's supposed to be a "Data" colum,upload_2018-4-7_2-4-21.png This one, which has been added over time, and which i didn't notice before now was the new stuff in the post above. haha.

I guess i need to get better at playing where's Waldo from now on. Thanks a lot for the hint!
 
Last edited:
Hey there. FIrst off, thanks for the wonderful tool!

But I'm facing a very frustratring problem. For some reason, the landed_titles.txt file generated has a very strange layout. It goes like this:

Code:
e_empire= {
     k_kingdom = {
          c_county1 = {}
          c_county2 = {}
          d_duchy = {
                 c_county1 = {}
                 c_county2 = {}
         }
     }
}

Why are counties getting duplicated like that? Thanks!
 
Hey there. FIrst off, thanks for the wonderful tool!

But I'm facing a very frustratring problem. For some reason, the landed_titles.txt file generated has a very strange layout. It goes like this:

Code:
e_empire= {
     k_kingdom = {
          c_county1 = {}
          c_county2 = {}
          d_duchy = {
                 c_county1 = {}
                 c_county2 = {}
         }
     }
}

Why are counties getting duplicated like that? Thanks!
Moved the tool to the desktop and it suddenly started working. Ignore previous comment please.
 
I don't know what you are doing mate. You probably have some wrong textin your provinceDef.xls.
The location of the tool should not affect anything...
I don't think there's a problem with my provinceDef.xls, since the same thing happens when I use the default file you provided (this one: http://www.mediafire.com/view/qpmas6q8dpq3iw8/provinceDef.xls). When I run the tool using it, only two empires are created (Maghreb and Russia), with the counties directly below them and then duplicated after the duchies as well. The other empires are simply ignored (Austria and others)!
 
v20 is up!
Probably chock-full with (minor) undocumented features that I already forgot about since, hey, two years passed since I released the last one (still worked though as far as I am concerned).

Please test and if someone comes along with a well thought out idea I will gladly add that in and release v21 in no time :D
Which reminds me @N0body: http://forum.paradoxplaza.com/forum...ill-a-custom-map.697082/page-33#post-22944111 is included ^^
 
Last edited:
Linking to my own example file doesn't really help me pinpoint your problem more. I know for a fact that that file can be used to properly generate the files and load the game up ;)

Here is the file I'm trying to use (converted to .xlsx since .xls can't be uploaded). I took it from the Seven Kingdoms mod, which uses your tool - and works.
 

Attachments

  • provinceDef.xlsx
    179,1 KB · Views: 6
Thanks a ton, Jon! As a longtime ( and heavy) user of this tool, and the assoc char gen tool, I admit I never thought there would be a new version!

You are awesome!
 
v20 is up!
Probably chock-full with (minor) undocumented features that I already forgot about since, hey, two years passed since I released the last one (still worked though as far as I am concerned).

Please test and if someone comes along with a well thought out idea I will gladly add that in and release v21 in no time :D
Which reminds me @N0body: http://forum.paradoxplaza.com/forum...ill-a-custom-map.697082/page-33#post-22944111 is included ^^

Great to see a new version. I hope those minor new features can be easily discovered by the users at least!