Jump to content


Photo

Getting New Skins/aliens To Work?


  • Please log in to reply
21 replies to this topic

#1 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 18 August 2004 - 09:37 AM

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, 19 August 2004 - 07:13 AM.

Posted Image

#2 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 24 August 2004 - 10:07 AM

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 :)
ufo2000 development team
http://ufo2000.sourceforge.net

#3 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 25 August 2004 - 05:18 AM

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.
Posted Image

#4 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 27 August 2004 - 11:52 AM

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.in...p/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, 27 August 2004 - 11:55 AM.

ufo2000 development team
http://ufo2000.sourceforge.net

#5 DaiShiva

DaiShiva

    Sergeant

  • Moderators
  • PipPipPip
  • 25 posts

Posted 27 August 2004 - 12:23 PM

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

Edited by DaiShiva, 27 August 2004 - 12:23 PM.


#6 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 28 August 2004 - 01:16 AM

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.
ufo2000 development team
http://ufo2000.sourceforge.net

#7 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 29 August 2004 - 04:18 PM

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.
Posted Image

#8 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 30 August 2004 - 01:54 AM

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, 30 August 2004 - 01:55 AM.

ufo2000 development team
http://ufo2000.sourceforge.net

#9 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 31 August 2004 - 01:29 AM

Hehe, silly me. Right. But there's also the case of the custom skins/models and such.
Posted Image

#10 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 09 August 2005 - 03:17 PM

0.7.893 http://ufo2000.lxnt.....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.
ufo2000 development team
http://ufo2000.sourceforge.net

#11 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 10 August 2005 - 09:55 AM

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, 10 August 2005 - 10:30 AM.


#12 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 10 August 2005 - 10:33 AM

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, 10 August 2005 - 10:37 AM.

ufo2000 development team
http://ufo2000.sourceforge.net

#13 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 10 August 2005 - 10:51 AM

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, 10 August 2005 - 10:53 AM.


#14 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 10 August 2005 - 11:05 AM

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.
ufo2000 development team
http://ufo2000.sourceforge.net

#15 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 10 August 2005 - 11:13 AM

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

Not to mention that certain units need to be defined to be able to fly. I am just mentioning them, not demanding them. ;)

Weapons handsprites work good so far. :)

#16 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 10 August 2005 - 11:53 AM

I am not exactly sure how to implement the spk images of sprites. Well anyway, here is the ethereal. It will be better than looking at that unit as a spk image.

Edited by Kratos, 10 August 2005 - 12:26 PM.


#17 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 10 August 2005 - 12:01 PM

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")
ufo2000 development team
http://ufo2000.sourceforge.net

#18 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 10 August 2005 - 12:28 PM

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, 10 August 2005 - 12:29 PM.


#19 nappes

nappes

    Sergeant

  • Forum Members
  • PipPipPip
  • 74 posts

Posted 10 August 2005 - 04:05 PM

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.

<{POST_SNAPBACK}>

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.
Posted Image

#20 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 10 August 2005 - 06:11 PM

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, 10 August 2005 - 06:20 PM.


#21 Hobbes

Hobbes

    UFO2000 Staff

  • Moderators
  • PipPipPipPip
  • 719 posts

Posted 10 August 2005 - 06:23 PM

I just saw the Ethereal on tactic and it looked OK at first sight but maybe I'm missing something.

#22 Violazr

Violazr

    Captain

  • Forum Members
  • PipPipPipPip
  • 249 posts

Posted 11 August 2005 - 03:39 AM

They are too low, sticking out of their box at the bottom.

And the civilian seems a little small, almost like a boy.