aliens

Author Topic: [OLD] Old OXCE discussion thread  (Read 780401 times)

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #735 on: February 29, 2016, 11:55:33 pm »
Right now different corpse if off the limits but animation of death is fully customizable in 2.9, in 3.0 it will probably affectable by kill weapon.


[ps]

This is true, but in real life you'd be able to tell if you put a bullet in their head haha.

I tried adding a death sound to the corpse in item.rul and that didn't do it. I also tried to use "explosionHitSound" and no luck either (not that I expected that one to do it). Would there be another way?
do you add death explosions? If not it would be hard to get it. Overall at some point I had plans to add screams but now I working on other things and it was push back to other time.
« Last Edit: March 01, 2016, 12:00:18 am by Yankes »

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #736 on: March 01, 2016, 02:07:18 am »
This isn't separate sprites but recoloring. And it should work right now. And in future you will have full control over that sprite to show in item (as corpse is only one use case).
Yankes, thanks for the reply. I've actually been playing around with sprite color replacement with the LIVE soldiers and it's worked well using spriteFaceGroup, spriteHairGroup, SpriteUtileGroup and SpriteRankGroup.

But those work for the "armor" rulesets. How do you do sprite replacement for a "bigSprite" (inventory) or "floorSprite" to change a corpse? I tried applying those to the corpse in the item ruleset or even the sprites themselves in that ruleset and I either get an error or no change. Can this be used to change color in the inventory armor as well?

Sorry for all the questions, I'm trying to figure it out myself, but if it's not here in the wiki (https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_(OpenXcom)) or in a previous thread, it's hard to know where to go.

Overall at some point I had plans to add screams but now I working on other things and it was push back to other time.
Okay, cool. Being able to shoot them at all is already a big plus.

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #737 on: March 01, 2016, 07:32:34 pm »
But those work for the "armor" rulesets. How do you do sprite replacement for a "bigSprite" (inventory) or "floorSprite" to change a corpse? I tried applying those to the corpse in the item ruleset or even the sprites themselves in that ruleset and I either get an error or no change. Can this be used to change color in the inventory armor as well?

You only define recoloring in armor. After that corpse of unit with that armor should be recolored using definition from its armor. But you need remember to have making colors in graphic of unit and items. If they mismatch then it will not work.

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #738 on: March 01, 2016, 09:13:34 pm »
But you need remember to have making colors in graphic of unit and items. If they mismatch then it will not work.
Sorry you lost me with that part. What do you mean graphic of unit and items? Doesn't a corpse and inventory screen use the same Battlescape palette that live units do?

If you can post the example ruleset you used to do this I'd appreciate it, but you seem busy so if you don't have time not a big deal.


Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #739 on: March 01, 2016, 09:51:16 pm »
Yes, they use same palette (with exception of last 15 index in inventory), but they need use exactly same colors to work with recoloring.
Working example is normal solders from OXC, Extended add same recoloring to corpses and inventory items. If it work for unit it should work for items and inventory.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [EXE] OpenXcom Extended
« Reply #740 on: March 01, 2016, 10:16:06 pm »
look here:

https://falkooxc.pythonanywhere.com/palconvert

the recoloring routine takes one of the colors (horizontal rows) and translates it by adding a fixed number, so say row 4 is recolored to row 7. For your hair recolors to work, both males and females on the spritesheet must have hair composed of one and the same color (row), with no rogue pixels.

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #741 on: March 02, 2016, 12:28:52 am »
I think maybe I'm not explaining my problem very well. I understand how to do the color replacement with the armor ruleset, I just don't understand how to carry over those changes for corpses/inventory. See the screen shots and ruleset code below. The first part works for the live units, but once they are corpses the color change stops:

Code: [Select]
armors:
  - type: STR_NONE_UC
    spriteFaceGroup: 6
    spriteFaceColor: [96, 96, 96, 96, 160, 160, 163, 163] #M0 F0 M1 F1 M2 F2 M3 F3
    spriteHairGroup: 9
    spriteHairColor: [144, 144, 164, 164, 245, 245, 166, 166] #M0 F0 M1 F1 M2 F2 M3 F3
  - type: STR_POWER_SUIT_UC
    spriteRankGroup: 5
    spriteRankColor: [16, 35, 68, 211, 205, 7]
  - type: STR_FLYING_SUIT_UC
    spriteRankGroup: 5
    spriteRankColor: [16, 35, 68, 211, 205, 7]

EDIT: I deleted the incorrect ruleset code here so it didn't confuse someone who stumbled on this thread and tried to do something similar.
« Last Edit: March 03, 2016, 06:18:18 am by Countdown3 »

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #742 on: March 02, 2016, 12:57:36 am »
First of all, what version of extended you are using? Corpse recoloring was added in 2.9. Previously you have only basic nightly version recoloring (that is you are using now).

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [EXE] OpenXcom Extended
« Reply #743 on: March 02, 2016, 01:07:35 am »
You cannot auto-recolor Inventory pics.

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #744 on: March 02, 2016, 02:57:52 am »
First of all, what version of extended you are using? Corpse recoloring was added in 2.9. Previously you have only basic nightly version recoloring (that is you are using now).
I'm using OXCE 2.9. Is there a ruleset defenition list for OXCE somewhere like there is for the latest nightly wiki? https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_(OpenXcom)

I see the first post of this thread and the mod site has some more info (https://www.openxcom.com/mod/openxcom-extended), but nothing about sprite recoloring that I saw so I just assumed it used the same rules as the latest nightly to do it.

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #745 on: March 02, 2016, 06:52:32 pm »
Sorry, game behave a bit different than I though. Because I now testing recoloring scripts this functionality "work for me". I forget that I never implemented recoloring (using properties form basic OXC) for items without scripts :/
Again sorry for confusion.

Work around to enable items and inventory recoloring is adding in armor:
Quote
    recolorScript: |
      unit.getRecolor i0;
      add_burn_shade i0 burn shade;
      ret i0;



Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #746 on: March 02, 2016, 10:17:22 pm »
Cool, I will try that out. Thanks again.

UPDATE: Yankes, that worked well. Looks great.


UPDATE #2: Question for Yankes or anyone else who might be looking on. I think I already know the answer is no, but can you set a new inventory portrait for a soldier based on his rank? (I'm not talking about color changing script since I assume that isn't doable, I'm talking about using the extrasprite ruleset for the MAN.SPK files.)

If you want to set a different colored armor for the gender/race that is easy. Just modify the extrasprite rulset and switch out the vanilla armor for the image you want ... done.

But could you do this based on the unit's rank? I don't see a way. You would need an if/then statement (not doable in YAML I don't think) and I must be missing it because I can't even find rank as a property in any of the rulesets for XCOM soldiers.
« Last Edit: March 03, 2016, 07:26:51 am by Countdown3 »

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #747 on: March 03, 2016, 08:13:35 pm »
Question for Yankes or anyone else who might be looking on. I think I already know the answer is no, but can you set a new inventory portrait for a soldier based on his rank? (I'm not talking about color changing script since I assume that isn't doable, I'm talking about using the extrasprite ruleset for the MAN.SPK files.)

If you want to set a different colored armor for the gender/race that is easy. Just modify the extrasprite rulset and switch out the vanilla armor for the image you want ... done.

But could you do this based on the unit's rank? I don't see a way. You would need an if/then statement (not doable in YAML I don't think) and I must be missing it because I can't even find rank as a property in any of the rulesets for XCOM soldiers.
Right now not. But I think about way to add it.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9100
    • View Profile

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [EXE] OpenXcom Extended
« Reply #749 on: March 11, 2016, 03:31:20 am »
What is the plan for the stun damage randomizer bug? I like how it works now, allowing for hits to have a random secondary stun damage. Maybe leave that extra 0-100% Stun roll be? Or make it optional? Actually while this stunts stun weapons (which I had to compensate by powering them up), it does work great for secondary stun damage.