Facepunch.Steamworks
Current running program's AppId
Called with a message from Steam
Run Update until func returns false.
This will cause your program to lock up until it finishes.
This is useful for things like tests or command line utilities etc.
An item in your inventory.
Careful, this might not be available. Especially on a game server.
Called when the local client's items are first retrieved, and when they change.
Obviously not called on the server.
A list of items owned by this user. You should call Refresh() before trying to access this,
and then wait until it's non null or listen to OnUpdate to find out immediately when it's populated.
You can send this data to a server, or another player who can then deserialize it
and get a verified list of items.
Serialized data exprires after an hour. This is the time the value in SerializedItems will expire.
Call this at least every two minutes, every frame doesn't hurt.
You should call it when you consider it active play time.
IE - your player is alive, and playing.
Don't stress on it too much tho cuz it's super hijackable anyway.
Call this to retrieve the items.
Note that if this has already been called it won't
trigger a call to OnUpdate unless the items have changed
Some definitions aren't sent to the client, and all aren't available on the server.
Manually getting a Definition here lets you call functions on those definitions.
Called every frame
If we have a local player request process it.
A list of items defined for this app.
This should be immediately populated and available.
Utility, given a "1;VLV250" string, convert it to a 2.5
You really need me to explain what this does?
Use your brains.
An item definition. This describes an item in your Steam inventory, but is
not unique to that item. For example, this might be a tshirt, but you might be able to own
multiple tshirts.
If you're manually occupying the Definition (because maybe you're on a server
and want to hack around the fact that definitions aren't presented to you),
you can use this to set propertis.
Trigger an item drop. Call this when it's a good time to award
an item drop to a player. This won't automatically result in giving
an item to a player. Just call it every minute or so, or on launch.
ItemDefinition is usually a generator
Basic UDP send. Packets can't be bigger than 1200 bytes (your typical MTU size). Can be lost, or arrive out of order (rare).
The sending API does have some knowledge of the underlying connection, so if there is no NAT-traversal accomplished or
there is a recognized adjustment happening on the connection, the packet will be batched until the connection is open again.
As above, but if the underlying p2p connection isn't yet established the packet will just be thrown away. Using this on the first
packet sent to a remote host almost guarantees the packet will be dropped.
This is only really useful for kinds of data that should never buffer up, i.e. voice payload packets
As above, but applies the Nagle algorithm to the send - sends will accumulate
until the current MTU size (typically ~1200 bytes, but can change) or ~200ms has passed (Nagle algorithm).
Useful if you want to send a set of smaller messages but have the coalesced into a single packet
Since the reliable stream is all ordered, you can do several small message sends with k_EP2PSendReliableWithBuffering and then
do a normal k_EP2PSendReliable to force all the buffered data to be sent.
Current user's Username
Current user's SteamId
Current Beta name, if ser
Should be called at least once every frame
History filters don't seem to work, so we don't bother.
You should apply them post process'dly
Favourite filters don't seem to work, so we don't bother.
You should apply them post process'dly
A list of servers that responded. If you're only interested in servers that responded since you
last updated, then simply clear this list.
A list of servers that were in the master list but didn't respond.
True when we have finished
Disposing will end the query
Callback when rules are receieved.
The bool is true if server responded properly.
List of server rules. Use HasRules to see if this is safe to access.
Returns true if this server has rules
Populates Rules for this server
Cancels a ticket.
You should cancel your ticket when you close the game or leave a server.
Creates an auth ticket.
Which you can send to a server to authenticate that you are who you say you are.
Returns the current BuildId of the game.
This is pretty useless, as it isn't guarenteed to return
the build id you're playing, or the latest build id.
Steam Id
Return true if blocked
Return true if is a friend. Returns false if blocked, request etc.
Their current display name
Returns true if this friend is online
Returns true if this friend is online and playing this game
Returns true if this friend is online and playing this game
The AppId this guy is playing
Returns all friends, even blocked, ignored, friend requests etc
Should be 32x32 - but make sure to check!
Should be 64x64 - but make sure to check!
Should be 184x184 - but make sure to check!
Return true if this image couldn't be loaded for some reason
Returns the optimal sample rate for voice - according to Steam
If set to true we are listening to the mic.
You should usually toggle this with the press of a key for push to talk.
The last time voice was detected, recorded
If set we will capture the audio at this rate. If unset (set to 0) will capture at OptimalSampleRate
Some platforms allow/need CallingConvention.ThisCall. If you're crashing with argument null
errors on certain platforms, try flipping this to true.
I owe this logic to Riley Labrecque's hard work on Steamworks.net - I don't have the knowledge
or patience to find this shit on my own, so massive thanks to him. And also massive thanks to him
for releasing his shit open source under the MIT license so we can all learn and iterate.
You can force the platform to a particular one here.
This is useful if you're on OSX because some versions of mono don't have a way
to tell which platform we're running
Allows you to interact with Steam's UGC stuff (User Generated Content).
To put simply, this allows you to upload a folder of files to Steam.
To upload a new file use CreateItem. This returns an Editor object.
This object is also used to edit existing items.
To get a list of items you can call CreateQuery. From there you can download
an item and retrieve the folder that it's downloaded to.
Generally there's no need to compress and decompress your uploads, so you should
usually be able to use the content straight from the destination folder.
Called when an item has been downloaded. This could have been
because of a call to Download or because of a subscription triggered
via the browser/app.
Called when an item has been installed. This could have been
because of a call to Download or because of a subscription triggered
via the browser/app.
You should never have to call this manually
Creates a query object, which is used to get a list of items.
This could be a list of the most popular items, or a search,
or just getting a list of the items you've uploaded.
Create a new Editor object with the intention of creating a new item.
Your item won't actually be created until you call Publish() on the object.
Returns a class representing this ItemId. We don't query
item name, description etc. We don't verify that item exists.
We don't verify that this item belongs to your app.
Gets an Item object for a specific item. This doesn't currently
query the item's name and description. It's only really useful
if you know an item's ID and want to download it, or check its
current download status.
How a query should be ordered.
The type of item you are querying for
Both MicrotransactionItems and subscriptionItems
Workshop item that is meant to be voted on for the purpose of selling in-game
normal Workshop item that can be subscribed to
Used to define the item type when creating
When querying a specific user's items this defines what
type of items you're looking for.
Return a URL to view this item online
The AppId you're querying. This defaults to this appid.
The AppId of the app used to upload the item. This defaults to 0
which means all/any.
Page starts at 1 !!
Only return items with these tags
If true, return items that have all RequireTags
If false, return items that have any tags in RequireTags
Don't return any items with this tag
If you're querying for a particular file or files, add them to this.
Don't call this in production!
Current user's Username
Current user's SteamId
Initialize a server - query port will use the same as GamePort (MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE)
Should be called at least once every frame
Gets or sets the current MaxPlayers.
This doesn't enforce any kind of limit, it just updates the master server.
Gets or sets the current BotCount.
This doesn't enforce any kind of limit, it just updates the master server.
Gets or sets the current Map Name.
Gets or sets the current ModDir
Gets or sets the current Product
Gets or sets the current Product
Gets or sets the current ServerName
Gets or sets the current Passworded
Gets or sets the current GameTags
Log onto Steam anonymously
Sets a Key Value
Steamid, Ownerid, Status
Steam authetication statuses
Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange.
Forget this guy. They're no longer in the game.
If true, Steam wants to send a packet. You should respond by sending
this packet in an unconnected way to the returned Address and Port
We have received a server query on our game port. Pass it to Steam to handle.
Allows getting and setting stats on users from the gameserver
Retrieve the stats for this user. If you pass a callback function in
this will be called when the stats are recieved, the bool will signify whether
it was successful or not.
Set the named statistic for this user
Set the named statistic for this user
Set the named stat for this user
Set the named stat for this user
We're only Pack = 8 on Windows