Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: TopAce on September 12, 2009, 11:13:13 am
-
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):
$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?
-
Mebbe you forgot +nocreate ?
-
Tried that. Made no difference.
-
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 beams in this mission.
-
When will the fire-turret SEXP be there? It would be really useful for non-beam heavy capship weapons (railguns etc)
-
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.
-
Stick a play dead fighter in each crate with 1HP via special hits. :p
-
Stick a play dead fighter in each crate with 1HP via special hits. :p
I find this suggestion inexplicably hilarious.
-
But it will most likely work well, if you will find a way to hide it to player.
-
Oh, I got it. Just do an invisible, textureless cube and stick it as such.