Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Sushi on April 13, 2009, 06:27:06 pm

Title: "$use newtonian dampening" with default profile?
Post by: Sushi on April 13, 2009, 06:27:06 pm
Hi,

I'm trying to create a mod that involves setting "$use newtonian dampening" to YES for the retail campaign. So far, I haven't had any luck.

I've tried creating a TBM file as follows:

Filename: data/tables/tweak-aip.tbm
Code: [Select]
#AI Profiles
   
$Profile Name:                               FS2 RETAIL
 
$use additive weapon velocity:                           YES
$use newtonian dampening:                                YES

#End

I've also tried using a whole new .tbl file (based on the sample here (http://hard-light.net/wiki/index.php/Ai_profiles.tbl) but with "$use additive weapon velocity" and "$use newtonian dampening" set to YES. Still no luck.

According to the wiki page linked above,

"There is a "hidden" profile called FS2 RETAIL that is hard-coded into FreeSpace Open and cannot be modified. It is always the default profile unless another is specified using $Default Profile. "

Does this mean I'm out of luck? Is it really not possible to change the default profile? Or is there something I've missed?
Title: Re: "$use newtonian damping" with default profile?
Post by: Zacam on April 13, 2009, 06:38:44 pm
Considering that the MediaVP retail-based SCP enhanced missions all use FS2 Retail in every mission file, this may indeed be the case unless they can open it to being ADDITIVELY modified by TBM.

(Note: I emphasised ADDITIVE above because I do not think a wholesale ability to change every variable to the Retail FS2 profile really suits. Most TC or Mods are probably going to want to use custom AIP's, while the retail needs to offer as close to original retail behaviour as possible).

But yeah, I think you are out of luck modifying the hardcoded one. And to test a custom one, you will need to specify in a test mission to use it or it will, as stated, default to using FS2 Retail anyway.
Title: Re: "$use newtonian damping" with default profile?
Post by: Sushi on April 13, 2009, 07:25:10 pm
So, is it a bug that you can't additively modify FS2 Retail? Or is it an intended feature?

If the former, is anyone already working on it?

If the latter, what's the reasoning?
Title: Re: "$use newtonian damping" with default profile?
Post by: Goober5000 on April 14, 2009, 05:44:04 pm
There's no way to modify FS2 RETAIL because it's a set standard.  But note the salient clause on the wiki page:
Quote
...unless another is specified using $Default Profile.

You want to make another profile the default instead.  So you can do what you want very easily like this:
Code: [Select]
#AI Profiles

$Default Profile:                            Sushi's Profile

$Profile Name:                               Sushi's Profile
$use additive weapon velocity:                           YES
$use newtonian dampening:                                YES

#End

With this new table, all missions that do not have an $AI Profile setting will use Sushi's Profile.  However, if they specifically say $AI Profile: FS2 RETAIL then you'll have to edit the mission.
Title: Re: "$use newtonian damping" with default profile?
Post by: Sushi on April 14, 2009, 08:36:34 pm
OK. So default profile means not just "default when FREDding a mission," but "default for any mission that doesn't explicitly say?" Interesting.

What if I add an optional ships.tbl flag that can set newtonian dampening on a per-ship basis? Something like

$Glide: <YES/NO>
    +Use Newtonian Dampening: <YES/NO>

If not specified, the AI_Profiles value would be the default. If specified, the flag is set for that particular ship. That would also get around the problem where the "$use newtonian dampening" flag is useful for fighters that glide but messes up mission timings because of how it affects capships. Viola! Fighters can turn in glide mode without exceeding their maximum speed, and since non-fighters still use "retail" damping the mission timings remain the same. In other words, it means that mods like RealFlight which could really benefit from newtonian dampening on the fighters could work on existing mods/campaigns (including retail) without destroying all of the timings.

This is trivial to implement, so I think I'll go ahead and add something like this to my SushiGlide build. :D Is there any good reason NOT to let newtonian dampening be optionally enabled/disabled on a per-ship basis?
Title: Re: "$use newtonian dampening" with default profile?
Post by: Nuke on April 15, 2009, 12:17:29 am
ive always wanted to be able to force usage of glide at the mission level.
Title: Re: "$use newtonian dampening" with default profile?
Post by: Sushi on April 15, 2009, 09:57:52 am
ive always wanted to be able to force usage of glide at the mission level.

That's a different issue. :) I agree that it would be cool, assuming that the AI didn't break down completely.

I'll add it to my list, and probably try it out and see what happens after I'm done with my current "SushiGlide" project.
Title: Re: "$use newtonian dampening" with default profile?
Post by: chief1983 on April 15, 2009, 11:51:16 am
Can't you use +nocreate in the tbm to modify the default FS2 profile?
Title: Re: "$use newtonian dampening" with default profile?
Post by: Sushi on April 15, 2009, 12:23:14 pm
Can't you use +nocreate in the tbm to modify the default FS2 profile?

I'll try it.

I still like the idea of enabling the newtonian dampening on a per-ship basis, though. It should help a lot for mods like RealFlight.