[SCR] Smart Turrets v4.7.2 (AP, 05-04-14), v2.6 (TC, 21-08-13)

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
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Rate of fire from tlaser :

PBE 1153.8 rds/min - raw 52
PPC 200 rds/min - raw 300

I cant say I understand that.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

PBE: 1000 / 52 * 12000 = 230,769 shield DPS
PPC: 1000 / 300 * 50000 = 166,666 shield DPS

PBE: 1000 / 52 * 5000 = 96,153 hull DPS
PPC: 1000 / 300 * 10000 = 33,333 hull DPS

So Smart will never pick PPC over the modified PBE when in range as the PBE has faster bullets and better DPS.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

@Black147: I'm downloading XRM 1.19 to try and repro the OWP issue.

I plan to start out in an invincible bragi with all races hating me and tour all sectors containing an OWP, with Smart NPC mode enabled for enemy and friendly.

Will I see this behaviour on any NPC OWP in the universe after starting a game and enabling Smart NPCs, or do I need to do something special? I'm unfamiliar with the XRM ship creation config script mentioned.

If this has something to do with XRM adding lasers as default equipment like with the PAR ships, that might indeed be a problem. Smart doesn't support PAR ships. My PAR experimentation in TC.

-----

Results

Teladi medium OWP, Overmaster's Talon

* I approached it and was shot with PPC only. Scanning it I saw only PPC. I then scripted onto it every supported laser using my own equip script (you can find 'glen.lib.equip' and companion scripts in the Custom Start download).
* Once equipped it shoots me consistently with Ion Cannon (3km range).
* I p2p jumped to 8km distant and its now shooting me consitently with PSGs.
* I closed and once I reached 6km range it switches again to ion cannons.
* Smart is definitely running on it confirmed by tracing.

This looks fine to me. I'll go check out another OWP.

Yaki large OWP, Weaver's Tempest

* Played out identically. Except it tried harder to kill me.
* Only had PPCs installed initially and 10 random ion distruptors in bay. I scripted in some extra stuff.
* Opened up with gauss cannon at 9-10km
* Switched to PPC as I closed to 8km
* Switched to PSG's at 7km
* Ended test

Also looks fine. Conclusion: not reproducible in an obvious way, will need additional guidance.
User avatar
Black147
Posts: 94
Joined: Sun, 23. Jan 11, 14:45
x3ap

Post by Black147 »

I'm unfamiliar with the XRM ship creation config script mentioned.
No, nothing special. It just equips ships based on several parameters. I added more lasers to that, that´s all. Your script should work fine: just give it a bunch of lasers to choose from that´s all I did as well.

Hmm, thanks for your checking. I´ll continue to observe other huge ships and OWPs and see if I can reproduce it and under which conditions.

With SMART enabled and switching enabled, will SMART switch to a small laser if it detects a missile incoming? Ie would it use a PRG to shoot at the missile and then switch back to bigger guns? I´d assume so and I do not remember whether the Q was shooting a lot of missiles during the encounter ... will check that possible explanation out.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Yes it'll switch lasers for missiles. Each turret gun might pick a different laser to shoot a missile with depending on range to and type of missile. It'll shoot missiles while continuing to fire on the primary target, dividing its time in a way I recently described.
Nashnir
Posts: 30
Joined: Wed, 2. Jun 10, 16:20
x4

Post by Nashnir »

I have many mods installed.
The major one being
XRM 1.19e
Also have the latest Smart Turret

Currently using the Argon M2 Atlas ( I believe XRM added this ship )
My loadout is as follows
Front : Photon Pulse Cannon
Left and Right : Plasma Beam Cannon
Top, Back and Down : Cluster Flak Array

Am using the Default global setting and using Custom Turret setting with the following
Offensive
Laser switching off
Bail only

The problem is the left and right Turrets track but do not fire especially at Fighters upto M6 like the Xenon P.
Dunno what the problem is.
Can someone help ?


Edit:
Solved the problem. I removed the "Bail only" Option and now it is fine :)
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

My favourite kind of issue, problem and solution all rolled into one :)

Man, the resolution on AP looks so sharp after playing Ultima 4.
gleak
Posts: 37
Joined: Sat, 20. Oct 12, 12:55
x3tc

Post by gleak »

Hi ,

@nashnir:
my guess is if you don't enable laser switching, you don't benefit of energy management . and so , your weapon don't have enough energy to shoot.


i have a question about this mod.
we know OOS and IS fight math aren't the same. does SMART mod take care of that, and populate maximum of the turret when OOS ?
i want to know if i must switch back to vanilla action for my OOS ship and keep smart enable only for IS
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Yes Smart has special OOS logic, as follows:

TC version: fills turrets when OOS with best OOS laser available (highest shield dmg per shot IIRC)

AP version: When not in combat fills the turret with best OOS. When in combat it'll switch lasers between best OOS shield or hull DPS depending on condition of target shields.
StoogeR
Posts: 44
Joined: Wed, 18. Jul 07, 17:20
x3tc

Post by StoogeR »

I have a problem with SMART and "collect wares in sector" command. When smart is running on my turret (TS ship) and I tell my ship to collect wares in sector, it starts "teleporting" all crates to my cargobay (yeah its nice but... not intended, right?) one after another. Even crates beyond my radar range. I can clean up whole sector after big battle in minute or two.
All returns back to normal when I disable SMART on my turret.

I'm playing AP + XRM, SMART and marine repairs scripts, nothing more.
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

hey.. i have a question regarding the v2.2 version of this script but i cant find the topic so i hope you dont mind me asking it here..

i created two lasers, one with only hull dps (0 damage to shields) and one with only shield dps (0 damage to hulls)

i installed both on a ships turrets and when i tell the turrets to do smart offence something strange happens..

the turrets chose the hull laser to shoot at the shields and vice versa.. as soon as the shields are down (i helped a bit in this test) they switch to the anti shield laser and start fireing at the targets..

i tried training the lasers but it dont give any noticable results..

is there something wrong..? something im missing..?

thanks for this awesome script btw, had a lot of fun with it already.. :D
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

I have a problem with SMART and "collect wares in sector" command.
I've reproduced this. I started a mistral collecting wares 20km away from cannisters of mosquito missile and it beams them on board instantly, with some seconds delay in between each cannister.

Analysis
This is what I see in the script debugger:

1 !move.collectware.xml executes up until the following instructions on task 0:

Code: Select all

069   |||$time = 45000
071 @ ||$ret = [THIS] -> move to ware object $wareobj for collecting: timeout=$time ms
2 A turret script then fires (task 1 in my case), looks for work and goes back to sleep again.

3 The 'move to ware object' command running on task 0 is apparently awakened when the task 1 script goes to sleep, causing move.collectware.xml to continue and execute the following code.

Code: Select all

072   ||if $ret == FLRET_FIREFREE
074   |||$sectorowner = [SECTOR] -> get owner race
075   |||if [OWNER] != Player AND [OWNER] == $sectorowner AND ! $is.astronaut
088   |||$catchedamount = [THIS] -> catch ware object $wareobj
089   |||return $catchedamount
Conclusion

'move to ware object' behaviour appears dubious because it returned FLRET_FIREFREE when it is actually nowhere near the object. I'd expect it to report a timeout or interrupt instead.

'catch ware object' behaviour appears dubious because it beamed the cargo aboard from 20km instead of collecting it via flight. The name of the command suggests its meant to make the ship move and scoop it up rather than beam it.

Certainly if some particular behaviour in Smart's turret loop can be demonstrated to be the cause of this bizarre behaviour I can look into how to fix it. Unfortunately I've no idea why the task 1 script entering a wait should cause the task 0 'move to ware object' to awaken with that dubious FLRET_FIREFREE returncode, nor why 'catch ware object' should then decide to teleport the cargo from 20km away.
Last edited by Shimrod on Mon, 28. Jan 13, 01:15, edited 1 time in total.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

i created two lasers, one with only hull dps (0 damage to shields) and one with only shield dps (0 damage to hulls)

i installed both on a ships turrets and when i tell the turrets to do smart offence something strange happens..
Confirmed. The TC version 2.2 is picking the hull lasers vs shields on non-huge ship classes. The AP version 4.4 doesn't have this problem.
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

Shimrod wrote:
i created two lasers, one with only hull dps (0 damage to shields) and one with only shield dps (0 damage to hulls)

i installed both on a ships turrets and when i tell the turrets to do smart offence something strange happens..
Confirmed. The TC version 2.2 is picking the hull lasers vs shields on non-huge ship classes. The AP version 4.4 doesn't have this problem.
is there a solution for this..? i realy like SMART for my turrets but im playing Xtended so i need the TC version of the script..
garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 »

I've discovered a weird bug today, having all turrets set to capture (AP) occasionally one of the turrets will go nuts and launch a continuous stream of shots until energy is depleted, totally annihilating its target, it completely ignores the fire rate of the weapon for example with PSP I will have a continuous stream of psp rounds almost looking like a beam weapon. For a good while I had been using your script on the front mounts and mars on the turrets, I have switched to everything covered by smart and the front mounts are not behaving as they did previously...
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

I'll update 2.2 when I get a free evening. No workaround, it sounds like the weapons script is picking from the wrong array in the majority of target type cases.

Hey garrry, long time no bugs. I'll keep an eye out for the psp annihilation beam effect, that's a new one on me. If it's readily reproducible on your end then I might be able to see what's going from Smart's debug logging that can be enabled from the menu.

I guess either a laser refire delay is coming out very small, or a very active script is causing interrupts on the turret task causing the waits between shots to be truncated.
garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 »

wasn't just psp, it has happened with other weapons, what do you need me to do just enable the logging and send it to you?

I haven't really played since the summer due to housing issues, got my new rig built so I'm trying to reignite the flame lol
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Sure you could PM me a log segment.

I haven't played X for ages either, just stopped in to check on any issues reported in my script threads. I can't even remember where the log file is generated for Smart offhand, but I do remember it's got 9050 in the filename :)

If I get back into it, since there's still a year to go for Elite 4, I was toying with the idea of using the onboard marines to produce up to say a 10% bonus rate of fire on Smart enabled turrets, depending on filled marine capacity. The idea being the extra hands increase efficiency. The higher ROF would of course have an equivalent percentage increase in laser energy drain.
garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 »

I'll see if I can get that done tonight, I have a bit of tinkering to do inside hardware wise first, hopefully I will have my gamer mind-set flowing afterwards...
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

I've uploaded a TC version 2.3 that should fix picking the hull lasers vs shields and vice versa vs non-huge ships.

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