Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on November 19, 2015, 08:11:03 pm

Title: Per-campaign control settings: GOOD or BADDE
Post by: General Battuta on November 19, 2015, 08:11:03 pm
What's up with this? I can't figure out why you'd want it. Is it a bug or an intended feature of the pilot code?

Ohh, I can figure out why you'd want it! You might be switching between campaigns with very different feature sets.

Still, it's kind of a hassle to reconfigure your basic FS2 controls for every new basic FS2 campaign. (I should clarify that when you switch to a new campaign, your controls reset to FS2 defaults). What do people think?
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: The Dagger on November 19, 2015, 08:34:29 pm
I think it should be on per-pilot bassis. If you want to have different configs for different campaigns, just use different pilots.
I hate reconfiguring ETS keys for every single campaign (I have a notebook keyboard and some keys have been shuffled around).
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: Yarn on November 19, 2015, 08:41:14 pm
I think it should be on per-pilot bassis. If you want to have different configs for different campaigns, just use different pilots.
Agreed. Especially considering that most campaigns (I'm pretty sure) use the same control features as the main FS2 campaign.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: niffiwan on November 19, 2015, 08:45:54 pm
Per campaign is intended behaviour, but I can see the reasons for changing it back to per-pilot.  Before that's done though, would presets, or methods of copying control schemes around be any better?
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: Goober5000 on November 19, 2015, 11:22:27 pm
What were the reasons for making it per-campaign?
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: AdmiralRalwood on November 19, 2015, 11:48:40 pm
I didn't even realize it was per-campaign until I opened up csg.cpp and saw that controls were being read and written there as well.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: karajorma on November 20, 2015, 12:11:51 am
If we need a compromise we can do this. Add a setting to controlconfigdefaults.tbl. If the flag is present, the game puts up a message along the lines that "This campaign has a different default keyboard layout than your previous mod, do you wish to use it?" Then we just tell modders to use the setting only if their mod significantly alters the default keys for some reason.


That said, I'm not sure we need a compromise, has anyone actually made a mod that would need a significantly different key set? Back in the day when TBP and FS2 ran from the same folder I could see it, but I don't think we need it now.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: The E on November 20, 2015, 12:35:43 am
Yeah, campaign-specific control settings should be the exception, not the default, and the user should be notified if they are in effect.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: niffiwan on November 20, 2015, 01:54:58 am
What were the reasons for making it per-campaign?

I don't know, I believe Taylor did that prior to me working on the new pilot code.

That said, I'm not sure we need a compromise, has anyone actually made a mod that would need a significantly different key set? Back in the day when TBP and FS2 ran from the same folder I could see it, but I don't think we need it now.

I've got some wildly different configs for (e.g.) FS2 / Diaspora / WoD / TBP (can't recall any mods that need this off the top of my head, maybe Frontlines given the nature of shield-less combat?).  All the Windows-only players out there please note that on Linux & OSX, pilots are shared across all FSO-based games / TCs / mods for a single user account on a PC! :)
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: karajorma on November 20, 2015, 08:42:33 am
That's horrible!

Diaspora for instance ships with a completely different default config more suited to modern gaming (use of WASD for instance). That's going to make things a bit of a pain for someone who then moves to Freespace for instance.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: MatthTheGeek on November 20, 2015, 09:52:48 am
Someone remind me why the new pilot format isn't text editable? Because that issue would go from major annoyance to trivial if one could just copy-paste around and maintain as many key layouts as we want instead of having to go through the awful ingame interface to set the keys again.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: chief1983 on November 20, 2015, 02:44:21 pm
It could be.  We can export it to JSON.  We could theoretically replace the binary file part of the pilot code with a JSON reader then.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: headdie on November 20, 2015, 04:37:29 pm
Given that alt key bindings are the exception rather than the rule would a table created by the mod maker with suggested key bindings be a better solution. 
that way if the table is absent - retail behaviour
 - if the table is there it uses those bindings
 - - if the player wants to edit those bindings further the game writes a tbm into the mod folder thus preserving the mod default key bindings for reversion.
 - for player wants to ignore the mod recommend key bindings for whatever reason perhaps a launcher flag to force retail behaviour and allow the player to bind their keys to the pilot file like normal
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: Phantom Hoover on November 20, 2015, 05:15:15 pm
It could be.  We can export it to JSON.  We could theoretically replace the binary file part of the pilot code with a JSON reader then.

Please please please do.
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: niffiwan on November 20, 2015, 11:26:41 pm
Behold, the oldest open FSO PR on github (https://github.com/scp-fs2open/fs2open.github.com/pull/22)  :nervous: 

(I really have to finish off some of my WIPs)
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: General Battuta on November 30, 2015, 03:01:36 pm
Eyyyy what's up with this
Title: Re: Per-campaign control settings: GOOD or BADDE
Post by: niffiwan on November 30, 2015, 03:22:36 pm
I want to get a few other things finished (e.g. apngs) before looking at this one, so if anyone else wants to have a go in the meantime, feel free!