Raised This Month: $32 Target: $400
 8% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 06-29-2018 , 11:01   Re: [ANY] SteamWorks
Reply With Quote #681

Quote:
Originally Posted by LowIntelligence View Post
Awesome work, it's been very useful on my servers

I however do have a question!
Would it be possible to use Steamworks to determine what Language a client is running the game in? (Steam language or region language isn't precise enough for me)
If so, how should I approach this?
https://sm.alliedmods.net/new-api/la...ClientLanguage
joao7yt is offline
LowIntelligence
Junior Member
Join Date: Jul 2017
Old 06-29-2018 , 11:21   Re: [ANY] SteamWorks
Reply With Quote #682

Quote:
Originally Posted by joao7yt View Post
This returns the Client's Steam language, I specifically need the language the Game is set to.
LowIntelligence is offline
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 06-29-2018 , 11:24   Re: [ANY] SteamWorks
Reply With Quote #683

Quote:
Originally Posted by LowIntelligence View Post
This returns the Client's Steam language, I specifically need the language the Game is set to.
Hmmm, interesting, I thought it would return the current game language, since sourcemod needs to know that to be able to print translation phrases in the right language... If it doesn’t, then idk
joao7yt is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-30-2018 , 08:34   Re: [ANY] SteamWorks
Reply With Quote #684

Quote:
Originally Posted by joao7yt View Post
Quote:
Originally Posted by LowIntelligence View Post
This returns the Client's Steam language, I specifically need the language the Game is set to.
Hmmm, interesting, I thought it would return the current game language, since sourcemod needs to know that to be able to print translation phrases in the right language... If it doesn’t, then idk
It does return the GAME language.

Steam Language: english
Game language: danish



Code:
Client "DarkDeviL" connected (x.x.x.x:27005).
Server waking up from hibernation
DarkDeviL - GetClientInfo "cl_language": danish
DarkDeviL - GetClientLanguage: danish
Generated using something like this in OnClientConnect:
CODE
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-30-2018 , 09:09   Re: [ANY] SteamWorks
Reply With Quote #685

It will always return the language that the game is actually using. Note that some supported games always use the Steam UI langauge, ignoring the game-specific value.
psychonic is offline
LowIntelligence
Junior Member
Join Date: Jul 2017
Old 06-30-2018 , 12:47   Re: [ANY] SteamWorks
Reply With Quote #686

Quote:
Originally Posted by arne1288 View Post
It does return the GAME language.
Code:
Client "DarkDeviL" connected (x.x.x.x:27005).
Server waking up from hibernation
DarkDeviL - GetClientInfo "cl_language": danish
DarkDeviL - GetClientLanguage: danish
Generated using something like this in OnClientConnect:
CODE
Much appreciated for the effort, but like I said, I needed a precise method.
I was hoping there'd be a way to use Steamworks to get the actual language the game is running in as L4D2 uses the method Psychonic described.

LowIntelligence is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-30-2018 , 14:06   Re: [ANY] SteamWorks
Reply With Quote #687

There's nothing wrong in the provided picture here. English game UI = cl_language english.
(Take a break, call a vote, invite a friend, leaderboard - how is that russian?

Last edited by Visual77; 06-30-2018 at 14:08.
Visual77 is offline
LowIntelligence
Junior Member
Join Date: Jul 2017
Old 06-30-2018 , 15:31   Re: [ANY] SteamWorks
Reply With Quote #688

Quote:
Originally Posted by Visual77 View Post
There's nothing wrong in the provided picture here. English game UI = cl_language english.
(Take a break, call a vote, invite a friend, leaderboard - how is that russian?
The Game's language, as in localized content.
When the game is set to Russian, but your Steam is English it will keep the UI in English, yes.
However, the audio will be played from your separate Russian folders.
Same goes for other languages that have their own Audio.

Unfortunately there's a rather big exploit with using different game languages that'll allow you to gain a huge advantage.
This is why I'm trying to find a feature that'll allow you to at least detect what Language the client has the game set to.
LowIntelligence is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 07-05-2018 , 12:28   Re: [ANY] SteamWorks
Reply With Quote #689

Quote:
Originally Posted by LowIntelligence View Post
The Game's language, as in localized content.
When the game is set to Russian, but your Steam is English it will keep the UI in English, yes.
However, the audio will be played from your separate Russian folders.
Same goes for other languages that have their own Audio.
File a bug on the Valve issue tracker.

Quote:
Originally Posted by LowIntelligence View Post
Unfortunately there's a rather big exploit with using different game languages that'll allow you to gain a huge advantage.
Just check all the files?
KyleS is offline
LowIntelligence
Junior Member
Join Date: Jul 2017
Old 07-06-2018 , 04:48   Re: [ANY] SteamWorks
Reply With Quote #690

Quote:
Originally Posted by KyleS View Post
File a bug on the Valve issue tracker.
Yeah I've done that a bit ago, afraid it was even a duplicate from an even older one.
Just labeled, no replies to either of the issues.

Quote:
Originally Posted by KyleS
Just check all the files?
In general we already check for a ton of sound files.
The problem is that AFAIK you can only decide to either force everyone to have all the sounds (which would be from every language, which obviously not everyone is going to have)

It'd be perfect if there was a method that worked with L4D2 that allowed you to check if a file existed on the client and if it did check if it matched the server. That way it wouldn't kick someone that is playing in English for missing Russian/other Language files.

I'm open to any ideas, really, and I appreciate the replies that go beyond the scope of this topic.
I'm guessing that's a no on being able to use Steamworks somehow to gain the localization setting for the client?

Last edited by LowIntelligence; 07-06-2018 at 04:49.
LowIntelligence is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode