Author Topic: Additional soldier sprites  (Read 66233 times)

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Additional soldier sprites
« Reply #75 on: June 22, 2013, 12:30:06 pm »
Wow, very nice work!! Especially like the flat-top haircut realized!

We're moving to a model where we don't recolour the sprites in-engine. (for those of you with old laptops, this will save you processing power, at the cost of slightly more RAM) The reason there's flat-top graphics in there this time is that the default graphic has his haircut go brown when he equips personal armour, which isn't consistent with his paperdoll on the inventory screen.

And you may see a hint of power armour without helmets in there ;) It's one of a couple of things I'm working on.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #76 on: December 17, 2013, 01:27:14 am »
I get back to doing something constructive in OpenXcom :)
Right now corpse items and inventory items stay in original version, its time to fix that :)
side effects? 90% work to recolor aliens on the fly is done :)

Future goals:
hack original sprites to remove blood on stunned units
Red Muton commander
Fashion capes for Ethereals and Floaters
More random civilians?

[ps]
current state (with small changes to text draw):
https://github.com/Yankes/OpenXcom/tree/SoldersColors
« Last Edit: December 17, 2013, 01:38:45 am by Yankes »

Offline Hythlodaeus

  • Colonel
  • ****
  • Posts: 276
    • View Profile
Re: Additional soldier sprites
« Reply #77 on: December 17, 2013, 03:27:49 pm »
I get back to doing something constructive in OpenXcom :)
Right now corpse items and inventory items stay in original version, its time to fix that :)
side effects? 90% work to recolor aliens on the fly is done :)

Future goals:
hack original sprites to remove blood on stunned units
Red Muton commander
Fashion capes for Ethereals and Floaters
More random civilians?

[ps]
current state (with small changes to text draw):
https://github.com/Yankes/OpenXcom/tree/SoldersColors

Very nice. I'd say this is worth merging with the main repo.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #78 on: January 26, 2014, 04:26:41 pm »
Some test of recoloring aliens. This effect is created by replacing original cape color by color: `1 + unit_id%6`.
I think about solution that allow moders for creating custom recolors using only rule set file.
Something like that:
Code: [Select]
- color:
    1: "(1 + unit_id%6)*16" #ETHEREAL cape
or in case of humans:
Code: [Select]
- color:
    6: "face_color" #correct color of skin
    9: "hair_color" #correct color of hair
Or for muton:
Code: [Select]
- color:
    3: "commander ? 2 : 3" #red muton commander
    4: "commander ? 2 : 4" #red muton commander

Offline xracer

  • Commander
  • *****
  • Posts: 565
  • X-COM lover, we've gone at it everywhere
    • View Profile
Re: Additional soldier sprites
« Reply #79 on: January 26, 2014, 08:23:41 pm »
Looks really nice.

It will be a nice way to adjust thing without coding

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #80 on: February 13, 2014, 11:23:49 pm »
small update on progress. Half of complex work is done, core is done. now only left to do is parser (sometimes it can be most complex thing, I hope it wont be) and adding this to OXC.

Syntax will shift form that I planed first, forget C like syntax and start learn assembler :)
I except example code will look like that:

simple function that multiple argument by 13
Code: [Select]
set r0 in;
mul r0 13;
ret r0;

muton recolor function:
Code: [Select]
test commander 1;
ret_neq in; https:// if(commander != 1) return in;
set r0 in;
getcolor r1 r0;
test r1 3;
ret_lt in; https:// if(r1 < 3) return in;
test r1 4;
ret_gt in; https:// if(r1 > 4) return in;
setcolor r0 2; https://changing green '3' and '4' to red '2'
ret r0;

This code is lot of more ugly than previous version but is lot of faster. I archive 50x time speed up compared to previous version with nice syntax.
Now in rough test I archive 4 times slower time than equivalent C++ function. This allow to blit graphic using user defined code.

If someone is interesting in it, and want know what dark magic I used to made it work, this is my test ground in attachment.

ps. is possible to have nice syntax and fast runtime but this will require compiler and I dont want write it :)

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Additional soldier sprites
« Reply #81 on: February 18, 2014, 04:07:13 pm »
I am very interested in this functionality, as it would be an easy way to create new alien races without having to create all bitmaps

A quick way to create evolved aliens would be a very nice contribution !

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #82 on: April 12, 2014, 01:24:08 pm »
My mod is near finishing, only left is integrate it with OpenXcom.
This is minimal version, I have lot of ideas of expanding it, but because of time constraint I scrap or dont do most of it.
If people find my mod useful I will add allot of new stuff to improve it functionality.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Additional soldier sprites
« Reply #83 on: April 12, 2014, 04:57:04 pm »
I hope this won't automatically indicate alien ranks, it would make the game much easier :P

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #84 on: April 12, 2014, 08:06:56 pm »
Its up to you :) Another thing that my mod will allow is have blood on unit when is wounded, but this will require some hack to graphics.

Offline Ran

  • Colonel
  • ****
  • Posts: 196
    • View Profile
Re: Additional soldier sprites
« Reply #85 on: April 13, 2014, 09:37:45 pm »
Looks really great!

One question - is it now possible to have completely different sprites for each of the 8 soldier types?
The recoloring code is awesome but doesn't work for each mod.

Offline Fox105iwsp

  • Colonel
  • ****
  • Posts: 107
    • View Profile
Re: Additional soldier sprites
« Reply #86 on: April 14, 2014, 08:33:24 am »
Question over here >_<
....is there a mod for the Red Muton Commander/Elite units, ready over here?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #87 on: April 15, 2014, 01:59:45 am »
Not jet :)

I finished first step of integration with OpenXcom :)
Hello word of recoloring:
Code: [Select]
    #YAML code form `- type: STR_NONE_UC`
    recolorScript: >
      set_color in 3;
      ret in;
I need do some additional work to made it usefu.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Additional soldier sprites
« Reply #88 on: April 16, 2014, 01:11:08 am »
version 1.0 is ready: https://github.com/Yankes/OpenXcom/tree/ColorScript

My next target will be create some way to inform user about available data for script.
Right now you can use:

Code: [Select]
health
health_max
energy
energy_max
stun
stun_max https:// == health
morale
morale_max https:// == 100

fatalwounds https:// sum of fatalwounds_*
fatalwounds_head
fatalwounds_torso
fatalwounds_leftarm
fatalwounds_rightarm
fatalwounds_leftleg
fatalwounds_rightleg

armor_front
armor_left
armor_right
armor_rear
armor_under

unit_id
unit_rank
unit_float
unit_kneel

soldier_hair https:// color with shade based on soldier_look
soldier_face https:// color with shade based on soldier_look
color_hair https:// == 9
color_face https:// == 6

soldier_look
soldier_look_blonde
soldier_look_brownhair
soldier_look_oriental
soldier_look_african

soldier_grender
soldier_grender_male
soldier_grender_female

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Additional soldier sprites
« Reply #89 on: April 19, 2014, 11:25:30 am »
Yankes, is it possible use your code without redesign for flashing/blinking units (in real time) into red and back?
For example, for units in blast radius: https://openxcom.org/forum/index.php?topic=1532.msg19483#msg19483