aliens

Author Topic: Change dogfight graphics in INTERWIN.DAT  (Read 4430 times)

Offline Flaubert

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Change dogfight graphics in INTERWIN.DAT
« on: October 02, 2023, 11:14:58 pm »
Hello,
  I would like to change doghfight main interface (Interwin01.gif) to add a second button similar to minimizeButton. I found that graphic is inside /Geodata/Interwin.dat, but I dont know how to approach this:

1. Find some way to read/unpack INTERWIN.DAT, then change Interwin01.gif interface, and PACK all again in a new INTERWIN.DAT modified. I don't know which program(s) could unpack/pack this DAT files.

2. Find a ruleset which could load another InterwinMod01.gif instead, for dogfight interface; but I don't know if such a rule exists.

Could anyone give me a hint about this? Thanks in advance

Offline Flaubert

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: Change dogfight graphics in INTERWIN.DAT
« Reply #1 on: October 03, 2023, 09:10:19 am »
Hello,
  I would like to change doghfight main interface (Interwin01.gif) to add a second button similar to minimizeButton. I found that graphic is inside /Geodata/Interwin.dat, but I dont know how to approach this:

1. Find some way to read/unpack INTERWIN.DAT, then change Interwin01.gif interface, and PACK all again in a new INTERWIN.DAT modified. I don't know which program(s) could unpack/pack this DAT files.

2. Find a ruleset which could load another InterwinMod01.gif instead, for dogfight interface; but I don't know if such a rule exists.

Could anyone give me a hint about this? Thanks in advance
I finally found an online Python tool (thanks to Buscher) to convert/from to SCR. I think that finally I will make an alternative dogfight interface and put it on SCR format into GEOGRAPH/GEOSCAPE folder, so I can load It to a surface.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9115
    • View Profile
Re: Change dogfight graphics in INTERWIN.DAT
« Reply #2 on: October 03, 2023, 10:03:41 am »
Every image in OpenXcom can be modded without having to use the original data formats.
INTERWIN.DAT is no exception

Code: [Select]
extraSprites:
  - type: INTERWIN.DAT
    singleImage: true
    files:
      0: Resources/UI/my_custom_interwin_dat.png

Offline Flaubert

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: Change dogfight graphics in INTERWIN.DAT
« Reply #3 on: October 03, 2023, 10:35:19 am »
Thanks! But, what if the file has many images inside?(like this one).
Should I load  0: image one, 1: image two....
Also, accesing to images in DogfightingState uses indexes inside INTERWIN.dar, so I'm not sure this should be also changed. I'll try and see.
Thanks again!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9115
    • View Profile
Re: Change dogfight graphics in INTERWIN.DAT
« Reply #4 on: October 03, 2023, 10:53:58 am »
Internally INTERWIN.DAT is represented as one big image.
So you also need to override it as just one big image.

OpenXcom then crops just the needed part from the big image at runtime.

Offline Flaubert

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: Change dogfight graphics in INTERWIN.DAT
« Reply #5 on: October 03, 2023, 02:02:58 pm »
Internally INTERWIN.DAT is represented as one big image.
So you also need to override it as just one big image.

OpenXcom then crops just the needed part from the big image at runtime.
Finally I could do It. Thanks a lot for your help.
Now, I need to add an Interactive Surface for button action, at the corresponding positions.