OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: Orz on January 28, 2016, 06:42:05 pm

Title: Changing UFO intercept/pedia sprites doesn't work?
Post by: Orz 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?
Title: Re: Changing UFO intercept/pedia sprites doesn't work?
Post by: Hobbes 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
Title: Re: Changing UFO intercept/pedia sprites doesn't work?
Post by: Orz 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:

(https://ufopedia.csignal.org/usopedia/119.png)

(https://ufopedia.csignal.org/usopedia/121.png)
Title: Re: Changing UFO intercept/pedia sprites doesn't work?
Post by: Hobbes 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 (https://falkooxc2.pythonanywhere.com/spriteconvert) to see them.
Title: Re: Changing UFO intercept/pedia sprites doesn't work?
Post by: SupSuper 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.
Title: Re: Changing UFO intercept/pedia sprites doesn't work?
Post by: Orz 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