Trying to find or make a weponized lightning mod

Started by BaconHamLincoln, January 08, 2020, 06:38:40 PM

Previous topic - Next topic

BaconHamLincoln

When playing with the Dev console in-game I have had a lot of fun messing with the lightning strike. Today I had the idea that a lightning strike based weapon/artillery would be very fun to have in-game. I have looked around and been unable to find such a mod, and haven't had much luck in even determining if such a mod would be possible.

It could take many forms, from a pawn manned station that acts as an alternative form of artillery, or something that allows the player to directly determine exactly where the lightning would strike just like in Dev mode. Either option would have a cost associated to it such as a massive power draw, 1-3 batteries worth. Would it even be possible for me to make such a mod?

If anyone likes the idea they are free to take it.

LWM

I was contemplating a lightning gun earlier today, actually (I've never done a weapon mod, so I probably wouldn't do it, TBH - unless someone wanted to work with me?)  But I like the idea of lightning artillery even better!  It's a very doable mod, I think.

AcetheSuperVillain

QuoteWould it even be possible for me to make such a mod?

So obviously, your version is much more specific, but the easiest form of this I can think of would be an item like the tornado generator that calls the flash-storm event instead.  From there, maybe you could work it into something closer to what you have in mind. 

Canute

I remember there was a mod which could made such an attack.
At last the Mechanoid terraformer event could give you a weather control unit, but that is only availble as special modpack Hardcore-SK.
There was another mod too i think, but can't remember or find it.

And Rim of Magic, with the Lighting mage could create lighting storms too.

Ogliss

are ya thinking about a turret that fires at a location and then lightning rains down on the target?
or something like
https://gyazo.com/ebaecc380ba2cc97fc504fabaf59af9e

Homez

Haven't played around with lightning yet, but if you have a decompiler look at RimWorld.WeatherEvent_LightningStrike.FireEvent(). This looks like the method used to initiate a random lightning strike. You could definitely write something inspired by this to create a lightning gun/trap/bomb.

PeskyNgon

Quote from: Homez on March 14, 2020, 11:45:32 AM
Haven't played around with lightning yet, but if you have a decompiler look at RimWorld.WeatherEvent_LightningStrike.FireEvent(). This looks like the method used to initiate a random lightning strike. You could definitely write something inspired by this to create a lightning gun/trap/bomb.

hi there! thanks for the tip, it helped me find the dev tool that calls a strike at the mouse cursor. im trying to make a "gun" the calls a lightning strike where its aimed. i have now found the code that calls a strike, but i cant work out how to "aim" it at the cell or pawn the person using the weapon is aiming at. i assume somewhere the coordinates of the Cell the weapon is aiming at is being stored, but i dont know where. please could you point me in the right direction?

LWM

When you create the event, there are two constructors.  One takes the map.  The other takes the map and something called "forcedStrikeLoc" - I suspect you can work with that!

PeskyNgon


RawCode

lightning itself is just fancy animation, you need to replace verb_shoot with your own verb that instead of spawning projectile animation, spawn lightning or anything you like.

lightning render and animation already present, all you need is to "rotate" animation and you will have bolt that fire from your pawn to target, instead of offscreen top to target.

natthegreat668

#10
weaponized lightning? There are mods for that.

Power++ mod allows players to summon a massive 50 or 100 lightning strikes in an area with the ARES and ARES 2.0 research. Look up the tutorial video on it. I find the ares really cool and flashy. It works similar to a call for an orbital bombardment or artillery strike. You pay with it with stored power in batteries instead of silver.

Rimatomics has a tesla pulsar weapon which works similarly to a turret. It takes awhile to charge and fires a massive bolt of lightning. Big damage with long cooldown and requires someone to man a console, so it is similar to artillery.

Rimworld of magic has lightning magician class and lightning rings. Lightning rings are basically guns that shoot lightning but are considered artifacts. Lightning mages can use a variety of lightning abilities. Its ultimate skill involves summoning a moving magic circle cloud thing that drops tons lightning bolts for a good duration of time.