User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Modding our games - Various technical discussions

Tue May 15, 2007 7:34 am

Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Tue May 15, 2007 8:21 am

Image Image

Since I am spoiled and never happy; do you have any descriptions of syntax and what the various things mean?
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE
Visit AGEWiki - your increasingly comprehensive source for information about AGE games
[SIGPIC][/SIGPIC]
[/CENTER]

AndrewKurtz
Posts: 1167
Joined: Tue Jan 30, 2007 2:49 am
Location: Greenville, SC

Wed May 16, 2007 7:36 pm



Does one of these files contain frontage information? If so, any chance of finding out which file/value?

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

Wed May 16, 2007 9:14 pm

Frontage info is in the terrain DB :indien:

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu May 17, 2007 7:06 am

Rafiki: there are some infos on the BOA modding manual, but the rest need to be asked there

best would be to do a FAQ or Wiki in the end I suppose.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

AndrewKurtz
Posts: 1167
Joined: Tue Jan 30, 2007 2:49 am
Location: Greenville, SC

Thu May 17, 2007 11:30 am

PhilThib wrote:Frontage info is in the terrain DB :indien:


May I ask which values represent frontage?

kentul01
Private
Posts: 21
Joined: Fri May 11, 2007 9:10 pm

help please!

Thu May 17, 2007 11:21 pm

now that ya'll have put the db excel stuff up, what can we do with it? i'm not wanting to make any massive changes or scenario editing, just some tweaking. like making atlanta a 5 level city instead of a 4. how does one go about doing that?

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

Fri May 18, 2007 6:02 am

Frontage: it is the blue text in the file (combat unit quota) in each terrain sheet of the excel file. It is rather 'complex' to understand. The value indicated is the maximum of 'move point' allowed by the terrain type... to know how many units are allowed by the terrain frontage, you divide the quota by the sum of the move value of all sub-units and this gives you the quantity... :bonk:
Ex: Hills has 130 as a quota (line 30 of excel file). An heavyFoot type sub-unit (i.e. Infantry rgt) uses 13 points (line 15)...therefore the frontage is 130/13 = 10 sub-units... more or less 3-4 brigades

Editing the excel: if you just want to edit cities, use the CSV splitter I have attached in the forum, with the cities tag, on a csv version of the cities sheet of your excel file. It will produce a text file you rename as per the campaign city file (see includes section of the game) and taht's it ( :bonk: again)

:indien:

kentul01
Private
Posts: 21
Joined: Fri May 11, 2007 9:10 pm

Sat May 19, 2007 1:24 am

Sir
i thank you for your response, but still i am having trouble. i will describe what i am doing and maybe that will help determine what i'm doing wrong. i open the db excel file. then i copy to a new book the cities&controls sheet. i save it as a csv file under the name citiescampaign61. i then open the csv splitter, highlight the script cities tab, after first making sure that my excel file is in the input line, and my destanation folder is my documents. i rename the inc file produced as citiescampaign61 and then move it to the includes folder. i have moved the file that was there to my desktop. i then start the game, but nothing changes. when i open the inc file, all of the cities are blank and no info is filed in. i am at a loss as to what to do. could you please help me?

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Sat May 19, 2007 11:20 am

Hi kentul01!

when i open the inc file, all of the cities are blank and no info is filed in.

If the produced inc-file is empty then the format of your exported csv-file may be wrong. Please choose for the output-filter settings: the field delimiter to semicolon and no text delimiter. The csv-file should look like that:

[font="Courier New"][SIZE="2"]0;Rensselaer, NY;$Railroad;$Civilized;NY;Mid_Atlantic;USA;100;0;USA;100;Troy;6;0;0;0;0;0;0;0;0;0
1;Columbia, NY;$Railroad;$Civilized;NY;Mid_Atlantic;USA;100;0;USA;100;Hudson;0;0;0;0;0;0;0;0;0;0
2;Putnam, NY;$Railroad;$Civilized;NY;Mid_Atlantic;USA;100;0;USA;100;Peekskill;3;1;0;0;0;0;0;0;0;0
3;Berkshire, CT;$Railroad;$Civilized;CT;New_England;USA;100;0;USA;100;0;0;0;0;0;0;0;0;0;0;0
[/size][/font]

kentul01
Private
Posts: 21
Joined: Fri May 11, 2007 9:10 pm

help

Sat May 19, 2007 2:09 pm

sir,
i think that i am an idiot, but i dont have a clue about excel. i am really trying to figure it out but no success so far. i'm going to post my file that i have been trying to work with here. maybe someone will be able to help me fix whatever it is i dont know how to do. :p leure:
Attachments
CitiesCampaign61.zip
(20.25 KiB) Downloaded 482 times

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Sat May 19, 2007 8:43 pm

Hello kentul01,

I don't think you are an idiot, I had an similar problem as I tried to mod BoA. :)

I took a look to your file. It is indeed saved in the wrong format. Not every 'csv' is the same, they differ in field delimiter and text delimiter. Your file has as field delimiter ',' (correct would be ';') and as text delimiter ' " ' (correct would be not text delimiter).

Your file:
[font="Courier New"][SIZE="2"]0,"Rensselaer, NY",$Railroad,$Civilized,NY,Mid_Atlantic,USA,100,0,USA,100,Troy,6,0,0,0,0,0,0,0,0,0[/size][/font]

Correct file:
[font="Courier New"][SIZE="2"]0;Rensselaer, NY;$Railroad;$Civilized;NY;Mid_Atlantic;USA;100;0;USA;100;Troy;6;0;0;0;0;0;0;0;0;0
[/size][/font]

Take a look if you can change these options in the export dialog when you save the csv-file. I don't use Excel but the free Open Office. If you save there a csv-file you have a small checkbox 'Edit filter settings'. You need to select that and will be able to set the correct parameters as you save the file.
I don't have an Excel on my computer here so I can't look up now where the filter settings hide in this program.

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Sat May 19, 2007 8:47 pm

Attached your file in the correct format.
Attachments
CitiesCampaign61.zip
(19.79 KiB) Downloaded 434 times

kentul01
Private
Posts: 21
Joined: Fri May 11, 2007 9:10 pm

thank you

Sun May 20, 2007 12:27 am

WoW! all i can say is that you folks are awesome. the file now looks like its supposed to when i use the csv splitter on it. however, once i rename it to citiescampaignA61 and put it into the inclues file, the game dosent change. i have moved the original a61 file to "my documents". is the game getting the info from some other file that i need to remove so it will access mine?

User avatar
Stonewall
Posts: 267
Joined: Sat Mar 17, 2007 4:33 pm
Location: Florida, USA

Sun May 20, 2007 5:23 am

kentul01 wrote:WoW! all i can say is that you folks are awesome. the file now looks like its supposed to when i use the csv splitter on it. however, once i rename it to citiescampaignA61 and put it into the inclues file, the game dosent change. i have moved the original a61 file to "my documents". is the game getting the info from some other file that i need to remove so it will access mine?


The city information is stored in the scenario file itself. Unless I'm misunderstanding your question.

The most surefire way to edit cities is to open your Aptil 1861 campaign scenario file with a text editor.

Search for "Atlanta" you'll eventually come to a section of the file that looks like this:

Code: Select all

{Region}
      UID              = 294
      Control          = 100
      Supply           = 54
      WasBesieged      = 0
      {StrucList}
      294
        {Structure}
        1000155
        3 [color="Red"](type 3 = city)[/color]
        4 [color="Red"](structure size)[/color]
        0
        1000002
        0
        0
        0
        0
        0
        Atlanta [color="Red"](structure name)[/color]
       
        {/Structure}
        {Structure}
        1000539
        2 [color="Red"](type 2 = depot)[/color]
        1 [color="Red"](structure size)[/color]
        0
        1000002
        0
        0
        0
        0
        0
        Atlanta Depot [color="Red"](structure name)[/color]
       
        {/Structure}
      {/StrucList}
      {Populations}
      {/Populations}
    {/Region}



Pay careful attention to the [structure] brackets and the first single digit number under the long 7 digit number immediately inside the [structure]. This number tells you whether the numbers are for the city (3), the depot (2), a fort (1), or a harbor(0).

Or, you can just look and see what the name of the structure is and its just as accurate. :D Atlanta has a city and a depot.

The city is handled first and the depot second. To change the size of the city, find the 2nd number down from the long 7 digit identifier. It is "4." That is your current city size. To modify the size of the city, simply change it to a 5 or an 8 or a 50. Whatever makes your heart go pitter-patter.

Save the file and start a new game. The changes will not apply to saved games. However, with some additional editing, you cna change the savegames as well. Its just a longer process.

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Sun May 20, 2007 10:34 am

Thanks Stonewall, you are right only changing the cities.inc doesn't help.
OK, let's do it the 'right' way. :)

Example: Let's change the city level of Washington DC to 10 for the April 1861 scenario.
1. Open the [font="Courier New"]AACW_Setup1861_April_Campaign26.xls[/font] from the AACW DB.
2. Change the city level on the cities tab.

Image


3. Save the file as csv. (AACW_Cities1861_April_Campaign_Test.csv)

Image


Don't forget to set the correct export filter settings.

Image


4. Change the scenario name on the setup page, so the original scenario will no be overwritten (1861 April Campaign Test.scn).

Image


5. Edit on the setup page the name of the cities inc-file to a new name. (CitiesCampaignA61_Test.inc)

Image


6. Change also the sting alias for the scenario name so that you can recognize your new scenario in the scenario list (str1861ACampaign2DispNameTest).

Image


7. Save the setup page also as csv-file. (AACW_Setup1861_April_Campaign_Test.csv)

8. Open the [font="Courier New"]LocalStrings_ACW25e.xls[/font] and add your new string there.

Image


9. Save the modified string-file as csv (LocalStrings_ACW.xls) and copy it to the game directory ...\AGEod's American Civil War\ACW\Settings\
Overwrite the old file. (Save a backup before)

10. Open the csv-splitter, 'Setup,Events' tab and create a script from your setup file (AACW_Setup1861_April_Campaign_Test.csv).

Image


11. Copy the created 'Script.ini' to the game directory '...\AGEod's American Civil War\ACW\Scripts\'

12. Go to the events folder and create a copy of the file '1861 April Campaign.sct' with the new name '1861 April Campaign Test.sct'. The reason is that the game will search for an event file with the same name as the scenario file. As you created a new scenario with new name the corresponding event file was missing. The original one from the April 1861 Campaign should be ok.

13. Create the cities.inc file with the csv-splitter.

Image


Rename the file to 'CitiesCampaignA61_Test.inc' and copy it to the game directory '...\AGEod's American Civil War\ACW\Includes\'

14. Start the game. As soon as the load-screen appear press 'F9' once. In the upper right corner 'Edit mode ON' will appear.
Do nothing. The main menu will appear for a short while then your new scenario will load automatically. If you did something wrong (or I explained something wrong) an error message will appear. But normally your scenario should just load.

15. Press 'ESC' and save the game. The new scenario will be written.

16. Exit the game and start it again. If you choose 'New Game' your new scenario should be in the list and if you open it Washington DC will have city-level 10 now.

Image

Image

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon May 21, 2007 7:07 am

great Primapsrite!

The right way in doing things is to use the master files = Excel files, not tweaking the actual scenario file.

You tweak the master file (XLS), you export it (into CSV), then the utility generate a script. The script is used to create a brand new scenario.

A small error on what said Norbert (Primasprite): you have to rename the .sct file (events attached to the campaign) the same name as the campaign, or new events won't fire.

Your procedure Primasprite can be made into a stickied document I think :)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Mon May 21, 2007 7:54 am

About the problem of exporting the database to the correct csv-format:
It seems Excel exports with different field delimiter in dependence to the Windows regional settings. This means that you will get different results if you export an csv in Europe or North America (!!).

This ist what I found on: http://astrochimp.com/2005/12/20/export-csv-with-any-delimiter/

Export CSV with Any Delimiter
December 20th, 2005 PHP, tips-and-tricks, Hacks, Windows, Database, Excel

When working with databases you often find yourself in the frustrating situation of loading a database from an Excel file. The usual solution is to save the Excel file as a .csv file from which you can split out the fields. Problems occur when your fields contain commas. Exporting as a tab separated list does not solve this issue since blank fields do not get parsed consistently. The solution would be to use a different character as the delimiter, but Excel does not provide an obvious way to export data with a delimiter that is not a tab or comma. There is a little known setting in Windows can solve you problems. You can set any character to use as your delimiter when saving an Excel file as a csv. The key is in Windows Regional Settings:

To change the default on your PC to a pipe rather than a comma bring up your default options window by clicking Start -> Settings -> Control Panel -> Regional Settings.

Click the “Number” tab and in the “List Separator” field, replace the current default separator with the one you want to use (let’s say a pipe symbol | ).

Click “OK” to save the change and close the window. You can now save Excel files as pipe delimited files [...]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Mon May 21, 2007 7:56 am

Pocus wrote:A small error on what said Norbert (Primasprite): you have to rename the .sct file (events attached to the campaign) the same name as the campaign, or new events won't fire.

I think I mentioned that under number '12'. :)

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Mon May 21, 2007 5:51 pm

BTW: I guess with the patches the files of the AACW database change too. It would be terrific if the downloadable database files could be updated if a new patch is published. :cwboy:

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

Mon May 21, 2007 6:28 pm

We do that internally, so we could work out something too here... :innocent:

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon May 21, 2007 8:09 pm

oops sorry missed point 12.

We will update the downloadable database, no problems. once 1.03 is stable I will do that, this is just an habit to take.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Fri Aug 10, 2007 11:14 am

Any chance we can see an updated DB download with the upcoming release of 1.06c?
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE

Visit AGEWiki - your increasingly comprehensive source for information about AGE games

[SIGPIC][/SIGPIC]

[/CENTER]

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Aug 13, 2007 10:09 am

Done, in 1.06d.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Fri Oct 05, 2007 11:29 am

Primasprit, is it OK if I put your excellent explanations into the wiki?
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE

Visit AGEWiki - your increasingly comprehensive source for information about AGE games

[SIGPIC][/SIGPIC]

[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Fri Oct 05, 2007 12:11 pm

Of course. I would feel honoured. :)

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Wed Oct 24, 2007 11:41 am

Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Wed Oct 24, 2007 8:53 pm



For the benefit of those others who might be attempting to download these maps to work with ExMap. The second link above (which I have marked) is corrupted. Pocus has been informed and will hopefully be able to reacquire an uncorrupted file from Sandra later this week.

zlatan24
Civilian
Posts: 1
Joined: Sat Oct 27, 2007 11:31 am

Sat Oct 27, 2007 11:55 am

I know not bad tool recover excel files - FixExcel files, extract information from corrupted Microsoft Excel files, recover info after viruses, problems with media (a hard drive failure, a corrupted CD or DVD, etc.), errors in transferring the file via the LAN or the Internet, etc, will display a dialog box with the question whether this worksheet should actually be scanned.

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Oct 29, 2007 2:00 pm

Gray_Lensman wrote:For the benefit of those others who might be attempting to download these maps to work with ExMap. The second link above (which I have marked) is corrupted. Pocus has been informed and will hopefully be able to reacquire an uncorrupted file from Sandra later this week.


new version uploaded.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 4 guests