Author Topic: Question about the "cargo" flag - Target as Threat?  (Read 1900 times)

0 Members and 1 Guest are viewing this topic.

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Question about the "cargo" flag - Target as Threat?
I don't know if this has been so ever since retail, but warships just don't target cargo containers automatically unless given orders to - which is problematic for cargo depots of 10-15 containers.

I'm making a mission in which you and your wingmen must guard a cruiser as it deals with a large cargo depot and the sentries that are guarding it. I made it so that the cruiser follows a waypoint that is on the other side of the cargo depot. I was hoping it would destroy the containers, too, but it just doesn't target them at all.

I figured it's related to the "cargo" flag and the objecttypes.tbl. The "cargo" flag didn't have the "Target as Threat" flag, which means that nothing will target it automatically unless given orders to (for fighters, "Attack any ship" is fine).

Okay, so it's time to alter the tables. I created this modular table file (named cargo-obt.tbm):

Code: [Select]
$Name:                  Cargo
$Target as Threat: YES
$Scannable:             YES
$Max Debris Speed:      200
$FF Multiplier:         0.10
$EMP Multiplier:        10.0
$Beams Easily Hit:      YES
$Fog:
   +Start dist:            10.0
   +Compl dist:            500.0
   +Disappear factor:      1.5
$AI:
   +Passive docks:         (  "cargo" )
$Vaporize Percent Chance: 0.0

(This is a copy/paste from the Wiki sample, with the "Target as Threat: YES" line added to it.

This doesn't do the trick. For some reason, it appears that the engine simply ignores this file. Whether I add #End to the end or not makes no difference. Adding "#Ship Types" to the top will simply crash the game on startup. I was searching in the Wiki, but couldn't find anything.

Currently, I have given the containers the "transport" flag which makes everything and everyone fire at it randomly, as intended, and it keeps its cargo scannable, but you cannot target the containers by "U". The mission works as it should with the "transport" flag trick, but it's still itching my nose. Changing the "cargo" ship type should, at least theoretically, be possible.

Can anyone help?
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Question about the "cargo" flag - Target as Threat?
Mebbe you forgot +nocreate ?

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: Question about the "cargo" flag - Target as Threat?
Tried that. Made no difference.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Question about the "cargo" flag - Target as Threat?
Well you could do it the easy way and just FRED it:

when-argument
--any-of
----> <list of cargo>
-->and
--> not is destroyed delay
----> <argument>
-->distance
----> <
----> weapon range
----> cap ship beam turret
----> <argument>
-->fire-beam
---> beam turret
---> <argument>

Make it repeating 9999999 with 1 second delay.


Fire-beam could be replaced with attack but you would need a variable to keep track of the number of attack orders and another argument when-argument with is-destroyed-delay to clear the goal. 
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 TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: Question about the "cargo" flag - Target as Threat?
No beams in this mission.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 
Re: Question about the "cargo" flag - Target as Threat?
When will the fire-turret SEXP be there? It would be really useful for non-beam heavy capship weapons (railguns etc)

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Question about the "cargo" flag - Target as Threat?
Cargo isn't protected in the ships editor is it?

OK been playing with this and it doesn't seem possible without table modifications.  Two ways to do it.  One change the cargo to another type in the ships editor.  Second is what you were trying to do but you need to do it for the attacking ships type as well to tell it to attack cargo. 
« Last Edit: September 12, 2009, 05:35:57 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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Question about the "cargo" flag - Target as Threat?
Stick a play dead fighter in each crate with 1HP via special hits. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Stormkeeper

  • Interviewer Extraordinaire
  • 211
  • Boomz!
Re: Question about the "cargo" flag - Target as Threat?
Stick a play dead fighter in each crate with 1HP via special hits. :p
I find this suggestion inexplicably hilarious.
Ancient-Shivan War|Interview Board

Member of the Scooby Doo Fanclub. And we're not talking a cartoon dog here people!!

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Question about the "cargo" flag - Target as Threat?
But it will most likely work well, if you will find a way to hide it to player.

  

Offline Stormkeeper

  • Interviewer Extraordinaire
  • 211
  • Boomz!
Re: Question about the "cargo" flag - Target as Threat?
Oh, I got it. Just do an invisible, textureless cube and stick it as such.
Ancient-Shivan War|Interview Board

Member of the Scooby Doo Fanclub. And we're not talking a cartoon dog here people!!