[SCR] Missile Safety (v1.12)

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

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

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Version 1.12 released.

Another superficial bugfix but mostly...

installing all of the included AP files from the X3AP_Missile_Safety_AI subfolder should result in a performance gain for AP.

This is due to a restructuring of the main "escort" script in the game.
Instead of all 30 docked fighters permanently scanning for enemies, one of them scans for enemies. The others adopt the scan result.
Once this information becomes outdated, the first escort to do a "scan"... again updates it for everyone.

Also, if "many" fighters are docked at a carrier, each individual fighter will scan less often.
There is no actual downside. With "many" fighters, some will launch quickly. Others will randomly launch later... but the launch bays have to cycle their door animation anyway so it's not going to help if all fighters want to launch but cannot.
Another small game-wide performance gain. =)
(Many fighters = more than (max docking bays / 3 + 2) )

AI escorts that were created with the old script will keep it until they are destroyed and respawned. Eventually, this change will take hold throughout the game.
When starting a new game with this installed, all escorts start with the new script.



The way I tested the results (cursory =):
- start a new game of Humble Merchant
- Set SETA to 10 and fly waaaay outside the sector so there are no graphically induced slowdowns
- without stopping, check FPS in the outside / behind view

In vanilla I got around 48 FPS,
With all new scripts minus the turret script (the "mk3" files) I got 50 FPS.
All new scripts: 50-55 FPS.

The "effect" of the turret script can vary quite a bit, depending on how many ships with how many turrets are spawned in the sector.


It's not a world of difference but it's free...
It could have been more but.... I used part of the freed up CPU time to smarten up the AI a little more. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Bobucles
Posts: 2259
Joined: Fri, 25. Dec 09, 03:56
x3tc

Post by Bobucles »

A mod that makes missiles less crazy AND improves overall game performance? Mods like this should come standard!
When starting a new game with this installed, all escorts start with the new script.
Is there a mod that will basically reboot everything in the game world? I don't recall but I think Cycrow's cheat package can do it...
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Bobucles wrote:I don't recall but I think Cycrow's cheat package can do it...
If you're looking around, you can probably find a script to instantly kill every AI ship in the universe.
That's a scripter's idea of a reboot. =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Coruskane
Posts: 851
Joined: Fri, 13. Jun 08, 13:14
x4

Post by Coruskane »

cool updates. I will check them out!

It always frustrated me that that 100M $$$ of military hardware was unable to try and shoot down a missile aimed at a friendly ship. And escort ships have a useful extra point.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

An AI fleet no longer makes the impression of 1960's B-movie robots. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
sneakbyte
Posts: 27
Joined: Sun, 21. Feb 10, 07:36
x3tc

Post by sneakbyte »

EDIT: NVM forgot to copy the AI content folder in X3:AP sigh
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

I've just installed a couple of mods and a few scripts. All of them were recommended to work nicely with XRM and have proven to work together. I'll list what i have to make it clearer :)

X3:TC 3.1.1
Bonus Pack
XRM
Complex Cleaner
MBRR and pre-reqs
Lucikes library and Prospector
Logaines CSecG
Bounce
Claim Unknown Sector
Marine Repairs
NPC Bailing
Pure Hud
Salvage Claim Software
Phanon Corp
Pirate Base
Smart Turrets
Numeric Ranks
Missile Defence Mk2

and a couple of others by you.

Every time i start up a new game or load up a save of what is basically a new game i get a popup saying "Enter number of Missile volleys". No matter what I type in 0, 1, 10 etc, it keeps popping up. As soon as i disable this addon, the popup never appears.

Thought I'd mention it cos you updated recently and maybe it's related to that...... or I'm doing something wrong and not understanding something correctly :)
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

I've never heard of this happening in vanilla TC so it must be one of your other scripts.

The MS script does not generate any messages at all.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Spectre01
Posts: 465
Joined: Tue, 23. Dec 08, 10:15
x4

Post by Spectre01 »

I still say they should make this into the bonus pack.
qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie »

what Erenar describes happened to me too.

i installed both the missile safety script 1.12 and Mars Fire Control 5.20 at 31-12-2011 and i also run XRM. I only got it away by starting a new game,
my save games all started with that message "Enter number of Missile volleys". and indeed no matter what you type it keeps popping up.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

And I can't change that.

The MS calls
1. my own library to get a ship's model size (which calls no other scripts)
2. itself.

At no time does it ever call another script that might pop up a message.

If that happens then it's another script doing it for reasons of it's own.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

Hmmm ok :) Thanks for the quick replies. Now to work out what script/mod actually contains that message :)

Any tips on how to go about that? Would the editor have a search function i could run through each added file?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22437
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

the enter number of volleys message is from the standard missile barrage script
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

What do you think could be causing it to pop with xrm and missile safety enabled? Is there a way to stop it from popping?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22437
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

im assuming some script is issuing the command from somewhere.

the message is at the top of the command script, u could remove that to stop it from asking. But u'll need another way to enter the number of volleys.

the AP version doesn't it a different way so u could do something simlar to the TC version.


also, check if you have both an xml and pck for the command script.

!ship.cmd.missile.attack

if you have an xml, most likly u've installed something that makes changes to the script but its not being used because the pck still exists
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

Ok, so.... I think my laziness kicked me where the sun only shines occasionally.

I had installed the script as a full "Install Archive" through the mod manager (stable version). I am guessing that the manager also installed the AP AI files in the subfolder because after installing the 3 scripts manually.... all is working fine and dandy :)

Thanks for the pointers :) Attempting to look a little deeper into the issue alerted me to the pck files from the AI folder and made me consider the above possibility. Also noting that apparently AP uses 3 variables, TC 1... that alerted me to those AI files.

Edit Yep, all seems good, just went mental and let loose on the OTAS HQ and dealt with (until i got nuked) quite a number of ships and no popup! :D
Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr »

I've installed this (along with the AI files moved to the correct location) but I'm not seeing any difference whatsoever for NPC ships.
I wonder if I've misunderstood what it's supposed to do with regards to NPC ships?

My understanding was that it would make it so that missiles fired by NPC ships would have their collision detection disabled until they were at a particular range to prevent them being destroyed (and therefore exploding, taking the NPC ship out too); but that simply isn't happening in my game with Missile Safety installed and enabled in the AL options.

Instead, enemy missiles detonate when shot immediately after launching and I still end up destroying enemy ships because they were stupid enough to launch a Silkworm when at 25% hull or so.

The 1.1 patch made us get credit for those 'missile suicides' of enemy ships, but it still makes capping certain fighters far more difficult than it should be and a lot less fun.


I resolved this in the past by reducing the blast radius for all fighter-usable missiles to 500 in TMissiles.pck and that solves the problem by reducing the chance of the enemy fighters taking damage from their own early-detonated missiles, but it also screws with the effectiveness of various missiles that are supposed to have a large blast radius; so I'd much prefer another solution!

Any ideas, Gazz?
Last edited by Kvalyr on Thu, 19. Jan 12, 09:58, edited 1 time in total.
aka1nas
Posts: 1414
Joined: Thu, 7. Jul 05, 05:17
x4

Post by aka1nas »

I installed v.1.12 (and confirmed that the stock scripts were properly overwritten) with AP 1.1 and am also not seeing the script appear to do anything with NPC ships firing missiles. About 90% of my kills are coming from blowing up the NPCs missile inadvertently while shooting them. :(
User avatar
Charon_A
Posts: 105
Joined: Wed, 6. Nov 02, 20:31

Post by Charon_A »

Gazz, looks like a great script, thanks! :)
I do wonder however if it is safe to update the files that come with AP 2.0 with the ones from this script? Some of te files in the archive look older (have lower version) than the ones installed with AP 2.0+BonusPack.
Be careful about reading health books. You may die of a misprint.
---Mark Twain---
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

It's probably safe. There were no major AI fixes in AP patches.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

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