Author Topic: Additional soldier sprites  (Read 66133 times)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Additional soldier sprites
« Reply #45 on: January 18, 2013, 01:21:47 am »
I made some tweaks to coloring, previous one was a bit odd :)
Another thing I find is that is possible to store optional blood/wound in sprite, but this will require some hex magic.
It will be possible to draw unit that have fatal wounds with red parts. Only drawback is that you will louse some possible colors.

anonilsus

  • Guest
Re: Additional soldier sprites
« Reply #46 on: January 28, 2013, 03:32:23 pm »
I think this is a really good idea and should be even implement without the need for having a mod activated. This is one of the cases where it only adds to the game and nothing is lost, neither balance nor "feeling".

I remember clearly that I was confused when I first played xcom that the soldiers look different but in the battlescape they are all part of the "Arian Army"

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Additional soldier sprites
« Reply #47 on: January 29, 2013, 11:04:34 pm »
I will try made "full" version that can be merge with master branch.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Additional soldier sprites
« Reply #48 on: January 30, 2013, 04:56:45 am »
I always worry about the kind of crazy tricks Yankes pulls and how long they will work for :P but different soldier appearence is useful, if he sends a pull request I'll put it in.

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Additional soldier sprites
« Reply #49 on: January 30, 2013, 07:20:40 am »
I need to arrange with one of you guys to transfer the images I have that should be easily shiftable to extend the other hairstyles to the battlescape as well, but that might require some additional code to sub in these extra sprites.

Volutar

  • Guest
Re: Additional soldier sprites
« Reply #50 on: January 30, 2013, 07:32:13 am »
So it will be extra additional "race/skin color" values? It will be relatively simple to add ragdoll images, but as for battlescape randering... alot of things are hardcoded, and it will require for some brainwork - how to add some extra sprites without touching original. Either it be "copy" of original (like it's additional armor type), or totally new pck having extra torso sprites only.

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Additional soldier sprites
« Reply #51 on: January 30, 2013, 09:11:55 am »
So it will be extra additional "race/skin color" values? It will be relatively simple to add ragdoll images, but as for battlescape randering... alot of things are hardcoded, and it will require for some brainwork - how to add some extra sprites without touching original. Either it be "copy" of original (like it's additional armor type), or totally new pck having extra torso sprites only.

What Yankes has coded will add the extra skin tones and hair colours. I have blonde european hairstyles for both genders that can then be recoloured if someone wants to code loading the PNGs into the game based on some gender/hairstyle data- essentially you have to swap out the "chest" part of the sprite sheet, and also the corpse 1-3 frames. (Plus the inventory screen paperdoll, which may need the recolouring extended to it) I haven't quite finished them all but I've heard back about my promotion now so I might be able to put aside some time this weekend to finish off adapting the remaining basic hairstyles. :)

And yes, you could just make these into two giant PCKs, one that holds the extra chest/corpse frames and one that holds the paperdolls. (Although why do that when it's probably going to be only moderately easier than just coding in reading a good sprite format like PNG?)

Volutar

  • Guest
Re: Additional soldier sprites
« Reply #52 on: January 30, 2013, 09:24:18 am »
PNG sprites aren't implemented. Plus I guess it will be kind of a problem to use 8bit paletted PNGs.

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Additional soldier sprites
« Reply #53 on: January 31, 2013, 11:05:23 am »
PNG sprites aren't implemented. Plus I guess it will be kind of a problem to use 8bit paletted PNGs.

A paletted PNG isn't really any different than a paletted gif.

Loading PNGs is in the library the game uses to render. It's not going to be that much faster to code in a whole new PCK than it is to just code in a method for loading new resources from external files, and the only reason it would be faster is because you can copy-paste a bit.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Additional soldier sprites
« Reply #54 on: January 31, 2013, 11:11:23 am »
Allow me to chime in: loading of external png files would make modding a lot easier. Just saying. ;)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Additional soldier sprites
« Reply #55 on: January 31, 2013, 11:11:27 pm »
loading of external PNGs (and many other common image formats) is theoretically already supported, using the SDL_Image library, using the same method we use for loading the game over (LBM) screens.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Additional soldier sprites
« Reply #56 on: February 01, 2013, 01:17:32 am »
half work done :) only thing to do left is corpse on ground and copse in trunk :>

[ps]
 https://github.com/Yankes/OpenXcom/tree/SoldersColors is last version of this
« Last Edit: February 01, 2013, 01:26:39 am by Yankes »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Additional soldier sprites
« Reply #57 on: March 02, 2013, 05:47:47 pm »
https://github.com/Yankes/OpenXcom/tree/SoldersColors
I can say that solder sprite is now 100% converted (at least is he still alive :) corpse stay unchanged)
Tomorrow I will send pull request to master branch.

I made too small hack to slow down game while debugging. right now you can only change speed using debugger,
stop execution of xcom and change `slownes` to something bigger than 1.
it should be transparent for rest of game except game run couple times slower.

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Additional soldier sprites
« Reply #58 on: March 02, 2013, 11:25:49 pm »
https://github.com/Yankes/OpenXcom/tree/SoldersColors
I can say that solder sprite is now 100% converted (at least is he still alive :) corpse stay unchanged)
Tomorrow I will send pull request to master branch.

I made too small hack to slow down game while debugging. right now you can only change speed using debugger,
stop execution of xcom and change `slownes` to something bigger than 1.
it should be transparent for rest of game except game run couple times slower.

Can we make this work for corpses on the battlescape too at some point? I've been including new hair for corpses. (I haven't been updating the inventory pic though, so we can leave that as is for unconscious or dead soldiers)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Additional soldier sprites
« Reply #59 on: March 03, 2013, 01:48:31 am »
this depend on this if I can access solder data from its corpse. I didnt check this yet.