aliens

Author Topic: [SOLVED] Help with changing Craft img in base view  (Read 4542 times)

Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
[SOLVED] Help with changing Craft img in base view
« on: February 28, 2018, 09:35:10 pm »
Hi,
Im rookie in X-com moddin  but I know how to edit weapons ect but still I'm struggling with replacing Craft sprite in hangar. Looking on BASEBIT.PCK
https://www.ufopaedia.org/images/5/57/BASEBITSPCK.png I'm confused becasue sprite number which is used is 3.
 - type: STR_INTERCEPTOR
    sprite: 3

So how to add new sprite and use it?
For weapons in tactical fight I'm doing somthing like that:
- type: BIGOBS.PCK
    files:
      59: Resources/napalm.gif
      60: Resources/sniper.gif

and it's working fine....

Appreciate any help!
« Last Edit: March 01, 2018, 01:14:05 am by Amiga »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Help with changing Craft img in base view
« Reply #1 on: February 28, 2018, 09:52:26 pm »
Interceptor sprites are a special case, you have to know about the offsets for them.  The sprite that matches index 3 is found in INTICON.PCK (remember that numbering starts at 0) - this one is used in the geoscape when you minimize an interception.  There's another sprite here for the Interceptor - index 14, 3 plus an offset of 11, is the icon for drawing damage on the craft during interception.  The interceptor in BASEBITS.PCK is index 36, an offset from the ruleset of 33.  That means to change the basebit sprite, you'd use this ruleset:
Code: [Select]
extraSprites:
  - type: BASEBITS.PCK
      files:
        36: Resources/new_interceptor_basebit_sprite.gif

If you forget what the offsets are, they're documented in the online ruleset reference.

Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
Re: Help with changing Craft img in base view
« Reply #2 on: February 28, 2018, 10:53:53 pm »
Great. Thanks for answer. One more thing...If interceptor is tricky what about sprite for new added crafts?? Honestly this is more important for me that playing with Interceptor :)

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Help with changing Craft img in base view
« Reply #3 on: February 28, 2018, 11:24:34 pm »
Just start your craft sprite index well enough past the vanilla values that you don't run into offsets overlapping each other.

Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
Re: Help with changing Craft img in base view
« Reply #4 on: March 01, 2018, 12:10:12 am »
Just start your craft sprite index well enough past the vanilla values that you don't run into offsets overlapping each other.

I set to 55 which is next in the set free but I getting error.

 - type: BASEBITS.PCK
    files:
      55: Resources/ship.gif

Maybe it's problem with my image..is there any limitation?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Help with changing Craft img in base view
« Reply #5 on: March 01, 2018, 12:13:01 am »
You're missing the point of the offsets; the sprite: 55 in your craft definition points to the INTICON.PCK sprites, not the BASEBITS.PCK sprite. You need the BASEBITS.PCK index to be 55+33=88, not 55 as you have it defined.

Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
Re: Help with changing Craft img in base view
« Reply #6 on: March 01, 2018, 12:53:08 am »
You're missing the point of the offsets; the sprite: 55 in your craft definition points to the INTICON.PCK sprites, not the BASEBITS.PCK sprite. You need the BASEBITS.PCK index to be 55+33=88, not 55 as you have it defined.

Finally I get it:)
  - type: INTICON.PCK
    files:
      26: Resources/minimized.png + 33 = 59 which is sprite in hangar
      37: Resources/dogfight_icon.png

  - type: BASEBITS.PCK
    files:
      59: Resources/ship_in_hangar.png

      26 + 11 = 37 which is dogfight icon

and at the end 59-33 = 21 which is number of SPRITE

Thank you for explanation! It was little confused....


« Last Edit: March 01, 2018, 01:54:12 am by Amiga »

Offline efrenespartano

  • Commander
  • *****
  • Posts: 748
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: [SOLVED] Help with changing Craft img in base view
« Reply #7 on: March 03, 2018, 12:42:29 pm »
Finally I get it:)


That's a nice Interceptor sprite! Is that a MiG-29 Fulcrum?

Enviado desde mi Blade A510 mediante Tapatalk

Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
Re: [SOLVED] Help with changing Craft img in base view
« Reply #8 on: March 05, 2018, 12:04:11 am »
Hi,
That Craft wasn't perfect.
Here's my latest..

Offline efrenespartano

  • Commander
  • *****
  • Posts: 748
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: [SOLVED] Help with changing Craft img in base view
« Reply #9 on: March 05, 2018, 12:27:34 am »
Hi,
That Craft wasn't perfect.
Here's my latest..

I like them very much!

Could you adjunt your sprites? It would be nice to use them in my game! :D

Enviado desde mi Blade A510 mediante Tapatalk


Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
Re: [SOLVED] Help with changing Craft img in base view
« Reply #10 on: March 05, 2018, 11:34:15 am »
I like them very much!

Could you adjunt your sprites? It would be nice to use them in my game! :D

Enviado desde mi Blade A510 mediante Tapatalk

Sure. I will put .zip package with asset and .rul files ect.