Master Lexx
Warlord
- Joined
- Nov 28, 2005
- Messages
- 187
Tuturial: how to skin and add new bonus resources and improvments to the game
I am the creator of GreenMod, I already included 9 new resources there. I want to share my knowledge and give instructions on how to do this for your own. How to alter the skins of existing resources to re use them for new ones, how to add new improvements and how to setup the xml files CIV4BonusInfos.xml , CIV4ImprovementInfos.xml , CIV4ArtDefines_Bonus.xml , CIV4ArtDefines_Improvement.xml , CIV4BuildInfos.xml , CIV4UnitInfos.xml .
If you have any ideas or corrections regarding my guide, please send them to me via personal message!
(or maybe you want some extra pics or description to something, simply pm me!)
Here I will take the most difficult example on how to add a bonus resource, other bonus resources may be more simply but if you can make this difficult one, you will also be able to make all the simple ones. You can always look into GreenMod if you want to see it working. This tutorial is made for mod makers, who have some basic knowledge about graphics painting and know how to alter xml files. Don´t even try to ask here how to begin an own mod or where to get the xml files from and other basic things!
I don’t speak native English, so please forgive me my sometimes worse word selection.
You need Paint Shop Pro (http://www.zdnet.de/downloads/prg/s/l/de0DSL_is-wc.html, shareware)
Also get a hex editor (HexWorkshop, http://bpsoft.com/ , shareware)
A xml editor (notepad++, http://notepad-plus.sourceforge.net/uk/about.php , freeware)
A dds converter (DDSConverter 2.1, http://eliteforce2.filefront.com/file/DDS_Converter;29412 , freeware)
And make sure that in the DDSConverter options “save alpha if any” is activated!
Also extract all the game resources with the pak extractor (there are w2k and wxp versions). The folder where you extracted your ingame art directory with this, will be refered by me as “exart”. (http://forums.civfanatics.com/showthread.php?t=137265)
Other abbreviations:
dir = directory
pic = picture
ddsc = dds converter
impr = improvement
mymod = dir of the mod (Civ4\Mods\Mymod)
First some basic knowledge about selections and alpha channels with Painst Shop Pro.
The alpha channel is just second picture in a picture. This alpha channel can only use grey scale colours, a black pixel at a sertain position in the alpha channel means that the same pixel in the real pic will not be visible (0%) outside the graphics programm. White means complete visible (100%). All colours between black and white represent a different transparency for the real pic between 0% and 100% visible.
There are three possibilities to edit the alpha channel in PSP. First go into the menu – selection – selection (load/save) – load selection out of alpha channel. Now you see a new selection, this represents any not complete black colour in the alpha channel. So you can´t know if this is nearly invisible or complete visible.
One way to make this visible is to go in the menu – selection – edit selection , now you can see the alpha channel represented with red colour on top of your real pic. With a black color you can remove the visible parts, with a white colour you can add new visible parts to the selection.
Another way is to go menu – selection – selection (load/save) – save selection as file , the new file can be edited like every other pic. But only use greyscale colours there, because you want to use it again as selection/alpha channel later.
A cheap although easy way to edit the alpha channel is to just let it be a selection. If you hold shift pressed while working with the selection tool you can add a new selection to the existing one (like complete white) and if you hold ctrl pressed you can remove something from the actual selection (like complete black). This is my preferred way to alter the alpha channel, but remember that the existing selection may not be all white, it can be every value between black and up to white.
After you edited the selection or loaded it from a file, you need to save this again into the alpha channel of this file. Menu – selection – selection (load/save) – save selection into alpha channel, as name use the same name the existing alpha channel already has or it may add a second alpha channel but not all formats support more than one alpha channel (like dds).
Remember after this you still need to save the file itself!
I am the creator of GreenMod, I already included 9 new resources there. I want to share my knowledge and give instructions on how to do this for your own. How to alter the skins of existing resources to re use them for new ones, how to add new improvements and how to setup the xml files CIV4BonusInfos.xml , CIV4ImprovementInfos.xml , CIV4ArtDefines_Bonus.xml , CIV4ArtDefines_Improvement.xml , CIV4BuildInfos.xml , CIV4UnitInfos.xml .
If you have any ideas or corrections regarding my guide, please send them to me via personal message!
(or maybe you want some extra pics or description to something, simply pm me!)
Here I will take the most difficult example on how to add a bonus resource, other bonus resources may be more simply but if you can make this difficult one, you will also be able to make all the simple ones. You can always look into GreenMod if you want to see it working. This tutorial is made for mod makers, who have some basic knowledge about graphics painting and know how to alter xml files. Don´t even try to ask here how to begin an own mod or where to get the xml files from and other basic things!
I don’t speak native English, so please forgive me my sometimes worse word selection.
You need Paint Shop Pro (http://www.zdnet.de/downloads/prg/s/l/de0DSL_is-wc.html, shareware)
Also get a hex editor (HexWorkshop, http://bpsoft.com/ , shareware)
A xml editor (notepad++, http://notepad-plus.sourceforge.net/uk/about.php , freeware)
A dds converter (DDSConverter 2.1, http://eliteforce2.filefront.com/file/DDS_Converter;29412 , freeware)
And make sure that in the DDSConverter options “save alpha if any” is activated!
Also extract all the game resources with the pak extractor (there are w2k and wxp versions). The folder where you extracted your ingame art directory with this, will be refered by me as “exart”. (http://forums.civfanatics.com/showthread.php?t=137265)
Other abbreviations:
dir = directory
pic = picture
ddsc = dds converter
impr = improvement
mymod = dir of the mod (Civ4\Mods\Mymod)
First some basic knowledge about selections and alpha channels with Painst Shop Pro.
The alpha channel is just second picture in a picture. This alpha channel can only use grey scale colours, a black pixel at a sertain position in the alpha channel means that the same pixel in the real pic will not be visible (0%) outside the graphics programm. White means complete visible (100%). All colours between black and white represent a different transparency for the real pic between 0% and 100% visible.
There are three possibilities to edit the alpha channel in PSP. First go into the menu – selection – selection (load/save) – load selection out of alpha channel. Now you see a new selection, this represents any not complete black colour in the alpha channel. So you can´t know if this is nearly invisible or complete visible.

One way to make this visible is to go in the menu – selection – edit selection , now you can see the alpha channel represented with red colour on top of your real pic. With a black color you can remove the visible parts, with a white colour you can add new visible parts to the selection.


Another way is to go menu – selection – selection (load/save) – save selection as file , the new file can be edited like every other pic. But only use greyscale colours there, because you want to use it again as selection/alpha channel later.


A cheap although easy way to edit the alpha channel is to just let it be a selection. If you hold shift pressed while working with the selection tool you can add a new selection to the existing one (like complete white) and if you hold ctrl pressed you can remove something from the actual selection (like complete black). This is my preferred way to alter the alpha channel, but remember that the existing selection may not be all white, it can be every value between black and up to white.


After you edited the selection or loaded it from a file, you need to save this again into the alpha channel of this file. Menu – selection – selection (load/save) – save selection into alpha channel, as name use the same name the existing alpha channel already has or it may add a second alpha channel but not all formats support more than one alpha channel (like dds).

Remember after this you still need to save the file itself!