aliens

Author Topic: [RESOLVED] I'm having trouble with craft sprites  (Read 4739 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[RESOLVED] I'm having trouble with craft sprites
« on: July 10, 2017, 10:17:18 am »
I'm copying resource files from XComFiles into my mod to get unique craft graphics, but I can't seem to get the craft sprites to work.

It seems like the single number used to declare the craft's sprite tells the game its basebit sprite, minimized sprite, and dogfight sprite all at once. In XComFiles, the MiG31 is set as sprite 799, while the extraSprites ruleset declares the following values for MiG31:
basebit: 832
minimized: 799
dogfight: 810

How does the game know to use 832 and 810, and how do I get these graphics to work in my game? I tried setting the sprite to 610, with the MiG31 basebit and minimized both set to 610, but I can't set dogfight to 610 because both minimized and dogfight are part of INTICON.PCK.


P.S.: To the folks working on openxcom: Can you improve the error messages on segmentation faults? These are extremely common in debugging and happen from almost any missing piece of data, yet openxcom gives no data on what caused the segmentation fault. For example, if I try to access the base screen and it fails to find craft sprite #610 from BASEBITS.PCK, it could give an error message saying BASEBITS.PCK sub-unit 610 not found or something.
« Last Edit: July 11, 2017, 04:33:29 am by The Reaver of Darkness »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: I'm having trouble with craft sprites
« Reply #1 on: July 10, 2017, 10:57:26 am »
These numbers use a fixed interval. If you change one number by X, you must also increase the others by X, even if it's not the same number.
I use a simple Excel sheet to manage the numbers (can post it later). Or you can just take a craft from some other mod and keep the same numbers on all sprites.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: I'm having trouble with craft sprites
« Reply #2 on: July 10, 2017, 12:13:07 pm »
So that's why they're all in such a strange order? I don't understand how a fixed interval means that the minimized sprites are not in the same order as the dogfight sprites.

Well if I tried using the same numbers you had for the MiG and it worked. I'll try that for now but I'd be happy to have the Excel spreadsheet. edit: I found a continuous set of numbers in your ruleset that I'm now using: 822-832 for minimized corresponding with 833-843 for dogfight and 855-865 for basebits. I have tested them and they all work!

I'm also planning on adding an internal component to the Interceptor map if you're interested in seeing that. I think the green flashing square next to the craft is a bit off-putting, and I'm getting the hang of making new tile pieces.
« Last Edit: July 10, 2017, 12:40:57 pm by The Reaver of Darkness »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: I'm having trouble with craft sprites
« Reply #3 on: July 10, 2017, 07:11:51 pm »
So that's why they're all in such a strange order? I don't understand how a fixed interval means that the minimized sprites are not in the same order as the dogfight sprites.

Well if I tried using the same numbers you had for the MiG and it worked. I'll try that for now but I'd be happy to have the Excel spreadsheet. edit: I found a continuous set of numbers in your ruleset that I'm now using: 822-832 for minimized corresponding with 833-843 for dogfight and 855-865 for basebits. I have tested them and they all work!

OK, attaching my .xls. Enter your number under Sprite, and the remaining two will complete automatically. Just remember to make sure that the same number doesn't come up in different columns!

I'm also planning on adding an internal component to the Interceptor map if you're interested in seeing that. I think the green flashing square next to the craft is a bit off-putting, and I'm getting the hang of making new tile pieces.

Sure, I would like that.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: I'm having trouble with craft sprites
« Reply #4 on: July 11, 2017, 04:33:16 am »


The interior isn't much to look at, just a corrugated wall. I'm rather proud of myself for drawing the back of the windshield flipped up. I made the side bit easy, just lowered it down. I guess it slides on a hinge to make getting out easy.

Someone else could take what I have here and decorate the interior a bit.
« Last Edit: July 11, 2017, 04:35:48 am by The Reaver of Darkness »

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: [RESOLVED] I'm having trouble with craft sprites
« Reply #5 on: July 14, 2017, 03:20:05 am »
WHERE do you get the craft sprites from?
I downloaded BBs Toolpack and it extracted lots of things but I did not see the craft sprites especially for dogfights and minimized.
Thanks
« Last Edit: July 14, 2017, 03:34:57 am by SteamXCOM »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [RESOLVED] I'm having trouble with craft sprites
« Reply #6 on: July 14, 2017, 06:43:48 am »
WHERE do you get the craft sprites from?
I downloaded BBs Toolpack and it extracted lots of things but I did not see the craft sprites especially for dogfights and minimized.
Thanks
I was just looking for them earlier today. They are found in UFO\GEOGRAPH\INTICON.PCK. The baseview sprites are found in UFO\BASEBITS.

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: [RESOLVED] I'm having trouble with craft sprites
« Reply #7 on: July 14, 2017, 08:37:33 am »
good!

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: [RESOLVED] I'm having trouble with craft sprites
« Reply #8 on: July 15, 2017, 06:48:38 am »
I was just looking for them earlier today. They are found in UFO\GEOGRAPH\INTICON.PCK. The baseview sprites are found in UFO\BASEBITS.
Thank you, I can get them in PCKview.

-------------------------------
EDIT
Forget about PCKview they are posted here as it seems some others could not get them either:

https://openxcom.org/forum/index.php/topic,2426.15.html
(towards the bottom of that page)
Craft files and floorobs that cannot be extracted.
« Last Edit: July 24, 2017, 11:04:37 pm by SteamXCOM »