[UPDATE] Missile Spoof

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [UPDATE] Missile Spoof

Post by Norby »

Lone_Wolf wrote:
missiles in [wiki]Missiles_and_Bombs[/wiki] use values of 10 and 100 also.
[wiki]I Missile[/wiki] has 128 max. energy. I do not know why it is in the Equipment category, should be in Weapons imho.

I think 100 damage too much for a flare (an NPC Adder should survive a hit imho) and more interesting if some special missiles can resist. There are some around 30 energy in Nexus Missile so I suggest 30 if you want spoof these or even 10 if not.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [UPDATE] Missile Spoof

Post by cim »

Lone_Wolf wrote:
Play-testing the 1.03 code i uploaded, made me realise a potential problem :
Flare's may do TOO MUCH damage on detonation.
dealEnergyDamage is pretty straightforward (if you aren't bothered about shaping): the damage is the damage dealt at the specified range or closer, decaying by inverse-square outside that range (until the damage drops to 1 or the range exceeds scanner radius, at which point it stops)

The old dealEnergyDamageWithinDesiredRange is not as straightforward: it deals the weapon damage, multiplied by the desired range, divided by 6.76, at a distance of 1m. This then decays by inverse square until the desired range is reached, beyond which it drops instantly to zero; conversely it accelerates by inverse square within 1m: there is no theoretical maximum damage. (So at the desired range, it does the specified damage divided by 6.76 times the range). The difficulties in explaining this - especially the 6.76 constant, which is just to keep compatibility with an earlier implementation - are one of the reasons it got a replacement in 1.77
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: [UPDATE] Missile Spoof

Post by Lone_Wolf »

So formula for dealEnergyDamageWithinDesiredRange goes like this :

Damage = ( weapon_energy * desired_range ) / ( 6.76 * actual_range * actual_range)

The orginal flare has weapon_energy = 1195 , desired_range = 250 .

Here are some value pairs ( actual_range, Damage) :

1, 43454
10, 4345.4
18, 134.11
38, 30.09
65, 10.28
93, 5.02
125, 2.78
250, 0.69

This suggests that using dealEnergyDamage with damage 134 and a desired range of 18 will be very close to the old behaviour.
This would also mean that ships further away from the flare then 93 meters will barely notice the explosion.

Also there are several things in the missile_spoof code (check spoof-flares.js ) that limit the efficiency of flares :

- the chance a missile has it's target redirected to a flare is less then 1
(.99 for standard and Hardhead missile, 0.75 for most other missiles).

- A maximum of 5 flares is created
I'm not 100% sure what happens in spoof-flares.js if missiles > 5 , but expect setting a missile target to a not-existing object would fail and the missile keeps target.
(adding code to make sure this happens should be easy).
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: [UPDATE] Missile Spoof

Post by Lone_Wolf »

I've done more play testing using damage 134 with desired range 18 and haven't noticed any problems.

To avoid confusion i've uploaded 1.04 with only that change, https://app.box.com/s/c34vc3dxfmozdpa7yt8i43icf93v35md .
I also pm'ed Cmdr Wyvern and asked him to post in this thread whether he wants to update it himself or if he's ok with someone taking over.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Re: [UPDATE] Missile Spoof

Post by Cmdr Wyvern »

Lone_Wolf wrote:
I've done more play testing using damage 134 with desired range 18 and haven't noticed any problems.

To avoid confusion i've uploaded 1.04 with only that change, https://app.box.com/s/c34vc3dxfmozdpa7yt8i43icf93v35md .
I also pm'ed Cmdr Wyvern and asked him to post in this thread whether he wants to update it himself or if he's ok with someone taking over.
And I'm officially OK with LW taking it over. Real Life don't give me much of a break to fiddle around with this any more, and well, there's much more talented tinkerers on here than I.

The last bit of tinkering I did with it involved removing the fire.ecm code and letting Auto-ECM take care of that.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [UPDATE] Missile Spoof

Post by Cholmondely »

Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply