Author Topic: Turret-set-target-priorities  (Read 4846 times)

0 Members and 2 Guests are viewing this topic.

Turret-set-target-priorities
It's not on the Wiki yet, so - what exactly does it do? Can you have ship names in the list of strings, and will the turret then target the ships in the order listed? Or is it something else?

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Turret-set-target-priorities
If I remember right it sets the priorities based on types so bombs, bombers, fighters, cruisers, etc


teach me to open my mouth before checking
« Last Edit: December 16, 2010, 03:54:50 am by headdie »
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Turret-set-target-priorities
Wrong.  You are thinking of a different sexp

It sets target priority groups for that turret.  You have to have groups defined in object types.  It works the same way as setting priority groups on a turret via table. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
Re: Turret-set-target-priorities
Ah... What I'm trying to do is have a destroyer attack another one, but there are some escorts in between. The idea is that the destroyers battle each other (no beams, so no fire-beam SEXP), and leave it to the player to take out the escorts. Currently, the friendly destroyer fires first on the escorts (presumably because they're closer by).
This is one of the cases where a fire-turret SEXP would be handy, I guess, or can this already be done somehow?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Turret-set-target-priorities
Ah... What I'm trying to do is have a destroyer attack another one, but there are some escorts in between. The idea is that the destroyers battle each other (no beams, so no fire-beam SEXP), and leave it to the player to take out the escorts. Currently, the friendly destroyer fires first on the escorts (presumably because they're closer by). Can this be done somehow?
This is one of the cases where a fire-turret SEXP would be handy, I guess.

I've had this plan to fake fire-turret. Here's what I want you to try, tell me if it works:

Set the appropriate guns on the friendly destroyer to turret-tagged-only.

Tag the enemy destroyer with tag-ship.

Simultaneously change the enemy destroyer's target color back to red with the appropriate SEXP (change-iff-color?)

Turret target priority only lets you pick between ships, bombs and asteriods.

 
Re: Turret-set-target-priorities

I've had this plan to fake fire-turret. Here's what I want you to try, tell me if it works:

Set the appropriate guns on the friendly destroyer to turret-tagged-only.

Tag the enemy destroyer with tag-ship.

Simultaneously change the enemy destroyer's target color back to red with the appropriate SEXP (change-iff-color?)

Hmm, that almost works, except that the Demon is still yellow. Apparently the tagged status overrides the IFF colour.
« Last Edit: December 16, 2010, 02:19:14 pm by FreeSpaceFreak »

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Turret-set-target-priorities

I've had this plan to fake fire-turret. Here's what I want you to try, tell me if it works:

Set the appropriate guns on the friendly destroyer to turret-tagged-only.

Tag the enemy destroyer with tag-ship.

Simultaneously change the enemy destroyer's target color back to red with the appropriate SEXP (change-iff-color?)
Hmm, that almost works, except that the Demon is still yellow.

Balls. Put the IFF color thing on an every-time. Does that help?

 
Re: Turret-set-target-priorities
Nope, it doesn't. Still yellow.

Pic to ensure I'm doing it right:


 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Turret-set-target-priorities
I forget what each of the arguments do, so I can't be sure.

I suspect TAG may override the change-iff-color. :(

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Turret-set-target-priorities
Set up target priority groups.  It's not that hard and makes what you are trying to do very easy. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Turret-set-target-priorities
Set up target priority groups.  It's not that hard and makes what you are trying to do very easy.

I have seen it done, but unfortunately it can't be done in FRED alone, which is inelegant.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Turret-set-target-priorities
I've thought of adding that ability.  Not sure how hard it would be. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
Re: Turret-set-target-priorities
Okay, so I make an -obt.tbm like this, and then I can use turret-set-target-priorities with arguments "capital", "corvette", "cruiser" etc.?

Code: [Select]
#Ship Types

$Name:                  cruiser
+nocreate

$Name:                  corvette
+nocreate

$Name:                  capital
+nocreate

#End

(Oh hey look, code tags have a select button now :) )

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Turret-set-target-priorities
Not quite right.  More like this:

Code: [Select]
#Target Priorities

$Name: FighterCraft

$Name: Frigate

$Name: Vette

$Name: StrikeCarrier

$Name: Stations

$Name: SmallShips

$Name: MediumShips

$Name: LargeShips

#End

#Ship types

$Name: Fighter
+nocreate
$Target Priority Groups: (
"FighterCraft"
"SmallShips" )


Continue with other types.  Then if you want to have a turret shoot at only the ships in frigate class then you just set target priorities to frigate.  It will ignore all other types.  You can also change the group for a specific ship.  This has never been tested but theoretically you could have a target priority group with nothing in it by default and assign a ship to it in mission.  I do not know if this would work though. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Turret-set-target-priorities
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Turret-set-target-priorities
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.

I CARE I CARE


 

Offline Angelus

  • 210
  • The Angriest Angel
Re: Turret-set-target-priorities
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.

I CARE I CARE



+1

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Turret-set-target-priorities
Have you tried level 1 TAGging (choose the type of tagging via SEXP)? From what I could experience, it works without marking tagged ships with yellow brackets.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 
Re: Turret-set-target-priorities
Continue with other types.  Then if you want to have a turret shoot at only the ships in frigate class then you just set target priorities to frigate.  It will ignore all other types.  You can also change the group for a specific ship.  This has never been tested but theoretically you could have a target priority group with nothing in it by default and assign a ship to it in mission.  I do not know if this would work though.
Ahm, umm, there doesn't seem to be a SEXP for assigning a ship to a target priority group, is there?

I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.
Heck, that sure would make things a whole lot easier. Especially now that there are quite some mods that have non-beam anti-cap weapons and therefore can't nicely script their battles like fire-beam can. Do you happen to have the code lying around somewhere? People care now :nod:

Have you tried level 1 TAGging (choose the type of tagging via SEXP)? From what I could experience, it works without marking tagged ships with yellow brackets.
It is tagged level 1, but shows up as yellow. Changing the it to tag level 3, the hostile destroyer shows up red, without even needing the change-IFF-colour. So this is a step in the right direction.

Edit: However, the turrets are simply not firing now. Those that aren't slaved to the turret-tagged-specific work just fine, so it's got to be something in the SEXPs.
« Last Edit: December 17, 2010, 03:38:35 pm by FreeSpaceFreak »

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Turret-set-target-priorities
Yes there is a sexp for setting the target priority group of a ship.

OK maybe there isn't which is weird because I remember writing it. 
« Last Edit: December 17, 2010, 03:33:52 pm by FUBAR-BDHR »
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras