Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose hardcoded options to mod developers via dashoptions.tbl file #279

Closed
wants to merge 14 commits into from

Conversation

GooberRF
Copy link
Contributor

@GooberRF GooberRF commented Sep 26, 2024

This PR adds the initial framework for loading a file named dashoptions.tbl from a packfile in the loaded TC mod directory. The intent with this PR is to expose functionality to mod developers that has been "hardcoded" and out of each to them since the game's release. This functionality has long been desired by the modding community.

I will of course note that this is just the initial framework and a handful of the most commonly-requested basic options. This can and should be expanded over time (there are many more options I plan to add support for).

Currently here's what's supported:

  • Loading the dashoptions.tbl file (only when the game launches with a TC mod)
  • Parsing the dashoptions.tbl file, ignoring comments, and pulling supported options from it using RF's standard tbl syntax
  • Setting variables based on the options provided by the mod developer in dashoptions.tbl (string, int, float, bool, color currently supported)
  • Tracking whether a specific option has been set via dashoptions.tbl so that Dash can take action based on either the value provided, or the mere fact that a value has been provided
  • The list of options provided below

Here are the options available in the dashoptions.tbl file along with their default values. I will create a page on the wiki to fully detail all of this, and I also have a fully commented example dashoptions.tbl file, I'm just not sure where to put it (normally I'd say in dashfaction.vpp, but that would be loaded by the game as a set of defaults, which is not what I want)

#General
$Use Base Game Players Config: false
$Ignore Swap Assault Rifle Controls: false
$Ignore Swap Grenade Controls: false
$Disable Multiplayer Button: false
$Disable Singleplayer Buttons: false
$Assault Rifle Ammo Counter Color: "FF0000FF"
$Precision Rifle Scope Color: "00B4005A"
$Sniper Rifle Scope Color: "B400005A"
$Rail Driver Fire Glow Color: "80FFFFFF"
$Rail Driver Fire Flash Color: "80FFFFFF"
$Scoreboard Logo: "score_rflogo.tga"
$Default Geomod Mesh: "Holey01.v3d"
$Driller Double Geomod Mesh: "bit_driller_double.v3d"
$Driller Single Geomod Mesh: "bit_driller_single.v3d"
$APC Geomod Mesh: "Holey_APC.v3d"
$Default Geomod Smoke Emitter: "geomod smoke"
$Driller Geomod Smoke Emitter: "geomod smoke in driller"
$Ice Geomod Texture: "ice_ice01.tga"
$First Level Filename: "l1s1.rfl"
$Training Level Filename: "train01.rfl"
$Summoner Trailer Button Action: 0
+Summoner Trailer Button Bink Filename: "intro.bik"
+Summoner Trailer Button URL: "https://factionfiles.com"
#End

This PR:
Resolves #190
Resolves #105
Resolves #119
Resolves #235
Resolves #173 (mostly)
Lays foundation to eventually address everything in #165

@GooberRF GooberRF marked this pull request as ready for review October 17, 2024 23:56
@GooberRF GooberRF marked this pull request as draft October 21, 2024 14:20
@GooberRF
Copy link
Contributor Author

GooberRF commented Oct 21, 2024

I'm going to restructure this a little and split it in half to allow more flexibility and make it more useful. dashoptions.tbl for TC mods will be for options that necessarily need a TC mod to apply (like $Use Base Game Players Config and $Default Geomod Mesh), while options that would be useful in clientside mods (like $Precision Rifle Scope Color) will go in a separate .tbl file which can be loaded from client_mods per #269

Until #269 is merged, that will be a little difficult. As such, I'll pare this PR down to only the functionality for TC mods and submit a separate PR for the clientside equivalent to dashoptions.tbl, ideally after both #269 and this PR are merged.

@GooberRF
Copy link
Contributor Author

I'm going to withdraw this and delete this branch. The rewrite of this looks nothing like this one and if this is ever PRed over from Alpine it will be so vastly different that there's no point keeping this branch around.

@GooberRF GooberRF closed this Nov 15, 2024
@GooberRF GooberRF deleted the dashopttbl branch November 15, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment