aliens

Author Topic: Changing UFO intercept/pedia sprites doesn't work?  (Read 3618 times)

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Changing UFO intercept/pedia sprites doesn't work?
« on: January 28, 2016, 06:42:05 pm »
I'm probably doing something wrong or it's just not working as it should.

Let's say we wanna change Survey Ship's sprite to something else, doesn't matter what. It's vanilla sprite ID is 0, so we change it to 6 so it looks like a Dreadnought:

Code: [Select]
ufos:
  - type: STR_SURVEY_SHIP
    size: STR_VERY_SMALL
    sprite: 6

Sprite is the same during dogfight, so I check Ruleset Reference Nightly again:

Quote
sprite
Sprite ID from INTERWIN.DAT used to draw this UFO in the dogfight view and UFOpaedia.
don't try to add more images if you don't want to punch yourself in the face - use modsprite

And right below we have:

Quote
modSprite
Filename used to draw this UFO in the dogfight view and UFOpaedia.

OK, let's use modSprite for testing:

Code: [Select]
ufos:
  - type: STR_SURVEY_SHIP
    size: STR_VERY_SMALL
    sprite: 0
    modSprite: 6

Start new game. Intercept. Game crashes upon contact with craft.

So what am I doing wrong here?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Changing UFO intercept/pedia sprites doesn't work?
« Reply #1 on: January 28, 2016, 06:52:49 pm »
Code: [Select]
ufos:
  - type: STR_SURVEY_SHIP
    size: STR_VERY_SMALL
    sprite: 26

And then you'll need to define:

Code: [Select]
extraSprites:
  - type: INTICON.PCK
    files:
      26: Resources/Craft/VERY_SMALL_UFO.PNG

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Changing UFO intercept/pedia sprites doesn't work?
« Reply #2 on: January 28, 2016, 08:01:30 pm »
Thanks. However, I don't have any extra sprites (nor am I proficient with creating new images yet). All I wanted to do was swap Battleship intercept/pedia image with Fleet Supply Cruiser, as they are clearly mistakenly exchanged in vanilla. Shouldn't I be able to use the game's own internal data to swap these UFOs? Can I look for the sprite in some folder? I can't find it anywhere (the file names aren't exactly descriptive, if ya know what I mean!).

I thought I had already corrected this issue by just changing swapping the sprite IDs, but I didn't realize it had no effect till just now! Basically, this is how Battleship and Supply Cruiser intercept/pedia images should look:





Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Changing UFO intercept/pedia sprites doesn't work?
« Reply #3 on: January 28, 2016, 10:00:18 pm »
If you only want to switch the images, then you won't need the extraSprites. But since the sprites are stored in the original files you'll need to use something like Falko's XCom converter to see them.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Changing UFO intercept/pedia sprites doesn't work?
« Reply #4 on: January 28, 2016, 10:42:45 pm »
"modSprite" is only for adding new images. If you just wanna swap the vanilla sprites around just use "sprite".
Also, the TFTD UFOpaedia has its own separate images, so you'll need to swap those around as well.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Changing UFO intercept/pedia sprites doesn't work?
« Reply #5 on: January 29, 2016, 02:16:10 am »
If you just wanna swap the vanilla sprites around just use "sprite".

Exactly, the thing is simply putting a different sprite ID has no effect, that's the whole reason why I created this topic. I can swap the UFOpedia images just fine, I just did (in fact, I reverted them back since I realized vanilla got them correctly in the first place, silly me). My issue is "sprite: ID" not working. And yes, I tried it clean without any mods and even by overwriting the original ruleset.

As per UFOpaedia.org
Quote
Note: The Fleet Supply Cruiser's interception image is switched with that of the Battleship in-game. This is almost certainly a bug (the UFOpaedia images are not switched, and looks a lot more like the respective subs)

So this is all I need, but it doesn't change anything:
Code: [Select]
  - type: STR_BATTLESHIP
    sprite: 5 # previously 7
  - type: STR_FLEET_SUPPLY_CRUISER
    sprite: 7 # previously 5
« Last Edit: January 29, 2016, 02:18:09 am by Orz »