-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add Steamworks SDK #595
base: develop
Are you sure you want to change the base?
Add Steamworks SDK #595
Conversation
Nightly build for this pull request:
|
ClientCore/ClientConfiguration.cs
Outdated
@@ -184,6 +184,8 @@ public void RefreshSettings() | |||
|
|||
public string LocalGame => clientDefinitionsIni.GetStringValue(SETTINGS, "LocalGame", "DTA"); | |||
|
|||
public int SteamGameId => clientDefinitionsIni.GetIntValue(SETTINGS, "SteamGameId", 2229850); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be configured to the default value of YR one explicitly. you should check if it's a YR or Ares config via ifdef and use that as default, elif TS - use Steam TS one, else assign a missing ID value (idk if 0 is correct for Steam?) and check before even initializing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? It's not hard to change the default value for something sane based on the build config, and I don't think having am ability for people change steam app ID is something that should be exposed a lot. Besides, there are only two such games that are on Steam and are supported by the client - TS and YR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this instead
Why Steam Game Identityficator can be set from ClientDefinitions.ini
? Is there possible situation when modder publish its mod in the Steam as the standalone game? If not -- better to hardcode YR and TS Steam IDs as Kerbiter said.
In addition to the above, i believe a button to enable/disable feature (like DRP) is needed.
@MahBoiDeveloper please review where the docs for that should be put, if any at all? |
DXMainClient/Startup.cs
Outdated
@@ -153,6 +155,25 @@ public void Execute() | |||
fhc.CalculateHashes(); | |||
} | |||
#endif | |||
// Load native steam binaries. | |||
SteamNative.Initialize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, does the Steam SDK work (or at least doesn't crash the client) in Linux? It's better to test it. If not (I don't know whether it works or not), an if statement should be introduced to skip the Steam API if the OS is not Windows.
<PackageVersion Include="SteamworksSharp" Version="1.0.8" /> | ||
<PackageVersion Include="SteamworksSharp.Native" Version="1.0.8" /> | ||
<PackageVersion Include="SteamworksSharp.Native.Windows_x64" Version="1.0.8" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhh I don't think we should be using this. This is a pretty random wrapper wrote by a random person 6 years ago.
For a 1:1 Steamworks mappings use Steamworks.NET
. For a preoprly C# one I think Facepunch.Steamworks
should be used (based on some quick reading up I would pick that, even if it's a bit outdated). Please research this question a bit more, maybe there are other better alternatives.
It is not so complex feature like Discord Rich Presence, and documentation doesn't need for that, i suppose. |
Ah wait. The common DLL list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the common DLL list since new DLLs are introduced. #605
With this players can do "complete" cncnet steam integration, if they set a launch option in game's steam properties to something like this: Maybe it can be useful to add this info to the website? For instance, to the guides https://cncnet.org/yuris-revenge/how-to-play, https://cncnet.org/red-alert-2/how-to-play, https://cncnet.org/tiberian-sun/how-to-play |
Registers the game as playing on steam.
Configurable inside ClientDefs,
SteamGameId=2229850
Notes:
DXMainClient/Resources/steam_api64.dll
- Need clarification on where / how this should be copied to correct locationScreenshots