Author Topic: [UFO] Red/Blue Laser Pistol and Heavy Laser  (Read 1580 times)

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
[UFO] Red/Blue Laser Pistol and Heavy Laser
« on: August 05, 2016, 08:32:38 am »
I drew some art for the laser pistol and heavy laser, to give them the same motif as the laser rifle. The inspiration for this mod came from the AwesomeGuns.Laser mod which tweaked the laser pistol and heavy laser art a bit but mainly made the laser rifle look a lot more like the other two. If you like golden brown laser guns, then definitely check out AWESOMEGUNS.LASER. But if you're like me and think the laser rifle is pretty swank, I've got the artwork right here to carry that motif over to the other two laser guns. And if you just need more artwork for more varieties of laser, we've both got you covered!




I put several hours into these designs. While I primarily copied them from the laser rifle, I did have to draw all of the details by hand. If you like my work, feel free to add it to your own mods, just let them know who drew it, please! Also note that the laser rifle now has a scope, so it's been slightly altered from the original laser rifle.


I made sure to put in floorobs and handobs for these as well. It's all put together in an easy-to-install mod at the bottom of the post that shouldn't have any conflicts with other mods.

If you would like to view and download the images alone, check out this post:
https://openxcom.org/forum/index.php/topic,4796.msg68392.html#msg68392




Offline The_Atomik_Punk!

  • Squaddie
  • *
  • Posts: 24
  • Nobody rules these streets at night but me!!!
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #1 on: August 06, 2016, 02:38:39 am »
Love it- this is a big improvement in terms of aesthetic uniformity (for my tastes at least). Thanks for this great work, The Reaver of Darkness!

As an aside, do you have any interest in perhaps creating a unique sprite(s) for the Laser Sniper Rifle? As it stands, I think that mod just recycles the regular laser rifle sprites...

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #2 on: August 06, 2016, 02:53:30 am »
As an aside, do you have any interest in perhaps creating a unique sprite(s) for the Laser Sniper Rifle? As it stands, I think that mod just recycles the regular laser rifle sprites...
Why don't you just use the scoped rifle from this mod? Or you could try to import the X-Com: Apocalypse Laser Sniper Rifle graphic.

I'm a little burnt out on building fresh graphics at the moment, but if you can find me a base object to work with, I might be able to tweak or recolor it a bit.

Offline The_Atomik_Punk!

  • Squaddie
  • *
  • Posts: 24
  • Nobody rules these streets at night but me!!!
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #3 on: August 06, 2016, 03:35:51 am »
Why don't you just use the scoped rifle from this mod? Or you could try to import the X-Com: Apocalypse Laser Sniper Rifle graphic.

I'm a little burnt out on building fresh graphics at the moment, but if you can find me a base object to work with, I might be able to tweak or recolor it a bit.

I'm sorry dude; I didn't understand that there are multiple assets created by you in this pack (I assume some are not used by the laser pistol and heavy laser). You're right that the scoped laser rifle that is demonstrated in this thread would work perfectly for a laser sniper rifle. I have no idea how to add your assets into that mod, but I imagine it can't be that difficult if it just involves renaming and swapping image files.

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #4 on: August 06, 2016, 05:39:30 am »
I have no idea how to add your assets into that mod,
If you need me to, I can write up the changes for you, but I encourage you to do it yourself because once you learn how, you'll see how easy it is, and that will open up so many more possibilities to you. So I'll explain how to do it, and if you still need help, you can post the mod here and I'll update it for you.

Note that there's a lot of words here. The most barebones process is very simple but I'm going to explain in detail how everything works so that you can understand what you're doing rather than simply copying lines. That way you're far less likely to make mistakes, and far more likely to be able to use this knowledge down the road.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You can mostly copy and paste the important info directly from my mod into yours. There are three pertinent components:
1.) In the Resources folder and subfolders exists the image files for the laser rifle. they are combined with the laser pistol and heavy laser as one image, but that is fine. You need to put the image(s) into your mod's Resources folder, which sits in the main directory next to the rulesets. The bigobs file is the most important, but you can add the floorobs and handobs files as well if you wish, even though the scope is barely visible in those. If you do not have a Resources folder in your mod, create one. What subfolders you add inside the Resources folder are entirely up to you.

2.) In the extraSprites ruleset file, you will see multiple sections named BIGOBS.PCK, HANDOB.PCK, or FLOOROB.PCK. You've got to figure out which sections relate to the lasers and copy them. The BIGOBS.PCK segment looks like this:
  - type: BIGOBS.PCK
    width: 96
    height: 48
    subX: 32
    subY: 48
    files:
      315: Resources/RedBlueLasers/RedBlueLasers_bigobs.gif
Here the width and height values are the x and y dimensions of the image. It is 96 x 48 pixels. The subX and subY values are the dimensions of a single unit--this image has three units and each is 32 pixels wide. The line under files gives the route to the image file, starting from the base directory of your mod. First it goes into Resources/ and then through whichever subfolders you may have the image file in, and finally ends with the name of the image file. The number before the path (315 in this case) determines the numerical value associated with the first segment of the image. The second segment is automatically numbered 316, and the third 317. You can select any number you want here, but it's best to make it high enough to avoid it overlapping the vanilla image numbers.

3.) The items ruleset file in your mod will have a section for the laser sniper rifle. It may be called STR_LASER_SNIPER_RIFLE or STR_LASER_RIFLE or perhaps something else. It'll probably be obvious, but the item's name doesn't have to match the name you see for it in-game, because the language file can be used to change how it's displayed. In the laser sniper rifle's section, you may or may not see the sprite references. They would look something like this:
  - type: STR_LASER_SNIPER_RIFLE
    bigSprite: 0
    floorSprite: 8
    handSprite: 6
You'll want to change the numbers to match what you have listed in the extraSprites ruleset. If the item doesn't have these lines, you can add them. 0, 8, and 6 are the default values for the laser rifle, but 315 is the number I used. Recall that the image starts with the laser pistol graphic, so if you set the bigSprite line to 315, your laser sniper rifle will look like a laser pistol. Instead, you'd want to number it one unit higher, 316.

So try that and let me know how it goes!
« Last Edit: August 06, 2016, 05:43:55 am by The Reaver of Darkness »

Offline The_Atomik_Punk!

  • Squaddie
  • *
  • Posts: 24
  • Nobody rules these streets at night but me!!!
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #5 on: August 12, 2016, 05:11:50 am »
Holy smokes dude- thank you very much for the highly detailed and insightful post!

So I gave this two tries, and here's where I got: I now have your scoped laser rifle sprite working for the Laser sniper rifle mod (woo, woo!), and I successfully reverted the laser rifle to it's standard sprite (so as to have it not share a bigbob with the laser sniper rifle), but I don't hink I went about achieving it the correct way, and I'm afraid I might have introduced overlapping rulesets or something rather. My trouble undoubtedly derives from not properly setting things up, and not fully understanding what I've done to get to this point. A brief recap:

- I copied the entire resources folder from your redbluelasers mod to the lasersniperfile mod (the resources folder didn't exist previously for this particular mod)
- I then copied your extreSprites.rul and items.rul files from your mod into the rulset folder of the laser sniper rifle mod, neither of which existed in the laser sniper rifle mod (I think this part is wrong on my part)
- I then changed within the Laser_Sniper_Rifle.rul to call upon the new resources
 bigSprite: 316
 floorSprite: 314
 handSprite: 332
- I then reverted the laser rifle sprites by modifying the sprite numbers to  bigSprite: 0 floorSprite: 8 handSprite: 6 in the items.rul, which worked

I'd greatly appreciate if you could look over my steps to see if there was indeed something I did wrong, because, while "working", I think I may hae messed something up under the hood, so to speak. Once again The Reaver of Darkness, thank you very much for taking the time to explain the reasoning behind everything; it's sort of like the old, "give a man a fish, he'll eat for a day, teach a man to fish, he'll eat for a lifetime"  ;D

*EDIT attached the laser sniper rifle mod in case you  wanted to peek in it.
« Last Edit: August 12, 2016, 05:15:12 am by The_Atomik_Punk! »

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #6 on: August 12, 2016, 07:34:04 am »
- I then reverted the laser rifle sprites by modifying the sprite numbers to  bigSprite: 0 floorSprite: 8 handSprite: 6 in the items.rul, which worked
I found these values listed under the Laser Sniper Rifle:
    bigSprite: 0
    floorSprite: 0
    handSprite: 8

That makes it look like the laser rifle.
What was the specific problem you were having? I'm a bit confused. It sounds like you said it's working fine, yet something about it might be broken.

Offline The_Atomik_Punk!

  • Squaddie
  • *
  • Posts: 24
  • Nobody rules these streets at night but me!!!
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #7 on: August 12, 2016, 11:53:51 pm »
I found these values listed under the Laser Sniper Rifle:
    bigSprite: 0
    floorSprite: 0
    handSprite: 8

That makes it look like the laser rifle.
What was the specific problem you were having? I'm a bit confused. It sounds like you said it's working fine, yet something about it might be broken.

Sorry, I'm having no specific problem at all; everything is working for me. What I was referring to above was that by copying the resources and .rul files from your redbluelaser mod, the vanilla laser rifle was now scoped, which is what I wanted to use for the laser sniper rifle. I therefore reverted the laser rifle sprite to default by inputting the values above. What I was asking is if you could look over my bulletpoint summary of what I modified to see if my methodology is sound, or if I did something wrong or extraneous that may introduce unforeseen consequences.

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #8 on: August 13, 2016, 03:50:54 am »
or if I did something wrong
If it parses, you didn't do anything "wrong". It's all about knowing what effect you want to achieve. If you didn't get what you want, then let's talk about that.

Your extraSprites numbers for the graphics don't match your Laser Sniper Rifle's numbers, at least in the one you gave me. When I ran it, it made the LSR look like the Laser Rifle--scopeless.

#extraSprites:
#  - type: BIGOBS.PCK
#    files:
#      57: Resources/SniperRifle/bigobs_57_0.gif
#      58: Resources/SniperRifle/bigobs_58_0.gif
#  - type: FLOOROB.PCK
#    files:
#      76: Resources/SniperRifle/floorob_76_0.gif
#      77: Resources/SniperRifle/floorob_77_0.gif
#  - type: HANDOB.PCK
#    files:
#      129: Resources/SniperRifle/HANDOB/

If you're using these numbers, then the sprite numbers in the items portion of the ruleset must match:

items:
  - type: STR_LASER_SNIPER_RIFLE
    bigSprite: 58
    floorSprite: 77
    handSprite: 129


Further notes in the example mod below:
« Last Edit: August 13, 2016, 04:16:49 am by The Reaver of Darkness »

Offline The_Atomik_Punk!

  • Squaddie
  • *
  • Posts: 24
  • Nobody rules these streets at night but me!!!
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #9 on: August 14, 2016, 08:41:39 pm »
Thank you for the guidance, The Reaver of Darkness; I really appreciate the explanatory notes in the attached example mod. Sorry for cluttering up your thread with my questions, I now have sufficient understanding to navigate these files in a rudimentary way, thanks to you.

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #10 on: August 15, 2016, 05:39:01 am »
Glad to help, and thanks for boosting my thread to the top! :D

Offline new_civilian

  • Colonel
  • ****
  • Posts: 618
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #11 on: September 01, 2016, 11:47:08 am »
Your lasers just replaced (for me) the already excellent ones from Chicko which I used all those years. Very nice work.
Keep those mods coming!

Offline The Reaver of Darkness

  • Captain
  • ***
  • Posts: 350
    • View Profile
Re: [UFO] Red/Blue Laser Pistol and Heavy Laser
« Reply #12 on: February 12, 2017, 06:55:50 am »
The heavy laser floorob had been bugging me but I was too lazy to fix it. Well I finally fixed it!



Both handles have been enlarged, there is now much less empty space along the bottom of the back end of the weapon, and most importantly the barrel grooves go up high enough that it no longer appears to be digging into the ground but actually laying flat like you'd think it would.

I've also updated my ground weapons mod with this change as well as some older changes that have accumulated since I posted it: https://openxcom.org/forum/index.php/topic,4196.0.html