• 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.
EDIT: BTW, did I post somewhere about the "/debug" switch or did you stumbled upon it yourself? :) I doesn't do too many wonders in the public releases so it's almost an Easter egg.

I found it in the changelog and tried it to see if it creates any log.

The problem with monitoring the autosave file will be probably harder to catch but I'll try to find what may cause it. I tested Observer with longer savegame much less than importing single savegames, due to lack of time, so something must've slipped through.

I suppose you're using a .net FileSystemWatcher object to monitor the file, and the file is changing (last edited time-stamp is changing) so it seems strange that the change is not detected.
 
arl said:
I suppose you're using a .net FileSystemWatcher object to monitor the file, and the file is changing (last edited time-stamp is changing) so it seems strange that the change is not detected.

Naah, I don't have to use anything sophisticated, it's clear that the file was changing. I discovered the problem was caused by a recently introduced line that was meant to rule out saving duplicated savegame snapshots but there was a logical error there and the method was a bit too efficient ;)

The rest of problems are fixed as well, I'm uploading the latest version in a couple of minutes :)
 
I tried and DH Observer works nice, now.

Anyway, I found setting filter in this particular way in statistics tab cause an unhandled exception (here is the AAR)
195o9u.jpg


Also, manpower production (current by prov) and infrastructure data seems to be mixed: current infra map mode shows manpower data, and the opposite.
Here is the savegame, just in case you want to check it.
Other than that, I'd suggest to make dropdown lists wider in statistics tab, because some map mode have very long test, especially the resources one (ie: Energy production current, per province).
 
Yay, I've got even more in-depth bug reports! ;) I'll be correcting and improving the code from DHC even after I consider the project done for good so it's doubly useful.

Core (and claimed) provinces are the only occurences of so-called CountryProvince data tables (each province is described by a country and one provinces can be described by multiple countries), being the most complicated of all and it's probably the most bug-risky type. Thanks for the savegame, I'll check it.
 
I tried and DH Observer works nice, now.

Anyway, I found setting filter in this particular way in statistics tab cause an unhandled exception (here is the AAR)
(snip)

Also, manpower production (current by prov) and infrastructure data seems to be mixed: current infra map mode shows manpower data, and the opposite.
Here is the savegame, just in case you want to check it.
Other than that, I'd suggest to make dropdown lists wider in statistics tab, because some map mode have very long test, especially the resources one (ie: Energy production current, per province).

Current manpower had infrastructure stats and current infrastructure had IC stats. Fixed. :)
The second problem fixed too, was a wrong reference and I didn't ever fixed it. It's not too useful anyway (the big table shows 0 if some province is not core, 1 otherwise) but it follows the design "every map mode has its table".

I'm uploading the new version in a moment.

From now on, there's a link in my signature to alternative download location should my website ever go down again (like free hosting should, from time to time ;) )
 
Hello Bizon!

I need to finally sort out the IC levels in MDS2, and put them to proper modern day levels, if I can?

You have a number of little programs to aid modding in DH, I wonder which one would you suggest to use? .. The Companion?

I was thinking...

It would be a great idea to have this:

You already have your province map convertor... so you have the provinces for each country... it would be nice.. considering there is MDS2 and RDD (which will have many more eras of time.. various scenarios.. where the IC levels will need to be roughly accurate to the time period.. I mean have a program which can adjust IC levels quite easily...

... The program... I tell the program the country, and it allocates the IC evenly over all the provinces.. I can then take .. or the program will put .. that data into the province.csv file

I mean I can have:
USA = 1000
China = 800
Germany = 700

.. and so on, but no manual labour, it is all done in a jiffy!

Do you think it can be done. I think you CAN do it Bizon...:)
 
I had experience with a similar task, i.e. creating events that increase/decrease IC and resource production. It is similar in the general idea but the output quite differs.

If you looked at my calculation tables, maybe it would suffice to do the following: when you have a table where each province has an assigned target IC, energy, metal and following values, can you use an Excel formula, in the tune of:

Code:
="province = { ic = { size = "&A10&" } energy = "&A11&" metal = "&A12&" }"

where A10 cell holds an IC value, A11 cell energy value, etc. for a given province.

Then you could drag the formula down for every province present and then copy the resulting list to a scenario file.

Do you think it will work?
 
I had experience with a similar task, i.e. creating events that increase/decrease IC and resource production. It is similar in the general idea but the output quite differs.
If you looked at my calculation tables, maybe it would suffice to do the following: when you have a table where each province has an assigned target IC, energy, metal and following values, can you use an Excel formula, in the tune of:
Code:
="province = { ic = { size = "&A10&" } energy = "&A11&" metal = "&A12&" }"

where A10 cell holds an IC value, A11 cell energy value, etc. for a given province.
Then you could drag the formula down for every province present and then copy the resulting list to a scenario file.
Do you think it will work?

It might work better doing it this way, and doing an excel macro to step through all the cells in a column?

But then you'd have to have all the cells lined up correctly, or it would be pandemonium!

I used your Companion to help me do the first 50 country's IC levels for MDS2. It was like using lord gelderon's (?) map from the old days...

IT WAS VERY GOOD Bizon! Thanks again for the tool!
 
Hey Bizon,
I find that the colors on the map are a little too pale to differentiate easily some countries. I wonder if it would be possible for the program to check first if there is a colorscale.csv file in the folder, and if not to load the colors which are hardcoded. That way, the map could display the colors used by any mode, to the condition that the colorscale.csv file would have been copied in the DHC folder. Would that be possible?
Cheers!
 
From what I remember the program actually reads colorscales.csv from the game (mod) folder. If the colors are too pale maybe it's the fact that DH applies some shading for the provinces so it looks better.

So you propose for the program to look in the folder where exe is placed first before going to the game folder and loading colorscales.csv from there? It's easy to do :)
 
Hmm, not exactly. I suggested to look a the colorscale.csv located in the DHC folder first (this file being copied here by the user), and to load default values hardcoded only if there is no such code. But let me first check tonight if my "issue" happened because I had loaded some new files, which have modified my intented setup.
Thanks, Bizon!
 
So, here is how is the map in WIF2, and its rendering in DHC.





1- I have checked that the colorscale.csv files are the same in all the subdirectories of "Darkest Hour". Since I don't know exactly what is the location of the one that your program calls, I wanted to avoid any possible confusion.
2- I have used Photoshop to check some of the colors used, based on their RGB values in colorscale.csv : The result seems to be in between the 2 screenshots posted above. :blink: I guess that you are correct and that DH applies some shading effect. I will try to look at it deeper.
 
No, they are obviously different ; e.g. if you look at the Dutch territory.

I must have remembered wrong, in fact those colors are hardcoded, that means that each country's color definition is read from country.csv but meaning of color strings (LightGray, DarkBrown, etc.) is set in stone.

Code:
case "LightGray": Color = Color.FromArgb(250, 250, 250); break;
                case "DarkBrown": Color = Color.FromArgb(217, 195, 195); break;
                case "LightYellow": Color = Color.FromArgb(255, 244, 191); break;
                case "UserColor4": Color = Color.FromArgb(218, 206, 142); break;
                case "UserColor3": Color = Color.FromArgb(206, 166, 166); break;
                case "LightBlue": Color = Color.FromArgb(223, 242, 254); break;
                case "Brown": Color = Color.FromArgb(182, 185, 126); break;
                case "DarkOrange": Color = Color.FromArgb(194, 169, 141); break;
                case "Yellow": Color = Color.FromArgb(255, 240, 148); break;
                case "DarkBlue": Color = Color.FromArgb(175, 176, 221); break;
                case "UserColor6": Color = Color.FromArgb(200, 135, 135); break;
                case "UserColor5": Color = Color.FromArgb(210, 90, 90); break;
                case "LightGreen": Color = Color.FromArgb(185, 192, 135); break;
                case "White": Color = Color.FromArgb(255, 255, 255); break;
                case "LightBrown": Color = Color.FromArgb(197, 247, 247); break;
                case "Green": Color = Color.FromArgb(160, 208, 174); break;
                case "DarkGreen": Color = Color.FromArgb(141, 170, 150); break;
                case "UserColor1": Color = Color.FromArgb(0, 192, 212); break;
                case "DarkYellow": Color = Color.FromArgb(235, 211, 175); break;
                case "DarkGray": Color = Color.FromArgb(255, 250, 224); break;
                case "Grey": Color = Color.FromArgb(185, 185, 185); break;
                case "Red": Color = Color.FromArgb(240, 163, 163); break;
                case "Blue": Color = Color.FromArgb(188, 217, 252); break;
                case "Gray": Color = Color.FromArgb(185, 185, 185); break;
                case "LightRed": Color = Color.FromArgb(255, 255, 230); break;
                case "UserColor2": Color = Color.FromArgb(219, 230, 247); break;
                case "LightOrange": Color = Color.FromArgb(255, 208, 197); break;
                case "Black": Color = Color.FromArgb(85, 85, 85); break;
                case "DarkRed": Color = Color.FromArgb(235, 30, 100); break;
                case "Orange": Color = Color.FromArgb(220, 224, 177); break;

I'll correct it today :)
 
Done, should be working now! :) Colors are still generally lighter than the ones used in DH Full but again it's the matter of lack of shading applied. I don't havy any quick idea how to apply any shading and of course making all countries uniformly darker won't help. But maybe now those colors taken straight from colorscales.csv are going to be better than the original hardcoded ones?
 
Done, should be working now! :) Colors are still generally lighter than the ones used in DH Full but again it's the matter of lack of shading applied. I don't havy any quick idea how to apply any shading and of course making all countries uniformly darker won't help. But maybe now those colors taken straight from colorscales.csv are going to be better than the original hardcoded ones?

Thank you Bizon. I had a look earlier and it is better like that. I've tested the tool more thoroughly this week, and now, I have several additionnal requests for your programming skills :rolleyes:

-would it be possible to add a box to check/uncheck somewhere, where the user would indicate if he wants to use the colorscale in the mod folder, or the one in the DHC folder (supposing that it has been added there previously by the user)? That way, it would be possible to fiddle with the one in the DHC folder, without messing up with the one used in game.

-IC (maximum per country) and IC (current per country) return the same values in the statistics. And both are wrong in my WIF2 game. I have 0/100/132 in my game, but the stats return 189 for current/maximum.
Would it be possible to fix that?

-and last thing (for now), do you think that it would be possible to add new stats for each resources, for the critical/desired/max stockpiles? If it is possible, I would use it for my ongoing AAR.

Cheers!
 
The first one is trivial.

The second one -- seems so but I already suspected there's a glitch in calculation of the country's IC levels. Currently it's counted in a straightforward way (all ic "size" and "current_size" attributes are summed up) but I suspect at least one factor messing there, i.e. minister modifiers. Which means that DHC should read a) the current cabinet from the save file, b) respective db\ministers file, c) minister_personalities.txt and interpret them together. It's something that I originally planned for the program so nothing impossible but still requiring some coding. Secondly, domestic policies modifiers may too come in. And I don't know if there are any other modifiers.

About the third one - sure, but I checked a savegame file and they're not written there so I think they are calculated on the fly. I checked the misc.txt descriptions and old dev diaries but I can't find what are their exact formulas (IC * misc.txt factor * something else?). Do you remember where can I get them easily?

From all the points above, the second thing requires some real work on additions to the code. It's not something that can't be done though ;)
 
1-Regarding the thresholds for energy/steel/rare, it seems to be quite easy. It seems to be based on the ICs available, multiplied by a fixed value depending on the resources and the threshold:
For 1 AVAILABLE IC, and when AT PEACE
-critical: rare x15, steel x30, energy x60
-the ratio between critical/desired/max are 1/3/6
See
Threshold.jpg
When AT WAR, the values are multiplied by a value from misc.txt
(# Wartime Desired Stockpile multiplier - multiplier on the Desired Stockpile for all resources and supplies when at war)

2-Regarding oil/supply, it is more complicated, I've asked for help in the development forum (see your DHC section).

Cheers!