Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Time Capsule (How-to Library) » How to create face sti's [the basic tutorial]
How to create face sti's [the basic tutorial][message #9453] Thu, 12 August 2004 06:17 Go to previous message
Wodan is currently offline Wodan

 
Messages:538
Registered:December 2001
Location: Antwerp, Belgium
Below is the reply I sent someone asking for help about creating face sti's. Might as well post it so some others might benefit from it. It might not be free of errors though.

Anyways, it's quite easy really, once you get the hang of it.
The difficulty lies in the amount of work and the amount of things to do before your character is ready.

1. decide which character you'll be working on.
Let's say you want to make a new recruitable character, and you want him to replace, say, Hamous (Postie in UC), which is character number 63.
Now,
- NON-recruitable characters use face images with a b in front, eg b63.sti,
- Mercenaries use face images without anything in front of them. eg 63.sti.
- Rectruitable characters, like Hamous, need all of them.

So, for the faces of character #63 you'd need: (check the ja2/data/faces folder with UC installed if you want an example)
/data/faces/63.sti (48x43 pixel image)
/data/faces/B63.sti (90x100 pixel image) (= the one you see when talking to someone)
/data/faces/33face/63.sti (15x14 pixel image)
/data/faces/33face/B63.sti (29x33 pixel image)
/data/faces/65face/63.sti (31x27 pixel image)
/data/faces/65face/B63.sti (58x65 pixel image)
/data/faces/bigfaces/63.sti (106x122 pixel image) (= the one in the (AIM) profile page with background picture, or the terrorists intel page)

To be honest, you might not need all of the sti's. The above ones are the ones Sirtech included in the game, but for instance terrorist #111 does fine with only the 90x100 and 106x122 image. So some of them might be obsolete.

2. create a face image
Do this in the graphic program of your liking. Tip: Make it 106x122 pixels or bigger, that way you only have to cut and scale it down for making all the other ones. Check some images in the ja2/data/faces folder (after installing UC) to see how the faces fit the images.
2a. the best results: when the face image is finished and the correct size, convert the image to 256 colors in your graphic program if it has the function. Export the color palette to import it later on in sti-edit.
2b.You can also forget the prevous (2b) step and just copy (CTRL+C) and paste (CTRL+V) your image into sti-edit, but when your image has a lot of different colors it might lose some quality.

3. Mouth and eye movements.
Some of the face sti's have moving mouths and blinking eyes in the game.
The most noticeable are the 90x100, the 48x43 and the 58x65. I think we didn't even bother to make the mouth and eye images for the other ones.
There are 8 pages in one sti-file like that: (the 106x122.sti is an exeption to that, it's a single-page sti)
- the full face image
- eyes: closed detail
- eyes: half closed detail
- eyes: angry frown detail
- eyes: pulling eyebrows up detail
- mouth: ee detail
- mouth: aa detail
-mouth: oo detail
In the multipage sti file (see 4.) they will be placed in this order after eachother.

Try to make the three eye details the same size, and do the same for the mouth details. Keeps you from the need to tweak their position with the x,y coordinates in sti-edit.

4. Importing into sti-edit
open sti-edit. Here you can do two things that have the same effect
4a. open a face image you want to overwrite, and paste your homemade face image from the graphic program onto the image in sti-edit. Press the red arrow pointing to the right to go to the next image in the sti-file and copy and paste your first eye detail over the present image. (they will replace it rather than paste literally OVER it). Do the same with the other 6 images.
4b. OR: create a new sti-file in sti-edit using the white page icon (neue data einstellen), and choose the second option (collection).
Here you can start with the standard palette (which will automatically be overwritten by the first image you paset into it) or load the
palette you exported in 2b for a better matching result. Click on "neue data einstellen" (read: create) and you get a nice black square empty sti collection. Now copy your face image from the graphic program and paste in in sti-edit. Then press the red arrow pointing to the right with GREEN background to CREATE the second page in the sti-file. Copy and paste your first eye image and continue doing this until you get 7 pages and thus 8 images. (the first image is on page 0 Wink

5. save your sti file in the appropriete folder.
Remember that there are several face sti files with the same name (63.sti or B63.sti)
so you might want to make a folder structure similar to the one described in 1.

6. Repeat 1. until 5.
create all 7 face sti's for your merc, and place them in the approriate folder. (See 1)

7. Mouth and eye movements
Now, you still have to get the eye and mouth movements in the correct spot.
The coordinates for those detailes are stored in two places:
- for the small images (48x43 I think) they are stored in the exe.
- for the 90x100 images they are stored in the prof.dat file.

7.a. Open the prof.dat file with ProEdit (in /ja2/data/binarydata/ ). In the bottom left you can enter the mouth and eye image coordinates.
These coordinates measure in pixels the distance from the top left corner of your face image to the top left corner of your eye or mouth image. You can look up these coordinates by checking the placement of the detailed images in your advanced graphic program or in paint by pasting the detailed image over the big one and move them to the right position (coordinates appear in bottom of window)
7b. Use ProEdit add-on(by Azrael) (in /ja2/data/binarydata/ or in the UC-Utils pack available for download) to open the exe you are using (ja2.exe
for regular game or Ja2-UC.exe if you are modding UC) and edit the coordinates for the 48x43 face eye and mouth images.
If for some reason your 4 eye detail images are not the same pixelsize, they will look distorted in the game, since they will all
be offsetted with the 1 set of coordinates you entered in ProEdit or the add-on. You can solve this by making the images the same size, or by tweaking their position using the x and y offsets in sti-edit. (if your first image is 20x38, and your second is 14x30, aligning to the centre of the other one, then you will have to adjust x and y to 3,4.

Voila. Piece of cake, no? :moosegrin:

The programs I mentioned are literally named like I did. Sti-creator IS NOT Sti-edit. Use Sti-Edit. It's windows based. No DOS knowledge needed. It does tend to crash from time to time, and sometimes pasting a new page into the sti file causes the other pages palette to go nuts (you'll see) so save often.


Good luck! Let me know where I am not clear. But first try it all out, when you fiddle a bit with sti-edit, it'll all become clearer. I promise.

Report message to a moderator

First Sergeant
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Next Topic: 1.13 Map Editor Guide
Goto Forum:
  


Current Time: Mon Dec 02 07:05:32 GMT+2 2024

Total time taken to generate the page: 0.01574 seconds