aliens

Author Topic: Art Testing Kit  (Read 6202 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Art Testing Kit
« on: December 23, 2022, 11:27:20 am »
[OpenXcom Extended version 7.5.7 or newer is required to use this mod] (Get OXCE 'HERE')


This mod is not built to be played, instead it is a tool for allowing quick access to all of the X-COM: UFO Defense drawing routines.

To use this tool select "New Battle" from the main menu then "Equip Craft" followed by "Armor".

You will find that there are now several new armors that can be equipped, these correspond to the various X-Com and Alien units.

Before the name of each armor is the drawing routine used for that sprite sheet, for example dR: 1 is drawingRoutine: 1 used by the alien Floater unit.

My hope is that this can save a bit of time as this mod's .png image files can quickly be swapped with your own sprite sheets to check how that unit will look while walking around ingame.

If your sprite sheet is a different height or width than the sprite sheet you are replacing it with then you also need to modify the extraSprites_ATK.rul file's code to match the new image size.

The values that need to be changed are width: & height: for the related entry in the [====] Units / Armors [====] section of the extraSprites_ATK.rul file.

For example if you wanted to swap the Muton.png sprite sheet with a new image file that has a size of of 512 by 720 you would need to change this code in the extraSprites_ATK.rul file.

Code: [Select]
  - type: ATK_MUTON.PCK
    width: 512
    height: 680
    subX: 32
    subY: 40
    files:
      0: Resources/Unit/drawingRoutine_10_Muton/Muton.png

So that the width & height variables matched your new file's image size:

Code: [Select]
  - type: ATK_MUTON.PCK
    width: 512
    height: 720 # <====
    subX: 32
    subY: 40
    files:
      0: Resources/Unit/drawingRoutine_10_Muton/Muton.png

There are also one and two handed weapons available at the top of the equipment menu:



Supported drawing routines are:
0 = Soldier, Sectoid
1 = Floater
2 = HWP
3 = Cyberdisk
4 = Civilian, Ethereal, Zombie
5 = Sectopod, Reaper
6 = Snakeman
7 = Chryssalid
8 = Silacoid
9 = Celatid
10 = Muton
11 = Coelacanth, Displacer
12 = Hallucinoid
14 = Lobster Man
16 = Bio-Drone
19 = Tentaculat
20 = Triscene
21 = Xarquid
22 = Inverted Cyberdisc (Propulsion animation on top)


Changelog:
(V1-8)
- Added drawing routine 20. (Triscene)

(V1-7)
- Added drawing routine 11. (Coelacanth & Displacer)

(V1-6)
- Added drawing routine 21. (Xarquid)

(V1-5)
- Added drawing routine 12. (Hallucinoid)
- Equipment HandOb images now display at the correct height. (Effected: Sectoid, Floater, Ethereal, Snakeman, Muton, Lobster man)

(V1-4)
- Added drawing routine 16. (Bio-Drone)
- Added a one handed and a two handed weapon.

(V1-3)
. Added drawing routine 14. (Lobster Man)

(V1-2)
- Prevented a crash when female X-Com soldiers used the Muton drawing routine. (Female torso frames added)
- Inventory is now allowed for all armors, however many aliens now share the X-Com Power Suit's inventory image as a place holder since they have none of their own.
- All armors can now hold equipment.

(V1-1)
- Added drawing routine 19. (Tentaculat)
- Included better instructions about mismatched unit sprite sheet heights and widths.

Download:
- Art Testing Kit V1-8
- Art Testing Kit V1-7
- Art Testing Kit V1-6
- Art Testing Kit V1-5
- Art Testing Kit V1-4
- Art Testing Kit V1-3
- Art Testing Kit V1-2
- Art Testing Kit V1-1
- Art Testing Kit V1-0
« Last Edit: February 11, 2023, 07:35:35 am by The Martian »

Offline b

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: Art Testing Kit
« Reply #1 on: December 24, 2022, 12:22:55 am »
Any idea why I might be getting this error when replacing the muton?

[23-12-2022_15-16-58]   [FATAL]   A fatal error has occurred: Frame(s) missing in 'ATK_MUTON.PCK' for armor 'STR_ATK_MUTON_ARMO:R'
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::CrossPlatform::stackTrace(void*)+0x36) [0x5612b9dabae6]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::CrossPlatform::crashDump(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x477) [0x5612b9dac687]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(exceptionLogger()+0x75) [0x5612b9baefc5]
[23-12-2022_15-16-58]   [FATAL]   /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92ae6) [0x7fb0c984eae6]
[23-12-2022_15-16-58]   [FATAL]   /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92b21) [0x7fb0c984eb21]
[23-12-2022_15-16-58]   [FATAL]   /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92d54) [0x7fb0c984ed54]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::UnitSprite::selectUnit(OpenXcom::UnitSprite::Part&, int, int)+0x352) [0x5612b9d96362]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::UnitSprite::drawRoutine0()+0x111b) [0x5612b9d9755b]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::UnitSprite::draw(OpenXcom::BattleUnit const*, int, int, int, int, OpenXcom::AreaSubset<void, int>, bool)+0x194) [0x5612b9d959c4]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::Map::drawUnit(OpenXcom::UnitSprite&, OpenXcom::Tile*, OpenXcom::Tile*, OpenXcom::Position, bool, OpenXcom::BattleUnit*)+0xa66) [0x5612b9d4b8e6]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::Map::drawTerrain(OpenXcom::Surface*)+0xc07) [0x5612b9d4dbd7]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::Surface::blit(SDL_Surface*)+0x52) [0x5612b9eaa582]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::State::blit()+0x48) [0x5612b9ea8658]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(OpenXcom::Game::run()+0x7ba) [0x5612b9dccaaa]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(main+0x175) [0x5612b9b8c5d5]
[23-12-2022_15-16-58]   [FATAL]   /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fb0c8e36c87]
[23-12-2022_15-16-58]   [FATAL]   /home/b/.local/share/openxcom/OpenXcomEx(_start+0x2a) [0x5612b9b9374a]
[23-12-2022_15-17-09]   [FATAL]   OpenXcom has crashed: Frame(s) missing in 'ATK_MUTON.PCK' for armor 'STR_ATK_MUTON_ARMOR'


Offline b

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: Art Testing Kit
« Reply #2 on: December 24, 2022, 04:10:11 am »
Do you know if the tentaculat from TFTD  uses one of the routines from xcom1?

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #3 on: December 24, 2022, 12:24:59 pm »
Any idea why I might be getting this error when replacing the muton?

Sorry that was an oversight on my part.

I forgot to mention that if your sprite sheet is a different height or width than the sprite sheet you are replacing then you also need to modify the extraSprites_ATK.rul file's code to match the new image size.

To use your Muton.png image search the extraSprites_ATK.rul file for this code:
Code: [Select]
  - type: ATK_MUTON.PCK
    width: 512
    height: 680
    subX: 32
    subY: 40
    files:
      0: Resources/Unit/drawingRoutine_10_Muton/Muton.png

Then change width and height for the entry to this and it should work.
Code: [Select]
    width: 512
    height: 720


Do you know if the tentaculat from TFTD  uses one of the routines from xcom1?

Tentaculat uses drawing routine 19 which is not used by any units in X-Com 1, however you are still able to use all TFTD drawing rountines in any OpenXcom mod you make for the original X-Com. (You can also use all X-Com 1 drawing routines in a mod for TFTD)

I've updated the Art Testing Kit to include drawing routine 19 (Tentaculat) in version V1-1.

I haven't yet added the rest of the TFTD drawing routines.

You can find the full ist of the drawing routines and which units they are associated with in the armor section of the Ruleset Reference, just scroll down until you see the drawingRoutine variable's entry:
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Armor
Spoiler:
Quote
    0 = Soldier, Sectoid
    1 = Floater
    2 = HWP
    3 = Cyberdisk
    4 = Civilian, Ethereal
    5 = Sectopod, Reaper
    6 = Snakeman
    7 = Chryssalid
    8 = Silacoid
    9 = Celatid
    10 = Muton (identical to routine 0 except for the placement of a single arm frame while walking in a specific direction, use routine 0 instead)
    11 = Submersible Weapons Systems
    12 = Hallucinoid
    13 = Aquanauts
    14 = Calcinite, Deep One, Gillman, Lobster Man, Tasoth
    15 = Aquatoid
    16 = Bio-Drone
    17 = TFTD Civilians type A and Zombie_(TFTD)
    18 = TFTD Civilians type B
    19 = Tentaculat
    20 = Triscene
    21 = Xarquid
    22 = Inverted Cyberdisc (propulsion animation on top)
« Last Edit: December 24, 2022, 12:36:34 pm by The Martian »

Offline b

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: Art Testing Kit
« Reply #4 on: December 25, 2022, 07:17:07 am »
Thanks, it sounds like a good update that should be very useful. The information is helpful also.
But for some reason I'm not able to see any of the custom graphics in the new version.  I mean I can change the armor and see tenticulat's and mutons and stuff, but I can no longer see the orcs and things even though they have the same names and file locations as in the previous version, and they worked in the previous version.  I re-installed the new version fresh, then replaced your place holder graphics,  unloaded and reloaded the mod in-game, and it still uses your placeholder graphics even though they are removed from the directory.


Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #5 on: December 25, 2022, 10:38:49 am »
it still uses your placeholder graphics even though they are removed from the directory.

That is really strange for it to be able to load the old image files after you rename or delete them, that should not be possible.

Could you check in the mod loading menu that the old V1-0 version is not still selected.

It may be possible that if the V1-0 version was lower in the mod load order and its contents are overwriting the V1-1 version data.

Spoiler:

If you have not already please also try completely deleting V1-0 before trying to run V1-1, just in case it is still loading that mod's resources from the old version.

Both the new and old versions share the "id: ATK" variable in their metadata.yml file. If I understand OpenXcom correctly this means the program will not see them as separate mods so if both folders are present it may cause problems... (I may be wrong about that though.)


I just downloaded V1-1 from the forum to check if the file had corrupted when I uploaded it but I was able to display the orc unit without an error:

Spoiler:

If you are storing the .zip files inside the OpenXcom mod folder after decompressing them try moving those files to another folder, OpenXcom can load a mod from a .zip.


Also if you are running a Windows OS try emptying your recycle bin after deleting the mod from OpenXcom's mod folder. (Make sure there aren't any files in your recycle bin that you don't want to permanently delete before doing it.)


Any additional information you can provide may be helpful in trying to reproduce this error.
« Last Edit: December 25, 2022, 10:45:08 am by The Martian »

Offline b

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: Art Testing Kit
« Reply #6 on: December 25, 2022, 09:48:39 pm »
Thanks, perhaps your mention of the zip file helped. I'm using linux.  I removed the folder and a compressed zip file of the mod from the mods folder, then I opened the game and switched the other game mods off,  then put the folder back in the mods folder (without the compressed zip file this time), then turned the mod back on in game and now it works.   

When I middle click a unit (only the ones without the ability to pick up items) there is a segmentation fault error and crash.  But I assume that is because I was trying to look at the inventory image which wasn't there.     Are there any plans to include the ability for those units to be able to pick things up so that the floaters arms can be tested when holding items?

Also,  If I use the floater routine for  the orc mage  sprite, is it possible to disable it's ability to fly?  Similarly, if I replace a non-flying routine (like the silacoid) with a flying sprite like a bat, is it possible to make it fly while using the silacoid routine? Or should I just use a different routine for those sprites?

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #7 on: December 26, 2022, 12:59:23 pm »
I've uploaded the Art Testing Kit V1-2.

When I middle click a unit (only the ones without the ability to pick up items) there is a segmentation fault error and crash.

I think I've fixed it by including an inventory image for all the armors. The ones that didn't have their own image now all share the X-Com Power Suit image for now.

Are there any plans to include the ability for those units to be able to pick things up so that the floaters arms can be tested when holding items?

As of V1-2 you should be able to hold equipment with all of the unit types now.

Also,  If I use the floater routine for  the orc mage  sprite, is it possible to disable it's ability to fly?  Similarly, if I replace a non-flying routine (like the silacoid) with a flying sprite like a bat, is it possible to make it fly while using the silacoid routine? Or should I just use a different routine for those sprites?

The variable you are looking for is movementType: in the armors_ATK.rul file.

You can change it to the following settings:
Code: [Select]
    0 = Walking
    1 = Flying
    2 = Sliding (no walking animation)
    3 = Floating (fly underwater, walk on the surface)
    4 = Sinking (walk underwater, fly on the surface)

The unit will be able to fly or walk regardless of the drawing routine it is using.

I'm using Linux.

 




Offline b

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: Art Testing Kit
« Reply #8 on: December 27, 2022, 04:09:16 am »
It is working great now. I can see the orc's inventory.

 I realize this is only for sprite testing, so the following is not necessary, but it would be nice to be able to have variants of the same routine using different sprites at the same time. So I could have 3 different types of modified mutons at the same time.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #9 on: December 30, 2022, 01:39:05 pm »
I've uploaded the Art Testing Kit V1-3, it now supports drawing routine 14. (Lobster Man)

I realize this is only for sprite testing, so the following is not necessary, but it would be nice to be able to have variants of the same routine using different sprites at the same time. So I could have 3 different types of modified mutons at the same time.

Here is a sub mod that will provide 3 extra muton armors.
(Just make sure you load it after the main one.)



Download:
Art Testing Kit Example Sub Mod (V1-0).zip

You can use its code as a template to do the same with other sprite sheets.

The example makes use of OXCE's refNode feature which will allow you to quickly make a copy of an entry by referencing the anchor on the new entry instead of retyping all of the code you wish to duplicate.

Its a good trick to know as it could save you a lot of time and space with larger projects.

(Ruleset Reference section on inheritance via the refNode attribute)
Spoiler:

So this armor entry:
Code: [Select]
# [=] Muton [=] <drawingRoutine: 10>
  - &STR_ATK_MUTON_ARMOR
    type: STR_ATK_MUTON_ARMOR
    spriteSheet: ATK_MUTON.PCK
    spriteInv: ATK_POWER_SUIT_INVENTORY.SPK
    allowInv: true
    corpseBattle:
      - STR_ATK_MUTON_CORPSE
    storeItem: STR_ATK_MUTON_ITEM
    frontArmor: 20
    sideArmor: 20
    rearArmor: 20
    underArmor: 10
    drawingRoutine: 10
    damageModifier:
      - 1.0
      - 0.6
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 0.0
    loftempsSet: [ 3 ]
    forcedTorso: 1


Can be quickly duplicated with just these lines of code and then only the variables you want to change need to be written:

Code: [Select]
# [=] Muton (1) [=] <drawingRoutine: 10>
  - type: STR_ATK_MUTON_ARMOR_1
    refNode: *STR_ATK_MUTON_ARMOR
    spriteSheet: ATK_MUTON_1.PCK
    storeItem: STR_ATK_MUTON_ITEM_1
« Last Edit: December 30, 2022, 01:53:30 pm by The Martian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #10 on: January 01, 2023, 10:48:33 pm »
I've uploaded Art Testing Kit V1-4, it now supports drawing routine 16. (Bio-Drone)

Additionally two weapons have been added that can be selected at the top of the equipment menu.

These weapons have BigOb, FloorOb & HandOb sprites and should allow you to quickly swap images for either a one handed weapon or a two handed weapon:

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #11 on: January 04, 2023, 09:42:10 pm »
I've uploaded Art Testing Kit V1-5, it now supports drawing routine 12. (Hallucinoid)

Also the standHeight: variable has been configured on several units to match the base game settings.

This should cause item HandOb images to be displayed at the expected height.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #12 on: January 15, 2023, 08:32:51 am »
I've uploaded Art Testing Kit V1-6, it now supports drawing routine 21. (Xarquid)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #13 on: January 31, 2023, 09:20:31 pm »
I've uploaded Art Testing Kit V1-7, it now supports drawing routine 11. (Coelacanth & Displacer)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Art Testing Kit
« Reply #14 on: February 07, 2023, 02:56:14 am »
I've uploaded Art Testing Kit V1-8, it now supports drawing routine 20. (Triscene)