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
|
|
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
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
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9455]
|
Tue, 17 August 2004 22:04
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
1. You can import one either way.
Use the multi page selection when creating a sti file from scratch,
import it via the button under the palette when you start from an existing one and want to paste over new images. (I used to do that sometimes to have a check on how many images I needed to replace). Do note that when you import the palette into an existing sti file, the images in it will be totally screwed up. (which doesn't really mind if you are to paste your new ones over them, but still, it looks wrong).
2. Well, I don't know if I get the question completely, but as long as you have the first image in the sti file pasted in, you should get an idea of the character you're using. And make sure you have the 90x100 face image for the npc's,
and I think the 48x43 or 31x27 images).
I think you get the "not completed" image if you don't have 8 images in your sti file. Not sure though. You could of course just copy and paste a detail of the face 7 times, justto have something.
Sometimes, when you paste an image in the sti file, say, the 3rd image out of 7, and the color scheme (palette) is a bit different than the previous 3 images, sti-edit sometimes freaks out and screws up all the other images.
(which is why you should save often).
If you would redo the process, it might just work fine next time... :headbanger:
Report message to a moderator
|
First Sergeant
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9457]
|
Wed, 18 August 2004 22:01
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
I understand the terminology can cause some confusing.
Each character has a set of sti files in different sizes. (The set of 7 I mention, although not all characters need all 7 files)
Every sti file in that set has 8 different images in it.
Out of those 8, the first is fixed in size and determines the size of the sti, the 7 following images
are the eye and mouth details and shouldn't be bigger than respectively +/- the eye and the mouth region.(see below).
So, if you have an npc, it would use 3 bXX.sti's, meaning his face in 3 different sizes, with every face having 7 eye and mouth details.
Let's say, open ja2/data/faces/B165.sti
That is the 90x100 face of Sparks. (a guy you should only encounter in the Sci-fi version of UC,
which isn't released yet)
Anyways, the sti consists of 8 images:
0: 90x100 total face image
1: 46x43 eye detail
2: 46x43 eye detail
3: 46x43 eye detail
4: 46x43 eye detail
5: 47x36 mouth detail
6: 47x36 mouth detail
7: 47x36 mouth detail
You will see the same structure for all face images, with the exception of the 106x122 bigface image. (used in profile and AIM, MERC page)
Of course, for another pic, the sizes of mouth and eye details might be slightly different.
Now open Proedit and check the eye detail offset (1,2,3 and 4)
an mouth image offset (5, 6 and 7). They should be eye 23,31 and mouth: 40.67. If so, you have a working pic. Voila.
For smaller sti's, yes, the images might become tiny. This is after all a 640x480 res game you know.
But as I said before, i think the game only actually uses the moving eye and mouth images for a few sti sizes,
and I forgot which ones. 90x100 is one of them for sure, but maybe the smallest ones don't have moving mouths
(although the images/sti's are made to be so in the original game. Maybe the dev's never got to implementing it)
Hope this answers your question...
Report message to a moderator
|
First Sergeant
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9459]
|
Mon, 23 August 2004 22:24
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
Quote:Originally posted by Khor1255:
Should I create different whole face frames or one whole face and 4 eye and 3 mouth cutouts? One face with 4 eye and 3 mouth cutouts.
Quote:
Also, does that one 8 frame animation cover all the different sizes used when you see a merc talking or do I need seperate cutouts at different sizes for each sized animation? Nope, the one 8 frame animation is only for one size. All other sizes need adjusted cutouts.
For the 90x100 image, the whole face image includes a part of the chest and the whole head,
while the 48x43 face doesn't even picture a whole head, but just the face.
Really, you should just pick out a merc in the JA2 (UC) folder and use it as a reference to recreate all files you find on his character number.
Damn, you're a hard learner. :wb: )
Try and reread my previous post(s), they are in fact quite clear on the matter. And make sure you first try to make a complete face set and test in in-game. You'll know and learn fast enough what you are doing right/wrong.
Report message to a moderator
|
First Sergeant
|
|
|
|
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9465]
|
Wed, 25 August 2004 22:35
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
1. I really think that most editors support 1.06 and 1.07 versions of the exe. a pity you're not using one of those (UC is a hacked 1.07) since Sirtech didn't patch them for nothing.
2. Weapons is Ramfall's field of expertise. I know close to nothing about that
3. You made the pics ok I think. And you do have to adjust them in ProEdit. The x,y offset is measured from the top left of the total face pic to the top left of the detailed pic.
! The coordinates in ProEdit only affect the 90x100 image. The 48x43 image coordinates are edited via the proedit add-on which you can find in the UC-utils pack.
And for every change you make in ProEdit, you have to start a new game for the changes to take effect.
If you can't get it sorted out, send me the sti, I'll be working on UC tonight anyway. I'll take a look at it.
EDIT: oh, and make sure the two eye and mouth templates are not too big. If they are, the animation freaks out too. Dunno how big they can be, nbut I once tried 1/2 of the total face image, and it was already too big. (tried animating Bruce the photographer to take a picture of you instead of blinking )
Report message to a moderator
|
First Sergeant
|
|
|
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9470]
|
Fri, 27 August 2004 05:17
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
1. I think you have to extract the myweapons.txt from the exe using a similar patcher as the one you get it back into the exe with. That last one is not the burst bug patch but some batch file calles "patch ja2" or something.
Any official 1.07 should work with all the tools we used in the Uc-utils pack. Try batman's editor, it has an exstensive help section. Read it thoroughly.
Oh, and I'd stay away from hex-editing. It's just a guess, but I think it is waaay beyond your current capabilities. I'd focus on the more rookie-friendly stuff for now. Again, I could be wrong.
The first image in a sti file (the image on the first page, which is image "0", should be the exact size needed (see way above, or the original ja2 sti you'll be replacing). The rest doesn't matter as long as they are not too big.
Just send me the sti and I'll take a look.
(after the weeknd though, will be away)
Report message to a moderator
|
First Sergeant
|
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9473]
|
Wed, 01 September 2004 17:56
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
Well. How did you make your faces? Did you manage to create mouth and eye cutouts?
If you used Photoshop, you make sure the eye or mouth detail is in the correct spot,
and use the "info" tab to track your mouse pointers coordinates. I am sure several graphical programs
have that feature somewhere.
If yours doesn't, you can do it via Windows Paint, as I explained in the other thread.
I'll do it again here:
- copy paste your main face pic into paint
- copy and paste say, the eye detail into paint
- the detail will have a selection border around it. Now move the selection area so it fits on the face
(it's a bit tricky) and read the coordinates in the bottom bar. !Since the bottom bar displays the mouse cursor
position, make sure to select that eye detail in the most top left corner. With this method, you might be a pixel off, so check it ingame
and either tweak it using Proedit or as Khor mentioned via the x,y buttons in sti-edit. (the last method allows you to tweak while the game is running)
For your own convenience, you want the eye details to be the same image size, and same goes for the mouth details. If they are not, you will have to tweak them all seperately
via the x,y offsets in sti-edit. And beleive me, you don't want to be bothered with that if you're making 50+ characters.
Report message to a moderator
|
First Sergeant
|
|
|
|
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9479]
|
Fri, 03 September 2004 16:08
|
|
Balrog |
Messages:4
Registered:August 2004 |
|
|
I see tnx but somehow it does only show b pics of NPC/RPCs and not of mercs/IMP costum mercs?! :bawling:
Report message to a moderator
|
Civilian
|
|
|
|
Re: How to create face sti's [the basic tutorial][message #9481]
|
Wed, 01 December 2004 19:56
|
|
Wodan |
|
Messages:538
Registered:December 2001 Location: Antwerp, Belgium |
|
|
*bump*
@Kaerar: ok, well, maybe it's rather basic. But it's better than nothing, huh?
I didn't go into actually working the faces, since you can create faces by just having pictures of the right size and cutting and pasting of mouth and eye movements.
Dunno if this helps.
Report message to a moderator
|
First Sergeant
|
|
|
Goto Forum:
Current Time: Mon Dec 02 00:48:57 GMT+2 2024
Total time taken to generate the page: 0.03045 seconds
|