Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: headdie on September 05, 2010, 02:09:00 pm

Title: Ship Stat editor
Post by: headdie on September 05, 2010, 02:09:00 pm
I was wondering if it would be possible to set something up so that within fred you can tweak some ship settings normally controlled by the tables so you can create a 1 time variant of a ship without having to create a near duplicate in the ships tbl/tbm.  For example I am working on a training drone which in the blurb can be used to simulate any fighter scale craft.  Now as it is I will have to create near carbon copies of this drone tweaked for each role it plays even if it is only used once in the campaign.  Obviously if the variant is to be used in several missions then I would probably be better creating the tbl/tbm entry but it would be worth it.

Should it be implemented the things I would like to be changeable are:

The class name as it appears in the mission
Shield Points
Hit Points
Ship speeds
Afterburner speed, capacity and usage rate
Rotation speed
Rotation and speed dampening
Primary and secondary bank compatibility
Primary and secondary bank capacity

Title: Re: Ship Stat editor
Post by: Aardwolf on September 05, 2010, 02:51:32 pm
Use ship templates. I'm not sure how they work, but I'm pretty sure this is what they do.
Title: Re: Ship Stat editor
Post by: Mobius on September 05, 2010, 04:51:31 pm
Use ship templates. I'm not sure how they work, but I'm pretty sure this is what they do.

Those need alternate table entries, however.

The class name as it appears in the mission

Use alt names for that. :)

Shield Points
Hit Points

Special hitpoints will handle both.

Ship speeds
Afterburner speed, capacity and usage rate
Rotation speed
Rotation and speed dampening

Uhm, these are tricky unless the feature you're proposing is added or you rely on alternate table entries. Rotation speed should be easy to handle via AI profiles, though.

Primary and secondary bank compatibility

You don't need this if you don't want the player and/or his wingmen to fly drones: just make the table entry compatible with all needed weapons, and select specific loadouts in FRED.

Primary and secondary bank capacity

You should be able to handle that by editing the loadout. If you want a drone to carry 5 Harpoons per bank instead of 10, do it. :)
Title: Re: Ship Stat editor
Post by: FUBAR-BDHR on September 05, 2010, 04:56:54 pm
Actually you can't do the weapons restrictions unless you make the mission a scramble or always lock down every fighter.  The player could simply slide another ships weapons to his.  Also if there were to be multiplayer involved there is no way to even lock the player ai.
Title: Re: Ship Stat editor
Post by: Mobius on September 05, 2010, 05:15:07 pm
His request suggests that the drones are not meant to be used by the player, which helps a lot when it comes to loadout.

I might be wrong, however.
Title: Re: Ship Stat editor
Post by: FUBAR-BDHR on September 05, 2010, 05:19:05 pm
You reread it it was just an example of what he wants.  That does not mean it would not be used for other things.

Also the part team loadout still applies if he puts the drones in a starting wing. 
Title: Re: Ship Stat editor
Post by: Mobius on September 05, 2010, 05:49:37 pm
Yeah, true.

I have been wanting a feature like this for quite some time. Let's let the coders have their say. :)
Title: Re: Ship Stat editor
Post by: General Battuta on September 05, 2010, 05:53:27 pm
Yeah, true.

I have been wanting a feature like this for quite some time. Let's let the coders have their say. :)

You've been talking to one.
Title: Re: Ship Stat editor
Post by: Mobius on September 06, 2010, 12:14:54 pm
2+ coders. :p
Title: Re: Ship Stat editor
Post by: The E on September 06, 2010, 01:02:35 pm
Something like that isn't hard to write. Hell, I guess you could even set up an excel/OOo spreadsheet to do this stuff.

Which, incidentally, is probably why noone has bothered to write it. It's boring and tedious work that is not at all interesting.
Title: Re: Ship Stat editor
Post by: FUBAR-BDHR on September 06, 2010, 01:45:01 pm
E you do realize he's talking about in FRED not just editing the table?  There has always been resistance (and I agree with it) to the idea of allowing FREDders to change table data in such a manner. 
Title: Re: Ship Stat editor
Post by: The E on September 06, 2010, 01:57:20 pm
No, I didn't realize that. Point still stands though.
Title: Re: Ship Stat editor
Post by: FUBAR-BDHR on September 06, 2010, 02:10:34 pm
Yea it's not a hard change but it crosses the line between modding and FREDding.  A big taboo.  You are no longer letting the mod or TC control the data but the FREDder. 
Title: Re: Ship Stat editor
Post by: The E on September 06, 2010, 02:28:57 pm
Yeah, I sort of agree
Title: Re: Ship Stat editor
Post by: headdie on September 06, 2010, 03:29:09 pm
Yea it's not a hard change but it crosses the line between modding and FREDding.  A big taboo.  You are no longer letting the mod or TC control the data but the FREDder. 

Ignorance time: Can I ask why it is such a taboo?

especially when taking into account that with the easy to use mod structure we have, tbm files and the Wiki it would take a competent FREDder something like half an hour to an hour and a VP extractor like VPView to lean how to create a tbm that overrides the Mod/TC creators settings for a ship in the ways I suggest.
Title: Re: Ship Stat editor
Post by: The E on September 06, 2010, 03:31:23 pm
Problem is that good FREDer != good Tabler.
Title: Re: Ship Stat editor
Post by: headdie on September 06, 2010, 03:50:28 pm
fair enough.

though the system I had in mind was that FRED would create a separate file referenced by the mission file which stored all the alterations to ship data used in that mission thus avoiding the need to touch the original tbl/tbm and minimising the changes to the mission file structure.  It was with the use of the additional file that is loaded after the game compiles the ship table where I thought the difficulties in implementation would appear
Title: Re: Ship Stat editor
Post by: FUBAR-BDHR on September 06, 2010, 03:55:16 pm
Wow that would be even worse.  Imagine dropping such a file in the mediavps and firing up multiplayer.  Instant super ships for one player and there is no validation check like for tables.
Title: Re: Ship Stat editor
Post by: General Battuta on September 06, 2010, 04:06:24 pm
You know you could get most, though not quite all, of the effects you wanted by simply swapping ship AI classes. It would work on non-player vessels.
Title: Re: Ship Stat editor
Post by: headdie on September 06, 2010, 04:42:40 pm
Wow that would be even worse.  Imagine dropping such a file in the mediavps and firing up multiplayer.  Instant super ships for one player and there is no validation check like for tables.

The multi issue would only crop up if the host is using a modified mission file with the entry calling the modification file or you could code multi mode to ignore the additional file

You know you could get most, though not quite all, of the effects you wanted by simply swapping ship AI classes. It would work on non-player vessels.

I made the suggestion to try and avoid using tables for tweaked versions of ships used for a single mission. (yes I know I'm lazy)
Title: Re: Ship Stat editor
Post by: The E on September 06, 2010, 04:44:49 pm
Wow that would be even worse.  Imagine dropping such a file in the mediavps and firing up multiplayer.  Instant super ships for one player and there is no validation check like for tables.

The multi issue would only crop up if the host is using a modified mission file with the entry calling the modification file or you could code multi mode to ignore the additional file

Wrong. FUBAR is entirely right.
Title: Re: Ship Stat editor
Post by: Wanderer on September 22, 2010, 02:07:21 pm
Avoid using ship templates for the time being