• 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.
Showing developer posts only. Show all posts in this thread.
mvsnconsolegene said:
As in, like...three fake countries? Everything stripped to it's simplest form?

- MVSN

Precisely.

Hehe as an off-topic insertion I noticed while restructuring the code that I already have 800 lines in the eug_file.cpp, which is a personal record of mine for the line number in a single file.
 
Last edited:
Hurrah!, I now the declare the EUG file loader to be in a working state. It can now load a Victoria save game, then output it, and the ouput file can be run back in Victoria again. It can also load its own output file and then output the file back in exactly the same format, which I think is a good measure of its stability. Below you can download it the ZIP which contains the code, the program and a test input file and the corresponding output file. By the way, I have to revise the code further (I recently changed the Node structure into a class which doesn't like pretty as an interface right now). But if you ask me to do that tonight I'll kill you. :rolleyes:

EUGEdit.zip
 
Well it did get to over 900 the same evening (but it's not really that important hehe).

What to put on your webspace? Well, you can obviously describe the project and provide contact information for those who wish to help: I think we need even more province ID editors at the current pace we're making. Also once we create more content you could try to keep newest program versions, ID lists, and so on on that site (but it wouldn't have to be exactly the newest versions as that is impossible). We could also upload some of the more generic code such as my EUG loader; I have yet to see any similar code related to EUG files released in pulic for the good of the Paradox communities.

EDIT: Bah I just found a bug which makes it impossible to load EU2 save games. Apparently I can load scenarios setups, but I can't load games produced by the Save Game dialog. I am off to work it out...

EDIT2: I found the error pretty quickly, and it seems Paradox cannot keep to standards... Now I have to recode for the new posibility that a tag may include another directly following one....

Code:
combat = { 
    id = { type = 4712 id = 174967 } 
    type = siege 
    province = 696 
    date = { year = 1422 month = may day = 23 } 
    morale = { 2.680 2.180 } 

    #The problem is the line below:
    attackers = { { type = 6001 id = 231 } { type = 4712 id = 164196 } } 

    fortress = { inf = 4521 cav = 0 art = 0 } 
    siege_p = 8 
    siege_d = 0.000 
    siege_breaches = 1 
    }
 
Last edited:
Well it doesn't work as a converter yet, what I have written is merely a file loader for the .EUG files that we will need to modify. However, since this has been written the real programming can start quite soon.

I have now fixed the error and it should work on both Victoria and EU2 save files now. I have included the link to the updated version below:
Updated EUGEdit.zip (no longer valid).

EDIT: I've tried to make a minimal scenario, and I was quite successful when I transplanted the province/POP data into a fabricated save file together with the USA as the only nation in the world. The only quirks were: 1) You can't view the list over the great powers (the game CTDs naturally and self-explainable...), 2) At first month change to February about 1200 error messages appear that you have to click hold down enter and "Ignore" for about 2 minutes. Once this is done it won't appear again though, and when I saved it I noticed one part that is required appears to be the strange number lists in the header section for capitals, provinces and minor statistics. I'll try to find out what those mean, and if they can be ignored somehow.
 
Last edited:
OK the minimal scenario works perfectly now, probably those numbers have to correspond to a file somewhere, they are totally ignored if I just paste the original ones in. Here's the link to a .ZIP with the scenario if anyone wants to try to be alone in the world as the US:

Minimum.zip

Place the .EUG in your "Victoria\scenarios\save games\" folder.

EDIT: Lord Asharak and G-Klav, I would like to change the format you write the province IDs in to the following:

EU2_PROVID "VIC_STATENAME" VIC_PROVINCE1 VIC_PROVINCE2 VIC_PROVINCEX

As an example:
278 "Crappyland State" 1847 1843 1834 638

My reasoning is based on the discovery that states are tied to countries. My new idea basically is to let each EU2 province become its own state in Victoria (which does not necessarily have to correspond to GC states, but similarities would be nice). This is an easy way to handle the state problem which has been plauging me for a long time.
 
Last edited:
To keep things in an orderly fashion I dare to make a third post in a row:

I have now put Lord Asharak's first ID conversions in a file which is of the required format, but I'd like G-Klaves progress too ;). As everything else, I have uploaded it for you to take a look on. But I really want Lord Asharak himself to download it use it as a base for further additions. The most important issue however we need some kind of leader of the province ID mapping section, that will coordinate all the conversion into the same file, and in such a way that no ID occurs twice etc. I propose Lord Asharak or G-Klav for this team position, but this of course is either of them agree and find that they has the time to get in touch with people and organize the province ID conversion. Either way, they should contact each other and decide who will be the main contact person for me. This might not sound important, but it is really hard when people convert different areas at the same time...

Anyway, here is the .ZIP:
Updated Provinces.zip (no longer valid).

I've updated it with G-Klav's progress on page 7. Also, you should edit some of the state names that I've given them (I basically just took their EU2 province names that seem to be really unlogical in many cases).

The ID leader should keep this file and make sure a somewhat updated version is uploaded somewhere for me and the other programmers to download ;). Anyway, to ease the process of keep track of everything, I suggest this person downloads copies of the EU2 ID maps at Builder's Paradise, and then paint red crosses in Paint on the provinces that already have been mapped. This graphical confirmation will make sure we do not miss any provinces in the end, and can hopefully prevent duplicates.

By the way, I converted Italy ;), and while I'm at it, I'll take Spain later as well. I need to take a break from the programming...

If you wonder whether I sleep I can say I do; the explosion here of posts of mine is just a sign of that 1) summer vaccation is approaching, 2) I've broken a bottleneck as noticed, 3) many things have to be organized now rather than later.
 
Last edited:
Another update. This time I've repackaged everything (as well as introducing the entire working directory and bug fixes of the EUG loading code). It also makes two fixes to Provinces.txt.

EU2Vic.zip

Explaination of files:
EUGEdit.exe - This program still only loads and saves EUG files, although I plan to make it some kind of hardcore command line tool for filtering out specific tags.
Eu2Vic.exe - I am programming a command line test version in C++, so you Java coders will have something to get inspired from ;). As for now though it only reads Provinces.txt in, and complains about any errors if found (which is very useful while editing it). That's how I found the current errors that I fixed.
*.h and *.cpp files: Code for the .EUG loader.
Other files: Miscellaneous test data that I intend to use for the first basic conversions.
 
Hehe province ID conversion doesn't require many neurons as I noticed while converting Italy... If you have time to spare the better. As for the format you should download Eu2Vic.zip (see my post above), unzip it, and then open \Data\Provinces.txt. It's where all ID progress has been made so far, and even though someone (we don't know who yet), will have to keep the central version, you can still use it and then paste your own conversions on the forum. Also, for the general format I'd say best description is:

Code:
EU2_ID "STATE_NAME" VICTORIA_ID1 VICTORIA_ID2 VICTORIA_ID3 etc.

Where EU2_ID is the province ID in EU2, STATE_NAME (which must be between "") is the name of the state created in Victoria, and VICTORIA_IDX the corresponding Victoria province IDs for the specified EU2 province. Comments can be inserted on blank lines or after the last Victoria ID you added (and a # must preceede the comment like Paradox's data files). I can give a short example (my Italy conversion):

Code:
###Italy###

370	"Veneto"	837 768 828
371	"Tirol"		829 830 767 823 831
389	"Lombardia"	825 826 820 824 827
390	"Mantua"	838 839
391	"Romagna"	842 845 844
392	"Marché"	854 850 #Consider to remove L'Aquila from this.
393	"Napoli"	737 856 1294
394	"Apulia"	1288 964 1340 1341 1289
395	"Messina"	1297 1298
396	"Sicily"	1295
397	"Sardinia"	738 1299
398	"Corsica"	857
399	"Roma"		855 #Should Rome have this few provinces?
400	"Siena"		851 852 853
401	"Firenze"	846 848 849
402	"Emilia"	840 841 843 847
403	"Genoa"		816 817 818
404	"Piedmonte"	814 815 819
819	"Malta"		1296

If you want to convert a specific area, I think noone is working on South America, North America and Africa right now. I do know we got people working on Europe and Asia (and probably Australia). Pick one and work on it :). Once we've nominated a ID project leader he will be the one coordinating the effort like I mentioned earlier.
 
You can also type in "showid" in the Victoria console, and then when you move the mouse over a province its ID is displayed in the right-bottom corner of the screen.
 
We might need your help, but then again I have no idea how many offered to help already. All province ID converting will take quite a few people to get it finished in reasonable time however, so once we got a person leading the effort he can organize the workload.

On the programming front: The converter now outputs the population data, and hopefully soon the header and global data (I am to finish that today). I don't think it is too wrong to assume that I might be able to get a test country converted this weekend.

EDIT: I've decided to convert from EU2 save games to Victoria scenario setups instead of complete save games. The reason is because then it's much easier to use default include = "x" commands for many things, such as the POP data. This means that the output file generated by the converter becomes ~4 MB smaller and loading and saving goes much quicker...
 
Last edited:
A little joke of mine:

Funny.jpg


Eh looks exciting, doesn't it? ;)
 
Don't you have Victoria??? Then the showid method, although somewhat clumsy, should work. Drawing province IDs on a screenshot takes almost as long time as converting; that's why there are ID maps for EU2 but not for Victoria (yet).
 
Yeah it would be possible. I'll try to include all existing countries at the time of the EU2 save into Victoria (provided their tags have been converted, and the provinces they are in). This is actually the thing I will do this weekend unless an unexpected event/error occurs. After that all finer details that were discussed in the beginning of this thead can begin to get implemented. MSVN another some other programmers also probably want to code a user-friendly Java version based of the C++ one.
 
In general each EU2 province ID can correspond to multiple Victoria IDs, but I have arranged it in such a way that each two EU2 IDs can never map to the same Victoria ID. Unfortunely this means that in your case where 2 EU2 provinces would correspond to one Victoria province, you have two options:

1. Ignore to add one of the EU2 provinces. The converter will be smart enough to disregard this and continue as usual. If you really do need to remove one EU2 ID, please comment about it in the province data file, and also please remove the most unimportant province. By that I mean that a province which can have a capital of a country is considered important, while a crappy low-income province that can never be a capital is unimportant.

2. Assign the less important EU2 ID to some other Victoria province ID that it really shouldn't link to.
 
It should be; I am off to test it now. Thanks very much!

EDIT: Yes you may continue hehe, as long as you hand it in before someone else it's definately worthwhile. ;)

There is one thing which is not correct though, not the actual format but one thing I didn't tell you. I didn't explain that the "VICTORA_STATE" really should be a new string each time (and it doesn't necessarily has to correspond to a GC one). The reason is that I believe states are created and merged by the use of the same strings within the game itself; I am not certain whether you can create split states at the start of a scenario though. Anyhow it would ease the conversion progress if the owner of a state of a scenario could simply be determined by the owner of one province, which will be the case with my suggested setup.

Therefore I would like you to rename those states of yours that have names that occur multiple times (eg. multiple "Rio de Janiero":s etc. A suggestion if you can't think of any new state names is to simply use the EU2 province name (since you will have one for each ID). Those names are not always so good however.

Here you can have your IDs back, because I took the liberty to tab them (somewhat nicely). If you write them in NotePad the tabbing level corresponds to the one in the forums (use the tag "code" to preserve tabbing here):

Code:
#####SOUTH AMERICA#####
###ARGENTINA###
217	"Corrientes"	2653 2654 2656 
219	"Salta"		2377 2406 2415 2416 2419 2420
220	"Santiago del Estero" 2620 2621 2622 
221	"Chaco"		2407 2417 2418 2643 
222	"Santa Fé"	2642 2648 2649 2657 2658 
223	"Buenos Aires"	2647 2644 2645 2659 2646 
224	"Buenos Aires"	2637 2641 
1485	"Córdoba" 2635	2636 2638 2639 2640 
1486	"La Pampa"	2630 2633 2634 

###BOLIVIA###
171	"Potosí"	2401 
192	"La Paz"	2385 2386 2388 2409 2410 
193	"Cochabamba"	2411 2412 2413 2414 
194	"Potosí"	2389 2403 

###BRASIL### 
184	"Para"		2125 2118 2119 
185	"Amazonas"	2106 2121 
187	"Negra"		2075 2076 2077 
188	"Amazonas"	2107 
189	"Amazonas"	2105 
190	"Amazonas"	2108 2112 
191	"Mato Grosso"	2095 2408 
195	"Goyaz"		2441 
196	"Maranhao"	2133 
197	"Para"		2120 2100 
198	"Para"		2126 2127 
199	"Para"		2129 
200	"Maranhao"	2130 
201	"Maranhao"	2131 2132 2135 2139 2134
202	"Parahiba"	2136 2137 2140 2145 
203	"Pernambuco"	2146 2147 
204	"Pernambuco"	2138 2448 
205	"Pernambuco"	2475 
206	"Bahia"		2447 2445 
207	"Bahia"		2438 2446 
208	"Minas Gerias"	2466 2464 
209	"Rio de Janeiro" 2465 
210	"Rio de Janeiro" 2463 
211	"Rio de Janeiro" 2462 
212	"Sao Paolo"	2454 2455 2459 2461 
213	"Parana"	2449 2450 2451 2452 2453 
214	"Sao Pedro"	2405 2616 2655 2663 2664 

###CHILE### 
172	"Potosí"	2402 
173	"Potosí"	2404 
174	"Valparaíso"	2605 2603 2606 
175	"Santiago"	2607 2609 2610 2611 2612 2615
176	"Valdivia"	2613 2614 
177	"Valdivia"	2770 2771 
228	"Valdivia"	2780 2782 

###COLOMBIA### 
158	"Magdalena"	1721 1736 1738 
159	"Boyacá"	2071 2074 2079 2080 
160	"Cundinamarca"	2069 2070 2081 2084 
161	"Cauca"		2068 
162	"Cauca"		2082 2083 
163	"Asuay"		2085 2086 2087 2097 

###ECUADOR### 
164	"Quito"		2088 2089 2090 2091 2092

###FRANCE### 
182	"French Guyana"	2099 2117 
183	"French Guyana"	2124 

###NETHERLANDS###
153	"Dutch West Indies" 1733 
181	"Dutch Guyana"	2115 2116 

###PATAGONIA### 
225	"Río Negro"	2598 2631 2632 2608
226	"Chubut"	2773 2785 
227	"Santa Cruz"	2763 2772 2783 2784
229	"Santa Cruz"	2781 

###PERU### 
165	"Trujillo"	2093 
166	"Lima"		2390 
167	"Junín"		2391 2395 
168	"Lima"		2394 2396 
169	"Arequipa"	2393 
170	"Arequipa"	2398 2399 2400 2397
1482	"Trujillo"	2096 
1483	"Junín"		2392 
1484	"Chuncos"	2381 2383 2383 2384 

###PARAGUAY### 
216	"Asuncion"	2425 2426 2427 2428 2429 2430 2432 2433
218	"Chaco"		2421 2422 2424 2436 

###UNITED KINGDOM### 
180	"British Guyana" 2113 2114 
230	"Santa Cruz"	2788 

###URUGUAY### 
215	"Montevideo"	2650 2651 2652 

###VENEZUELA### 
154	"Orinoco"	1752 2103 2104 
155	"Barinas"	2073 2109 
156	"Venezuela"	1720 1740 1751 2101 
157	"Zulia"		1737 1739 2072 
178	"Orinoco"	1753 2102 
179	"Orinoco"	2111
 
Last edited:
Thanks, I assume they are correct now regarding the state names. I'll just let the converter load them to see what happens.

EDIT: Nice now the entire province ID database consists of a grand total of 258 EU2 province IDs ;). I wonder how many remain...

By the way kokomo, could you convert Spain then? I assume you would be very well suited for the job if you're Spanish.

EDIT2: Sorry for this messy post, but another side effect of the order in which the Victoria IDs are written I did just discover. The first Victoria ID that is listed is the one that will be used for any capital province of the country possessing it. If you know that one of the provinces on a line usually is the capital for country X, go ahead and put it first in line so that:

EU2_ID "STATE NAME" VIC_ID_CAPITAL VIC_ID2 VIC_ID3 VIC_IDX
 
Last edited:
Wow you do this pretty fast... It'll be hard to keep up with the programming ;). Anyhow, you forgot all " " around the state names in that province list :rolleyes: . If you don't have time I can add them later though, so there's no damage done.

I also know that not all Spanish speakers are Spaniards, but I still think you are more qualified than I am :D.
 
I'll add the " ". ;)

Like I've said before, this weekend I will hopefully succeed to convert the first test country (I've selected Sweden :D), although it won't be much to look at.

Anyway, my upload for this night (your latest IDs haven't been added yet though, I'll do that tomorrow):
Eu2Vic.zip
 
Last edited:
You can read the previous pages of this thread (at least the first 5 pages), for pretty good suggestions about how to handle everything. Like you say, we will need to enter a good amount of starting factories (but since there is always 1 supply of each good on the WM there is actually no risk of locking the game into a trend where nothing can be done). Suggestions that have been made on this earlier have said that either infra tech or manufactories should give factories in the states they create. I do not know about infra, but the manufactories part could work to implement. This conversion could be based on the manufactory type, but it could also be randomized and weighted against an ideal distribution of Victoria factories; eg. 1/12th machine parts, 2/12th steel factories or something similar.

As for the gold, leaders and armies, I do not actually believe either would have to be converted. Remember that there is a 16 year time gap between 1820 and 1836, and at least you can imagine that many generals would retire in that time. For simplicity's sake it's just better to import the good old Victoria leaders. Gold has quite some value in EU2, but I would believe that it at any ratio would be more important than the Victorian money. Elsewise one could at least make it so that 1 ducat = 100 Victorian pounds / (EU2 inflation * some constant). As for the armies, I usually disband them at the start of the 1836 scenario anyhow. While it would be nice to have them converted I think this should be given a fairly low priority until other thinks work, because a quite clever algorithm would be needed to prevent imbalances etc.

I think we did already decide to leave the TI spots empty for colonization, although this will make certain counties look strange with big empty wholes in then.
 
Last edited: