[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

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

That's great to hear. If I were Xenon I'd start making doughnut shaped capital ships to counter this threat :)
User avatar
PromX
Posts: 123
Joined: Thu, 21. Feb 08, 23:39
x4

Post by PromX »

Shimrod wrote:That's great to hear. If I were Xenon I'd start making doughnut shaped capital ships to counter this threat :)
Thanks for the laugh and also for the nice update :)
Pierre'70
Posts: 124
Joined: Sat, 30. Apr 05, 12:19
x4

Post by Pierre'70 »

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?
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

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.
Pierre'70
Posts: 124
Joined: Sat, 30. Apr 05, 12:19
x4

Post by Pierre'70 »

Thanks for fixing this Shimrod. It's working fine now.
User avatar
TheRealBix
Posts: 400
Joined: Thu, 2. Jul 09, 14:34
x4

Post by TheRealBix »

Hi there, really nice script :)

Can you give us more infos on the "maing gun" command ?

When I fire my PPC in the Pteranodon, it's like a machine gun of projectiles !! It's really deadly, and it's cool, but I don't think that's the desired effect of the command ^^' It has the fire rate of the HEPT
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

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 :)
User avatar
TheRealBix
Posts: 400
Joined: Thu, 2. Jul 09, 14:34
x4

Post by TheRealBix »

Thanks for your answer !

Actually I think i'll use or not the command, depending on my mood of the day. (poor Xenons.. :p)

I'll also take a look to the L3 forums.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

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 fly an OWP. What about you?
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

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.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

Shimrod 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.
Great thanks :)
I fly an OWP. What about you?
Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein »

i am getting readtext errors, no smart menu is visible.
im playing the german version of ap with xrm and a lot of others mods but they all work fine and the english mods are just shown with english text.

any ideas what could cause that?
Ofc ***modified***, modders doing what Egosoft cant.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Smart contains only English strings. To get it working on German using English text:

1. Copy 9050-L044.xml to 9050-L049.xml
2. Edit 9050-L049.xml, change:

<language id="44">

to

<language id="49">

I must remember to bundle some English-on language files.
Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein »

thx, i thought its because of the language setting but wasnt shure because all other english mods worked.
Ofc ***modified***, modders doing what Egosoft cant.
Lakz
Posts: 127
Joined: Tue, 19. Feb 13, 04:20

Post by Lakz »

Is Smart Turret tailored for XRM? My capitals are using PPCs to shoot at M3s instead of their heavy bean weapons.

edit : heavy beaM :)
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

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.

Code: Select all

495   | * Antifighter list is arranged in order: 
496   | * Head: Least preferred (Beams) 
497   | * Middle: Everything else 
498   | * Tail: Most preferred (PSG)
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.
Lakz
Posts: 127
Joined: Tue, 19. Feb 13, 04:20

Post by Lakz »

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.
Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Post by Kadatherion »

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).
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.
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.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

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.
Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Post by Kadatherion »

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.

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