Litcube's Missile Boat Add-On (Turret:V0.92b / Supply:V0.93b)
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 2008
- Joined: Mon, 9. Jul 07, 23:33
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Weird. If this script was running on that ship, that wouldn't happen.joelR wrote:Litcube does this script fill the ship to max capacity with missiles? I ran into several xenon caps that were stuffed with all sorts of missiles along with their lasers. Also a xenon G (SRM) had a cargohold full of various fireable missiles but only launched 1 hammerhead at me in a 3 minute fight.
-
- Posts: 2008
- Joined: Mon, 9. Jul 07, 23:33
Ok ill check if its running on it tomorrow. Time to sleep!Litcube wrote:Weird. If this script was running on that ship, that wouldn't happen.joelR wrote:Litcube does this script fill the ship to max capacity with missiles? I ran into several xenon caps that were stuffed with all sorts of missiles along with their lasers. Also a xenon G (SRM) had a cargohold full of various fireable missiles but only launched 1 hammerhead at me in a 3 minute fight.
-
- Posts: 1842
- Joined: Mon, 10. Aug 09, 02:09
I've thought that it's Missile Boat Addon fault (or conflict with IR), but today I got CTD with ONLYMizuchi wrote:Edit: Well, scratch that.![]()
They always seem to be turret-related: sometimes it lists Missile Defense MK2 scripts, sometimes it lists Vanilla turret-scriptsm and sometimes (as above) it includes MARS.Code: Select all
Story call stack dump: [000000]->[0351cc]#-25272(2142)[702].StartThisScriptID(97046, {"plugin.gz.mars.lib",44,"MARS - Library",494,0,{...},{...},{...},{...},0}, {5,"missile.supply",0,0,0,0,0,0,0,0}, 0) [03538b]->[035fcd]#-25272(2142)[702].__runScript({3026183,0,0,3,{...},{...},0,97046,{...},0,0,0,0}, {"plugin.gz.mars.lib",44,"MARS - Library",494,0,{...},{...},{...},{...},0}, 65542, -25272, {5,"missile.supply",0,0,0,0,0,0,0,0}, 0) [060427]->[0aa6fd]#-25272(2142)[2004].ShootMissileSECOBID(44038, 1, 32, 0)
The last three crashes (updated!) have been the same report as above, though.
ShootMissileSECOBID on stack. Without any 'wrapper' (ie no turret command etc)
probably missile was shot directly during attack or by IR script controlling ship. SO, ShootMissileSECOBID is only common thing. NOw, what the hell does it mean... already excluded tmissiles.txt modifications as cause (well, I havent tried vanilla missiles but i doubt it makes difference)
ie. this script only causes bug to appear faster, but is not real reason
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
A similar crash was reported in the Smart Turrets thread.
If that last param is the refobj, could be that [THIS] is null.
ShootMissileSECOBID(3962, 3, 29, 0)
comes from:
= [THIS] -> fire missile $Missile from turret $Task on $Enemy
Suggesting:
[THIS] = null
$Missile = 29 (spectre)
$Task = 3 (turret 3)
$Enemy = 3962 (maybe game's hashcode for a sector object)
Code: Select all
Story call stack dump:
[000000]->[0351cc]#-199751(2023)[702].StartThisScriptID(3, {"plugin.gz.missile.load.att.e.std",42,"Start Attack Enemies - player",1,0,0,{...},0,0,100}, {4,3}, 0)
[03538b]->[035fcd]#-199751(2023)[702].__runScript({27437161,0,3,3,{...},{...},0,3,{...},100,0,0,0}, {"Lib.Cmd.Turret.Barrage",44,"Lib Cmd: Main turret barrage",46,0,{...},{...},{...},{...},911}, 65542, -199751, {4,3}, 0)
[060427]->[0aa6fd]#-199751(2023)[2004].ShootMissileSECOBID(3962, 3, 29, 0)
ShootMissileSECOBID(3962, 3, 29, 0)
comes from:
= [THIS] -> fire missile $Missile from turret $Task on $Enemy
Suggesting:
[THIS] = null
$Missile = 29 (spectre)
$Task = 3 (turret 3)
$Enemy = 3962 (maybe game's hashcode for a sector object)
-
- Posts: 1014
- Joined: Wed, 17. Jun 09, 18:29
Hi Litcube
Just downloading the missile supply scripts over to include with the XRM (plus the XRM recommend scripts), as i was just using the missile boat attack script until now on its own......but when i copy the Lib.Gen.RunScriptWhenFinished over to the script directory it states their is already a version of this in there......
So am i right to assume this is an generic identical script and there is no reason to copy over the original script of this name?
Thanks for your reply.
Just downloading the missile supply scripts over to include with the XRM (plus the XRM recommend scripts), as i was just using the missile boat attack script until now on its own......but when i copy the Lib.Gen.RunScriptWhenFinished over to the script directory it states their is already a version of this in there......
So am i right to assume this is an generic identical script and there is no reason to copy over the original script of this name?
Thanks for your reply.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Missile Boat Turret Overwrite Update
0.9b:
- Near total rewrite
New rules as of V0.9
- A volley is defined as missile launches between respected missile ROF + ship's assigned Missile Fire Probability Delay.
- The Missile Fire Probability Delay is equal to 11.5 seconds - (ship's assigned Missile Fire Probability * 100).
- Missile Fire Probability is set in the ship's command console (delay examples: %5: 10 sec, 100%: 0.5 sec)
- By default, AI ship's have a 5% Missile Fire Probability.
- Turrets can fire at only one target per volley.
- To mitigate overkill and waste, not all pods are used in a volley, depending on target "hit points"
- Multiple turrets can attack a single target, if the expected damage output is appropriate per "hit points"
Missile selection:
- Highest damage missile that is 20% faster than the target's speed
- If target range is more than 90% of missile range, the missile is skipped for fire
- If no missile is found that meets speed requirements, pick fastest missile
- If no missile is found that meets range requirement, NO missile is returned (thus barrage will not fire)
0.9b:
- Near total rewrite
New rules as of V0.9
- A volley is defined as missile launches between respected missile ROF + ship's assigned Missile Fire Probability Delay.
- The Missile Fire Probability Delay is equal to 11.5 seconds - (ship's assigned Missile Fire Probability * 100).
- Missile Fire Probability is set in the ship's command console (delay examples: %5: 10 sec, 100%: 0.5 sec)
- By default, AI ship's have a 5% Missile Fire Probability.
- Turrets can fire at only one target per volley.
- To mitigate overkill and waste, not all pods are used in a volley, depending on target "hit points"
- Multiple turrets can attack a single target, if the expected damage output is appropriate per "hit points"
Missile selection:
- Highest damage missile that is 20% faster than the target's speed
- If target range is more than 90% of missile range, the missile is skipped for fire
- If no missile is found that meets speed requirements, pick fastest missile
- If no missile is found that meets range requirement, NO missile is returned (thus barrage will not fire)
-
- Posts: 21
- Joined: Thu, 12. Feb 04, 21:16
-
- Posts: 166
- Joined: Sun, 15. Aug 04, 12:21
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Tiek wrote:Hi Litcube, congratulations for the great script. I have a question: the script "Lib.Gen.GetBestMissileForTarget" at line 80 calls the script "Lib.Gen.Arrays.SortByElement" that is missing in the package. This script is essential for the correct execution of other scripts? Thanks.
Thank you!
Missile Boat Turret Overwrite Update
0.91b:
- Packing issue. Forgot a file. Very important.
-
- Posts: 2939
- Joined: Mon, 28. Feb 11, 19:50
Re: Litcube's Missile Boat Add-On (Turret:V0.91b / Supply:V0.92b)
So.... All files that we find in folder must go in 'scripts', right? Just checking, since you mention only one file ...Litcube wrote: Rename the stock !turret.missileattack.pck to something else. Copy the !turret.missileattack.xml included in this package to the scripts directory.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Re: Litcube's Missile Boat Add-On (Turret:V0.91b / Supply:V0.92b)
deca.death wrote:So.... All files that we find in folder must go in 'scripts', right? Just checking, since you mention only one file ...Litcube wrote: Rename the stock !turret.missileattack.pck to something else. Copy the !turret.missileattack.xml included in this package to the scripts directory.
Missile Boat Turret Overwrite Update
0.92b:
- Compressed the !turret.missileattack.xml to a .pck for easier installation.
This will overwrite your !turret.missileattack.pck in your scripts directory. Back it up if you want the option to revert later.
-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
-
- Posts: 1135
- Joined: Sun, 19. Oct 08, 18:46
Hey. I've been working on enhancing missile boat AI in MBR (just making them keep their distance from their target), so have had a look at the vanilla as well as your script. Despite being much better than vanilla, there is a problem of targeting with both.
Currently, the turret script only targets the nearest enemy ship. Preferably it would target the nearest Huge, then Big, then Fighter, then Station, then other ship (e.g. freighter). Also, it would be great if the turret could take into account the ship's attacker and attack target, before finding it's own target.
This targeting issue is especially evident with my changes to flight logic. The boat will now keep it's distance from that big M1/2/7, but there are often a bunch of freighters/civilians/whatever nearby, so the actual attack target is never fired at.
I think since the script only runs in sector, some better targeting logic wouldn't be too expensive?
Anyway, let me know if you intend to do something about targeting, otherwise I will write a custom script for MBR.
Currently, the turret script only targets the nearest enemy ship. Preferably it would target the nearest Huge, then Big, then Fighter, then Station, then other ship (e.g. freighter). Also, it would be great if the turret could take into account the ship's attacker and attack target, before finding it's own target.
This targeting issue is especially evident with my changes to flight logic. The boat will now keep it's distance from that big M1/2/7, but there are often a bunch of freighters/civilians/whatever nearby, so the actual attack target is never fired at.
I think since the script only runs in sector, some better targeting logic wouldn't be too expensive?
Anyway, let me know if you intend to do something about targeting, otherwise I will write a custom script for MBR.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.
Black holes are where God divided by zero.
Black holes are where God divided by zero.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
ThisIsHarsh wrote:Anyway, let me know if you intend to do something about targeting, otherwise I will write a custom script for MBR.
Fighters are just as much a valid target as huge ships, when you consider the benefits of multiple turrets (multi-tracking) on a boat, and flail type missiles. This last point (multi-tracking) mitigates the usefulness of using the ships 'attack target'.
If you want to control this on your own ships, use attack target as the turret command.
-
- Posts: 1135
- Joined: Sun, 19. Oct 08, 18:46
Point taken. However, looking at 'Lib.Cmd.Turret.Barrage', the '!turret.attacktarget.std' behaviour only works for player tracking aim, not for the ship's command/attack target.Litcube wrote:ThisIsHarsh wrote:Anyway, let me know if you intend to do something about targeting, otherwise I will write a custom script for MBR.
Fighters are just as much a valid target as huge ships, when you consider the benefits of multiple turrets (multi-tracking) on a boat, and flail type missiles. This last point (multi-tracking) mitigates the usefulness of using the ships 'attack target'.
If you want to control this on your own ships, use attack target as the turret command.
What would be really good, as a cross-compatible solution, would be to have a local variable 'preferred.target' (or something), where the turret will attack that target if possible.
If it is OK with you, and you are not planning further updates, I would like to make this script a required/recommended prerequisite for Military Base Response revamp, but use a custom targeting script?
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.
Black holes are where God divided by zero.
Black holes are where God divided by zero.