Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: HLD_Prophecy on February 14, 2017, 09:08:00 am
-
Hey all!
So I'm trying to set the default five weapons that appear in the tech database to be invisible by default. These are the Subach, Mekhu, Akheton SDG, Rockeye, and Tempest.
I tried adding entries like these into my wep.tbm:
$Name: Subach HL-7
$Flags: ("player allowed" "stream")
$Name: Mekhu HL-7
$Flags: ("player allowed" "stream")
I would have thought that removing the "in tech database" flag would have worked, but the entries still show up. I also tried this, as it worked for clearing ship entries:
$Name: Subach HL-7
+nocreate
$Flags: ("player allowed" "stream")
But that didn't work either.
Any help, please?
-
You're already most of the way there. You just need to add "+override" after the new flag list, this will cause the old flag list to be replaced by the one you specify.
See also: http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Flags:
-
You're already most of the way there. You just need to add "+override" after the new flag list, this will cause the old flag list to be replaced by the one you specify.
See also: http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Flags:
Thanks!
Is +nocreate necessary or not?
-
+nocreate is necessary for any table entry whose only purpose is to modify an existing weapon or ship.
-
+nocreate is necessary for any table entry whose only purpose is to modify an existing weapon or ship.
This is untrue; +nocreate is only necessary if there is a possibility that the original entry may not exist.
-
Not to get too far off-topic, but I've never understood +nocreate. It seems like it's just suppressing useful errors and, if a valid entry with the same name gets loaded later, potentially hiding any trace of the problem until someone happens to notice the incorrect values (not easy if it's, say, some special-case flag or something). In that case, I'd rather have the parser yell at me. What gives?
-
Not to get too far off-topic, but I've never understood +nocreate.
The MediaVPs are meant to be used even with mods that may not include the full set of ships/weapons as retail; they thus use +nocreate so their changes only apply if the thing exists in the first place (rather than creating a new entry missing most if not all of the data it needs to be usable and potentially pushing a mod over the ship/weapon limit despite not using those ships/weapons at all).
For anyone developing their own mod that is not meant to be used similarly to the MediaVPs, +nocreate serves absolutely no purpose.
-
Huh, I'd never thought about someone using the MediaVPs that way, but that makes sense. Thanks!
-
Adding +override worked, thanks a bunch guys!
And thanks for the explanation, AdmiralRalwood :)
-
There are also flags that you can set in FRED at the start of a campaign which affect the weapon's visibility.
-
There are also flags that you can set in FRED at the start of a campaign which affect the weapon's visibility.
Thanks for the tip. :)