Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Flaming_Sword on September 17, 2009, 09:38:51 am
-
Hi.
Presenting my most selfish patch ever!
The problem:
Using ships/weapons that exist in retail or an included mod - except with a different name.
Example:
Shivans! mod, with renamed Shivan ships, having to keep a separate set of TBMs to mirror those of included mediavps. Messy and breaks every time there's a mediavps update, so new set of TBMs must be created when that happens.
The Solution:
Addition of support for $Rename: in ship/weapon TBL/TBMs. Works just like $Name:, but will be used in-game instead if it exists.
Example:
You want to modify the Subach HL-7 in your mod. You update the stats and give it a new name (e.g. $Rename: Peashooter) in a TBM. No further changes required, as retail ships already use Subach HL-7, and all mediavps TBMs will still apply effects changes (and any other mod in the secondary mod list).
$Name: @Subach HL-7
+nocreate
$Rename: Peashooter
<whatever else>
Patch here (http://www.mediafire.com/?2hmaqnmgdmw). Based on Antipodes revision 5595.
Much of the patch is whitespace changes. :nervous:
-
Builds for Windows, based on this:
http://www.mediafire.com/?mxz2ng5wjmq
-
Example TBMs for retail/mediavps:
#Ship Classes
$Name: GTF Myrmidon
+nocreate
$Rename: Big Target
#End
#Primary Weapons
$Name: @Subach HL-7
+nocreate
$Rename: Peashooter
#End
#Secondary Weapons
$Name: @Rockeye
+nocreate
$Rename: Rocky
#End
-
So...what would it take to get this accepted? I recall someone mentioning wanting to make the line $Alt_name: instead of $Rename:
-
So ships that have "Subach HL-7" in their allowed primaries will be able to arm "Peashooter" if it is available? (without adding peashooter to the ship tables)
-
Yes.
What has happened is that "Subach HL-7" has been renamed to "Peashooter" as far as the player is concerned.
-
Would another TBM be able to override "Peashooter" and have it affect both?
-
In the end, you're still modifying @Subach HL-7. All you've done is have a separate name that gets displayed in the game. There is only the one entry.
An overriding TBM will still need to have @Subach HL-7 as the name of the entry.
-
Then I think it really ought to be called an alternate name, and not a rename.
-
That's 2 for $Alt_name:
-
Since it is providing an alternative name for an already existing entry, make it 3 for "$Alt Name" or $Alt_Name