Jump to content
Lt_Parsons

[Mod] True laser beam

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

Share this post


Link to post
Share on other sites

Take a screenshot. I'd be interested to see if you've actually got a genuine laser beam effect working.

Share this post


Link to post
Share on other sites

Hmm, added it in, and the aliens had no weapons and my medipacks disappeared when I equipped them...

EDIT: Wait, nevermind, screwed up the file somehow.

Edited by Sathra

Share this post


Link to post
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.

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

Mmm, could actually be a bit thicker. Just personal preference though. Having played it a bit more I find myself liking it!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Aye, I've had the same thoughts on the speed. I'm waiting on the heavy versions before I start fiddling with the speed though.

Share this post


Link to post
Share on other sites

OOOOh. Me likey! Any chance we can convince Chris to have an option for the original and this to be in the official options menu? :3

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Ah, I have noticed it possibly going backwards with the scatter laser. Though hard to tell since its still just a flash of red light (lots of them). Does look odd somehow though.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I've found that angled shots with a thicker beam have an odd effect. It ripples sideways. Looks pretty cool imo.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Finally got time to update mod to work with current game =)

It will now patch the xml instead of just providing complete file, so, hopefully, there will be less need to watch for every little change when game updates.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×