Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Galemp on December 21, 2015, 12:52:06 pm

Title: Interface Art "Themes"
Post by: Galemp on December 21, 2015, 12:52:06 pm
Feature request here. May be useful for FOTG and campaigns that have branches or loops.

We can change the Main Hall in the middle of the campaign as a retail feature, and we can specify mission loading screens. We also have control over music and HUDs. But could we implement changing the interface as a whole, too? For example, you have a campaign where the player defects to the NTF halfway through, and moves from a Hecate to an Orion. Switch the interface from green and gold with GTVA logos to blue and gold with NTF logos, and use FS1-style briefing icons. The swap could specify a new default ship-select/weapon-select animation style if it's not already set by the tables.

Maybe have alternate versions of interface elements with a suffix, like 2_briefing-ntf, in a similar way to how we swap ship textures. Set the interface in the campaign file in the same way we change main halls, and it uses the alternate if present or the original if not.

I know there's not a lot of love for the interface code, but how doable is this, roughly? Both Vasudan Imperium and Scroll of Atankharzim would hugely benefit.
Title: Re: Interface Art "Themes"
Post by: AdmiralRalwood on December 21, 2015, 03:12:10 pm
...Ooof. I can imagine some spots where code can be reused, but my gut instinct is that this would be a lot of effort. Maybe someone with more experience with that part of the codebase will correct me, though.
Title: Re: Interface Art "Themes"
Post by: niffiwan on December 21, 2015, 03:51:09 pm
The closest I can think that we have at the moment is per-mission briefing screens (http://www.hard-light.net/forums/index.php?topic=90337.0), but that won't change the interface, just the background. From what I've seen of trying to create custom interfaces (thousands of little pics) it seems like this would be a lot of work.  There's not much re-use of interface screen elements in FSO which means lots and lots of places to add code to allow switching of the thousands of different elements.

Still, I think that Yarn probably knows the most about the interface code, so his opinion would be the best one to have.
Title: Re: Interface Art "Themes"
Post by: Galemp on December 21, 2015, 04:29:38 pm
The idea would be that there is already a completely new set of interface graphics that could be used in place of the existing ones. They don't necessarily need to be all listed in a table; but the engine is directed to replace INTERFACE_FILENAME with INTERFACE_FILENAME-MOD if present, ELSE use FILENAME.
Title: Re: Interface Art "Themes"
Post by: mjn.mixael on December 21, 2015, 07:57:48 pm
I know The_E was once working on something like this on a per campaign basis... perhaps see what he has finished?
Title: Re: Interface Art "Themes"
Post by: The E on December 22, 2015, 01:45:18 am
Not much. Haven't had much mental energy left to spend on this these past few weeks, unfortunately.
Title: Re: Interface Art "Themes"
Post by: zookeeper on December 22, 2015, 03:15:22 am
Maybe have alternate versions of interface elements with a suffix, like 2_briefing-ntf, in a similar way to how we swap ship textures. Set the interface in the campaign file in the same way we change main halls, and it uses the alternate if present or the original if not.

Just for the record, I think the alternates should really really really be in a different directory altogether; for example either interface/ntf/2_briefing or interface-ntf/2_briefing. Stuffing them all in the same interface directory would be madness that can easily be avoided.

P.S. PR #449 (https://github.com/scp-fs2open/fs2open.github.com/pull/449) does something reasonably similar. Maybe helpful, maybe not.
Title: Re: Interface Art "Themes"
Post by: The E on December 22, 2015, 05:05:10 am
Yeah, the way I planned on doing it was with a separate directory that all interface files would be loaded from.
Title: Re: Interface Art "Themes"
Post by: Galemp on December 22, 2015, 09:34:10 am
That sounds much better!
Title: Re: Interface Art "Themes"
Post by: Bryan See on January 02, 2016, 12:30:19 pm
What about interface with differing aspect ratios? What about resizing or scaling?
Title: Re: Interface Art "Themes"
Post by: The E on January 02, 2016, 01:02:02 pm
Feel free to come up with a design for them.