:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Nov 23, 2017 3:58 am
All times are UTC + 0
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
Adding new cameos [ZH]
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] View previous topic :: View next topic
Author Message
DaFool
Defense Minister


Joined: 07 Nov 2006

PostPosted: Thu Jan 01, 2009 4:20 am    Post subject:   Adding new cameos [ZH] Reply with quote

It's been a while since I have posted a tutorial, but since this below has basically been my day, I thought I'd post it up.  I aslo have all the red alert 1 and tiberian dawn cameos converted and ready for use Wink.

Tutorial: adding new icons to generals.

What you need
1)XCC Mixer
2)Notepad
3)Paint
4)Image(s)

Background
Traditionally each cameo was stored as a separate image.  Not so in Generals, now all the cameos are compiled into sheet of images (in the .tga format).  There is then an INI file which carves up these images into what we called “Mapped Images”.  So basically the INI has a list of coordinates that signifies each individual image and then you assign a name to it.  There are two types of cameos-small and large.  The large is used for when the unit or building is selected, and the small for every other function.  In this tutorial I will focus in on the small cameos, but the large work in the exact same manner.

Step 1
The first thing you need before adding cameos are well, cameos.  I have attached a couple sheets for you to use, or you could make your own if you please.  Small cameos are 62x50 pixels and large are 122x98 pixels.  You should make sure your cameos are this big before you begin trying to add them in.  Open up paint and have the image size be 512x512.  You should then start copy and pasting all your cameos in a grid like fashion starting in the upper left and leaving no room between them.  Remember that the small cameos are 62x50, and in example A, the space I leave is part of the cameo.  You will have extra space on right and bottom, so don’t worry about that.  So once you have all the cameos you want to work with ready, save the image in the .png format.  Generals uses the .tga format, so you will have to convert it XCC Mixer.

Step 2
Since we’re in XCC Mixer, lets take the time to look at our Generals or Zero Hour directory.  One big difference you will notice is that the cameos sheets are located in different places in the two games.  Generals has the sheets in the textures big, while Zero Hour has them hidden away in the EnglishZH big (at least for me, since I have an English version).  Since we now know where the images are stored, lets looked to where the INI is stored.  Go back to the main directory and go to the INI big.  You will have to scroll down a bit, and you will see a whole section dedicated to mapped images.  This are very important because you can copy and edit these in the future.  Personally this is what I did, but I have provided you with a sample INI in the attachment.

Step 3
If we’re gonna get our cameos to work in game, they need to be in the right directory.  So if you don’t already have these folders already, you are going to need to make them.

For Generals:
Generals\Data\INI\MappedImages\TextureSize_512
Generals\Art\Textures

For Zero Hour:
Generals Zero Hour\Data\INI\MappedImages\TextureSize_512
Generals Zero Hour\Data\english\Art\Textures

In both cases that sheet that you made should go in the folder called Textures.  You are probably wondering what to call that folder, and as far as I know you can call it whatever you want.  However, you should make sure you are not naming it the name of an already existing file.  The following are already in use:

SAUserInterface512
SCUserInterface512
SNUserInterface512
SSUserInterface512
SUUserInterface512

Personally I only changed the second letter of the name and kept everything else.  Each of the above is for a different faction, and each has multiple versions of it, each ending with _xxx where xxx is a number.

So the full name of the first sheet I have attached is SGUserInterface512_001.tga.

Step 4
So you have all your directories set up and your sheet(s) is in place, now all you need is the INI to tell the game how to read them.  You can edit the one I attached for in the future or you can extract another one from back in the directory.  The basis entry looks like this:

MappedImage SASpyPlane
 Texture = SRUserInterface512_001.tga
 TextureWidth = 512
 TextureHeight = 512
 Coords = Left:373 Top:301 Right:433 Bottom:349
 Status = NONE
End

The first line names the cameo, the second tells what image to look for it on(**this is your sheet**).  The next two lines say how big the sheet is, and the Coords line tells where on the sheet the specific cameo is.  It’s simple enough you can just figure it by looking at the image in paint, or you can edit an already existing INI which has a sheet that has matching coordinates.  Once you have named every image and given the correct coordinates, save the INI using the same base name as the sheet, and move the INI in the correct directory.  The images are now ingame!

Step 5
You’re not done yet, even though the cameos are in, nothing is said to have them!  So go around and edit them in.  Use the names you gave to the cameos in the INI and paste them over the images you want to replace.  The Command button INI and the INI for all your units and buildings all have tags for their image.  “ButtonImage“ for the small one and SelectPortrait for your large cameos.


sheet.jpg
 Description:
 Filesize:  103.88 KB
 Viewed:  40261 Time(s)

sheet.jpg



attachment.zip
 Description:

Download
 Filename:  attachment.zip
 Filesize:  321.51 KB
 Downloaded:  1447 Time(s)



Key Words: #Tutorials #Modding #Generals #ZeroHour #OSBIGEditor #XCCUtilities #Cameos 

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Thu Jan 01, 2009 2:32 pm    Post subject: Reply with quote

Hey, where are my credits for telling you how to do this #Tongue
Nah, good tutorial DaFool Smile
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail MSN Messenger
DaFool
Defense Minister


Joined: 07 Nov 2006

PostPosted: Thu Jan 01, 2009 3:51 pm    Post subject: Reply with quote

Thanks to dutchy for saying

Quote:
For the cameos: look Data -> INI -> MappedImages, and then you must find it out on your own. I know they are in there, but I never know for sure which file is the correct one. Trial and error is the best option here

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message
DaFool
Defense Minister


Joined: 07 Nov 2006

PostPosted: Sun Jan 11, 2009 7:02 pm    Post subject: Reply with quote

Ra2 Cameos
http://www.ppmsite.com/forum/viewtopic.php?p=286068#286068
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message
shortie
Civilian


Joined: 10 Aug 2011

PostPosted: Wed Aug 10, 2011 1:54 pm    Post subject: Reply with quote

ehe , my fist tutorial looks well. But, I'm very busy this week tree, I need JMK Design to make two programs and they must be finished next month, so my tut progress will be going slow. I'll post another tutorial tomorrow.

Last edited by shortie on Wed May 08, 2013 1:58 am; edited 2 times in total

Back to top
View user's profile Send private message
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Fri Aug 12, 2011 2:18 am    Post subject: Reply with quote

^^ Say WUT?
_________________

The enemy shall be injected with toxic poison - Venom

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
001010011100101110
Commander


Joined: 18 Aug 2009

PostPosted: Fri Aug 12, 2011 2:24 am    Post subject: Reply with quote

shortie wrote:
I'll post another tutorial tomorrow.


*checks date*

LIES!

Back to top
View user's profile Send private message
wooday
Civilian


Joined: 19 Dec 2016

PostPosted: Tue Dec 20, 2016 6:45 am    Post subject: Reply with quote

001010011100101110 wrote:
shortie wrote:
I'll post another phallosan tutorial on https://casenergy.org/phallosan-forte-review-results tomorrow.


*checks date*

LIES!


Can we get an update tutorial on cameo's?

Last edited by wooday on Fri Aug 25, 2017 12:01 pm; edited 2 times in total

Back to top
View user's profile Send private message
Palafox
Civilian


Joined: 29 Jul 2017

PostPosted: Sat Aug 05, 2017 6:09 am    Post subject: Reply with quote

wooday wrote:
Can we get an update tutorial on cameo's?


Yes please!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [9 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1443s ][ Queries: 15 (0.0079s) ][ Debug on ]