0% found this document useful (0 votes)
28 views

Eic Modding

Uploaded by

zotyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Eic Modding

Uploaded by

zotyo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

. Texture Basics .

Hello to everyone! Ships:


Data\Models\Ships\
My name is Niko Pesonen and I’m the Lead Animator at Nitrogames. In GUI:
the first parts we’ll focus on modding the game graphics, but later on Data\GUI\
we’ll pay more attention to things like AI, audio, weather etc.
In the folders you see diffuse textures as well as normal maps. Normal
Basicly all the textures in EIC can be modified. These include ships, maps are usually labeled xxx_NM.dds. Some models also use specular
characters, buildings, terrain surface, particle textures and the whole maps. To see which model uses which textures you can open up the
GUI (user interface). You can also make modifications to the weather, 3D model file (.3DS) in hex editor. The textures are usually listed in the
time of day and waves. But before we go through any of that I’ll start beginning of the file. In most cases the textures are stored in the same
with the basics of modding textures in Photoshop. folder with the model file and named accordingly so you don’t need
hex editor to figure out which textures belong to certain 3D model.
Texture locations
If you don’t have a hex editor, you can use Notepad ++ - download it
First of all you need to locate the texture files. So here goes. Now you are ready to start editing the texture of your choice.
from here:
http://notepad-plus.sourceforge.net/uk/download.php
The default installation folder is: Here’s an example (Data\Models\Characters\NavalOfficer\01\Na-
c:\program files\paradox interactive\east india company\ valOfficer_Body_DM_01):
DDS plug-in
The sub-folders are found as shown below. Since all the textures are in dds-format (DirectDraw Surface) you first
need to download and install the plugin from Nvidia:
Terrain textures:
Data\Textures\Terrain\ http://developer.nvidia.com/object/photoshop_dds_plugins.html

Particle textures: Import to Photoshop


Data\Textures\Particles\
Now we are ready to import files to Photoshop.
Decals:
Data\Textures\Decals\
1.In Photoshop click File->Open...
Characters: 2.Then select the dds-file of your choice.
Data\Models\Characters\ 3.Now the plug-in ask you about the read properties of the file. We’ll
choose the settings shown below. If you want to import the image with-
Flags: out MIP maps, just uncheck the Load MIP maps.
Data\Models\Flags\
. Texture Basics .

As you can see there’s a larger image and then smaller versions of the Saving the File
same texture. These are called MIP maps and are used when the texture If the image already has MIP maps and you want to use the existing MIP
is further away from the camera. The MIP maps are also used when us- There are a few important things you need to know when saving the file maps, choose Use Existing MIP maps.
ing lower texture detail level in game options. because there are several format options to the dds-file.
If you don’t want to use MIP maps at all, choose No MIP maps.
Note: It’s strongly recommended to flatten the layers in the image before sav-
In most cases its best to open the image without “Load MIP maps” se- ing it as dds file. After choosing the correct options here you are ready to save! Run EIC
lected and let the plugin generate the MIP maps once saving the file. and see how the changes you made appear ingame.
Fist click File->Save As...
So thats all for today. I’ll hope this helps you getting started with modi-
Now, you’ll get a list of options fying the textures in EIC. Next time we’ll go into more detail about edit-
to choose from. (below) ing the images.

In here you need to choose the Best,


right options for a specific im- Niko
age. If you are saving an image
which doesn’t have an aplha
channel (transparency) you
need to choose DXT1 RGB 4
bpp no alpha. If the image has
an alpha channel, you need to
select DXT5 ARGB 8 bpp inter-
polated alpha. For the GUI tex-
tures you would want to choose
the 8.8.8.8 ARGB 32 bpp un-
signed.

You also have to select the


right option for the MIP Map
Generation. If you are saving a
file which doesn’t contain MIP
maps, but you want them to be
generated, choose Generate
MIP maps.
. Character Texture .

Hi all! this is what it looks like: time to get used to. There’s always some guesswork and trial and error
involved in modifying existing textures.
I though it would be nice for those of you that are interested in making
modifications to the game but do not yet have all the knowledge how to Ok. I’m not going to scare you anymore :)
go about it, to give you an idea how to start modding the textures.
Let’s take a look at the texture and make some adjustments to it.
This time around we are going to take a look at a simple modification to Basically you can do anything you want to it. It all depends on your skill
a Naval Officers clothes in Photoshop. level.
I’m just going to give a simple demonstration how to change the color of
Ok. Here we go. the jacket an paint a logo on the back.
For the color change we’ll use the Replace Color adjustment:
In the last tutorial we looked at opening and saving files, so I’m not
going to go through much of that. First of all you have to open up the
appropriate file in Photoshop. I’m going to use the Naval Officer found
in: ...Data\Models\Characters\NavalOfficer\01\NavalOfficer_Body_
DM_01.dds.

We are not going to make any changes to the mipmaps, so load the im-
age without them and choose Load Using Default Sizes.

As you can see this is just the body, so if you want to make changes to
the head you’ll have to open up the head file. We are going to leave the
head as it is for now.

Modding this kind of a texture could be a little taunting task. It is some-


times very hard to see what’s going on in the image. Basically the tech-
nique is to take pieces of the 3d-model and lay them down on a flat
surface and start painting on them. Unfortunately you can’t see the
So polygons that make up the model in photoshop so this takes a little
. Character Texture .

Now you’ll have to choose a color you want to replace by using the eye is represented with the black and white image. You can also add more
dropper tool and selecting e neutral blueish color as shown with the red color to your selection with the eye dropper with the + -sign next to it. This is of course just one way to change the color and surely not always
circle. the best way. But this is not the forum to teach photoshop. :)
As you can see, we have selected most of the blue color and now it’s
time to replace those areas with another color. What we’ll do next to finish the texture, is to add a logo on the back of
We’ll do that by adjusting the three bottom sliders. (Hue, Saturation and the character.
Lightness) We’ll need another layer. So to do that press Shift+Ctrl+N.
By adjusting hue you basically change the color. Saturation equals the Now we have created another layer and to that layer we are going to cre-
amount of color you want. ate a simple image.
-100 = grayscale image, +100 = fully saturated image.
Lightness is for making the selected area darker or brighter. Choose the Custom Shape Tool from the toolbar
and select the color you want for your shape:
I’ll adjust the Hue to +150 to replace the blue color with a red. And
here’s what it looks like now: Select “Fill pixels” and select the shape you want
from the dropdown menu as shown below:

Then just draw the shape on top of the image.


Here’s what it looks like:

Adjust the fuzziness to somewhere around 55. The fuzziness controls the
amount of tolerance you have in your selection. The bigger the number,
the more colorinformation it selects. The areas or color you have chosen
. Character Texture .

I’ll rotate the shape 90 degrees clockwise by choosing: Then position the shape and blend the shape to the texture by using for Since we didn’t open up the the image with the mipmaps, we are able
example a soft light -mode in the layers panel: to save all these changes to all the mipmap -levels by simply saving the
file with “Generate MIP maps” on. This way the dds plugin generates the
mipmaps from this single image.

Word of Warning:
Do not replace the original files with the modified ones before you have
made a copy of the original one!!!

Final words.

Again I have to point out that this was by no means the perfect and only
way to approach this.
You, who already master photoshop will propably figure out much “cool-
So here’s the final result: er” ways to produce the textures you want. I still hope this example gives
you the main idea behind modding the characters’ textures. Later on
we’ll look at modifying the normal maps and some other types of tex-
tures. So it’s bye for now, and I’ll post more examples soon!

Oh! By the way, there is a section in the EIC forum titled EIC- User Modi-
fications.
If you have any questions or ideas about a topic or whatever, go the and
we we’ll look into it and see what we can do for you.

Best,
Niko
. GUI .

Welcome to the 3rd part of modding. You can see there are all the graphical elements you get in the games opacity of the image. To see the al-
tactical view. pha channel, select the channels
This time we are going to take a look at the GUI (Graphical User Inter- tab next to Layers and click on the
face). You can basically do anything here, but you still have a few rules. eye icon next to the Alpha 1.
Again, all the GUI-elements are moddable as are the model textures. First of all the picture is divided into 48 by 48 pixel blocks. To see these
“blocks” you have to turn on the grid in Photoshop. View -> Show -> The alpha channel is just a gray-
I’ve opened up the tactical_gui_2_48px.dds and here’s what it looks Grid. scale image which represents the
like: transparency of the image. White
After that you have to adjust the grid to the correct size by choosing Edit color will reveal the image 100%
-> Preferences -> Guides, Grid and Slices... From here you have to ad- and the black 0%.
just the Gridline to 48 pixels and the Subdivisions to 1.
By default the alpha channel is
represented as a red color on top of
the image with a 50% opacity. If you
want to adjust the amount of red you
see in the image, doubleclick the Al-
pha 1 icon and adjust the opacity of
the alpha. Note that this does not af-
fect the alpha and how it works, but
only the transparency of the alpha
image on top of the picture.

If you want to see just the Alpha


channel, just turn off the eye icon
next to the RGB channel. This way
you’ll see only the black and white
alpha image.
Now you are able to see how the picture is divided into blocks. Some of
the elements take only one block, some multiple. This of course means that if you modify the GUI elements so that the
The next thing you’ll notice is that some of the graphical elements look shapes change, you have to take care that the alpha is also modified
a bit weird. accordingly.

There might be some “garbage” around them. In this case it doesn’t So lets make a simple change in the GUI. A simple thing to do here would
matter because the image has an alpha channel, which controls the be to change a flag to another country’s flag, so here goes.
. GUI .

Zoom in to the flag you want to change and turn it into another one. I’ll Here’s the image and the alpha:
just draw a Finnish flag on top of the Danish one.

So here’s before and after:

Again, your imagination is the limit here. Lets see some Star Wars
-themes out there !!!

Best,
Niko

As you can see, the flag elements are inside their own “blocks”. This Now you are ready to save the image. Save the original one, so that you
means that the element is read from that block and you cannot draw can revert to that whenever you need to!!! When saving, remember to
anything that goes outside this block. use the 8.8.8.8 ARGB 32 bpp unsigned and choose no MIP maps.
Since we didn’t change the shape of the element, there is no need to
adjust the alpha channel. And here’s shots from the game:

If you want to create more radical changes to the GUI you can always
modify the alpha as needed.
For example here I’ve created a few cracks in the panel by drawing black
in the alpha channel, so that part of the panel is hidden by the black and
making little adjustments to the image itself.
. Adding a port into the game .

Hi all, and welcome to the fourth modding tutorial.


Ifaty is a port in Madagaskar and it belongs to the africa_5 area. Find
My name is Samppa Rönkä and I work as an AI programmer here at Ni- ifaty from the tradeareas.txt and make a copy of it’s “block” right below
tro Games. Today I’m going to demonstrate how to add a new port into it. It will be longish as item pricing at the port needs many lines.
the game.
Wherever you see “ifaty”, change them to “new”. You should change at
Adding a dummy port model least the block name, “name” and “unitIdString” parameters. UnitId-
String must match with the one you used at the first file. You should end
Linking a port to the game
First we’ll add a dummy port model to the map. Open this file with your up with something like this:
favorite text editor: Open the following file into your text editor:
new
Data\AI\tradeareas.txt
Data\Missions\Generic02\generic02_units.dhps {
name = str_PORT_NAME_NEW
This file contains different MTI areas and their ports. The structure looks mission = Data/Missions/India_03/india_03.dhm
Now go to the very bottom. The last “addUnit” block adds Madras to the like this:
game. It should look like this: europe portCam_x = -214.0
{ portCam_y = 30.0
addUnit uTOWN_indian london portCam_z = 7.2
addUnitRootPart pTO_ind3 { portCam_beta = 34
setUnitIdString uid_town_madras } portCam_dir = 257.0
setUnitSpawnCoordinates s,918.458,-402.004 timeofday1 = 12
setUnitAngle 291 goteborg timeofday2 = 15
setUnitScript generic02_script41 { timeofday3 = 18
}
Copy those lines and paste them back to the file just below Madras. We’ll unitIdString = uid_town_new
call our new port simply “new” and position it to Madagaskar. I hope ...
you all have more imagination here! So, make the following changes } lvlTownHall = 4
and save the file: lvlGarrison = 4
africa_1
setUnitIdString uid_town_new { ...and so forth...
setUnitSpawnCoordinates s,-220.0,-1025.0 tabou }
setUnitAngle 65 {
} Save the file and move on to the next chapter!

If you start the game now you should see a new port at Madagaskar. It’s
...
just an empty shell though - the game doesn’t see it yet.
}
. Adding a port into the game .

Save this as Data\Units\uPIER.dhu That’s it! Now start the game and go see your brand new port. This may
not have been the simplest of things but it’s part of the fun and luckily
Then open Data\Missions\Generic02\generic02_units.dhps again you don’t have to do this every day.
and add this below your new port stuff at the bottom of the file.
In case of any questions or problems see our modding forum.
addUnit uPIER
addUnitRootPart pPIER_01 - Samppa
Adding a pier setUnitIdString uid_pier_new
setUnitSpawnCoordinates s,-265.0,-1050.0
If you tried to start the game you might have noticed that the pier was setUnitAngle 335
missing from the port. In the original game, the piers are terrain ob-
jects fixed to a world map. We’ll have to create a pier dynamically. Now the port has a pier so let’s move on to the final chapter.

First, paste the following to a new file: (you’ll need to do this only once)

part : Soli
{
id=pPIER_01
type=Soli
model=”Data/Models/Strategic/Towns/Pier01.s3d”
name=”pPIER_01”
}
Final touches
Save this as Data\Parts\Solids\Towns\pPIER_01.dhp
Paste the following to a new file: (you’ll need to do this only once) Open the file Data\Locales\en\_strings.txt and add the following line
somewhere there: (this will be the actual visible name of the port in
unit : ArmorUnit game)
{
name=”uPIER” str_PORT_NAME_NEW = New Port
unitid=33030303
bones=none Open the file Data\AI\diplomacy.txt and add following: (the number is
animation=none a port’s value in diplomacy)
scale=3
} new = 5000
. Editing terrain textures .

Hi all! is tilable. What whis means is that copies of the image can drawn next Because I’m going to replace the original desert texture with a new one
to each other so that there are no visible seams. Here’s what two desert I’ll copy this image on top of the original one. Then you propably want to
This time we are going to take a look at the terrain textures in the stra- images would look next to each other: resize/reposition it.
tegic view of EIC. So, to get started I’ve opened up two texture files:
desert.dds and desert_NM.dds. You can find them from: ...\Data\Tex- Here’s what mine looks like now:
tures\Terrain\Strategic.
Now it’s time to flatten the image. Otherwise
Here’s how the two images look: the thing we are going to do next will not work.
Now let’s make this image tilable. The easiest
way to do this is to apply an Offset filter. (Filter
? Other ? Offset...) With this filter we can move
the image to any coordinate in our canvas and
it automatically starts to tile itself. Here’s what
it looks like with Offset’s horizontal and verti-
cal set to 256, 256. (Make sure wrap around
is on.)
As you can see there is no seam between the two of them. Let’s look at a
simple way to accomplish this. First you need an image you want to work As you can see the tiling is crearly visible here
with. I’m going to use this sand texture here: as expected. A quick way to remove the tiling is
to use a clone stamp tool and paint away the
seams. I’m assuming here that you are familiar
The first one is just a simple texture file that is drawn on the strategic with clone stamp tool. If not, there is plenty of
map. The blue one is a normal map for that texture. All textures that information and tutorials on photoshop in the
have a normal map have the letter NM at the end of the file name. As Internet.
you can see this particular normal map has just one color so it’s basi-
cally not affecting the texture. For those who aren’t familiar with normal This is what it looks like after the clone stamp
maps, here’s a short explanation: Normal maps are used for creating treatment:
the illusion of height differences in the 3D-model. If you are familiar
with 3D-programmes you compare normal maps to bump maps. Both You might want to use the offset again to make
are used to create bumpiness or height differences in the 3D-model. sure the seams are gone. Let’s pretend that the
They work differently, but I’m not going to go any deeper into the techni- image is in perfect shape :)
cal stuff here.
Now it’s time to move on to the normal map.
So let’s get back to the base image. This texture is generated so that it Let’s copy the new desert image on top of the
. Editing terrain textures .

normal map image. Again, flatten the image. You can either apply the mal map. 2.Scale - The bigger the scale, the more elevation you get So this concludes today’s tutorial. Sure, you want to see how it looks
normal map filter to the coloured image or convert it to a grayscale image like in the game. Here’s a screenshot:
first. The normal map is basically generated accordingly to the bright- Let’s leave the rest to their default settings.
ness values of the image so making the image grayscale helps to see the
contrast of the image a little bit better. So let’s do that. (Shift+Ctrl+U) Here’s the result:
You can now adjust the image to your liking but I’m just going to use this
grayscale image. Apply the normal map filter. (Filter ? NVIDIA Tools ?
NormalMapFilter...)

Best,
Niko

If you don’t want the normal map to be that crisp you can always blur it
To be able to control the normal map generation we have to look at a few with the gaussian blur for example. Save both files as DXT1 - no alpha
things in here. and you are ready to go!

1.Filter Type - The bigger the sample, the less detail you get for the nor-
. Localizing the game .

Hi there! Translating the game is a huge task and some typos will appear no
This step is the most important one and maybe the only thing you really matter how careful try to be. Have someone else to read through the
Welcome to the sixth modding tutorial! Today we learn how to translate need to do to get most of the game localized. Open Data/Locales/en/_ sentences you’ve translated and to look for mistakes. Play the game to
the East India Company to your own language. This includes not only ed- strings.txt into your favourite text editor. I use Notepad++ myself. Please make sure the sentences fit into the context.
iting the strings in game but also editing the GUI (graphic user interface) note that the file must be in UTF-8 format. The file looks like this:
to make room for long words in some languages. Editing the GUI
Existing translations str_LOADGAME = Load Game
str_OPTIONS = Options Sometimes the word you have translated is too long to fit into the ele-
East India Company ships in english, french, german, spanish, russian str_EXITTOWINDOWS = Exit to Windows ment. Here’s an imaginary situation at the strategic level:
and japanese languages. At the time of writing, our player community str_EXITTOMAINMENU = Exit to Main Menu
has volunteerily made the following translations:
On the left hand side there’s an id for every sentence and on the right
* Polish translation by delra side the actual text which is visible in the game. Do not touch the id’s,
* Turkish translation by oguzkonya just translate the text on the right. The above example looks like this in
finnish language:

Also, the dutch version is work in progress. str_LOADGAME = Lataa peli If you can’t use any shorter word, you may be able to make the element
str_OPTIONS = Asetukset wider. All GUI elements such as windows and buttons are defined in
str_EXITTOWINDOWS = Poistu Windowsiin
scripts found in the same folder as the _strings.txt. I won’t go into too
str_EXITTOMAINMENU = Poistu päävalikkoon
much detail here, but for example a popup window in strategic view is
defined in strategic_info.txt. At the bottom of the file there’s a block for
Some sentences contain variables such as %s, %d or %i. Removing
“ok” button:
those or changing their order will cause the game to crash, so be care-
ful. btnok
The process {
str_SOME_STRING = Upgrade %s in %s to level %d before %d render = 5
Translating the game can be roughly divided to four parts: componenttype=frame
Above translated without touching the variables: framefile = Data\Locales\en\base_button.txt
x = root.x + root.width/2 - root.block
* Translating the ingame strings str_SOME_STRING = Päivitä %s satamassa %s tasolle %d ennen y = root.y+root.height - this.height -root.marg*3.5
* Proofreading vuotta %d width = 100
* Editing the GUI caption = str_OK
* Voice acting Proofreading }

Translating the ingame strings


. Localizing the game .

Our example case is solved by changing the width parameter to 160.

Voice acting

You’ll find the speeches at Data/Sounds/Voices folder. Just replace the


voices with new ones. Speech samples should be in 16-bit mono.
Finally

I hope this tutorial gave you a basic understanding about localizing the
East India Company. In case of any questions or problems don’t hesi-
tate to ask at our modding forum.

See you next time!


- Samppa

You might also like