Jump to content
XCOMUFO & Xenocide

Getting New Skins/aliens To Work?


Exo2000

Recommended Posts

The first question;

 

I have some custom skin replacements (the urban camo, to be precise, and a couple of new alien skins) but I can't figure out how to get them into UFO 2000, can anyone gimme a hand?

 

And secondly, on the music note;

 

I have the original X-COM (Enemy Unknown, music by "John Broomhall") OST as a series of high-quality mp3's, now, I can make them into .oggs for you guys if you want them.

 

I'm currently listening to the classic Intercept/Dogfight... *bops*

 

~~

 

I'm currently converting a high quality set. I'll also make one low quality, and one mid quality, sound fair?

 

On a scale of one to ten, the current high set is 10, the mid will be 5 and the low will be 1, unless that turns out really bad, then 2 and upwards.

 

Be warned! The High-Quality .oggs are TWO TO THREE TIMES the size of their .mp3 counterparts.

Edited by Exo2000
Link to comment
Share on other sites

We will add a flexible plugins system to the game in the near future (in fact we have already started making it for maps), so anyone will be able to add custom unit skins, music and background pictures. Until then, there is little what we can do with all this stuff.

 

In addition, most of these skins and soundtracks use modified copyrighted material and I don't know if we can include them into official distributive of ufo2000 due to legal reasons. But we can have all these resources as third party addons without any problems :)

Link to comment
Share on other sites

That was the idea, you could offer up the extra variants/versions of the music as optional downloads for those with differing bandwidths and connection speeds. As such, my high-quality oggs (with maximum deflate on WinZip) total 42mb. In one zip.

 

dBpowerAMP Music Converter is the best EVER, hands down. Completely free music converter. Making the low-quality ones now.

Link to comment
Share on other sites

That was the idea, you could offer up the extra variants/versions of the music as optional downloads for those with differing bandwidths and connection speeds. As such, my high-quality oggs (with maximum deflate on WinZip) total 42mb. In one zip.

Currently we have a page where people can share links to their favourite soundtracks: http://ufo2k.lxnt.info/pmwiki/pmwiki.php/Main/NewMusic

 

After we extend plugin system to support standard way of installing music packages for ufo2000 (similar to installing new maps), anybody will be able to easily set up any music and listen to it.

Edited by Serge
Link to comment
Share on other sites

no, i have not forgotten about this =) I believe i have the beginnings of a programmable unit skin interface written in c++ and lua. It doesnt use allegro, but porting it *shouldnt* be too bad

Great! What we need first is some simple structured description of unit skins. It even does not need to be universal and suitable for any purpose, it should just describe existing skins from x-com and tftd in a clean way. We can improve it later to handle everything we will need. Though different hairstyles that were added recently (as a dirty hack), can make skins descriptions more complicated.

Link to comment
Share on other sites

I'll get the descriptions done when I get back home in a couple of days. If that's ok with you guys. They'll be pretty simple, then I'll elaborate and expand, adding in details as I go.
Link to comment
Share on other sites

I'll get the descriptions done when I get back home in a couple of days. If that's ok with you guys. They'll be pretty simple, then I'll elaborate and expand, adding in details as I go.

Well, looks like we have some sort of minor misunderstanding here :)

 

What I had in mind when writing about 'unit descriptions' was a description for unit rendering code of the game, not for humans. For example, to display a sectoid unit standing and looking northwest we need to display frames from 'sectoid.pck' file with some specific indexes in some specific order...

 

But the idea of having human readable descriptions (some kind of ufopaedia) for players is very good indeed. The same applies to weapons and equipment. By the way, we can probably use what Xenocide creative texts department has already done if they are kind enough to give us permission :)

Edited by Serge
Link to comment
Share on other sites

  • 11 months later...

0.7.893 http://ufo2000.lxnt.info/files/ufo2000-0.7.893-beta.exe

 

Since version 0.7.893 some support for modding units has been added.

 

You can install this new beta and select a new skin with a weird name: '-- user made --'. It is a new skin made by nappes (issue #288) support for which was added via files from 'extensions/unit-soldier' folder, there is a lua script in it along with png file which contains all the sprites.

 

Currently only unit animation can be modded and only for one skin. But it is just a start. First we need to make the animation work smoothly, after that we can start adding real units with their properties and unique features.

 

I tried to comment lua file to describe what is in it, but if you have any questions, feel free to ask. In general, using this engine it should be possible to describe animation for probably all of the existing x-com units plus lots of new. API is still not finalized and can change, but I would like to get some feedback from people who are interested in units modding (in order to support all the needed features in a convenient way). Opinions, ideas, suggestions?

 

The most easy way to start experimenting with this new code is to start a hotseat game with at least one soldier having this new skin. Then exit from the game, set F_FASTSTART = 1 flag in ufo2000.ini. After that whenever you start the game, it will bypass the main menu and directly start tactical mission with the previous settings. Also quite useful are animation speed settings (set movement speed to minimum in order to notice what happens on the screen) and F2 (save) / F3 (load) keys. Changing soldier.lua file and restarting the game, you can see the changes you made to unit animation.

Link to comment
Share on other sites

I have been looking at the new units and I found the sudden dying bodies to just move for some awkward reason. Heck, even if it is borrowed it shouldn't move like that. Not only that, the sprites don't look like they are even in the right position to carry a rifle. They seem too far away to be able to carry it even with hands.

 

Serge: if you can make it so more sprites can be implemented, I may be able to make the ethereal png sprites work. And it would be nice to be able to have the option to reconfigure their armor stats. If there will be user-made units...its going to require armor stat configuration in the lua.

Edited by Kratos
Link to comment
Share on other sites

I have been looking at the new units and I found the sudden dying bodies to just move for some awkward reason. Heck, even if it is borrowed it shouldn't move like that.

That's a bug, dying body seems to slide to the direction the unit was facing. I'll try to fix this.

 

Not only that, the sprites don't look like they are even in the right position to carry a rifle. They seem too far away to be able to carry it even with hands.

These are experimental sprites, they surely will be improved later. And we do not handle weapons quite well even for x-com sprites, that needs to be fixed for sure.

 

if you can make it so more sprites can be implemented, I may be able to make the ethereal png sprites work.

You already can make different sprites work, for example that's a lua script that describes civilian animation (comments stripped, but all the idea is the same as in soldier.lua), just replace current soldier.lua with this code:

local frames = pck_image_set("$(xcom)/units/civm.pck", 0, 8 * 9 + 3)

local function sprite_renderer(img, dir, phase, extra)
   if extra.collapse then
       img:draw(0, 0, frames[1 + 8 * 9 + math.floor(phase / 3)])
       return
   end
   if phase == 0 then
       img:draw(0, 0, frames[1 + dir])
   else
       img:draw(0, 0, frames[8 + dir * 8 + phase])
   end
end

AddUnit {
   pMap  = sprite_renderer,
   pInv  = frames[1],
}

 

And it would be nice to be able to have the option to reconfigure their armor stats. If their will be user-made units...its going to require armor stat configuration in the lua.

That was the whole idea of making unit mods, but the first milestone is to get unit animation work properly.

 

Edit: Just noticed, the same script works for the ethereal too, just replace "$(xcom)/units/civm.pck" with "$(xcom)/units/ethereal.pck" :)

Edited by Serge
Link to comment
Share on other sites

I meant adding multiple user-sprites at once.

 

The ethereal and civilian sprites are kind of glitchy in ufo2000. They work right but they don't carry a weapon and part of their sprite turns invisible when they walk.

 

Heh, I noticed there isn't an spk image of ethereal. I will see if I can cut the xcom image out. :)

Edited by Kratos
Link to comment
Share on other sites

I meant adding multiple user-sprites at once.

Once again, not so fast :) I'm working on that.

 

The ethereal and civilian sprites are kind of glitchy in ufo2000. They work right but they don't carry a weapon and part of their sprite turns invisible when they walk.

It is easy to add a weapon (or combine a sprite from many different parts). The format is quite flexible as you can define any custom unit rendering function. Here is the updated script:

local frames = pck_image_set("$(xcom)/units/ethereal.pck", 0, 8 * 9 + 3)

local function sprite_renderer(img, dir, phase, extra)
   if extra.collapse then
       img:draw(0, 0, frames[1 + 8 * 9 + math.floor(phase / 3)])
       return
   end

   local function draw_body()
       if phase == 0 then
           img:draw(0, 0, frames[1 + dir])
       else
           img:draw(0, 0, frames[8 + dir * 8 + phase])
       end
   end

   if not extra.gun then draw_body() return end

   -- depending on the direction we may have to draw weapon or the body first
   if (dir < 1 or dir > 5) then
       -- show a gun first, then overwrite it with a soldier body
       img:draw(0, 0, extra.gun)
       draw_body()
   else
       -- show soldier body first, then overwrite it with a gun
       draw_body()
       img:draw(0, 0, extra.gun)
   end
end

AddUnit {
   pMap  = sprite_renderer,
   pInv  = frames[1],
}

 

Parts of body get overwritten by floor sprites, that's another bug. The fix will be available quite soon.

Link to comment
Share on other sites

We don't need to create SPK files for modding, that is a legacy format from x-com just like pck. You can just use PNG file for the unit inventory screen, even more, you can use a part of PNG picture for that. For example in soldier.lua the following code is used (filename plus x, y coordinates of top left corner and width, height):

pInv = png_image_fragment("$(extension)/soldier.png", 325, 0, 390 - 325, 150)

 

But you can also use a whole PNG picture for the inventory screen:

pInv = png_image("$(extension)/mycoolinventorypicture.png")

Link to comment
Share on other sites

Got it working, thanks.

 

Is there a way to make it so that it sounds like an ethereal when dying and has the ground object of an ethereal? This will make so users can toggle between death sounds and corpse images.

Edited by Kratos
Link to comment
Share on other sites

Not only that, the sprites don't look like they are even in the right position to carry a rifle. They seem too far away to be able to carry it even with hands.

That's because the sprites for soldiers carrying a weapon have not been made yet. The sprites which are currently included in the beta are intended for unarmed soldiers only.

Link to comment
Share on other sites

Revision 7.898

 

Something else I found...the units of ethereal and civilian sprites are not positioned right for walking tiles.

 

Edit: Even the new "soldier" sprite does this as well. To get a better look, line up the "new" sprites with sectoids and mutons and you will notice the "new" sprites are out of place.

 

Edit2: I seen the "new" soldier death sprite and it looks too bloody compared to the xcom death sprites.

Edited by Kratos
Link to comment
Share on other sites

×
×
  • Create New...