Target leading in turret AI.... how?

Status
Not open for further replies.

Reven

Spaceman
[edit: Wrong forum... bleh. This was supposed to be in remake, of course]

I would like to mod my game so that the turret AI leads the target when it shoots. To be honest, I can't see how turrets are at all useful without target leading - they will only hit their target if the target it flying straight and level and directrly towards/away from you.

Anyways, I added "Autotracking" to the turret_medium_XXX_gun entries, and that seems to work as advertised, but the turrets don't seem to inherit the parent ship's scanner. So, while the autotracking works, the autotracking "cone" is extremely small and there is no lead target indicator when in a turret. So while autotracking works, the turret guns still won't lead their target.

How would I go about adding a different scanner to a turret? Or, is there an easier way to make turrets lead their targets properly?

Thanks in advance for any help or suggestions.
 
I've been looking at units.csv more closely. ITTS is set to true for the turrets already, but I can never get a lead target indicator. I changed the tracking cone to 30 degrees, and still nothing.

Please, there has to be someone here who knows how to get the turrets to lead their targets properly. Anyone?
 
Ok, figured it out. It works!! Turrets leading their targets properly makes the game so much more interesting. In some ways easier, as a Galaxy can blow away Talons by the dozen. But enemy ships that have their own turrets become more challenging, and capital ships are very challenging.

For those who want to replicate the same behavior, this is what I did.

There are three lines in units.csv for each turret:
  1. medium_turret_XXX__upgrades: change the ITTS field to TRUE. Change Tracking_Cone and Locking_Cone to 30.
  2. turret_medium_XXX: change Tracking_Cone and Locking_Cone to 30.
  3. turret_medium_XXX_gun: change Tracking_Cone and Locking_Cone to 30.

XXX is the turret gun type. Do the same for the mediumrear and large turrets as well. I'm not sure all of the changes are necesary. Specifically, I'm not sure about __upgrades lines. I'll do some more experimenting to nail down only the changes that are needed.

Ok, now this begs the question... why was this left out?
 
I'm not sure I understand your directions.
There are dozens of fields for the turret entries - do you have to change the settings for every one of them? Every weapon seems to have a turret line.

How many lines on the units.csv did you have to change?

It would be great when someone figures this out if they could post their units.csv file for all to download.
 
Reven said:
Ok, now this begs the question... why was this left out?
I beleive you've answered your own question:
"a Galaxy can blow away Talons by the dozen. But enemy ships that have their own turrets become more challenging, and capital ships are very challenging."

It unbalances the game too much; cap ships are deadly enough. Souds interesting, though; I might play aroudn with it.
 
I like the turrets as they are, personally. Good enough shots to give flankers and tailgaters second thoughts, but hardly champion snipers. In military terms it's called suppression fire, and it's meant to make the enemies keep their heads down.
 
JKeefe said:
It unbalances the game too much; cap ships are deadly enough. Souds interesting, though; I might play aroudn with it.

Balancing the game by making turrets dumb as stumps seems to me to be a poor way of balancing a game. It also kills realism. Capital ships are harder, but not that much harder. The Galaxy is the one ship that seems to improve the most, but it's also the second most expensive "fighter" in the game and without accurate turrets, this makes no sense. It's a huge target, can only use level 3 shields and reactor, two guns, and two turrets that can't hit anything unless both you and the opponend are flighing straight at each other.

If you're going to put automatic turrets in the game at all, then do it right. You don't nerf realism for balance. If you absolutely have to nerf, nerf the entire feature. Turrets should be at very least have target leading if they are automated, otherwise, leave turrets like they are in Privateer - you have to manually be in them to fire.

If it makes capital ships too powerful (something that I dispute it does), then reduce the power of the guns in their turrets. Problem solved.

As far as instructions on how to do it go, I'll give better ones now:
  1. Edit the file <privateer>/units/units.csv in a text editor. Alternatively, you can use OpenOffice.Org Spreadsheet (or Excel if you don't have anything better) to open the file. If you use a text editor, it has to be one that won't wrap the lines - notepad isn't good enough (even when you turn wordwrap off in notepad, it will wrap lines after 255 characters). I use one called textpad. The first five lines on the screen should each start as shown:
    Code:
    Key,Directory,Name,...
    Key,String,string,...
    tarsus,tarsus,tarsus,...
    tarsus.blank,tarsus,tarsus,...
    tarsus.template,tarsus,...
    Each line is a comma-separated list of fields. The first line gives the name of each field. The second line gives the type. Each line after that is one line for each unit in the game. If you are using at text editor and the first five lines don't each start the way shown above, then you need to get a text editor that won't wrap lines. The first field in each line is the key field - it's a unique name that identifies the line.
    If you are using OpenOffice.Org Spreadsheet to open the file, you will first get a text import dialog with lots of import options you can change. The defaults will be fine, so just click 'OK'
  2. There are two types of turrets for fighters - the top/bottom mount style for a Galaxy, and the rear style for the rest. For this example, we will make the Galaxy (top/bottom) style Tachyon turret into one that leads its target. Scroll down until you find the lines that start with "medium_turret_tachyon" and "medium_turret_tachyon_gun".
  3. On the first line (medium_turret_tachyon), go right until you find the fields TRUE,TRUE,4000,5,180,10. Change the number 5 to 30. This is the tracking cone - this will allow the turret to fire up to 30 degrees off axis.
  4. On the second line (medium_turret_tachyon_gun) go right until you see TRUE,TRUE,380,5,180,10. Again, change the 5 to 30. Continue right quite a ways until you see: {Tachyon;;;Light Medium Heavy;. After the word "Heavy", add a space and the word "Autotracking" so it looks like {Tachyon;;;Light Medium Heavy Autotracking;
  5. Edit is done - save the file and test it out in your game. If you have used spreadsheet software to edit the file, make sure when you save it you specify not to save it in the native format for the software. When you save, you will get a warning about possible loss of features. For OpenOffice.Org Spreadsheet it will ask you if you want to save in its native format. Click 'NO'. For Excel, it will ask you if you want to preserve the .csv format, click 'YES'. For other spreadsheets you're on your own.
You are done. This turret type will now lead its targets properly. Repeat the procedure for each turret that you want to turn on target leading for. You can have it just for one type of turret (the type you have mounted on your ship) in order to give you a fighting advantage, or you can make the change on all fighter turrets, or all turrets in the game. The scope of the change is up to you.

Some more info to help you edit the turrets you want:
  • Top/Botton (Galaxy) turrets all have lines that start with "turret_medium_XXX" where XXX is the gun type (Ion, Tacyon, etc).
  • Rear fighter turrets all have lines starting with "turret_mediumrear_XXX"
  • Ignore lines with key fields that end with "__upgrades"
  • Remember, for each turret there will be two lines - the second will always end with gun. Make sure you edit them both as per instructions.

Hope this helps.
 
Reven said:
Balancing the game by making turrets dumb as stumps seems to me to be a poor way of balancing a game.
Sweeet mercy.. they did NOTHING in the original game. Nothing at all. Not dumb, not smart, they just sat there until you got in them yourself.

Your complaint could only possibly apply to capship turrets. It would be possible to upgrade them only, but I find them enoug of a challenge. Those ships weren't exactly hard to take down in the original.
 
Hope this helps.
Does it ever! Wonderful. Every time I have to escape at full afterburner my carpal tunnel syndrom worsens by 1% having to do circles with the mouse for like ten minutes. Now the rear gun can actually kill enemies all by itself. Thanks! :)
 
You have to be careful with that turret mod, though. It improves the hostile turret fire, too.
As examples, there's a Kilrathi heavy fighter that in performance and loadout is equal to the Cent in just about every way. It also packs a tailgun turret. And a Kilrathi capship that's bristling with heavy turrets; dangerous to deal with alone, possibly lethal if it's turrets were any better.
And let's not forget mercs flying Orions. The Palan blockade buster missions will get them gunning for you.
 
Yeah, that's why I made the enhancement specific to medium rear laser turret. I use only lasers, as per the "energy question" thread, but none of the more powerful enemies use lasers, --I guess they all believe the advertising hype. Orions are usually disintegrated by my laser torrents, before they have a chance to aim their turrets, anyways ... ;-)
 
Makes me wonder if the stronger enemies wiil mount the fusion gun when I get to the Rightious Fire missions.
In the origional, none of the others mounted the fusion, which is a good thing as the fusion gun is a real hellraiser.
 
Correct me if I'm wrong but...
I was under the impression that ITTS and autotracking were two fairly different mechanisms:
Autotracking - allows a dead accurate tracked shot up to its maximum radius off axis. If radius is too great, simply shoots straight ahead. This at least appears to be how normal ship guns use autotracking. Perhaps AI autotracking accuracy is lessened?
ITTS - Calculates and shows where the target would be (if it continues on its path) by the time your shot gets there.

The modifications suggested "seem" to leave the turrets aiming at the ship (not using the ITTS calculation), but having their shots made spot on if the target is within 30 degrees.
Wouldn't the change need to be made in the AI somehow to get the turrets to use the ITTS calculations instead? That way ITTS would be used, but its accuracy would only be the level of the turret AI's ability, not dead accurate like autotracking seems to be.
 
I've been watching how autotracking and the turret AI works.
Autotracking is only dead accurate if your target is going in the same direction and speed when the shot arrives. Yet, the pilot AI is smart enough to try constant evasion tactics, which is why most of the slow shooting guns miss fast fighters at anything longer than point-blank range, even with autotracking.
The turret AI tries to get it's target into the center of the turret's crosshairs, and as this thread is about, isn't smart enough to lead by ITTS. Autotracking on the turrets might make them better shots, especially with rapid-fire guns, but an autotracking plasma turret (plasmas are slooooooow guns) would still be lucky to hit the broad side of a Broadsword.
 
You need to change turret AI behavior. It's admittedly very hard -- look in the AI folder for examples.

I'm personally against letting my turrets do my fighting for me -- the main use of turrets is to make sure enemies don't park themselves on my sides/rear and plink me to death. (Yeah, my fav ships to fly are the Drayman and Galaxy... Well, I usually keep one Demon in the Drayman to go pick fights with, but the Galaxy is the best ship in the original game if the turrets do something by themselves IMHO. Good armor, decent firepower with guns close together so you actually get to hit with both at the same time, enough cargo space to make sure you can pay for repairs without touching your bounty money)
 
Status
Not open for further replies.
Back
Top