Commit Graph
121 Commits
Author SHA1 Message Date
wookieejedi 619e0e125e Add option to expand warning on unbound keys (#4342)
In Training missions, the game will check if keys used in directives are bound or unbound, and if unbound will display a message to the player to bind the key.

This is limited to only Training missions though, so this PR adds a `game_settings` option to allow modders to use that check in singleplayer mission types too, which is very useful for mods that rely on key presses in non-training missions. Also fixes #4340.
2022-06-04 08:17:24 -04:00
Goober5000 06f3bb77d1 add the ability for subtitles to be scaled correctly to the screen
By specifying a base resolution in game_settings.tbl, subtitles can be scaled to the screen in the same way as HUD gauges.  This can be used to prevent subtitles from appearing smaller at larger resolutions.

Depends on and is a follow-up to #4157.
2022-04-10 23:41:45 -04:00
Goober5000 f3a94d4fc8 add game_settings.tbl option to specify subtitle coords in pixels
What it says on the tin.  This allows more precise positioning of subtitles, and a future PR will add the ability to scale them according to screen resolution.
2022-04-09 20:43:42 -04:00
Goober5000 8fa332b869 refactor supernova code
A bit of cleanup, refactoring, and bugfixing...

1) The supernova code now uses enums to represent states, and those state transitions now all happen in `supernova_process` instead of being scattered around.
2) Some state transition bugs were fixed - e.g. the HUD is now disabled when the camera cuts to the external view, instead of when the camera stops moving; and the particles start and the simulation stops when the comments say they do.
3) There is now a game_settings.tbl flag to make the HUD countdown timer reach zero when the supernova hits, instead of reaching 5s.  This only affects the HUD display; actual timing is not changed.
4) Don't apply lightshafts if the supernova glare is in effect - partial fix for #4152.
2022-04-08 22:02:34 -04:00
Goober5000 29a0736d34 fix missile detonation for computers with high FPS
There is a bit of code that detonates a missile if it misses impacting on a subsystem.  On Nyctaeus's Arachnas model, missiles could reach the center point of the main beam turret submodel without actually hitting any part of the submodel.  The fail-safe code would set the missile to detonate in that case, but on low-FPS systems the weapon would be able to actually hit the turret before it detonated.  On high-FPS systems, there is a clean miss.

This reworks the code to delay the missile detonation until it reaches the other side of the submodel, so it has time to hit some other part of it.  It also reduces the detonation time from 1/100 of a second (which is more than one frame on 120 FPS systems) to 1/1000 of a second (which is always less than one frame).
2022-02-06 17:53:19 -05:00
Goober5000 d8987b3de0 set some mod flags by default in 22.0 2022-01-30 22:58:24 -05:00
Goober5000 059babea50 add game_settings flag 2022-01-30 22:23:44 -05:00
Goober5000 5c122a2913 add game_settings flag to not target turrets
In FS2, the HUD will automatically target the first turret on any BIG or HUGE ship.  In FS1, this did not happen.  This adds a flag to disable the new behavior.

The change is needed because the scan view cone is significantly constrained when any turrets or subsystems are targeted.  This makes Playing Judas quite a bit more difficult than it was designed to be.
2022-01-03 18:23:27 -05:00
wookieejedi 6ae4f55e91 Fix Default Sound Levels in Game Settings Table (#3809)
The game setting table allows  modders to set the default noise levels for new pilots, but the game did not actually use the values set in mod table. This PR fixes that and adds safety range checks, too. Tested and works as expected.
2021-12-06 21:39:42 -05:00
Asteroth d079d7fad2 Expose nebula visibility factors (#3676)
* Expose nebula visibility factors

* separately expose size factors

* naming changes
2021-11-10 13:07:04 -05:00
Goober5000 e27ed05127 spelling fixes 2021-10-20 15:31:23 -04:00
Brian Hernandez 08548ea517 Scale distant combat related effects so they stay visible (#3656)
* Scale distant combat related effects so they stay visible
- Effects scaled so that they always maintain a minimum pixel size
- Supports lasers, beams, all trails, muzzle flashes, and thrusters
- Disabled by default, but can be configured through the game_settings.tbl

* Added comments clarifying when min pixel size scaling happens.

* Convert some NULLs to nullptr to make CLANG happy
2021-10-13 19:46:01 -04:00
Brian e48011d175 Added comment to clarify that the mod_table is about game_settings.tbl 2021-09-14 11:26:13 -04:00
Goober5000 deefbf0860 allow custom briefing icons to always override standard icons
Adds the `$Custom briefing icons always override standard icons:` option to game_settings.tbl.  Implements #3575.
2021-07-27 14:16:58 -04:00
Goober5000 ff62ea010e training messages have additional idiosyncrasies 2021-07-16 22:09:11 -04:00
BMagnu 87f449415f Self-Shadow on 3D-Cockpits (#3437)
* Improve wookieejedi's cockpit shadows

* Rename stray bool

* Make shadow's eye pos explicit

* Tidy up stub declaration

* Add configurable shadows + requests by m!m

* make variable lowercase
2021-05-21 08:15:20 +00:00
wookieejedi ca6cc21be8 incorporate feedback/extra checks 2021-05-18 09:04:56 -04:00
wookieejedi 40840ee3f9 specify as float tuple 2021-05-17 17:56:48 -04:00
wookieejedi 76af0129f3 Expose Shadow Cascade Distances
The shadows distances were tuned/added by swifty with the following logic:
`// these cascade distances are a result of some arbitrary tuning to give a good balance of quality and banding.`

Mods, especially TCs, may have very different sized ships compared to FS, and as such desire more precise control over shadow cascade distances.

This PR exposes those values with settings in the `game_settings.tbl`.

PR is tested and works as expected.
2021-05-17 17:17:55 -04:00
Baezon 3810b039f5 Merge remote-tracking branch 'upstream/master' into exponential-fog 2021-03-20 10:39:41 -04:00
Strygon 3ab9f85a7a ditto 2021-03-17 17:50:19 +01:00
Strygon 45db675c35 Renaming the bool 2021-03-17 17:49:43 +01:00
Strygon 5b01a68352 Adding a few forgotten parts of the ChaseViewDefault code 2021-03-17 17:39:27 +01:00
Strygon 6598c25fda Adding support for Chase View flag 2021-03-17 17:35:39 +01:00
Baezon 78c79ac88d debug clean up 2021-03-08 01:37:00 -05:00
Baezon 3c53b74e5e switch to exponential nebula fog 2021-03-04 23:02:24 -05:00
Goober5000 f3bca4384f additional case functions and checks
This refactors the tolower/toupper code to use standards-conformant logic, and also adds some helpful utility functions.  Regular tolower/toupper must be supplied a value that can be represented as `unsigned char`, but the std:: functions are a bit more robust.
2021-02-18 04:23:08 -05:00
Phantom Hoover 83df3a003c Turn framerate-independent turning on by default 2020-12-04 17:38:09 +00:00
Baezon 01d2657532 v1 2020-10-09 23:00:21 -04:00
Baezon cf270771f0 re enable muzzle flashes flag 2020-09-25 13:59:15 -04:00
Baezon b7ceb29be9 clarity comments 2020-09-24 01:00:21 -04:00
Baezon 58ce531ec6 v1
V2
2020-09-24 01:00:21 -04:00
wookieejedi 65bf014693 and another syntax fix... 2020-09-23 16:36:21 -04:00
wookieejedi 13325ef81a one more cleanup 2020-09-23 16:24:57 -04:00
wookieejedi 74b3374fe6 fix syntax issue 2020-09-23 16:00:18 -04:00
wookieejedi 984ee93d75 Expose Weapons SS Damage Threshold for Turret Inaccuracy
This PR adds a table entry that allows modders to specify the damage threshold for when turrents become less accurate due to weapon subsystem damage. A Game table setting is easier to set once and tune, thus this PR allows that efficent exposure to the modder and does not require a large change or complex table entry.
2020-09-23 15:25:16 -04:00
JohnAFernandez 6ba811ec6c Fix 2526 and Add Two Game_setting.tbl flags
Fixes 2526 by making the array a vector and also adds a Shockwaves always damage bombs game_setting.tbl setting and a Shockwaves_consistently_apply_damage game_settings.tbl setting.  The second one keeps bombs and asteroids from being hit more than once by shockwaves, like ships do!
2020-09-01 01:47:33 -04:00
Goober5000 fc786b0473 Merge branch 'master' into swamers-lead 2020-08-21 22:50:25 -04:00
Tyler Blount c3c323acd6 Revert "Revert "Update DDS Utilities to DX10 Standard"" 2020-08-15 14:13:11 -06:00
Tyler Blount 5779117e30 Revert "Update DDS Utilities to DX10 Standard" 2020-08-15 12:52:25 -06:00
Tyler Blount 376e67b9ce Fix CI errors 2020-08-14 15:30:06 -06:00
Tyler Blount ccb6bdc08d Make capability system outputs user friendly 2020-08-14 13:15:47 -06:00
Tyler Blount d35199e5bb Add system for checking mod required rendering features 2020-08-14 11:58:38 -06:00
Goober5000 c9fcbb10da Merge branch 'master' into swamers-lead 2020-08-09 13:53:07 -04:00
Baezon f6603514b1 default value 2020-07-31 23:01:00 -04:00
Baezon 4ef217121e flag 2020-07-30 21:23:37 -04:00
Baezon 8bd033705f swarmers lead targets 2020-07-21 14:48:24 -04:00
Goober5000 d26a12464c clean up handling of translated vs. untranslated English
Since the original release of FS2, internal strings have been translated to their English entries in strings.tbl but external strings have not been translated to their English entries in tstrings.tbl.  It appears that string translation was universal until it was disabled via a hack, probably due to FRED idiosyncrasies (see comment in `fred_init()`), and then not re-enabled for release.  PR #2343 re-enabled it, but this turned out to have undesirable side-effects since many mods used incorrect XSTR indexes for external strings.

This PR restores the previous behavior and also cleanly separates localization into translated and untranslated modes.  FRED will always run in untranslated mode.  FSO will run in translated mode for all languages except English, where it will run in untranslated mode UNLESS the new option `$Use tabled strings for the default language` is enabled in game_settings.tbl.
2020-05-14 19:19:52 -04:00
asarium 7029e4a10f Add compile time option to enable logging in release builds
This mostly meant for special docker standalone server builds where it
might be useful to have full release performance but also have the logs
available if necessary. This now always compiles the log statements but
enables or disables them with a constexpr so they should not appear in
actual release binaries.
2020-02-24 18:54:55 +01:00
wookieejedi 539cad66e7 change placement and add reset values 2020-01-20 12:31:18 -05:00