* Add Mod Option to Limit 'Show Ship' when Toggling Cockpits
FotG uses cockpits and 'show ship', and also provides a way for players to toggle off cockpits. Unfortunately, if the player disables cockpits, 'show ship' still appears and looks very odd (since it appears the player is flying a ship with a hole in the center where the cockpit would be). Other mods have made entire ships with their cockpits, but FotG needs to use 'show ship' to match team colors and moving external ship animations.
This PR adds a game_settings option that allows mods to set to only use 'show ship' if cockpits are enabled.
Tested and works as expected.
* simplify logic
* fix typo
* initial version of default_settings.tbl
* Add a way to change player detail level defaults and implement a couple more options to detail_settings.tbl
* support the rest of 2d.cpp options
* Allow enforcing options to a specific value
* modernize detail defaults, levels, and values
* Fix parsing issue and remove lambda capture by reference
* fix print
* clang
* More efficient +Enforce parsing
* cleanup
* typo
* don't negate this
* error_display
* clarify language between presets, levels, and values
* add default case
* small fix
* use a map to minimize string lookups
As a follow-up to #5523, some mods use callsigns for their ships but prefer not to display the callsigns in the escort list. In lieu of a more flexible way to configure escort lists, a simple flag is sufficient to implement the desired behavior.
The ai_profiles.tbl options can already be read in any order, so it is modder-friendly to extend this capability to game_settings.tbl as well. This also updates the "unrecognized parameter" log statement to indicate the filename.
Note that this commit should be viewed while ignoring whitespace changes.
A design choice very early in FSO's scripting development established that invalid results return invalid objects. By using a game_settings.tbl flag, this allows invalid results to return nil instead.
* Create the ingame options game state
* Base working version of in-game options
* Cleanup + Optimization
* Localization pass
* more cleanup + documentation
* tooltips on option hover
* documentation and better inbounds check
* match case
* format strings instead of direct strings
* unused parameter
* address feedback
* localization id conflict with master
* Add this line back in
* pass the new option flags as well
* resolve xstr id conflict
* SCPUI in-game language selector
* xstr support
* proper debug print format
* minor fixes
* Save the language as json data rather than an index into the languages array
* ext instead of id for clarity
* Do this more formally
* unused param
One of the features requested in #5378 (specifically the one requested in #5274), this adds a new "$Contrails use absolute speed:" option to game_settings.tbl, which makes the `ct_below_limit()` function check `objp->phys_info.speed` instead of `objp->phys_info.fspeed`. This allows contrails to appear when moving in a direction other than forwards.
* Add Game Option to refresh selected weapon in loadout
This PR adds an option to always ensure the viewed weapon is one that can actually be on the selected ship when first clicking on the weapon loadout.
If you go to the loadout in the briefing and view the weapons on your ship, then go and change your ship class and go back to the weapon loadout screen, you will see that the weapon shown in the window on the right side is from your very first viewing before you changed your ship class. Displaying a weapon not allowed on a ship by default can be confusing to players, especially on mods like FotG where most ships have unique weapons.
The player can still of course click on a non-allowed weapon to view it, but with this PR the player will be initially shown a selected weapon that is allowed on the ship when opening the loadout editor.
Tested and works as expected.
* update order to be near weapon bools
Subsystem hitpoints are calculated as a percentage of the ship's hull strength as they are parsed. If a modular table modifies the ship's hull strength, the subsystems are not modified at the same time. This can lead to unreasonably large or small subsystem hitpoint values, as recently seen in the 1.3.0 version of Cardinal Spear.
This PR adds an option to defer hitpoint calculation until after parsing so that the subsystem is a percentage of the correct hull strength. Since this may affect the balance of existing mods, it is off by default unless the build targets 24.0 or later.
This also removes the long-unused `hull_percentage_of_hits` check and adds several log statements for significant options in game_settings.tbl.
The default movie subtitle font is font01.vf, but mods with custom font tables might not use this font. So this changes the handling slightly so that the movie player will use whatever the first available font is.
Follow-up to #1523. Fixes a sometimes spurious warning in mod initialization.
The hud-set-coords SEXP has always used exact pixels, without regard for the current screen resolution. This adds a similar scaling mechanism as is used for show-subtitle.
Fixes#5525.
* Init Particle shaders only if they're actually used
* set layout correctly
* Don't compile shadow shader if not needed
* Properly deal with capabilities
* Fix typo
* remove obsolete capability
* initial semi-working version
* better implementation of play and add stop and music.tbl viewer
* let the music window lose focus
* some cleanup
* add autoplay, next, previous
* use graphics
* Better dialog layout and allow ignoring files from the player list
* Make betterer
* a touch more cleanup
* revert this change
* missing bracket from merge conflict resolution
* address feedback