Jump to content

Piecing together the UFO unit frames


marshall

Recommended Posts

Now that I know how it's done, maybe it won't take me too many years to finish this mod :P

I'm gonna see if I can get a colleague to write a program to do it all automatically now but, failing that, it shouldn't be too hard to do by hand.

 

I expect I'll have to do some more thinking/posting when I get around to doing the aliens carrying weapons.

Link to comment
Share on other sites

And here I am.

How to make them carry weapons?

For, say, the Sectoid, there are 32 arm frames at the end of the sequence. I assume they comprise of a left and right arm for carrying, and a left and right arm for shooting, for each of 8 directions, although I don't know which is which.

I'm looking at handob.pck for the weapons that I presume they carry but can't figure out where to place them (this time, using the top-left pixel as the origin doesn't seem to work).

Also, I imagine a different weapon image is used for when they are shooting as opposed to when they are firing (although I suppose this could just be a different facing of the weapon from handob)

 

Solutions?

Link to comment
Share on other sites

And just to show you that this whole animation thing really is easy once you get the procedure down pat, I just created this in a whole 5 minutes:

https://ufopaedia.xcomufo.com/pics/chryssalid2.gif

Anyway I can convince you of doing the same work with some civilians? I had thought of using one of TFTD civilians to replace the ones on UFO for my Area51 mod but it takes ages using Paint :P

Link to comment
Share on other sites

How to make them carry weapons?

For, say, the Sectoid, there are 32 arm frames at the end of the sequence. I assume they comprise of a left and right arm for carrying, and a left and right arm for shooting, for each of 8 directions, although I don't know which is which.

I'm looking at handob.pck for the weapons that I presume they carry but can't figure out where to place them (this time, using the top-left pixel as the origin doesn't seem to work).

Also, I imagine a different weapon image is used for when they are shooting as opposed to when they are firing (although I suppose this could just be a different facing of the weapon from handob)

 

Solutions?

I haven't quite worked out the gun-holding animations either, but this is what I think they are:

 

The 1st row looks to be the right arm holding a single-handed item.

The 2nd row seems to be the left arm holding a two-handed item.

The 3rd row looks to be the right arm holding a two-handed item.

The 4th row is the right arm shooting!

 

As for the handob images, I have no idea how they align :P

Link to comment
Share on other sites

Don't use MS Paint ever. Try Paint Shop Pro.

I use Photoshop 7 :P

 

Were you asking if I could make some civilian animations, Hobbes?

Well, it's more to redo the entire Civilian .pck file. It's a major pain since you have to replace 50+ images because the .pck files on TFTD have the civilians split up in torso, legs and arms while the civ .pck files on UFO are a full body image. You have to compose the TFTD images if you want to import civ graphics from it to UFO.

I've a couple so far (that's why I'm interested on this post since I had problems getting the different body parts together) but it's really boring work so I understand if you pass it :(

Link to comment
Share on other sites

As for the handob images, I have no idea how they align

handobs are the same, just put the weapon over the built-up sprite, its just another card in the deck

 

the .pck files on TFTD have the civilians split up in torso, legs and arms

Really? Which civilian file is like that?

 

And as for 'aligning' the images 41 or so pixels from one another, am I correct in assuming you guys dont know about saving individual tiles? Right click on an image, save it as a bmp and you will have that frame by itself, making it (i think) easy to align one frame with another.

Link to comment
Share on other sites

Hobbes:

 

I was thinking about a solution that's a little more difficult and would require a bit of programming to create a TFTD/UFO colour conversion utility. But it would avoid having to extract and convert the entire thing frame by frame, which can be even more time consuming if done manually!

 

Why not just copy the sprite file, then put the entire file in place of the sprite you want to replace in UFO . Then, somehow take all the values in the sprite file from TFTD's battlescape palette and swap them with their closest match in UFO's battlescape palette. This of course would mean somehow making a conversion table, either manually or dynamically. The conversion is actually the easiest bit. The table's the hard bit.

 

Of course, I realise this isn't going to help with putting TFTD civilians in UFO, as their images are all in reverse order for some peculiar reason. Unless, of course, UFO civilians are back to front as well, then no worries!

 

You could even just get a copy of, say, the sectoid sprite file, make a copy and replace one of the civilian files, you'd end up with civilians that look like sectoids.

 

- NKF

Link to comment
Share on other sites

Really? Which civilian file is like that?

You're right, it's not a TFTD civ that I want to import but one of Bagirov's modified X-Com units (it's a soldier in urban cammo with helmet - it would make more sense for a military base to have it present than civilians). I mentioned the TFTD civ (the guy in a grey jumpsuit) because that was the alternative.

 

NKF, yes it would be more easier to replace the entire file but it would still need adjustments (the TFTD files are longer that the UFO ones). I don't know anything about how the different palettes work or to how to make your idea work, but PCKView does the job automatically. The real problem is to compose the soldier images together - you have to fit torso, legs and arms from 4 different .bmps then repeat the process 70 times. Too much time consuming for the moment :P

Link to comment
Share on other sites

Try this link for the Pcks. If you can't download it, is your hotmail address the one you use?

I've included the Civ pck I started to modify (feel free to laugh at my ape looking soldiers :P . With left/right facing positions you don't have to create the opposite side .pck since you can use the flip command to create a mirror image.

 

Good luck and thanks :(

Link to comment
Share on other sites

  • 3 weeks later...
lol what are we making here? my damn computer keeps breaking and i don't want to read like 3 pages back right at the moment. sorry jelly, got halfway thru with those uniforms and windows decided it was time to toast my hd drivers......but luckily i got the format down so i can pickup where i left off pretty quick i hope.
Link to comment
Share on other sites

  • 11 months later...

Sorry for getting this thread up again but some of the infos here are not correct or I am quite stupid (which is more likely :P).

 

If we take the Muton for example:

 

The first 16 of his pictures are his legs (8 left, 8 right) followed by his legs, his "head" and his torso (each 8). The first of those is always pointing to the upper right and goes clockwise until the eigth picture shows to the "top" (away from the screen).

 

Those pictures are those used for a standing Muton, right? Ok, they look fine so far.

 

Problem is with those for the animations.

 

I get those images using the following "formulae" (direction and frame start at 0 and go to 7):

leftArm = 40 + direction*24 + frame

rightArm = 48 + direction*24 + frame

legs = 56 + direction*24 + frame

torso = direction + 32

head = direction + 24

 

Looking at my pictures I notice that some of the legs are... well wrong?

 

https://www.pen-dragon.de/krams/mut_1.jpg

Those are the legs for a Muton who is moving towards the screen. See the y-axis? Quite messy, not well aligned.

 

Same problem with the right arm if having direction 2 (to lower-right). It looks like the arm sticks out of his chest. Has to hurt.

 

 

Is there a problem with my image retrieval or is that normal? I can't find any bugs (but I bet there are some :D) in that code, so I am quite confused. (And annoyed from staring on silly green feet! ;))

 

 

 

Second: The up-down-movement of the legs. Since most of the time the torso remains the same for all animations (like the head) adjusting the torso to the legs and arms (which move up and down) would be the best idea (I believe).

 

Mentioned was 0-1-2-1-0-1-2-1 as cycle. I had no good results with this and tested a bit. I noticed that in frame 3 and 7 (starting with 0) an offest of 0 gives the best results. So 1-2-1-0-1-2-1-0 was the next guess. Didn't work very well. It has to be a quite simple formula, I am sure. frame%3 and (frame+1)%3 don't work.

 

Hm, testet again: -1,-1,-1,0,-1,-1,-1,0 (where -1 is going down a pixel (Torso/Head)) yields the best results. But the first problem remains...

Link to comment
Share on other sites

  • 1 month later...

Shame I didn't get here earlier. But hey, you never know...

 

My map viewer pieces together all the units... But the resulting code is quite long winded, and could probably be better done.

 

Doesn't handle any animations for firing/moving units though.

 

*checks his own image lists*

 

The walking legs for any direction seem to follow the same wavey pattern.

 

My advise to you is tell a muton to walk down the screen in game and take as many screen shots as possible as he does so. You'll spot the pattern soon enough.

Link to comment
Share on other sites

Any volunteers to provide all (or some) x-com units rendering scripts for ufo2000?

 

We have got support for modding units animation using lua scripting.

Currently we support only a few skins, check for lua files here:

https://lxnt.info:8888/repos/ufo2k/trunk/ex...unit-chameleon/

 

All the comments about what is available for unit rendering scripts are in:

https://lxnt.info:8888/repos/ufo2k/trunk/ex...eon/soldier.lua

 

Plugging more unit skins is possible in the latest beta version of the game.

 

We don't have enough man power to do this work (and also sorry for the lack of detailed documentation). As there are people familiar with algorithms for proper building unit skins from pck frames, maybe we could get some help here.

 

Just PM me if you are interested. Theoretically it should be possible to make animation for any single square unit from x-com for ufo2000 :angry:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...