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

Title: Antipodes Patch: Ship/Weapons TBM Rename
Post 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).

Code: [Select]
$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:
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: The E on September 17, 2009, 05:18:01 pm
Builds for Windows, based on this:

http://www.mediafire.com/?mxz2ng5wjmq
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Flaming_Sword on September 17, 2009, 05:44:18 pm
Example TBMs for retail/mediavps:

Code: [Select]
#Ship Classes

$Name: GTF Myrmidon
+nocreate
$Rename: Big Target

#End

Code: [Select]
#Primary Weapons

$Name: @Subach HL-7
+nocreate
$Rename: Peashooter

#End

#Secondary Weapons

$Name:                                  @Rockeye
+nocreate
$Rename: Rocky

#End
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Flaming_Sword on October 01, 2009, 06:16:50 am
So...what would it take to get this accepted? I recall someone mentioning wanting to make the line $Alt_name: instead of $Rename:

Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Solatar on October 01, 2009, 08:54:40 pm
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)
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Flaming_Sword on October 01, 2009, 09:03:43 pm
Yes.

What has happened is that "Subach HL-7" has been renamed to "Peashooter" as far as the player is concerned.
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Aardwolf on October 02, 2009, 12:09:10 am
Would another TBM be able to override "Peashooter" and have it affect both?
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Flaming_Sword on October 02, 2009, 12:29:57 am
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.
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Aardwolf on October 02, 2009, 11:56:38 am
Then I think it really ought to be called an alternate name, and not a rename.
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Flaming_Sword on October 02, 2009, 04:27:17 pm
That's 2 for $Alt_name:
Title: Re: Antipodes Patch: Ship/Weapons TBM Rename
Post by: Zacam on October 03, 2009, 03:37:25 pm
Since it is providing an alternative name for an already existing entry, make it 3 for "$Alt Name" or $Alt_Name