Goal: get a CI building into CII
Description: gonna use the DutchTownHall ( ceh.gp & cehdez.gp)
Method:Step1: Installing tools & setting up environment to workStep2: Extracting the all.gsc file from CI:BackToWarStep3: Extracting .gp to .bmp with gpviewStep4: converting bmp.'s & their alphachannels to usable .tga's with build in alpha channels with BmpToTga Converter toolStep5: packing converted tga's to .g16/.g17 with gigapackStep7: Additional StepsStep8: Importing the building in CII

Step3:Extracting .gp to bmp
-1. Locate CEH.GP in C:\Users\Angel\Desktop\GSCUtility\Extracted & Copying to C:GpArch\Gp
-2. Rename to CEH.gp
-3. Open GpView, Open File, Select C:GpArch\Gp\CEH.gp
-4. Extract
-5. Locate C:GpArch\Extract\CEH.gp & copy to WorkFolder
-6. Open Workfolder\CEH.gp & cut CEH.lst & paste CEH.lst in Workfolder
( get it out of the CEH.gp folder-we will put it back after you converted the bmp's to tga )

Step4: Converting the .bmp & their alphachannels to usable .tga with build in alpha channel
-1. Fire up the BmpToTga converter Tool
-2. Set the input dir to your workfolder ( C:\Users\Angel\Desktop\Workfolder\CEH.gp )
-3. Create a new folder inside your workfolder ( any name)(eg THHOL)
-4. Set the output dir to this folder ( c:\Users\Angel\Desktop\Workfolder\THHOL)
-5. Press convert
-6. Select the CEH.lst in your workfolder and put it in the THHOL folder with the new .tga files
-7. Rename the CEH.lst to THHOL.lst
-8. Open the THHOL.lst and add after each line .tga ( eg 00000.tga, 00001.tga, ...). Save

Step5: Packing the converted .tga's to .g16/.g17 with gigapack
a)
-1. Fire Up GigaPack
-2. Hit the + icon and fill out the project name to THHOL
-3. Press the +lst button and direct to your workfolder with the THHOL.lst
-4. Tick the empty box next to THHOL in the list on the left in the second column, the frames ( OOOO1.tga,....) will appear in the third column.
-5. Under File Settings: Set Scaling options to 1, tick P3 option. Under Options , delete the palette line and set the national colour to blue.
-6. Check the output file name ( THHOL) and its output directory( by default the folder where gigapack is installed)
-7. Press convert
-8. Time for some more coffee

Step7: Additional Steps
Certain buildings have more then 1 gp ( .g16, .g17) files for the animations
In this case the DutchTownhall has 2. (CEH.GP & CEHDEZ.GP)
So repeat the Steps 3. till 5. for CEHDEZ.GP & and use THHOLDEZ for example as name

Step8: Importing the building in CII
-1. Copy both the THHOL.G17 & THHOLDEZ.G17 to your CII Test folder. ( C:\Users\Angel\Desktop\MyMod\Data\UnitsG17)
-2. Locate the CEH.MD from CI:BTW extracted folder( C:\Users\Angel\Desktop\GscUtility\Extracted\CEH.MD) and copy it to your CII Test Folder ( C:\Users\Angel\Desktop\MyMod\Data\UnitsMD)
-3. Rename the CEH.MD you just pasted to THHOL.MD
-4. Open the THHOL.MD and change the description name to THHOL. Change the icon to B_Do1. Change the Userrlc 0 to UnitsG17\THHOL and the Userrlc 1 to UnitsG17\THHOLDEZ. Save
-5. Locate nmlist.txt ( C:\Users\Angel\Desktop\MyMOd\Data) and add thhol to the list.
-6. Locate Text\MDLIST.txt and add UNITSMD\THHOL.MD Holland TownHallTest
-7. Locate any nation's .nds ( i took COS.NDS)
-8. Add the entries for THHOL to [MEMBERS] & [COUNTRY] ( just for testing in editor)
[MEMBERS]
THHOL(CO) THHOL
[COUNTRY]
THHOL(CO)
(dont forget to add +1 to the [COUNTRY] total after COS)
-9. Fire up Engine.exe in your test folder & go to editor and see if you did everything right.
You should have something like this:
(insert pic)

Step9 : You may also want to have icons for your buildings, units, or all together make new upgrade icons:

1. Press the +icon to create a new file
2. Fill out the name of the project ( icons)
3. Press the lst button and direct it to your prepared lst file
4. Hit the g18 button
5. Hit back on the g16 button ( in order to get a .g17 file)
6. Scale options from 4 ( 25%) to 1 (100%)
7. Tick P3 options to preserve original colors ( presets all options to 0)
8. Uncheck paletted image
9. Set directions to 1
10. Under Settings (conversion settigns) make sure minimal square and maximum square are set to 256
11. Tick the button next to icons.g17 to get the list in the third column of tga's
12. Hit the convert button

13. Close gigapack and fire up again, open the newly created icons.g17 to see if you did everything right.

14. Next step is to create a text file which refers to your icons and then implement them in game. That is, the first entry refers to the first icon in the .g17 file. It doesnt matter what you name it inside the iconlist.txt

15. Then, the icons should be placed in Data\cash and Data\Interf3, the iconlist in the Data directory.

16. Add them in your nds file's if it are upgrades, in the md files if it are building icons. In CII, the first icon entry refers to what will show up in the editor menu.

For the building icons to show up in the peasants menu and the building picture on selecting the entries are at the bottom of the md file and will need new g17 file's for it and then refer to them in which folder you place them.

Q2: GpView crashes on opening .gp files
A2: Make sure that GpArch is directly installed in the C: drive ( no D: or no C:ProgramFiles)

Q3: GpView doesnt extract the .gp files
A3: Make sure you have renamed the .gp file from XXXX.GP to XXXXX.gp ( lower caps)

Q4: After extracting the extracted .bmp files are all blury and weird
A4: By default the GpArch is setup for AC gp files with the corresponding palette folders. Switch the folders 0 & 1 with the Cossacks 0 & 1 file's ( either from the folder GpArch\ForCossacks\O & 1 or from the all.gsc you extracted in step 2. Obviously if you are extracting AC units and have the cossacks 0 & 1 folder in the GpArch, you will have the same issue, you just need to swop with the AC palette folders.

Q5: GigaPack doesnt create new .g16 files
A5: Make sure you have renamed the frames numbes in the .lst file with the extension .tga ( 00000.tga, 00001.tga, etc...)

Q6: On starting engine.exe to test my new building, it says Unable to create General Object by Name.
A6: Abort and check your .md file and verify that you changed the description of the monster and verify back with nmlist.txt that its the same. Also check with your .nds file to see if its the same name its referring to.

Q7: My building looks really small in CII editor
A7: Fire up gigaPack again and make sure this time you set scaling options to 1 instead of the default 4

Q8: I got errors with gigapack and its not listed above
A8: look in the gigapack.txt that comes with gigapack, its a log file, it will tell you what went wrong on creating the game, use this information to determine what and where it went wrong.

- This was an example for buildings. CII uses mainly .g16 & .G17 format for buildings
For units CII uses mainly .g2d format. These can be created from .g16 & .g17 format with Triangulator tool.
You can get the triangulator tool @ http://cossacksworld.ucoz.co.uk/load/1-1-0-13
I'll add a step 5. b) when I have succesfully managed to convert a unit with this triangulator tool.

- This was a basic setup for getting a building in CII. More entries will be needed to the .nds file ( to allow peasants to build the building) and possibly balancing changes to the .md ( prices,...) For all these things i refer to http://cossacksworld.ucoz.co.uk/index/0-13 and the various subpages.

- If you create gigapack files in .g17 format and say put it lets say the interf3 folder , after loading up the game it will automatically create a .G16 file with the folder name in front of the file in the cash folder. So for example you got an interface file name test.g17 and you put it in a subfolder name Mod inside the interf3 folder, after loading up the game, it will create a file named Interf3_Mod_Test.g16 in the cash folder.

- There are other things to consider like the national colour ( if you look the townhall is blue while its under the red players color). This is an issue caused after extracting the gp files with gp view, the color become's blue. This can be solved with the national colors option in gigapacker by setting the national colour to blue ( R:0 G:60 B:192)

- Icons & size's:

Unless you change the interface trough the dialogs editor to fit your new icons or change the background file ( upgrade.g17) you should follow the used sized by gsc which is for :

A. Upgrades: icons size is 52x52 saved at 32bits .tga

B. Editor: currently there are no icons in the editor for buildings and units. The size to use for these is 52x52 pixels. If you use a border of 1 pixel, then you will want to use a transparent frame with border and the image of the unit/building set at 50x50 pixels. Again saved as 32 bits.tga

If however no icons of this size are used in the icons.g17 and say you have a larger size icon, for example 64x64, the list with frame's in the editor will adapt it self. Instead of having 4 units in a row you will only have 3 units. Don't exagerate though.