Jump to content
Lt_Parsons

[Mod] True laser beam

Recommended Posts

thixotrop, TacticalDragon - Thanks!

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

Like i said, almost =)

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.

It is possible because game itself is great and devs are very open to modding and suggestions - much credit to GH for that.

Share this post


Link to post
Share on other sites
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.

Thank you! you give us reason to continue working ^^

Share this post


Link to post
Share on other sites

For anyone interested, mod still works with 22.6 update, you just need to reapply patch for it to work.

Run patch script twice - first time it'll say that file changed and store old backup, second run will actually reapply the patch.

Share this post


Link to post
Share on other sites

I have now played some time with this mod and I am so loving it.

All the other weapons seems so sloooow now.

But actually in some directions you can barely see the laser beams. Maybe this is because the beams are too fast? Or ist it my system?

I am no programmer myself so I don't know how to change and test any modifications and furthermore I don't have a savegame with ground combat and laser anymore. So I can't test that and I don't know how to do that otherwise.

Share this post


Link to post
Share on other sites
I have now played some time with this mod and I am so loving it.

All the other weapons seems so sloooow now.

But actually in some directions you can barely see the laser beams. Maybe this is because the beams are too fast? Or ist it my system?

Glad you like it.

Yes, there are some quirks. For example, sometimes burst-shot beams just merge visually if they landed near each other, and if you shoot too close to shooter, beams don't show because of speed.

Firstly i tried more slower projectile speed settings, but they were too slow - you was able to see beam slowly extending forward, looked very strange, so i settled on fast ones.

As for other weapons, all you need to change their bullet speed is find 'weapons_gc.xml' file in 'Xenonauts/assets' , open it with notepad, find block of data for the weapon, and in the string that looks like '<Projectile spectre="projectiles/bullet/bullet" speed="1000" showAfterDistance="60.0"/>' change 'speed="1000"' to whatever you like (beams use 10000 but that is kind of extreme for usual bullets).

Speed change is purely visual and wont break savegames. If game crashes after any changes - you had broken something and need to restore original file (do backups or you will need to use cache integrity check in steam).

Much more words needed to describe this, then to actually do =).

To test something you just mod it and play the game to see how it behaves, no actual secrets here.

(For quick weapon test i use small cheat-mod that unlocks all weapons from the start, begin new game and wait for first downed ufo. Good for testing looks and if it works at all, but you wont get much useful battle data this way. Open 'items.xml' in Excel, you'll know what to do there.)

Share this post


Link to post
Share on other sites

I will try that with a new game that I will bring to laser at least, as I don't know any cheat mods.

An idea that spawned while I was reading your answer:

Is it possible to implement something like a smoke trace effect that lingers along the beam length and vanishes slowly after it, so you know that something happend? That or an after-glow effect, that lingers and vanishes slowly.

I know that moves away from "real laser" but you know, SFX. :D

However it is your mod, I don't want to press you to anything. :P

Share this post


Link to post
Share on other sites

You can edit the file so ballistic weapons use the laser projectile if you just want to try a few things to adjust the beam to your liking.

It makes testing much easier.

Share this post


Link to post
Share on other sites
Is it possible to implement something like a smoke trace effect that lingers along the beam length and vanishes slowly after it, so you know that something happend? That or an after-glow effect, that lingers and vanishes slowly.

No, lingering effects are not possible right now to my knowledge - projectile disappears in the moment of impact and impact effect, fire and smoke effects are placed automatically by game. Only thing you can do is add exhaust/trace/glow/animation to projectile itself while it flies, which is useless for beams.

You can edit the file so ballistic weapons use the laser projectile if you just want to try a few things to adjust the beam to your liking.

It makes testing much easier.

That is actually easier to do than my testing hack =).

UPD3: Yes, mod should still work for 22.6hf if it was applied on 22.6.

Edited by Lt_Parsons

Share this post


Link to post
Share on other sites
What about v22.7?

Can't check the game right now, but if there no significant changes to weapon balance (check the update notes), everything should work fine.

I especially made mod to use not just a replacement file, but a patcher - to withstand quick rolling out of new game updates.

Version number mentioned in the opening post is just versions i had time to test with.

You just need to, as is said in the opening post, to reapply patch by running 'xtlbm_patch.bat' again. If it doesn't fails - it works.

Just try it out by yourself, if i did not updated yet.

UPD: checked it now, work perfectly on 22.7.

Edited by Lt_Parsons

Share this post


Link to post
Share on other sites

Updated for current experimental build v22.8.

Got rid of the patcher and added some beam display options - there already was spectres for different thickness, now also spectres for different draw speed.

Share this post


Link to post
Share on other sites

I actively searched for something like this because the "laser slugs" annoyed me. Great that you made the effort!

Sadly, it does not work for me. Or you could say it works too realistically, because there is no visible beam at all now.

I installed Xenonauts 1.0, Lore+ and Enhanced Crash Sites, then your Laser Mod for 1.0

What additional info can I get you for bug checking?

Share this post


Link to post
Share on other sites

@Oli Baba - welcome to the forums.

Lore+, Enhanced Crash Sites and Laser Beam shouldn't have any conflict, they mod different files. Hm.

Oops, you're right - i made a typo in default beam spectres after one of the updates (they pointed to old images that i removed from the package as apparently unused).

I'm actually surprised no one pointed it earlier - thanks for the hint!

I had reuploaded the fixed files - just download and unpack the updated archive on top with file replace, that should do it.

Share this post


Link to post
Share on other sites

I had reuploaded the fixed files - just download and unpack the updated archive on top with file replace, that should do it.

Works now and I love it!

Thanks a lot for the quick response...

:D

Share this post


Link to post
Share on other sites

I really love this mod as it really makes it seem they are using lasers. Is there anyway to change the sound it makes instead of sounding like a gun firing?

Share this post


Link to post
Share on other sites

@Jsleezy, @Nefertari - thanks =)

@Nefertari - sounds can be changed fairly easily. Any suggestions as to how lasers should sound?

Various free sounds effects i tried while making the mod were too cartoonish or cheesy and did not match the game better then original laser sfx so i dropped the idea. Visuals were more interesting thing to upgrade anyway.

But i can try to combine something if you find fitting sound example.

Share this post


Link to post
Share on other sites

I've been meaning to have a proper look at this mod for a while, and I finally did. I wasn't sure whether I'd like it based on the videos but seeing it in game I'm a convert. Very cool. It's a shame it doesn't work at close range, but otherwise the effect is really good.

EDIT: Actually, a quick thought: since laser pistols and carbines have a shorter range than other weapons, would it be worth giving them a shorter projectile and making it move a bit slower? Firing within their effective range more or less means you definitely don't see the beam, but since you know that it's not going to be firing very far you could get away with a special case for these weapons, perhaps.

Edited by kabill

Share this post


Link to post
Share on other sites

@kabill - Glad you like it.

I already included some spectre options, look for the list in the op post.

Will check myself if one of them works better a little later (not at my gaming/modding rig atm).

@Nefertari - You will probably also need effects for burst fire so i quickly made some variants of your sound - https://app.box.com/s/svfv5gn31ke83ktmdex1.

There are archive with slightly modded sfx for 1 shot and 3, 5 and 10 round bursts.

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

×