aliens

Author Topic: replacing vanilla sprites  (Read 2823 times)

Offline wolf619

  • Sergeant
  • **
  • Posts: 22
    • View Profile
replacing vanilla sprites
« on: March 27, 2018, 12:31:50 am »
I want to replace the original uniforms in the game with ones I have drawn. They work when I'm using them as a mod but I have no idea how to change the default uniforms. i want to replace for both the inventory screens and the battle scenes! Thanks for any help!

Also How do I edit how default stuff looks in the inventory?  like the default rifle for example.

Like I said I've got mods to work but I want to change the vanilla stuff, is this possible?
« Last Edit: March 27, 2018, 01:09:57 am by wolf619 »

Offline CampDragon

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: replacing vanilla sprites
« Reply #1 on: March 27, 2018, 01:20:42 am »
As far as i know yes in a roundabout way, Ive done just that with my new mod I'm working on. There are a couple ways I can think of going about it. You could just create new armor, replace the old stuff with your new outfit, so instead of STR_NONE they recert to what you have made.  On the weapon  are you wanting to change all instances of it in game, ie inventory, battlescape, and Ufopedia?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: replacing vanilla sprites
« Reply #2 on: March 27, 2018, 01:34:26 am »
Yes, and it's definitely not roundabout.  For items, the sprites in the inventory are called BIGOBS; they're picked from a sheet of 32x48 images called BIGOBS.PCK, and the index of the image is referred to by an item's bigSprite.  For example, you can see in the original sprites that the rifle uses sprite index number 1 (the counting starts from 0) - to change it, you can either just tell the game to load a different bigob index 1:
Code: [Select]
extraSprites:
  - type: BIGOBS.PCK
    sprites:
      1: Resources/your_new_rifle_sprite.png # Or whatever the path to the new image is in your mod's folder
or tell the rifle to use a different index:
Code: [Select]
items:
  - type: STR_RIFLE
    bigSprite: 64

extraSprites:
  - type: BIGOBS.PCK
    sprites:
      64: Resources/your_new_rifle_sprite.png # Or whatever the path to the new image is in your mod's folder

Are you looking to just change the look of the original armor, or create a new armor to use as a default for your soldiers?

Offline wolf619

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: replacing vanilla sprites
« Reply #3 on: March 27, 2018, 03:37:54 am »
BIGOBS sounds like exactly what I need, Thank you i'll try it out!
 I would like to maybe make a new armor and replace it as the default armor if thats possible, how would I do that?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: replacing vanilla sprites
« Reply #4 on: March 27, 2018, 03:48:42 am »
You can either copy the armor entry STR_NONE_UC from the vanilla ruleset (standard/xcom1/armors.rul) and just edit its values and sprite definitions, or use it as a template to make your own and replace the default armor in the soldiers ruleset (standard/xcom1/soldiers.rul).  There's a reference on ufopaedia.org that should help with understanding what all the values in the ruleset mean.