
[SCR] Smart Turrets v4.7.2 (AP, 05-04-14), v2.6 (TC, 21-08-13)
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 123
- Joined: Thu, 21. Feb 08, 23:39
-
- Posts: 124
- Joined: Sat, 30. Apr 05, 12:19
I'm seeing something strange when using the TC version with the latest version of XTC (2.1). Smart commands show up as 'unknown command!' if I set them on a ship in a different sector to my player ship. If I then enter the system containing that ship, the commands show up properly - and continue to do so if I leave the sector.
I've tried reinstalling the script to no avail. Could there be something in Xtended Terran Conflict that's causing this?
I've tried reinstalling the script to no avail. Could there be something in Xtended Terran Conflict that's causing this?
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
Confirmed. I've uploaded fixed versions for TC and AP.
The command ID fields of the scripts were bad. While the fields look OK in X-Studio (e.g. Command: GLEN_SMART_TURRET_OFFENSE), loading the script via in-game editor shows the ID instead of localized command name.
When running a turret script the game displays the command ID configured in the script. It'll always be the bad ID. However Smart immediately sets its own command ID when the turret script starts so this isn't noticeable.
The reason this only manifests OOS is that the game will not run turret scripts when OOS. It simply displays the script's command ID and remembers which script is assigned, only running it when the ship is in the active sector.
The command ID fields of the scripts were bad. While the fields look OK in X-Studio (e.g. Command: GLEN_SMART_TURRET_OFFENSE), loading the script via in-game editor shows the ID instead of localized command name.
When running a turret script the game displays the command ID configured in the script. It'll always be the bad ID. However Smart immediately sets its own command ID when the turret script starts so this isn't noticeable.
The reason this only manifests OOS is that the game will not run turret scripts when OOS. It simply displays the script's command ID and remembers which script is assigned, only running it when the ship is in the active sector.
-
- Posts: 124
- Joined: Sat, 30. Apr 05, 12:19
-
- Posts: 400
- Joined: Thu, 2. Jul 09, 14:34
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
Laser switching has a side effect of resetting refire delays on turret or maingun gun slots. This isn't noticeable on the turrets because Smart regulates the rate of fire, but since the main guns are manually fired it's at the mercy of how frequently the game engine itself will fire the guns when pushing the fire button.
The effect is not noticeable with fighters which use rapid-firing lasers because periodic switching yields only a minor deviation in rate of fire, but it starts to become noticeable with heavier corvette weaponry, and becomes eminently noticeable with slow firing capital ship weapons.
There's nothing I can do about it directly. The main gun script must re-evaluate the equipped lasers periodically, and with a high frequency to be responsive enough in a dogfight. Re-evaluating equipped lasers requires swapping in lasers to test whether they can hit, and this causes the fire delay to reset.
I posted a request for a scripting features to avoid this problem in the L3 general forum ("Scripting features I'd like to see") in July. I've not had a direct response on the thread, though it's possible changes might creep in via patch that I haven't read, since I'm not playing X at the moment.
So either avoid using this on capital ships or enjoy the rate of fire increase
The effect is not noticeable with fighters which use rapid-firing lasers because periodic switching yields only a minor deviation in rate of fire, but it starts to become noticeable with heavier corvette weaponry, and becomes eminently noticeable with slow firing capital ship weapons.
There's nothing I can do about it directly. The main gun script must re-evaluate the equipped lasers periodically, and with a high frequency to be responsive enough in a dogfight. Re-evaluating equipped lasers requires swapping in lasers to test whether they can hit, and this causes the fire delay to reset.
I posted a request for a scripting features to avoid this problem in the L3 general forum ("Scripting features I'd like to see") in July. I've not had a direct response on the thread, though it's possible changes might creep in via patch that I haven't read, since I'm not playing X at the moment.
So either avoid using this on capital ships or enjoy the rate of fire increase

-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
Hey Shimrod, noticed that when I tried to broadcast a turret command, it only worked by broadcasting to 'All' types.
I.e. I bought some fresh TS ships. I wanted to set all my new ships for SMART Defense so I used one of the TS's, went to SMART, and broadcasted it to 'Freighters'; the menu returned to the main SMART menu but nothing was processed.
I.e. I bought some fresh TS ships. I wanted to set all my new ships for SMART Defense so I used one of the TS's, went to SMART, and broadcasted it to 'Freighters'; the menu returned to the main SMART menu but nothing was processed.
I fly an OWP. What about you?
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
I suspect the problem is when the ships are docked at the shipyard, 'all ships in sector' scope doesn't find them. Same goes for ships docked at other ships.
If I buy 2 TS, tell them to idle in sector, then broadcast: defense, freighter, all ships in sector, they're assigned the command.
Fixed in 4.6.2.
4.6.2
- Fix 'all ships in sector' broadcast not finding docked ships.
If I buy 2 TS, tell them to idle in sector, then broadcast: defense, freighter, all ships in sector, they're assigned the command.
Fixed in 4.6.2.
4.6.2
- Fix 'all ships in sector' broadcast not finding docked ships.
-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
Great thanksShimrod wrote:I suspect the problem is when the ships are docked at the shipyard, 'all ships in sector' scope doesn't find them. Same goes for ships docked at other ships.
If I buy 2 TS, tell them to idle in sector, then broadcast: defense, freighter, all ships in sector, they're assigned the command.
Fixed in 4.6.2.
4.6.2
- Fix 'all ships in sector' broadcast not finding docked ships.

I fly an OWP. What about you?
-
- Posts: 384
- Joined: Thu, 31. Mar 11, 20:48
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
-
- Posts: 384
- Joined: Thu, 31. Mar 11, 20:48
-
- Posts: 127
- Joined: Tue, 19. Feb 13, 04:20
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
In general I found beams to be least effective vs fighters, making only brief contact with the moving target. Therefore beams are arranged lowest in the anti fighter order of preference.
Smart uses a generic algorithm to determine the best laser for a given target, primary factors being target ship's class, speed and distance. It doesn't contain any mod specific hard coding.
Code: Select all
495 | * Antifighter list is arranged in order:
496 | * Head: Least preferred (Beams)
497 | * Middle: Everything else
498 | * Tail: Most preferred (PSG)
-
- Posts: 127
- Joined: Tue, 19. Feb 13, 04:20
They are, compared to anti-fighter weaponry. But at range (~5km), they do a much better job than PPCs shooting in the wind (or at friendlies). I found the Ion Canon to be most effective for stripping the heaviest M3 from its shields on a good hit, which leaves the poor fella in a very bad situation when my fighters show up.
-
- Posts: 1021
- Joined: Fri, 25. Nov 05, 16:05
I have to agree, it's the only beef I have with the otherwise perfect Smart Turrets. Beam weapons (with the exception of the PALC in XRM, CMOD et cetera) aren't by far as effective as dedicated flak weapons, but where a PPC would never hit, a plasma, ion and especially tri-beam has a somewhat decent chance to. Given how the beam bullet works, it's likely the contact will be brief, yes, but in XRM and similar mods beam weapons are balanced to be anti cap ship weapons, thus that brief contact can be enough to vaporize a fighter if you are lucky.Lakz wrote:They are, compared to anti-fighter weaponry. But at range (~5km), they do a much better job than PPCs shooting in the wind (or at friendlies).
It's definitely not energy efficient, but if you have very specialized weapon compatibility on turrets (in XRM, for instance, front and rile turrets usually only mount heavy weaponry, flak weapons are often limited to rear and updo turrets), it's better than nothing. Definitely better than wasting the same energy on PPC/PSP salvos against an M3 at more than 3 km.
-
- Posts: 907
- Joined: Tue, 18. Feb 03, 01:43
I wonder if beams are best for every scenario.
There's the case where fighters are flying in to attack you. If they're heading in a straight line arguably both beam and PPC would be just as effective, assuming the ship isn't knocked off course (CIG?) or beings manoeuvring.
Another case is when you're flying away and fighters are dogging your heels, where they typically sway around and evade ppc fire at the rear. Beams seem like the better choice over PPC in this case.
Another case is when doing a combat mission, you fly towards the enemy who is either:
a. Flying towards something, in a straight path
b. Engaged in combat with something, flying all over the place.
For a. I wonder if a PPC volley is the better choice as it can kill the target outright, whereas being tickled by a beam might cause it to change course.
In b. I wonder if we shouldn't hold fire altogether unless we're likely to hit it, on the basis that it's typically dangerous to launch PPC into a mass of ships where you could easily hit friendlies. I find it's very difficult to hit fighters that are dogfighting with some other ship than your own.
I might get to play some X this month during Xmas (no pun intended) PTO. If I do then I'll go with XRM.
There's the case where fighters are flying in to attack you. If they're heading in a straight line arguably both beam and PPC would be just as effective, assuming the ship isn't knocked off course (CIG?) or beings manoeuvring.
Another case is when you're flying away and fighters are dogging your heels, where they typically sway around and evade ppc fire at the rear. Beams seem like the better choice over PPC in this case.
Another case is when doing a combat mission, you fly towards the enemy who is either:
a. Flying towards something, in a straight path
b. Engaged in combat with something, flying all over the place.
For a. I wonder if a PPC volley is the better choice as it can kill the target outright, whereas being tickled by a beam might cause it to change course.
In b. I wonder if we shouldn't hold fire altogether unless we're likely to hit it, on the basis that it's typically dangerous to launch PPC into a mass of ships where you could easily hit friendlies. I find it's very difficult to hit fighters that are dogfighting with some other ship than your own.
I might get to play some X this month during Xmas (no pun intended) PTO. If I do then I'll go with XRM.
-
- Posts: 1021
- Joined: Fri, 25. Nov 05, 16:05
Generally speaking, there's another difference from vanilla to keep in mind in XRM (and CMOD4, on which it's based): PPCs won't probably kill an M3 in a single lucky hit. Most weapons have been nerfed overall, cap ship ones especially, and ships themselves strengthened, to make it so fleet battles can last longer and be more cinematic. Where in vanilla a couple PPC broadsides would nuke an M7, in XRM it would be a battle lasting minutes. This also makes flak coverage even more imperative, as you can't really count on the lucky hit from an heavy weapon on a small target (plus, ships in XRM are on average much faster, that hit would have to be REALLY lucky).
Basically, XRM heavily specializes everything, considering turrets too have precise roles with their limited weapon compatibility. As such, a turret that for instance can only mount either PPCs or Plasma Beams, would work much better with the latter against a small target: unless you are quite lucky, neither would probably kill an M3 in a single hit, but the plasma beam being sort of instahit kinda guarantees that at least some damage is dealt before the M3 gets closer and into range of the more adequate flak turrets.
Paul has also fiddled with the actual bullet size to add another way to differentiate between weapons: even with beams, the heavier ones have less chances to instahit a small target at long range because of their size/hitbox, while the Tri-Beam is less powerful but has a decent hit ratio, striking a good middle ground. I doubt Smart Turrets can do anything to detect that, though.
As for friendly fire danger, when it comes to beams it can also depend a lot on whether the turret is a front or a side one. As the bullet is a constant stream of a couple seconds duration with a mid-long range (in XRM beams usually have around 6km range, as opposed to the ~8km+ of PPCs and similar), when fired from a side turret by a ship that is maneuvering the beam has many chances to hit unintended targets as its trajectory changes with the ship steering (even stations: the beam might be allowed to fire by Smart Turrets as it hadn't that friendly station in its line of fire at first... but trough steering a second later there it goes, blasting the poor factory).
Front mounted ones are less dangerous, at least when you are piloting the ship, for the simple reason you can manually keep an eye on where they are firing and correct your steering if they are going where they weren't supposed to.
From that point of view, PPCs might be on average less effective but safer on right/left turrets. Which is actually what I pretty much forced my current modded game (CMOD4 + a self made tships/tcockpits) to do: I gave beam compatibility to front turrets only, while the side ones are limited to the more common PPCs et similia.
Basically, XRM heavily specializes everything, considering turrets too have precise roles with their limited weapon compatibility. As such, a turret that for instance can only mount either PPCs or Plasma Beams, would work much better with the latter against a small target: unless you are quite lucky, neither would probably kill an M3 in a single hit, but the plasma beam being sort of instahit kinda guarantees that at least some damage is dealt before the M3 gets closer and into range of the more adequate flak turrets.
Paul has also fiddled with the actual bullet size to add another way to differentiate between weapons: even with beams, the heavier ones have less chances to instahit a small target at long range because of their size/hitbox, while the Tri-Beam is less powerful but has a decent hit ratio, striking a good middle ground. I doubt Smart Turrets can do anything to detect that, though.
As for friendly fire danger, when it comes to beams it can also depend a lot on whether the turret is a front or a side one. As the bullet is a constant stream of a couple seconds duration with a mid-long range (in XRM beams usually have around 6km range, as opposed to the ~8km+ of PPCs and similar), when fired from a side turret by a ship that is maneuvering the beam has many chances to hit unintended targets as its trajectory changes with the ship steering (even stations: the beam might be allowed to fire by Smart Turrets as it hadn't that friendly station in its line of fire at first... but trough steering a second later there it goes, blasting the poor factory).
Front mounted ones are less dangerous, at least when you are piloting the ship, for the simple reason you can manually keep an eye on where they are firing and correct your steering if they are going where they weren't supposed to.
From that point of view, PPCs might be on average less effective but safer on right/left turrets. Which is actually what I pretty much forced my current modded game (CMOD4 + a self made tships/tcockpits) to do: I gave beam compatibility to front turrets only, while the side ones are limited to the more common PPCs et similia.