aliens

Author Topic: [WEAPON] Recolored Laser and Plasma Bullet Sprites  (Read 23334 times)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #15 on: September 28, 2014, 06:07:36 am »
@shadychrctr:  Linux user?  maybe you need these in a sprite sheet?  (I don't know that they aren't, I'm just brainstorming).

Nvm. See Dioxine's excellent observation, below. ;)
« Last Edit: September 28, 2014, 07:24:41 am by ivandogovich »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #16 on: September 28, 2014, 07:22:54 am »
First of all, read your new bible before modding: https://www.ufopaedia.org/index.php?title=Ruleset_Reference_%28OpenXcom%29#Items

Now, what's wrong? Your sprite declarations are all over the place. Bullet sprites are supposed to be put every 35 numbers apart, while explosion sprites - every 10.

you have:

Code: [Select]
  - type: projectiles
    height: 3
    width: 105
    subX: 3
    subY: 3
    files:
      100: Resources/Laser_recolored/SmallLaserBulletSprite_red.png
      101: Resources/Laser_recolored/SmallLaserBulletSprite_purple.png
      102: Resources/Laser_recolored/SmallLaserBulletSprite_blue.png
      103: Resources/Laser_recolored/SmallLaserBulletSprite_green.png
      110: Resources/Laser_recolored/MediumLaserBulletSprite_red.png
      111: Resources/Laser_recolored/MediumLaserBulletSprite_purple.png
      112: Resources/Laser_recolored/MediumLaserBulletSprite_blue.png
      113: Resources/Laser_recolored/MediumLaserBulletSprite_green.png
  - type: SMOKE.PCK
    height: 80
    width: 160
    subX: 32
    subY: 40
    files:
      200: Resources/Laser_recolored/red/HitAnimation_Laser_red.gif
      201: Resources/Laser_recolored/purple/HitAnimation_Laser_purple.gif
      202: Resources/Laser_recolored/blue/HitAnimation_Laser_blue.gif
      203: Resources/Laser_recolored/green/HitAnimation_Laser_green.gif

you should have, for example:

Code: [Select]
  - type: projectiles
    height: 3
    width: 105
    subX: 3
    subY: 3
    files:
      385: Resources/Laser_recolored/SmallLaserBulletSprite_red.png
      420: Resources/Laser_recolored/SmallLaserBulletSprite_purple.png
      455: Resources/Laser_recolored/SmallLaserBulletSprite_blue.png
      490: Resources/Laser_recolored/SmallLaserBulletSprite_green.png
      525: Resources/Laser_recolored/MediumLaserBulletSprite_red.png
      560: Resources/Laser_recolored/MediumLaserBulletSprite_purple.png
      595: Resources/Laser_recolored/MediumLaserBulletSprite_blue.png
      630: Resources/Laser_recolored/MediumLaserBulletSprite_green.png
  - type: SMOKE.PCK
    height: 80
    width: 160
    subX: 32
    subY: 40
    files:
      66: Resources/Laser_recolored/red/HitAnimation_Laser_red.gif
      76: Resources/Laser_recolored/purple/HitAnimation_Laser_purple.gif
      86: Resources/Laser_recolored/blue/HitAnimation_Laser_blue.gif
      96: Resources/Laser_recolored/green/HitAnimation_Laser_green.gif

Also note that while explosions are indexed normally, bullet sprites are indexed 35 to 1. This means that 385 means bulletsprite 11, 420 - bulletsprite 12 etc.

Offline shadychrctr

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #17 on: September 29, 2014, 03:44:24 am »
Hmmmm, well now the hit anims work, but i'm still not getting any bullet sprites. I've been fiddling with it non stop but I just can't figure out what could be wrong anymore.... i've done what dioxine told me, then after a while I tried putting the bulletsprites into one file but still nothing.
this time I'm including ruleset and a pic of my resource file.

Offline shadychrctr

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #18 on: September 29, 2014, 03:58:04 am »
Plasma is green! BURN THE HERETIC!!! :P
Although "BURN THE HERETIC!!!" has quite the lilt of a WH40K fan. Blue plasma for life!

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #19 on: September 29, 2014, 04:33:29 am »
Well, that's my code below - noticed that my Width is different from yours. Maybe that's the problem?

Code: [Select]
  - type: Projectiles
    height: 3
    width: 57
    subX: 3
    subY: 3
    files:
      385: Resources/Piratez/Bullets/BulletMagnum.gif
      420: Resources/Piratez/Bullets/Arrow.gif
      455: Resources/Piratez/Bullets/BulletGaussSmall.gif
      490: Resources/Piratez/Bullets/BulletGaussBig.gif
      525: Resources/Piratez/Bullets/BulletPlasmaBlue.gif
      560: Resources/Piratez/Bullets/BulletLaserBlueMed.png
      595: Resources/Piratez/Bullets/Molotov.gif
      630: Resources/Piratez/Bullets/BulletLaserBlueSmall.png
      665: Resources/Piratez/Bullets/StickGrenade.gif
      700: Resources/Piratez/Bullets/Knife.gif
      735: Resources/Piratez/Bullets/BallPurple.gif
      770: Resources/Piratez/Bullets/CannonBall.gif
      805: Resources/Piratez/Bullets/BulletFlintlock.gif

Offline shadychrctr

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #20 on: September 29, 2014, 06:04:31 am »
ok, so was either the background colour, (not likely) or i had to capitalize Projectiles.......

Offline HotIceHilda

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #21 on: October 04, 2014, 09:10:47 pm »
So does this mod still require some personal tweaking to get it to work? It is a great idea for a mod, but some people are not knowledgeable about tweaking OpenXCOM

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #22 on: October 05, 2014, 01:07:37 am »
From what I downloaded, yes, it does require some tweaking. I think this mod is meant more as a resource for modders than an actual ready to use mod. It is some really simple tweaking and worth looking into. All you have to do is put the pictures in the right folder and pick the colour you want in the ruleset.

Take a look at it, give it a try, and if it doesn't work I can write a ruleset for you.

Offline HotIceHilda

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #23 on: October 05, 2014, 06:31:20 am »
From what I downloaded, yes, it does require some tweaking. I think this mod is meant more as a resource for modders than an actual ready to use mod. It is some really simple tweaking and worth looking into. All you have to do is put the pictures in the right folder and pick the colour you want in the ruleset.

Take a look at it, give it a try, and if it doesn't work I can write a ruleset for you.
I am guessing I have to put the hit animation and the bullet sprites in some folder. The only folder that I could think of that I should put it in is the bullet sprite folder in the resources folder. If I am please correct me.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #24 on: October 05, 2014, 06:41:28 am »
If you open the ".rul" file, you will see a section called "extraSprites"at the bottom. In there are the path to be used to access the new graphics.

Just make sure that those lines in the .rul file match with where you put the files (also the names, the ones in the ruleset are for red plasma, if I remember well).

In general, it is considered best practice to put new files in the Resources folder, within a folder with the name of your mod. It is not necessary, but that's how every modder does it (and how the .rul file for this mod assumes you will do things as well, but you can change it).

Offline Ran

  • Colonel
  • ****
  • Posts: 196
    • View Profile
Re: [WEAPON] Recolored Laser and Plasma Bullet Sprites
« Reply #25 on: October 07, 2014, 12:37:42 am »
Sorry I didn't reply sooner, I was sure I had uploaded a complete working demonstration of the replaced colors already. :-[

You'll find the TestGun Mod in the first post now, including an attached savegame. It is basically a magnum with many types of ammo, each one representing a different color form of plasma and laser hit and bullet sprites. It was done some months ago, I hope it still works with the current builds.