Jump to content

[Mod] True laser beam


Lt_Parsons

Recommended Posts

Have you ever felt, that your laser guns do just "pew" instead of "BLAST"?

All laser weapons in game shoot bullet-like projectiles, so using them wasn't much fun.

Some people already tried to change that by making projectile faster and/or longer. But why go only half way?

So, after some tinkering, i finally made laser beam to look almost like a proper one.

Change is only visual, but adds to immersion a bit.

xtlbmscreen.png

Videos: laser rifle, 3px beam, scatterlaser, 5px beam

Here is mod archive:

- for game v1.06

- for game v1.05

- for game v1.04

- for game v1.03

- for game v1.0-1.02

To install, just unpack archive in game folder and replace files where needed.

Backup of existing 'weapons_gc.xml' file also would be good to do before that, if you want to remove this mod later.

To manually set any weapon to use the new beams, open 'weapons_gc.xml' in notepad and in corresponding weapon description change string beginning with '<Projectile' to '<Projectile spectre="projectiles/laserbeam/laserbeam5_10" speed="10000" showAfterDistance="0"/>'

There are some options to tweak the beams appearance:

- beam thickness, 3, 5 and 7 px, default is 5 (first number in spectre name)

- beam draw speed, 10, 9 ,8, 7 and 5, default is 10 (second number in spectre name)

- beam projectile speed, default is 10000

Have fun! =)

Edited by Lt_Parsons
Link to comment
Share on other sites

Got to try it out and its ....variable. At short range its just a reddish flicker, but at longer range (rifle range) it looks good. A clear red beam to the target.

Have to try out the sniper and heavy weapon versions yet.

Link to comment
Share on other sites

xtlbmscreen.png

Also, video.

It is not really good enough - trajectory and beam draw angle are a bit off and on less powerful system projectile can be rendered much less smoothly, so beam may not appear at all because of speed, or appear only for half of trajectory. Timing of shot animation can be very wonky on less powerful rigs. Also, on diagonal shots beam move too much, so it looks as a ladder of sorts.

It is not in above video however - i was not been lucky in capturing those bugs on video (if there not much power for game, even less is available for capture so it lags and skips most of animation, and if game is smooth - less bugs).

Link to comment
Share on other sites

Glad you like it =)

To make it thicker you just need to resize sprite a bit (it is 3px high now) and replace a ton of numbers in xmls (h="3" and pivotY="2" to what you need) that define thickness, odd number of pixels is better i suppose.

My main concern however is projectile speed - i still do not think i got it right and it is too fast. It is matter of taste and your system speed mainly. Should be somewhere between 8000 and 11000.

Edited by Lt_Parsons
Link to comment
Share on other sites

Increased the height to 5 (not sure how to resize the sprite, and my one attempt looked...odd) and cut speed to 8000. Red barbs of light flashing to the target. Looks great, though being able to resize the sprite would make it look much better :P.

Link to comment
Share on other sites

Try this ones - 5 and 7 px high beams.

You know when speed it too low, when beam starts to extend backwards, onto and through soldier sprite.

Edit: And, just in case, do not forget to rename to "laser_beam.png" which one you try, or change "<img name="laser_long"/>" in "laser_long.xml" accordingly, so it use new sprite.

Edit2: I'll also check myself, how it look a little later (need to get to my working rig to test properly) and update archive maybe.

Edited by Lt_Parsons
Link to comment
Share on other sites

It is because of how i got it working - it starts draw with small part of beam sprite and gradually draw it longer and longer as projectile move forward, while simultaneously shifting sprite backwards, so it don't appear in front of impact point.

Animation timing is hard-defined and getting projectile speed so it synchronize properly is the key.

This have drawbacks, that i described earlier - mainly, on powerful system it animates fairly smooth, on not so powerful - animation lags and glitches appear (so i can't record proper slow-mo capture right now to set things right).

@GoodGuyEddy

We'll wait and see, i have posted screenshot and video of it, as he asked.

Now can only hope it is good enough to be included =)

Most important is that not only me likes the result, so work on mod is not wasted time, really.

Link to comment
Share on other sites

Not in my power, sadly - projectile trajectory is not linear, so it gains offset in flight, but do not rotate sprite along with bullet drop. If i try to correct this offset by animation, it works only in one direction and in others it shifts even more, cause sprite is simply rotated by engine according with shot direction.

Link to comment
Share on other sites

Yeah, like it slices instead of just blasting something =)

Also, 5px beam looks good and 7px is too thick. I'll set default to 5 and include others as option. Speed will leave as is, 10000. If less, beam sometimes noticeably goes backwards and i don't want that.

New video, scatterlaser, 5px beam

4th beam seems to always appear closer to shooter.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Since i don't have time to update this mod for every new build, here is how-to for more recent game versions.

To install on game newer then v18.3hf2, unpack archive in game folder, but do NOT replace "weapons_gc.xml" when prompted.

Then open existing unmodified "weapons_gc.xml" in notepad and find and replace every string <Projectile spectre="projectiles/laser/laser" speed="1000"/> with <Projectile spectre="projectiles/laser/laser_long5" speed="10000"/> and save changes.

Edited by Lt_Parsons
Link to comment
Share on other sites

  • 11 months later...

This looks awesome!

Really really great!!

I hope this will be possible to use in the final version.

So, after some tinkering, i finally made laser beam to look almost like a proper one.

If it would be a proper laser, you would not see it without particles in the air...but hey: "This is SciFi!!!"

Seeing all you modders and mappers here, thank you.

Although your input to the game may be small - not that it is small work, no no - but I think you add a lot of spice to the game immersion. Just recently used the mod "blood", only a small add-on but a huge impact.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...