Litcube's Missile Boat Add-On (Turret:V0.92b / Supply:V0.93b)
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
I suppose it's really hard to balance ^^
Especially considering what M7Ms represent in the gameworld.. a revolution in warfare. They are that, which makes them propably too powerful unmodded.
If anyone read the Honor Harrington books, there's a similar situation there.. where one side decides to focus more in missiles which after several years leads to both sides in the war building almost purely missile-launching warships Range is everything.
Although in this case I'd say the biggest problem lies with the player essentially (if he/she planned correctly) having an unlimited supply of torpedoes thanks (if need be) to TLs following the M7M stacked with those dastardly things. Maybe if they'd be a lot scarcer.. but I suppose that isn't really anything that could be covered by this script
Especially considering what M7Ms represent in the gameworld.. a revolution in warfare. They are that, which makes them propably too powerful unmodded.
If anyone read the Honor Harrington books, there's a similar situation there.. where one side decides to focus more in missiles which after several years leads to both sides in the war building almost purely missile-launching warships Range is everything.
Although in this case I'd say the biggest problem lies with the player essentially (if he/she planned correctly) having an unlimited supply of torpedoes thanks (if need be) to TLs following the M7M stacked with those dastardly things. Maybe if they'd be a lot scarcer.. but I suppose that isn't really anything that could be covered by this script
True.
I think the assumption that one should be able to take out anything in a single ship regardless of its "health", simply by observing your M7M from a distance should probably be pointed to this script:
http://forum.egosoft.com/viewtopic.php?t=218752
Anyone else might want to consider other methods. Bring in a TL, like acgabs says, to supply the M7M, while your M1 launches fighters to distract the enemy. That's what all those XRM ships are there for, and why they were all balanced right. So you can use them.
I think the assumption that one should be able to take out anything in a single ship regardless of its "health", simply by observing your M7M from a distance should probably be pointed to this script:
http://forum.egosoft.com/viewtopic.php?t=218752
Anyone else might want to consider other methods. Bring in a TL, like acgabs says, to supply the M7M, while your M1 launches fighters to distract the enemy. That's what all those XRM ships are there for, and why they were all balanced right. So you can use them.
My first instinct, and I'm not suggesting anyone actually implement this (I recognize it's a lot of work), is to alter the missile script to generate metrics for its barrages. In other words, when the script launches a barrage, it also starts a helper script on the target to get its array of inbound missiles, parsing the list to find the missiles it launched itself (by range to missile vs. range to missile boat, most likely). Having a handle on the missile objects now, it can monitor their progress to see how many get within X distance of the target (say, the largest possible dimension of a big ship plus some padding). It can use the hit percentage of the last barrage to predict how many missiles it needs to launch for the next, given the target's remaining health.
Expensive? You betcha. Pain to write? Of course! But that's what popped into my head.
Expensive? You betcha. Pain to write? Of course! But that's what popped into my head.
Well, there is. You can cycle through all ships, and get "missiles aiming at me", and build a list that way. But that list is outdated just as fast. Depending on the missile, it'll find new targets once another is destroyed.
As HotSake said, it would be expensive as hell. Repetitively cycling through all ships in a sector is expensive, never mind going through their respective missiles.
If you're going to write a ship command that targets missiles only, I'd assign them to one ship only, and periodically check for "missiles incoming" to that specific ship only.
I was going to write something like that myself to make M5s useful in a fleet battle situation.
As HotSake said, it would be expensive as hell. Repetitively cycling through all ships in a sector is expensive, never mind going through their respective missiles.
If you're going to write a ship command that targets missiles only, I'd assign them to one ship only, and periodically check for "missiles incoming" to that specific ship only.
I was going to write something like that myself to make M5s useful in a fleet battle situation.
hrm, well real quick just because i have to run, but want to toss this idea out,
it could start scanning only when theres an enemy ship in sector, and only through the M5's race, to make it less intense, 'player race only' would probably be good,
(could also give it a range limit and only scan ships within that range)
so have it scan once, get the closest missile, then do an attack, and disable scanning while attacking because itd be useless then anyways, ...maybe an interrupt in the attack if a missile is targeting the M5, but eh,
if it loses its target missile, scan again and repeat.
it could start scanning only when theres an enemy ship in sector, and only through the M5's race, to make it less intense, 'player race only' would probably be good,
(could also give it a range limit and only scan ships within that range)
so have it scan once, get the closest missile, then do an attack, and disable scanning while attacking because itd be useless then anyways, ...maybe an interrupt in the attack if a missile is targeting the M5, but eh,
if it loses its target missile, scan again and repeat.
Yup, those are good saving features.Firewrath wrote:hit could start scanning only when theres an enemy ship in sector, and only through the M5's race, to make it less intense, 'player race only' would probably be good,
(could also give it a range limit and only scan ships within that range)
so have it scan once, get the closest missile, then do an attack, and disable scanning while attacking because itd be useless then anyways, ...maybe an interrupt in the attack if a missile is targeting the M5, but eh,
if it loses its target missile, scan again and repeat.
On missile overkill: Its not only missile defense scripts, anything in with good flak coverage can survive sustained M7M volleys once the missile count drops. Might be more noticeable in XRM than vanilla due to turret mount arrangements. In my tests, with only XRM, cheat menu, and propmongler, almost all M2's survived with ~10-20% hull, regained full shields, and killed the opposing M7M. I'd assume the same applies to OWP, most M1, some M7's, and maybe a few others.
Adding overkill would help, but it doesn't need expensive missile hit rate tests, practically all that would do is adjust volley count to maybe save a few missiles, and that savings is wasted, and then some, if the resulting final kill volley isn't enough to do the job. Keep it firing full volleys until the target is destroyed.
Balancing that isn't the missile boat's problem. If regular defenses aren't enough, add a countermeasure script, balanced so its a contest of CM vs missile inventory, works well enough in other games. For example: A combo ECM, decoy, flak mine - use a nav sat dumb prop, when deployed parent ship script marks the CM position, gets incoming missile list, randomly redirects a couple to the CM, polls for it to be destroyed while those missiles exist, when its destroyed the remaining redirected missiles within ~1km of the marked position are destroyed. Probably a better way to do it, without polling like that, but, point. Missile script could help NPC's via telling them they're being attacked by a missile boat.
Haven't had time to do more testing, or much of anything else with X, should have some time this weekend...
Adding overkill would help, but it doesn't need expensive missile hit rate tests, practically all that would do is adjust volley count to maybe save a few missiles, and that savings is wasted, and then some, if the resulting final kill volley isn't enough to do the job. Keep it firing full volleys until the target is destroyed.
Balancing that isn't the missile boat's problem. If regular defenses aren't enough, add a countermeasure script, balanced so its a contest of CM vs missile inventory, works well enough in other games. For example: A combo ECM, decoy, flak mine - use a nav sat dumb prop, when deployed parent ship script marks the CM position, gets incoming missile list, randomly redirects a couple to the CM, polls for it to be destroyed while those missiles exist, when its destroyed the remaining redirected missiles within ~1km of the marked position are destroyed. Probably a better way to do it, without polling like that, but, point. Missile script could help NPC's via telling them they're being attacked by a missile boat.
Haven't had time to do more testing, or much of anything else with X, should have some time this weekend...
"Only the dead have seen the end of war." -Plato
-
- Posts: 8132
- Joined: Tue, 19. Apr 05, 13:33
Just a thought... is it possible that the crashes are not due to the missile boat script, but perhaps the changes made to CWP to accommodate M3Bs?
As the crash you experienced Litcube, happened when a missile boat spawned, that would suggest CWP rather than this script, and both were altered at around the same time...
As the crash you experienced Litcube, happened when a missile boat spawned, that would suggest CWP rather than this script, and both were altered at around the same time...
paulwheeler wrote:Just a thought... is it possible that the crashes are not due to the missile boat script, but perhaps the changes made to CWP to accommodate M3Bs?
As the crash you experienced Litcube, happened when a missile boat spawned, that would suggest CWP rather than this script, and both were altered at around the same time...
It's possible. I'm on site right now working, and I won't be flying back for another week or so. When I return, I'm going to run brute force testing on this thing, and come up with a cause.
I started playing XRM 4 days ago, I have found this topic because of CTDs.
All I can say is:
1. All CTDs seems to be random (every 6h or 5 min).
2. I use latest X3TC patch.
3. Scripts used: NPC Bailing Addon, CPC, JSON (All newest).
4. Game is not installed in default loc. It is DVD version, not Steam, no bonus pack.
5. My comp. is Dell Studio 1747 (6GB of ram, Win7pro 64bit).
6. ALL my CTD logs starts with:
7. Here is a full dump in zip: http://spectrum7.pl/pliki/x3/X3Crash.zip
P.S.
I'm ready for testing if necessary.
Rx
All I can say is:
1. All CTDs seems to be random (every 6h or 5 min).
2. I use latest X3TC patch.
3. Scripts used: NPC Bailing Addon, CPC, JSON (All newest).
4. Game is not installed in default loc. It is DVD version, not Steam, no bonus pack.
5. My comp. is Dell Studio 1747 (6GB of ram, Win7pro 64bit).
6. ALL my CTD logs starts with:
Code: Select all
Story call stack dump:
[000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)
P.S.
I'm ready for testing if necessary.
Rx
Hey Litcube, both Cadius pack and XRM introduce M3 size bombers (M3B)
I wonder if it would be possible to have some kind of script that check if M3B has no missiles and automaticaly force return to homebase/home ship?
For example:
1) M3B lock and loaded inside M1, homebase set to this M1
2) attack command for M3B (either manual or by fleet script)
3) M3B attack target A
4) M3B fire out all missiles --> force RTB script + save previous command
5) M3B return to M1.
6) If M3B has a setting to auto load missiles after dock it would reload and then initiated saved command (in this case attack target A)
7) script continue until:
a) M3B is destroyed
b) Target A is destroyed
c) home base/ship don't have any missiles to ressuply.
As to reduce CPU load I think that script shouldn't check conditions in real time, but once every 30-60 seconds.
Right now M3B are somehow limited in use coz:
- fully shielded and equipped they have like 10-20 missiles
- they often launch up to 4 missiles per salvo
- once they fire out missile they still attack like normal fighters, with poor results to M3B health, especiall when they attack capships they supose to deal with.
- it's pain in the ass to manually check if they have missiles and command them back to reload.
I wonder if it would be possible to have some kind of script that check if M3B has no missiles and automaticaly force return to homebase/home ship?
For example:
1) M3B lock and loaded inside M1, homebase set to this M1
2) attack command for M3B (either manual or by fleet script)
3) M3B attack target A
4) M3B fire out all missiles --> force RTB script + save previous command
5) M3B return to M1.
6) If M3B has a setting to auto load missiles after dock it would reload and then initiated saved command (in this case attack target A)
7) script continue until:
a) M3B is destroyed
b) Target A is destroyed
c) home base/ship don't have any missiles to ressuply.
As to reduce CPU load I think that script shouldn't check conditions in real time, but once every 30-60 seconds.
Right now M3B are somehow limited in use coz:
- fully shielded and equipped they have like 10-20 missiles
- they often launch up to 4 missiles per salvo
- once they fire out missile they still attack like normal fighters, with poor results to M3B health, especiall when they attack capships they supose to deal with.
- it's pain in the ass to manually check if they have missiles and command them back to reload.
-
- Posts: 2939
- Joined: Mon, 28. Feb 11, 19:50
r--x wrote:Code: Select all
Story call stack dump: [000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)
Where I can find this info, to check my own CTD problem, which again, seems totally random.
if the crash log is showing below, then its likely not CWP, but defintly cant rule out M3B's.paulwheeler wrote:Just a thought... is it possible that the crashes are not due to the missile boat script, but perhaps the changes made to CWP to accommodate M3Bs?
As the crash you experienced Litcube, happened when a missile boat spawned, that would suggest CWP rather than this script, and both were altered at around the same time...
Code: Select all
[000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)
[03538b]->[035fcd]#-26817(2023)[702].__runScript({19347562,0,3,7,{...},{...},0,3,{...},100,0,0,0}, {"Lib.Cmd.Turret.Barrage",44,"Lib Cmd: Main turret barrage",53,0,{...},{...},{...},{...},911}, 65542, -26817, {4,3}, 0)
[060427]->[0aa6fd]#-26817(2023)[2004].ShootMissileSECOBID(13870, 3, 29, 0)
i think it means the following: SECBOID: SEC( Sector ) BO( Body ) ID( Identification )
My best guess based on the code i have infront of me is that the error is occuring after the KC code calls a C++ API function of SA_ShootMissile with arg4 being null(0)
edit: scratch that, arg4 is set as 0 a few times when called, so its probably not that
There are no obvious errors within the KC code related to this function and a script call should never be able to crash the game - so its already an error in the engine itself by default - Notifying egosoft of these crashes would be a good idea, without a extreamly relyable test case its almost impsoable to poinpoint this type of error, if you wish to try:
Have Fun http://pastebin.com/HEy4JB4g
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
-
- Posts: 110
- Joined: Tue, 14. Feb 12, 13:00
Hello guys,
I have a questions... hope people can help...
using IR 15.29, enemy m7ms are now deadly as ever BUT can't be said about my own remotely controlled m7ms.... they are large dumb space hulks... any script to make my owned m7ms behave better?( i don't understand fully whether Litcube's script is only for NPC m7ms or for my m7ms... that's why..)
I have a questions... hope people can help...
using IR 15.29, enemy m7ms are now deadly as ever BUT can't be said about my own remotely controlled m7ms.... they are large dumb space hulks... any script to make my owned m7ms behave better?( i don't understand fully whether Litcube's script is only for NPC m7ms or for my m7ms... that's why..)
To Infinity, And Beyond!
Hello,ivanwong1989 wrote:.... they are large dumb space hulks... any script to make my owned m7ms behave better?
the script works for NPC ships and player ships.
If you run this script you need to set some options. You can find these options in the ship command console (key 'c') of the ship.
- Set the command of missile turrets of your m7m or m8 to "attack my target" or "kill all ememies". Your m7m will now launch missiles at the enemies, too. Don't confuse it with the '2. combat ...' menu. That's wrong. It's a turret command.
- Set the missile shot probability of the m7m from '5%' (default) to '100%'. This increases the missile fire rate.
You don't have to be on board of your m7m (or m8 ). But the script only works only for m7m that are in the sector as you are (In Sector)
---------------------------------------------------------
About the these Crash To Desktop (CTD) problems (the games crashes when running this script):
Code: Select all
Story call stack dump:
[000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)
[0354c8]->[03610a]#-43004(2142)[702].__runScript({16078717,0,2,3,{...},{...},0,2,{...},101,0,0,0}, {"Lib.Cmd.Turret.Barrage",50,"Lib Cmd: Main turret barrage",64,0,{...},{...},{...},{...},911}, 65542, -43004, {4,2}, 0)
[060564]->[0aa873]#-43004(2142)[2004].ShootMissileSECOBID(12, 2, 29, 0)
Am imserted check in the script file "Lib.Cmd.Turret.Barrage.xml", line 16 to 20, solves the problem.
Code: Select all
...
while [TRUE]
if is a new script version available
return 1
end
* check if ship is docked so the game does not crash
if [THIS]->is docked
= wait 30000 ms
continue
end
if not [THIS]->is in active sector
= wait 30000 ms
continue
end
...