Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missile range calculator
2018-05-07, 05:36 PM (This post was last modified: 2018-05-15 11:02 PM by HerpeDerp.)
Post: #1
Missile range calculator
Someone on discord asked about a missile range calculator and I realized I had almost made that at some point already as part of my dumb fire missile script.
To use it, just copy the code into a Lua box, change the configuration at the top to match your missile and press 'apply changes'. It then logs the range the missile will fly. There's not much more to it really, but I though I'd share it anyway.

https://pastebin.com/yZGmfynq
Find all posts by this user
Quote this message in a reply
2018-05-07, 05:39 PM
Post: #2
RE: Missile range calculator
Cool, thanks.

(2017-04-20 06:54 PM)Hikari Wrote:  I made something that has an impact of a type 1a supernova. The projectile already breaks laws of physics by going way past the speed of light.

2000mm HE Dakka Enthusiast
Find all posts by this user
Quote this message in a reply
2018-05-15, 08:42 AM
Post: #3
RE: Missile range calculator
Thank you a lot!

I really wanted to be able to compare different missile setups to each other. And then i thought it would be great to be able to check missiles quickly while playing adventure mode.

Then I went completely insane and made this:
https://pastebin.com/T5D13UeT

It checks all Missiles with a Lua Transceiver on the Launchpad (Missile has to be launched) and calculates the range and flight time.

Most credit goes to you because i was too lazy to figure out the actual calculation part Big Grin
Find all posts by this user
Quote this message in a reply
2018-05-15, 06:05 PM
Post: #4
RE: Missile range calculator
(2018-05-15 08:42 AM)Dr.Allcome Wrote:  -snip

Neat!

Would you mind if I added it to the main post (with credits of course)?

Btw, I'm quite certain missiles are alive for only 30 seconds without a regulator since a patch somewhere last year. The wiki might not have been updated and I never actually checked it in-game. Also, each module adds 0.2 mass instead of 0.1 I think, except for thumpers which add a total of 0.4.
I'll write a little script to compare calculated accelerations with the actual accelerations of the missile to check all that sometime soon.
Find all posts by this user
Quote this message in a reply
2018-05-15, 08:06 PM
Post: #5
RE: Missile range calculator
(2018-05-15 06:05 PM)HerpeDerp Wrote:  Would you mind if I added it to the main post (with credits of course)?
Go ahead, actually if you want to link to it, I also added it to an old GitHub account for easier updating:
https://github.com/4d7245/FromTheDepths/...ulator.lua

(2018-05-15 06:05 PM)HerpeDerp Wrote:  Btw, I'm quite certain missiles are alive for only 30 seconds without a regulator since a patch somewhere last year. The wiki might not have been updated and I never actually checked it in-game.
That is quite possible, the wiki seems to be outdated in a lot of places. I'll check it while testing and fix it.

(2018-05-15 06:05 PM)HerpeDerp Wrote:  Also, each module adds 0.2 mass instead of 0.1 I think, except for thumpers which add a total of 0.4.
I took this from the Wiki again: "The mass m is 0.1 t per module (0.2 t per block), with Thumper Warheads massing an additional 0.2 t."
But I also read your code as adding 0.2 per Block (2 Modules) and changed it since my code should loop through each module.
The Thumper should be correct depending on the base mass, since i add the basic mass before even checking if it is a Thumper and in that case only add the rest.
Find all posts by this user
Quote this message in a reply
2018-05-15, 10:05 PM
Post: #6
RE: Missile range calculator
(2018-05-15 08:06 PM)Dr.Allcome Wrote:  I took this from the Wiki again: "The mass m is 0.1 t per module (0.2 t per block), with Thumper Warheads massing an additional 0.2 t."
But I also read your code as adding 0.2 per Block (2 Modules) and changed it since my code should loop through each module.
The Thumper should be correct depending on the base mass, since i add the basic mass before even checking if it is a Thumper and in that case only add the rest.

Of course. Modules. Nvm that part
Find all posts by this user
Quote this message in a reply
2018-05-15, 10:52 PM
Post: #7
RE: Missile range calculator
Regarding Missile life without regulators we were both wrong... At least in v2.16 it seems to be 45 seconds.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)