COG Mods

Crown of Glory: Europe in the Age of Napoleon, the player controls one of the crowned potentates of Europe in the Napoleonic Era, wielding authority over his nation's military strategy, economic development, diplomatic relations, and social organization. It is a very thorough simulation of the entire Napoleonic Era - spanning from 1799 to 1820, from the dockyards in Lisbon to the frozen wastes of Holy Mother Russia.

Moderators: Gil R., ericbabe

alaric318
Posts: 366
Joined: Tue Oct 07, 2003 5:45 am

RE: New National Colors in 1.2.16...

Post by alaric318 »

greetings, for me, the given solution is ok, as i have make few changes in the file ("players2"), and like more the minors base morale in the original "players2", to change only the color and no other parameter in the file you must identify, in the file, where are the numbers that fits with the main index, as are differential between space occupied by the numbers and the main index, so, it cannot be readed as it fits in the wordpad, i will give the best example for it, in the "players2" file, the "0s" below the main index field "blue" do not give reference to it, because the index and the numbers do not fits, at the end of the file you will see fields without number below them, well, color fields in the main index come just after "max unit strength" field (always 10000) but numbers do not fit just below "red" "green" "blue" (fields 8,9 and 10 in the main index) so, the numbers to be edited to change color are positions 8, 9 and 10 in each "player" (just after the "10000"), note, also that some "players" given the lenght of the name begin numerical fields in different rows from others, hope all this help...

with regards,

Murat30.

Image
Attachments
CoG2.gif
CoG2.gif (131.4 KiB) Viewed 767 times
There is no plan of battle that survives the contact with the enemy.
User avatar
nepomuceno
Posts: 5
Joined: Sun Dec 18, 2005 11:52 pm

RE: COG Mods

Post by nepomuceno »

Hi all!!!!!!!!

I´have any question[&:] What´s the code number of the different units in the textbox "Start2"......for example

Ships are they "6"
Hv Ships are they "14"
Frigates "31"
Infantry "3"

I´have interested of the code numbers of the infantry and cavalry units.

Thanks to all[:)]
AQUI LA MAS PRINCIPAL HAZAÑA ES OBEDECER...
alaric318
Posts: 366
Joined: Tue Oct 07, 2003 5:45 am

RE: COG Mods

Post by alaric318 »

greetings, take care about "master" file in the main /data subfolder, there you can find all unit types listed,

with my best regards,

Murat30.
There is no plan of battle that survives the contact with the enemy.
User avatar
nepomuceno
Posts: 5
Joined: Sun Dec 18, 2005 11:52 pm

RE: COG Mods

Post by nepomuceno »

Thanks a lot Murat!!!!!

I´dont Know this.

Regards!!!!!!

Are you Spanish???????? i´m spanish.
AQUI LA MAS PRINCIPAL HAZAÑA ES OBEDECER...
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

Tanaka,

If you open players2.txt in a spreadsheet program, there should be columns labeled:

NAME2
Adjective
Leader
HomeProv
BASEMORALE
MaxContainer0--armies
MaxContainer1--corps
MaxContainer2--fleets
MaxContainer3--cities
MaxUnitStr
Red
Green
Blue
etc....

Under {Red, Green, Blue} France should have the values 153,161,222; Britain should have 236,125,123; and so forth.

There are Red,Green,Blue columns under the EuProv2.txt file, but these do not have anything to do with player color.

If your players2.txt file has zeroes under the Red, Green, Blue columns for players, then I think there is a problem with that file.
Image
User avatar
malthaussen
Posts: 143
Joined: Wed Jan 11, 2006 7:08 pm

RE: COG Mods

Post by malthaussen »

Is adding leaders or units simply a matter of inserting another line in the commandr/players2 files, or are there other files that need to be modified?

-- Mal
"Of two choices, I always take the third."
alaric318
Posts: 366
Joined: Tue Oct 07, 2003 5:45 am

RE: COG Mods

Post by alaric318 »

cheers, my friend, for adding units you must take care about "Start2" File, also, to mod leaders the file you must change is named "commndr", the best way to start a mod is to make a scenario folder under /CoG/Scenarios/ and name it say, /Custom_S adding the _S makes the game identify this folder as a scenario, copy here all the files from the scenario you want to start to mod, also the game uses another files for determine the name of new commanders that "spawn" after a battle, located in the /CoG/Data/ folder and named "CmdName1" to "CmdName8" one for each of the major powers, additionaly, to identify the unit type in "Start2" files in each scenario you must refer to "Master" file in the /CoG/Data/ folder. hope this help,

and with my best regards,

Murat30.
There is no plan of battle that survives the contact with the enemy.
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

ORIGINAL: malthaussen
Is adding leaders or units simply a matter of inserting another line in the commandr/players2 files, or are there other files that need to be modified?
-- Mal

It should be sufficient to modify commandr.txt in order to add a commander unit.

To add a military unit or diplomat, you need to modify start2.txt. Many of these columns are self-explanatory. Some of the trickier ones are:

Child: used for putting units into container-type units. So, for instance, we have:
Grande_Armee, child=0... means this is a top-most unit.

III_Corps, child=1... means this is in Grande_Armee (tries to put it in the last child=0 unit that it came across).

Infantry division, child=2... means this is in III_Corps. If we had set child=1, would have put it into Grande_Armee instead.



PlayerID refers to the player number in players2.txt.


Name, use "x" to have the program give the unit the default name.


Type, refers to the unit's type in master.txt.


Location, refers to the province location in EuProv2.txt.


cityIndex is used for cities, which you probably won't need to change.


Note that, for commanders, we do read in all 200 commander mugshots that are found in the files Mug80x80.pcx and Mug60x60.pcx -- even the 100 or so that are currently unused blank templates at the end. This is to allow modders to add pictures to their commanders; simply put pictures of more commanders into these blank locations in the mugshot files, and then set the proper picture number in the commandr.txt file.


Hope this helps. Feel free to ask any other modding questions.
Image
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

ORIGINAL: Murat30
named "commndr", the best way to start a mod is to make a scenario folder under /CoG/Scenarios/ and name it say, /Custom_S adding the _S makes the game identify this folder as a scenario, copy here all

I agree. The best way to make a mod is to copy the files you change to a /CustomName_S folder in the Scenarios folder rather than modifying the /Data files in that location.

Unfortunately, a few files modders might want to change can't be implemented in scenario folders. The most important of these is probably master.txt, which allows players to set properties of units (cost, movement rates, etc.) For these you'll need to make the changes in /Data ... just be sure to keep a backup copy of the original somewhere. Look in the Scenarios folders to see which files can be changed in a scenario, and which cannot.





Eric
Image
alaric318
Posts: 366
Joined: Tue Oct 07, 2003 5:45 am

RE: COG Mods

Post by alaric318 »

Greetings, Eric, you have answered a question that i was wanting to make, i do have make changes in master.txt, keep a copy untouched in another computer, almost all my important data are in both computers, i was not know if i can or not put master.txt in the folder of a scenario, now i know that not, aside this, if you read soon this post, as i know you are very busy and find it ok, but i have another question, it is about the number of pieces, well, i have noticed already that the piece limit has been increased from our last posting as the game do not cause problems where before patching was causing, not capital problems however must to say, as the game can continue, but, what is the piece limit for now in 1.2.16 and 1.2.18? thanks in advance,

and with my best regards,

Murat30/Alaric31.
There is no plan of battle that survives the contact with the enemy.
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

The number of allowed pieces has been increased to 8000.

Image
alaric318
Posts: 366
Joined: Tue Oct 07, 2003 5:45 am

RE: COG Mods

Post by alaric318 »

[:)] greetings! :)

i'm very pleased to know that, it denotes your deep support to the game, thanks you very much, and thanks for the fast repply,

with my best regards,

Murat30.
There is no plan of battle that survives the contact with the enemy.
User avatar
malthaussen
Posts: 143
Joined: Wed Jan 11, 2006 7:08 pm

RE: COG Mods

Post by malthaussen »

Some General modding notes:

Ground Units listed in the "start2" file that are not standard inf, art, or cav (ie, almost all units) will begin the game with the nation's default morale, and NOT with the morale you give them in the file. So you can't create a cool "Guard Lancer" unit with a morale of 9.5, or something.:( Regular units, however, will accept any morale rating you give them, so you could create a vanilla infantry unit with a huge morale (if you wanted to). Devs please take note: this ought to be fixed if possible.

The random units generated at the start of the game (due to power ratings?) begin with that selfsame default morale.

Any changes made to the Players2 file in the scenario folder will NOT take effect in the game. You must modify Players2 in the Data folder to make these changes (e.g., to change the nation's default morale or ruler's name).

Guard units can NOT be deployed at the start. Anyway, I got an error message when I attempted to do so, although it was possible to ignore it. The unit had no icon (thus the error message, I suppose), and default national morale.

-- Mal
"Of two choices, I always take the third."
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

I'll test the players file. I'm fairly sure that the names of leaders change properly between scenarios, so at least some of the player data may be working.

Re guards, in the COG engine guard and militia are just infantry with a certain level of morale. Their entries in the master.txt file refer to their costs and some other properties, but when a guard/militia is created the unit is just an infantry. So when creating a guard/militia in the start2.txt file, simply use the index of a regular infantry, not the index given for a guard in master.txt (viz. 12). To make an infantry a militia or guard in start2.txt, simply give it the corresponding level of morale.

I'll have to look further into the claim that morale levels are not preserved for non-basic units; looking over the code I can't see any immediate reason why there would be a distinction. I'll run it through the debugger and see what I can come up with.
Image
User avatar
malthaussen
Posts: 143
Joined: Wed Jan 11, 2006 7:08 pm

RE: COG Mods

Post by malthaussen »

I'll send ya the files if you want. When I change name or NML for Turkey (the country I'm using for the test), the changes only take effect if the players2 file is in the data folder. I would note that every scenario I have started has Napoleon as leader of the French, despite what it says in the players2 file of the scenario.

As for the special units and their starting morale, I've played around with this a lot (or even alot). Whether the Start2 file is in the data folder or the scenario folder, the morale will be the same as the country's morale in the Players2 file in the data folder. I suspect, actually, that non-standard units work differently in other ways in the game as well, but I haven't messed around with it enough to be sure. I'll keep you posted.:)

For grins and giggles, I tossed the players2 file out of the data folder to see if the startup would look in the scenario folder instead. No joy -- the game crashed on start. It did, however, generate an empty players2 file in the data folder, which was unexpected.:)

-- Mal
"Of two choices, I always take the third."
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

I did find the bug that won't set the morale for units other than infantry, cavalry, artillery, and have fixed that.

Will look into why it's not using players2.txt from the Scenarios folders.

Image
alaric318
Posts: 366
Joined: Tue Oct 07, 2003 5:45 am

RE: About Infantry Guards...

Post by alaric318 »

greetings, please take care about put your guards the very first infantry units in the oob, for each nation (Order Of Battle), the "Start2.Txt file or otherwise this units may drain morale of infantry units idexed previously added on the "start2.txt", you can put cavalry and artillery units and then start to add regular infantry when finished in adding guards, but if you put infantry and then guards, the infantry units suffer the "drain morale" rule for build guards, i think all of it, the best way is to form a guards corps or army for wished nation and then add below regular infantry. i have one mod from mine to test if give some problems, but can´t make it public at least to when i have play a with it and being sure it do not give problems, i maybe will are interested if people have problems with make a backup of the standard /data folder and change it to a modded /data folder, cannot say at this moment if the game can work fine this way but going to test it sometime when i have time,

thanks to all for your time to read, and thanks to the developers for make and, at least for me, OUTSTANDING very good wargame,
there aren't other game for the genre with the scope of "Crown Of Glory", strategic and tactical level and every on turn based gameplay, and good napoleonic game too, if you make a comparison with the others games in the market about this "topic" or "genre" say as "imperial glory", at least for me, "CoG" is the best strategic-tactical-napoleonic wargame on the board for this time, hope to see the engine going to others theathers of operations,

with my best regards,

Murat30.
There is no plan of battle that survives the contact with the enemy.
silber
Posts: 52
Joined: Thu Jul 22, 2004 2:43 pm

RE: COG Mods

Post by silber »

Is there any way to modify a saved game? Are there any data files which are read in at game load time vs. scenario start? (I was wondering if you could modify an ongoing 1792 game to reproduce French corps sizes etc.)
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: COG Mods

Post by ericbabe »

ORIGINAL: silber
Is there any way to modify a saved game? Are there any data files which are read in at game load time vs. scenario start? (I was wondering if you could modify an ongoing 1792 game to reproduce French corps sizes etc.)

The save game files are just text files, but the format is fairly complicated. To edit the strengths of divisions, I'd recommend trying the following procedure:

1) Rename any division whose strength you wish to edit.
2) Save the game.
3) Edit the saved game in a good text editor (some versions of Notepad may not be able to handle the large file size.)
4) Search the save game for the names of any divisions you wish to edit.
5) The first three numbers after the name of a division are internal numbers used by the program (piece handles and similar.)
6) The fourth number is strength.
7) The fifth number is morale.
8) You should be able to edit the 4th and 5th numbers to change these properties.

Image
BohemondAJE
Posts: 1
Joined: Mon Jan 30, 2006 10:07 am

RE: COG Mods

Post by BohemondAJE »

Hi,

I play whith France and I want to give Tyrolia, conquered from Austria, to Bavaria. It seems to be imposible by diplomatic actions so i decide to modify my save. I've tried to open it with notepad C++ but i didnt manage to find Tyrol. What kind of software may I use ?

Thx
Post Reply

Return to “Crown of Glory”