• 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.
M

montyP

Guest
I have made a VicToHOI2 savegame file converter. It’s only an early version, and it doesn’t convert everything from Vic yet, but if anyone wants to try it out email me on "monty (at) ebox.tninet.se".

Right now the converter converts resources, money, manpower, relations, transports(convoys), land units, naval units, policy, belligerence, alliances, technology, IC and infra. All countries from Vic to HOI2 are in, and all provinces are converted.

I add naval bases and air bases from the file “bases.txt”. It is the same file as can be found in the 1936 scenario folder. Dunno how to convert naval bases, so this is the solution I stick with for now. The file should be updated for future releases…


VicToHOI2 in action:

VicToHOI2.JPG
 
Last edited by a moderator:
Tabriz looks odd in the two pictures...
 
MadLibyan said:
I've been having some trouble converting files. Only the pre-made scenario files are converting, and even those won't load properly in HOI2. Any suggestions?

Yeah, I found a nasty little bug in the converter. :)

I'm sending out a new version to all who's got it so far.

Thanks
 
Well, the new version is definitely an improvement. My Vic games are converting fine, but they still won't load in HOI2. The file loads a little more than halfway, then I get errors. Hopefully you can work out these bugs sometime.

Yeah, but thanks for even working on the converter. Most people (like me) are scared to even attempt something like this.
 
Very nice work, I can get it to load, after choosing to ignore the error messages when they pop up. Though a few provinces are empty, it's probably due to VIP.

A few suggestions.

1. IC. Right now the IC values are from those in the 1936 scenario. This severely hampers a-historical gameplay, as my Manchu Empire spanning Africa, Middle East, Siberia, Asia and Australia with 9000 industrial score has a meager 140 IC. What you could do is take the combined levels of all the factories in a state, multiply that by a constant, I think 2 or 2.5 would be enough, then give that much IC to a single province in the corresponding state/area. Even better if you could distribute it among all the other provinces, but I think that's a bit too hard. I had a total of 50 factory levels in Jiangsu, but all I got in HOI2 was 18 IC and a lousy T-shirt. :rolleyes:

2. Ships!!! You're probably working on this right now. I had to annex Persia to get a land connection from Asia to Africa, since I didn't have my dozens of transports.

3. Certain provinces have 'translation' error. I conquered the provinces of Kotlas and Mezen from Russia, (Mezen's the topmost province that gives access to the White Sea, Kotlas is right below it.) I have these 2 provinces and the whole Ural state, forming a nice border with Russia. Now Mezen is back in Russian hands and my 10 division force in Kotlas is trapped! (Perhaps due to Mezen being Russian core province, and Kotlas is not.)

4. Certain provinces have gone to the wrong faction. Many of the unconquered African uncivs in VIP have switched sides... to INDIA. Maybe it's just VIP, but India isn't supposed to have them!

5. Siberia and Ural gets 1% dissent... not sure why. They aren't supposed to, since *I* colonised Siberia!!!

6. Game crashes upon unpausing. :eek:
 
MadLibyan said:
Well, the new version is definitely an improvement. My Vic games are converting fine, but they still won't load in HOI2. The file loads a little more than halfway, then I get errors. Hopefully you can work out these bugs sometime.

Yeah, but thanks for even working on the converter. Most people (like me) are scared to even attempt something like this.

If it says “scenario file had errors” it’s probably because not all provs are in. Right now I can think of two things why this occur; 1) Not all provs in Vic are colonized. All provs have to be regular colonized provs, not coaling station etc. or empty 2) There is a problem with the weighting of provinces in the code (i.e. a bug).

If you press ignore when you get the error message in HOI2 it should continue loading.

Please send me the Vic file and I will have a look at it (zipped please).
 
mib said:
Very nice work, I can get it to load, after choosing to ignore the error messages when they pop up. Though a few provinces are empty, it's probably due to VIP.

A few suggestions.

1. IC. Right now the IC values are from those in the 1936 scenario. This severely hampers a-historical gameplay, as my Manchu Empire spanning Africa, Middle East, Siberia, Asia and Australia with 9000 industrial score has a meager 140 IC. What you could do is take the combined levels of all the factories in a state, multiply that by a constant, I think 2 or 2.5 would be enough, then give that much IC to a single province in the corresponding state/area. Even better if you could distribute it among all the other provinces, but I think that's a bit too hard. I had a total of 50 factory levels in Jiangsu, but all I got in HOI2 was 18 IC and a lousy T-shirt. :rolleyes:

2. Ships!!! You're probably working on this right now. I had to annex Persia to get a land connection from Asia to Africa, since I didn't have my dozens of transports.

3. Certain provinces have 'translation' error. I conquered the provinces of Kotlas and Mezen from Russia, (Mezen's the topmost province that gives access to the White Sea, Kotlas is right below it.) I have these 2 provinces and the whole Ural state, forming a nice border with Russia. Now Mezen is back in Russian hands and my 10 division force in Kotlas is trapped! (Perhaps due to Mezen being Russian core province, and Kotlas is not.)

4. Certain provinces have gone to the wrong faction. Many of the unconquered African uncivs in VIP have switched sides... to INDIA. Maybe it's just VIP, but India isn't supposed to have them!

5. Siberia and Ural gets 1% dissent... not sure why. They aren't supposed to, since *I* colonised Siberia!!!

6. Game crashes upon unpausing. :eek:

Hey there, nice feedback. Remember though it’s only an alpha version, and things will be fixed as progressing. But this sure helps the progress speed of this project as I don’t have time to test it on that many different files.

To answer your observations:

1) No, IC is not converted yet. It is as you noticed the 1936 scenario values. In the future, it could be based on factories in area, number of pops and economic/infra tech level in Vic somehow... Anybody else have any suggestions?

2) Ships don’t convert yet. The game crashed when I put it in and I have to figure out what’s making it crash.

3) Translating the provinces was a really hard task, and I’m sure there are errors here and there. I will amend them as soon as possible.

4) This is due to you converting from VIP. The converter is in its present state only designed to convert countries from vanilla Vic to vanilla HOI2. Check the countries.txt file in the data folder to see how it's done.

5) Dunno why, can be because they aren’t one of your core provs. National provs are converted directly from Vic.

6) This it most definitely should not do. Please send me the Vic file you converted from (zipped please) and I will have a look at it.

Thanks!
 
Last edited by a moderator:
Ughh I have to slap myself in the face, because I posted about making exactly such a converter, only to get informed in that thread by the first reply you are already making one! :rofl: :eek:o

Good luck, I'll be keeping my eyes on this one! Maybe you should advertise it a bit more, because it appears people in general are not aware this exists. (Lots of "noone is working on a VicToHoI2 converter yet"-posts.)

By the way, I assume you converted all map IDs already by looking at your screenshots. Am I correct?
 
Chaingun said:
Ughh I have to slap myself in the face, because I posted about making exactly such a converter, only to get informed in that thread by the first reply you are already making one! :rofl: :eek:o

lol

I just looked at your post, and there are a few interesting ideas there that can be further developed. Country alignment (for example) will be hard to convert fair unless making a few assumptions, as you did.


Chaingun said:
Good luck, I'll be keeping my eyes on this one! Maybe you should advertise it a bit more, because it appears people in general are not aware this exists. (Lots of "noone is working on a VicToHoI2 converter yet"-posts.)

By the way, I assume you converted all map IDs already by looking at your screenshots. Am I correct?

Thanks man.

I think lots of input is needed on how to convert certain things though for this project to continue smoothly. One thing that will prove to be a real challenge is the IC conversion.

Yes, all provs from Vic to HOI2 are converted. It was a real monster task to convert them all… Then, to make it fair in the conversion process, I weight them in the cases where there are many Vic provs for every HOI2 prov.
 
Very specific idea about IC:

Like someone else said and what I proposed in my thread, the IC of a province should be based on the factories present in the Victoria state of that province. Now, I don't remember whether in the save file the factories were actually tied to any specific province or if they were in a state section - I can check this later. Anyhow, regardless of that I propose something like this (sorry for the ugly variable names):

Hoiprov_IC = Round(Vicstate_factory_value * C * (Vicprov_population / Vicstate_population) + Population_bonus) + Capital_bonus

(Round(x) is just a regular rounding function, which for example in C++ could look like y = int(x + 0.5f); )

If the province happens to contain a country's capital, then Capital_bonus is greater than 0, maybe 2 or 5 or so. It is to prevent certain countries from being without any IC at all.

Population_bonus happens at certain non-linear intervals of the total population in the correspond Victoria province(s). This is to prevent certain uncivilized nations from having abysmal IC (such as China). The exact intervals are to be determined, but the bonuses they give have to be rather small so it does not go on to generate huge ICs for example, once again, China and Korea. Note that this number is not necessarily an integer.

Hoiprov_IC is obviously the IC that is calculated. C is a constant which can be determined later, and perhaps be an user option.

Vicprov_population is the total population of the province(s) that this HoI2 province corresponds to in Victoria. Vicstate_population would be the average population in the state(s) these provinces lie in (average as in States_population_sum / State_number). A variant of this theme could be that only certain types of population would count, like clerks and craftsmen, but I think this would give less of an indication since the factory productivity in Victoria is non-linear to POP size.

Vicstate_factory_value is the interesting bit. It would be calculated with a formula I will soon describe for each state, and the actual value used in the equation above would be an average once again because if the HoI2 province corresponds to multiple Vic provinces then it may lie across state borders. In its most basic form I would want it to be calculated something like this:

Vicstate_factory_value = Heavy_factory_number + Medium_factory_number * D + Light_factory_number * E

D and E are constants less than 1, and for example they could be D = 0.5 and E = 0.25. The number of "heavy factories" is absolute, and the other numbers are relative to it. Why do I want to make a distinction between heavy, medium, and light industry? Well, essentially the IC in HoI2 is mainly representing the industry usable to the war effort. Sure, it can produces consumer goods (at least in HoI1) but I think it is only a representation of industry capable of producing war related items diverted to consumer items. Hence, I split the industry into three categories where some factories are more worth than others to the war effort.

The actual classification of factories can be discussed. I would argue that artillery, tank, airplane, car, steel, electric gear, telephone, small arms, ammunition, machine parts, explosives and fuel factories are good candiates to be heavy ones. Steamer shipyards maybe also can be considered as heavy since they were probably rebuilt from 1920 or much earlier to build other kinds of transport ships. ;) Medium are more difficult, but I think regular clothes should be in since after all clothes are required for armies. Maybe clipper shipyards (also can be thought of as rebuilt). Cement and canned food could possibly also fit into this category. Everything else would go into the light factory category. Why? Because I don't imagine it being able to produce lots of stuff very important to the war effort. Of course this list is flexible.

You could also scrap the classifications altogether and make the system more flexible with a multiplier for each factory type. Maybe this is even desirable since it still takes almost the same amount of programming; it just requires a bit more typing in the data files. However, the general principle of evaluation of a factory's contribution to the war should still be applied.

That was all. By the way, coal with be a good choice for the "energy" resource in HoI2, wouldn't it? I don't know how much you have implemented already or how; I just toss around ideas right now. :)
 
Last edited:
Chaingun said:
Very specific idea about IC:

Like someone else said and what I proposed in my thread, the IC of a province should be based on the factories present in the Victoria state of that province. Now, I don't remember whether in the save file the factories were actually tied to any specific province or if they were in a state section - I can check this later. Anyhow, regardless of that I propose something like this (sorry for the ugly variable names):

.
.
.
[cut...]

I like your idea a lot. This is totally in the line of what I’ve been thinking on how it should be done. The Vicstate_factory_value especially is a real nice touch, it adds to the feel and gives you something extra for that aeroplane factory you maybe hesitated to build.

Every good idea can be expanded further though, and one thing I would like to see in the equation is commerce and industry tech somehow. As technology level and factory output are very closely linked together. And I think highly developed countries should be able to take advantage of this.

Further more. There are problems on the way though, as there almost always are.:) I don’t think that they are unsurpassable, but we have to identify they and look at a way to handle them. Yes every factory is tied to a province, or rather a province within a state. But how should we handle this if a state is divided between two or many HOI2 provinces? Or, if one HOI2 province is composed by many parts of many different Vic states? Or, if many Vic states lies within one HOI2 territory (ok that’s not a big problem, just add them up right)?

All this can be handled though if we calculate a factory value for every state and then if the state is divided we divide the factory value and give every province a factory value of it’s own, when I come to think about it. Hmm, that should do it.:)

About resource conversion: What I did was give large nations one value and small nation one value then their actual resources from Vic can be added upon it. Coal – energy, oil – oil etc. Then I based money on country size rather than on actual Vic money, as the concept of money in HOI2 is a little bit different from that of Vic.

Keep the ideas coming Chaingun.

Cheers
 
What about resource production of HOI2? For Energy, oil and metal, this is rather easy (just take coal, oil and metal respectively) but what about the monthly production of rares? Sulphur? Rubber? Precious Metals? And the monthly production of Manpower/province? Use amount of soldiers? Perhaps grain production, like in EU2?
 
montyP said:
None of the three big alliances are in (haven’t figure out all the details on how they should convert), so if you want to keep score just add them yourself (add at least one nation to each fraction).

I suggest that :

The most prestigious nation with "Order" as national value become the axis leader. All his full allies enter in the axis.

The most prestigious nation with "Liberty" as national value become the Allied leader. All his full allies enter in the allies alliance.

The most prestigious nation with "Equality" as national value become the Komintern leader. All his full allies enter in the komintern.
 
Captain Frakas said:
I suggest that :

The most prestigious nation with "Order" as national value become the axis leader. All his full allies enter in the axis.

The most prestigious nation with "Liberty" as national value become the Allied leader. All his full allies enter in the allies alliance.

The most prestigious nation with "Equality" as national value become the Komintern leader. All his full allies enter in the komintern.

The problem with this is that it's by no means guaranteed the supposed nation has any allies at all. For example, if my Austria in one game was to be determined as a leader of some alliance, it is unlikely I would have any allies of real value in HoI2. (Unless you convert my defence alliances with a splintered Germany into a full alliance in HoI2.) The same goes for the AI; it is likely to form an alliance nowhere near the global scale to make matters at world war. Maybe events should get outputted by the converter that other nations of Order, Liberty and Equality would have a chance to join their respective alliances if they were "main-allianceless" in Victoria (i.e. in non of the three HoI2 designated alliances). You could also make it so the chance in the event would be related to the size/prestige of the nation so that big nations are more likely to take a stand than some faraway tiny country nobody really cares about. Of course, the event would also have to have a No option for human players even if the AI chance was 100%.

So a summary: Elect the leaders like you proposed but HoI2 allies to these leaders most be elected elsewhere than his Victoria alliances.
 
In vanilla HOI2, Germany start alone in axis, URSS next to alone in komintern (with mongolia and tanu tuva), only allied have two major : France and United Kingdom. So an Austrian axis leader with no allies at game start is not a problem for me... You could ask other country to join your alliance in hoi2...