Litcube's Missile Boat Add-On (Turret:V0.92b / Supply:V0.93b)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Post by MegaBurn » Tue, 22. Nov 11, 13:21

Alright... Testing them now, spawned up all 6 in a wing with collisions disabled and destroyed a group of P's, nothing so far. Will spawn some more in various scenarios.

Edit, CTD. Spawned 12 of each for Xenon fodder, immediately crashed.
"Only the dead have seen the end of war." -Plato

paulwheeler
Posts: 8132
Joined: Tue, 19. Apr 05, 13:33
x3tc

Post by paulwheeler » Tue, 22. Nov 11, 13:49

Maybe its total numbers of missile boats in sector thats causing the crashes... Try spawning 12 M8s and 12 M7Ms and see what happens.

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Post by MegaBurn » Tue, 22. Nov 11, 14:16

CTD on 1 acinonyx, xenon, vs a wing including an acinonyx, doesn't repeat though. Not sure group size matters, did fleet tests earlier with M7M.

Edit, more tests, including a 20 acinonyx (xenon) vs 20 ariadne (kha'ak) spawned on top of each other, resulting in a cool looking daisy chain of explosions.

Starting to think those two CTD's were coincidences, last two CTD's also happened in Omicron Lyae, where I'm idling to see if it happens again, and it might have... Wasn't paying much attention to other stuff in sector when I spawned those M3B's.

Edit2, repeated dozen of each test from earlier, no CTD.

Edit3, lost my M3B wing to the 66 spawned M3B, deployed G, skinir, and tobosaku B for clean up, then spawned 50 gladiators, went fine for a bit, about half were destroyed, then CTD, crash log looks a bit different... I have all 5 logs for reference, 1 and 5 are about the same, 2,3,4 are about the same, and the only significant difference I can see is, unfreeze this script vs start turret script kill all enemies.

Continuing idle test, see if spawning stuff was a coincidence, last three happened off of the same save game, and all 5 in the same sector...
"Only the dead have seen the end of war." -Plato

BlackFire
Posts: 88
Joined: Fri, 31. Oct 03, 21:31
x3tc

Post by BlackFire » Tue, 22. Nov 11, 18:36

I don't think it has anything to do with player ships, it was happening when I didn't even own a m7. Does the script reference specific missiles or just turrets? If missiles, maybe the changes to them in xrm are what's causing it. If it's trying to launch a tommahawk from ships that can't fire them anymore for instance.

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Post by MegaBurn » Tue, 22. Nov 11, 23:09

Didn't see anything in the scripts, its dynamic, more CPU intensive that way but flexible. Though its bias for max damage probably excluded swarms from most (all?) of my tests. Did a swarms only 20 vs 20 test in an unknown sector, no CTD, but it looks like they all ran out of missiles (100 each) before making a missile kill, several collisions though. Spawned a Valhalla for "resident sector monster" style clean up.

Edit, spawned 50 each M7M, M8, M3, and CTD, similar to 2, 3, 4, "start this script ... turret kill all enemies". Can only guesstimate its failing outright in some cases, immediately freezing in others, and its a very narrow set of conditions. Only thing significant at this point is its the first crash outside of Omicron Lyrae, in Unknown Sector 18-16, and third to occur immediately on spawn.

Edit2, CTD 7, 50 random M7M for Xenon, crashed immediately on spawn.
"Only the dead have seen the end of war." -Plato

acgabs
Posts: 38
Joined: Sat, 19. Nov 11, 15:01
x3tc

Post by acgabs » Wed, 30. Nov 11, 16:52

Hello!

I'm having a slight problem with this script (running it together with the XRM), that is, I'm not sure whether this is intended or not, also a few questions.

Problem: This turned up earlier, but really only was that annoying now. I was doing the Goner missions, in the last mission there is a big pirate orbital weapons platform in the system. I set the missile "turrets" in my M7M to attack my target, then selected the weapons platform.

It started with a volley of 10 missiles, then shortly after that another volley of 10 missiles. Of those a bunch broke through the weapon platform's defenses and reduced it to about 1/3 shield strength. What happened next was (I assume) the M7M calculated remaining shield strength/hp of the defense platform and concluded it didn't need that many missiles anymore, thus proceeding to fire them off in salvos of 2s and 3s... the result being they all got shot down way before coming anywhere near their target.

It proceeded thusly, wasting a bunch of missiles, until the platform had it's shields regenerated enough to warrant "big" missile salvos and the cycle started again.

Question: Is it possible to somehow manually dictate how many missiles are fired in a salvo?

Unrelated question: My M7M seems to be only using Hammerhead torpedoes, no matter the target really. M5s it uses those anti fighter swarm missiles against, but anything slower gets a torpedo. This is pretty annoying as I don't really want to waste them against a swarm of M4s and M3s. Is there any way to force the ship to use a different kind of missile?

Third question, somehow connected to the two above: The ship generally doesn't fire volleys at fighters as their hitpoints are pretty low. Is there a way to make it fire volleys of anti-fighter swarm missiles?

Thanks in advance for the answers!

Christoph

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Wed, 30. Nov 11, 17:31

@acgabs:

Thanks for taking the time to report that. It's a little tough to design a script that will meet everyone's expectations as to how a missile boat is supposed to behave. If you look on the XRM thread, you'll find a different method for everyone who took the time to write one. I want to avoid configurations, this is supposed to be clean and simple.

Also, read the first page for missile selection.

I might end up just writing two or three different versions.

@MegaBurn:

I experienced a crash a few days ago. Upon spawn of an M8. It happened. It happened to me. I think it's upon spawn, so I'll write a test script to replicate the scenario.

It'll be interesting to find out what's going on. The script itself isn't causing a crash. The script is, however, bringing to surface something unstable within missile launching. I'll see if I can narrow down which part is doing that.

Sn4kemaster
Posts: 1014
Joined: Wed, 17. Jun 09, 18:29
x4

Post by Sn4kemaster » Wed, 30. Nov 11, 21:23

acgabs wrote:Hello!

I set the missile "turrets" in my M7M to attack my target, then selected the weapons platform.

It started with a volley of 10 missiles, then shortly after that another volley of 10 missiles. Of those a bunch broke through the weapon platform's defenses and reduced it to about 1/3 shield strength. What happened next was (I assume) the M7M calculated remaining shield strength/hp of the defense platform and concluded it didn't need that many missiles anymore, thus proceeding to fire them off in salvos of 2s and 3s... the result being they all got shot down way before coming anywhere near their target.

It proceeded thusly, wasting a bunch of missiles, until the platform had it's shields regenerated enough to warrant "big" missile salvos and the cycle started again.
Litcube i noticed this too when the new missile script came out, obvioulsy the script is running as it should.

The problem that i can see is that this script is perfect if your not running say MDMK2.....then is very well weighted and allows the target some chance to fight back and the missile boat not to waste missile's.

But if (as most people in XRM are) you are running a anti-missle turret script like MDMk2...then the above situation can/does happen.

So really i would have thought just 2 version's should be available, one vs Vanilla turrets and another vs Anti-missile turrets, if you see where i am coming from.

Maybe the anti-missle turret version of the missile barrage script should not reduce the number of missiles fired depending on the shield strength of the target, but simply fire full salvo's but with slightly longer gaps in-between salvo's, this would mean that some missile's always got through but still give the victim the chance to run/fire back?

Just an idea anyway :)

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Wed, 30. Nov 11, 21:42

Missile defence scripts have the primary objective of destroying all missiles, and now I'm asked to adjust the script, because lord have mercy, the missile defence script is destroying all of the missiles.

I'm not being a dick, I'm just highlighting the irony of all this. If I do this, up the throughput of missiles, Gazz will be asked to release MD MK3, because "all my missiles are getting through".

:)

I'll throw a spam version up when I get home.

Sn4kemaster
Posts: 1014
Joined: Wed, 17. Jun 09, 18:29
x4

Post by Sn4kemaster » Wed, 30. Nov 11, 22:04

Some people like Missile Boats dangerous, others don't like the idea of their M2+'s getting blown up by one......you will never please everyone.

Like i said, i noticed this behaviour from when the new version came out many weeks ago but never mentioned it, ive just put forward a possible answer as some have players noted it in XRM over the weeks, and now someone in your thread!

Its no great shakes either way as the script is way better than Vanailla either way :wink:

acgabs
Posts: 38
Joined: Sat, 19. Nov 11, 15:01
x3tc

Post by acgabs » Wed, 30. Nov 11, 23:59

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 :)

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 1. Dec 11, 00:09

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.

HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake » Thu, 1. Dec 11, 03:52

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! :D But that's what popped into my head.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 1. Dec 11, 15:26

There's no reliable way to track missile success once they're launched. Even if you had all the script cycle room in the world.

Firewrath
Posts: 121
Joined: Fri, 3. Aug 07, 05:49
x3tc

Post by Firewrath » Thu, 1. Dec 11, 15:47

just curious,
you mean theres no way to get like a list of missiles in the sector and their targets?

cause, if not, Demmit, >.<
there goes my missile hunting M5 script, =/

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 1. Dec 11, 15:57

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.

Firewrath
Posts: 121
Joined: Fri, 3. Aug 07, 05:49
x3tc

Post by Firewrath » Thu, 1. Dec 11, 16:08

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.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 1. Dec 11, 16:11

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.
Yup, those are good saving features.

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Post by MegaBurn » Fri, 2. Dec 11, 11:10

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...
"Only the dead have seen the end of war." -Plato

paulwheeler
Posts: 8132
Joined: Tue, 19. Apr 05, 13:33
x3tc

Post by paulwheeler » Fri, 2. Dec 11, 15:05

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...

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”