DavoM
Private
Posts: 21
Joined: Sat Jul 09, 2016 5:14 am

Modding Models and Units - Adding Names

Mon Sep 19, 2016 9:29 pm

I have been having issues attempting to add flavour names into some Models and Units files (i.e. adding names for extra Dutch infantry regiments for example). I have added names successfully to individual files, however they do not appear within the game once it's reloaded. These are my following issues:

- I have two folders each for Models and Units (Models, Units, Models_prev, Units_prev). What is the purpose of having two lots of the same files for each? Would I need to edit files in both folders?

- Each folder also contains its own Models.Cached and Units.Cached files. I understand that I possibly have to delete these in order for any changes to appear in the game. However, when I have done so I get the following errors and then CTD -

6:27:41 AM [Error ] TDoubleList.AddEltFromString Invalid string LDR_FRA_BOUGENEL2|1 UD: 11039 Jean-François Bougenel

This happens with a large number of Leader units. It seems I cannot reload a new set of cached files, only using the originals will allow the game to load correctly.

Am I missing something? Or am I just wasting my time?

TIA

User avatar
PhilThib
Posts: 13443
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Tue Sep 20, 2016 7:36 am

DavoM wrote:- I have two folders each for Models and Units (Models, Units, Models_prev, Units_prev). What is the purpose of having two lots of the same files for each? Would I need to edit files in both folders?


Only the Models and Units files are read, however it is possible that data with same info may conflict. So I advise you to remove the _prev ones (zip them and set them aside, outside of the game).

DavoM wrote:- Each folder also contains its own Models.Cached and Units.Cached files. I understand that I possibly have to delete these in order for any changes to appear in the game. However, when I have done so I get the following errors and then CTD -


Yes, you need to remove the cached file and then re-run the game once (cached files are created, when absent, on the first game run). Cached usually contain a condensed summary in one single file of all the files, and they prevail on individual files, so even if you later change something in individual files, that won't be read, as the (older) data is read from Cached..

The errors are not linked with the cached files but with the new data you entered. 99% of the time, the kind of error you display is a typo, i.e. the model name is badly re-used/written in the unit. Check they match.

DavoM wrote:Am I missing something? Or am I just wasting my time?


It requires dozen hours of care and attention...it can be done of course, but the effort is daring...
Image

DavoM
Private
Posts: 21
Joined: Sat Jul 09, 2016 5:14 am

Wed Sep 21, 2016 8:10 am

Thanks for the response PhilThib.

I conducted some more experimentation. After the first CTD the game loads to the menu screen. If the 1850GC is chosen then there is an exception error and the game CTDs. This is likely due to the error-ridden unit and model cached files.

So I then reloaded all the original installation files but deleted the two chached files. Same thing happened, CTD with the exact same errors. So it seems it's possibly an error with unit IDs from the clean PON 1.4 STEAM install.

Next I reloaded the original install but only deleted the models.cached file. That actually worked. So I guess it's just the unit.cached file that has an issue. Now whether deleting one and not the other causes issues further along remains to be seen!

EDIT - Yes it does cause issues. Some of the generals of some of the nations (USA, Prussia, Russia as far as I have seen) have the wrong details, so for instance a Prussian general uses the details of a French general. Multiple entries have loaded within the models folder using the same unit ID number, so there will be two #3904 of which the original listed in the SCEN file will link to the wrong model. There are thousands, so not much chance fixing them individually. You were correct PhilThib, it would take many hours of dedication! Pity such a set of minor changes would be such work!

User avatar
Leibst
Posts: 2518
Joined: Wed Sep 27, 2006 6:06 am
Location: Madrid, Spain

Wed Sep 21, 2016 1:52 pm

If you only want to add some flavor names to a unit that is already in the game this is not much complicated.
But of course you have to start over a free of bugs version regarding models or units DDBB.
It will be very strange that a patch has been released with a bug in the units database. I can check that btw as i have a PoN steam installation of this past Monday.
Image
Headquarter game designer of España:1936 and Thirty Years War
http://headquarter.es/wp/

DavoM
Private
Posts: 21
Joined: Sat Jul 09, 2016 5:14 am

Wed Sep 21, 2016 9:17 pm

Yes, I only wanted to add some more flavour names to units already in the game (i.e. the Indian light regiments of the British EIC, or adding artillery regiment names for the Ottomans), so that recruiting any extra beyond those at the start of the game had names that fitted in. It's a little odd that nations like Argentina and Brazil have fully fleshed out unit lists yet the Netherlands, Belgium and Ottomans have many missing elements so that recruiting a new brigade just gives generic names.
Additionally, reinstalling PON 1.04 from Steam (which I did last night) provides both a models and units cached files ready to go. I thought this was a little odd, as shouldn't the first load of the game prompt these files to install if they're missing? The game works with them installed already, so it's not a big issue. They just cannot be removed ever again!

Having extra flavour names is a nicety, but the base game works, it's enjoyable, and it's fun to play the Victorian colonial era. I am happy with that. :)

Siegfroh
Major
Posts: 240
Joined: Sat Jun 27, 2015 4:30 pm
Contact: Website

Thu Sep 22, 2016 9:45 am

The latest patch, "Official patch 1.04" doesn't work, but is being repaired since it came out nearly two weeks ago. I would wait a few days (hours? ha ha ...) until the quickfix is released, before investing time in the game.

If you want to change the name of units (corps, divisions etc.) or elements (the "regiments" in them), you can easily rename them in the scenario file or, if you already started a game, in the .ord file in your savegames folder. To create an .ord file, you must save the game after the current turn started (and maybe have given at least one order in the current turn before).

For units, search for the name of the unit, usually you will find it twice. Overwrite the first occurence with your favourate name. The second occurence, three lines below the first, isn't used by the game.

For the names of elements ("SubUnit" in the files), there is only one entry which you can change freely.

Leaders are a bit more tricky, here you have to change both the corresponding model and unit files.

Example:

{Unit}
1004321 [color="#FFA07A"]<= ID of the structure, group, unit or element in the current scenario or game[/color]
114 [color="#FFA07A"]<= identifies the unit type (number in the GameData\Units folder)[/color]
0
6
1
1004320 [color="#FFA07A"]<= ID of the group to which this unit belongs[/color]
1000001
0
1
0
-1
0
999
-1
0
-1
-1
0
0
-1
0
0
No. 11 District [color="#FFFF00"]<= replace with the new name of the unit[/color]
NULL
NULL
No. 11 District [color="#FFFF00"]<= ignore[/color]
NULL
NULL
NULL
NULL
NULL
NULL
#CbtPower#68#CbtPower#
NULL
{SubUnit}
1004322 [color="#FFA07A"]<= ID of the structure, group, unit or element in the current scenario or game[/color]
249 [color="#FFA07A"]<= identifies the element's type (number in the GameData\Elements folder)[/color]
32
100
0
4
4
0
0
50
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
KR, QORDC, DCLI Mil. [color="#FFFF00"]<= replace with the new name of the element[/color]
{/SubUnit}
{SubUnit}

Siegfroh
Major
Posts: 240
Joined: Sat Jun 27, 2015 4:30 pm
Contact: Website

Thu Sep 22, 2016 10:00 am

For changing a leader name, the only way to do this is through the corresponding .mdl and .uni files.

Here the results from a test I made with the Austrian general Heß:

Changes in the GameData\Units file:

UID = 7182
Alias = uni_AUS_Hess3
NationTag = AUS
Name = Heß (name unit) [color="#FFFF00"]<= used by the game[/color]
ShortName = Heß (shortn unit) [color="#FFFF00"]<= not used by the game[/color]
Text = $ldr_txt_AUS_Hess
Color = $colAUSMain
ModelType0 = $ldr_AUS_Hess3|1
FamilyType0 = $famLeader|1
CmdCost = 0
Pillage = 0
BuildRule = $recCity

Changes in the GameData\Models file:

UID = 8089
Alias = ldr_AUS_Hess3
NationTag = AUS
Name = Heß (name mdl) [color="#FFFF00"]<= not used by the game[/color]
ShortName = Heß (shortn mdl) [color="#FFFF00"]<= used by the game[/color]
Text = $ldr_txt_AUS_Hess
Family = $famLeader
[...]

And here what appeared ingame:

[ATTACH]40023[/ATTACH] [ATTACH]40024[/ATTACH] [ATTACH]40022[/ATTACH]
Attachments
name modding - leader B.jpg
name modding - leader A.jpg
name modding - leader C.jpg

Siegfroh
Major
Posts: 240
Joined: Sat Jun 27, 2015 4:30 pm
Contact: Website

Thu Sep 22, 2016 10:19 am

PS. The data files would be smaller and maybe the overall performance of the game quicker, if all the unused entries were eliminated.

DavoM
Private
Posts: 21
Joined: Sat Jul 09, 2016 5:14 am

Thu Sep 22, 2016 10:39 am

I am aware of the issues with the current patch, and have seen that there will be a quickfix soon :wacko:

In the meantime I have adjusted the 1850 GC with the fixes that you've addressed in other posts, so thanks for the work Siegfroh. I wish I had your level of patience!

In regards to the savegame .ord file, would renaming be possible with a newly recruited unit? I imagine that the file is a record of the .scen file at that saved point of the game, so maybe it's possible......

Siegfroh
Major
Posts: 240
Joined: Sat Jun 27, 2015 4:30 pm
Contact: Website

Thu Sep 22, 2016 10:50 am

DavoM wrote:In regards to the savegame .ord file, would renaming be possible with a newly recruited unit? I imagine that the file is a record of the .scen file at that saved point of the game, so maybe it's possible......

I am quite sure (but haven't verified), with the order to recruit a new unit this unit is added immediately to the .ord file. Just give it a try, recruit, rename and after one turn you will see wheter the name change is effectuated.

It is also possible that newly recruited units receive their names only while the next turn is procesed. So you possibly would have to wait for the next turn after recruiting, before you can change the name.

If you want to see a name change to be realised immediately, save the game, change the .ord file, and reload the game instead of resuming it.

DavoM
Private
Posts: 21
Joined: Sat Jul 09, 2016 5:14 am

Sat Sep 24, 2016 12:22 pm

Siegfroh wrote:I am quite sure (but haven't verified), with the order to recruit a new unit this unit is added immediately to the .ord file. Just give it a try, recruit, rename and after one turn you will see wheter the name change is effectuated.

It is also possible that newly recruited units receive their names only while the next turn is procesed. So you possibly would have to wait for the next turn after recruiting, before you can change the name.

If you want to see a name change to be realised immediately, save the game, change the .ord file, and reload the game instead of resuming it.


Thanks Siegfroh, that worked perfectly. :cool:

Return to “PON Mods”

Who is online

Users browsing this forum: No registered users and 1 guest