### GodotSteam Project Overview Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/overrides/home.html This section provides a general introduction to the GodotSteam project, its purpose, and its ecosystem. It outlines the different versions available and directs users to getting started guides and download information. ```html {% extends "base.html" %} {% block styles %} {{ super() }} {% endblock %} {% block content %} GodotSteam ---------- Making Godot Engine a little more powerful with the Steamworks SDK * [Get Started](getting_started/introduction) * [Download](#download_versions) An ecosystem of tools for Godot Engine and Valve's Steam. For Linux, Mac, and Windows. ---------------------------------------------------------------------------------------- The GodotSteam project spans various pre-compiled modules, an equal amount of plug-ins, text and video tutorial series, an open-source game project, as well as more things in the pipeline. ![](assets/images/home_intro.jpg) ### [Standard](getting_started/what_are_you_making/#singleplayer-or-steam-networking) The core version of GodotSteam packed with all of Valve's Steamworks SDK magic. Built and run since the days of Godot 2. ### [Server](getting_started/what_are_you_making/#master-or-dedicated-servers) If you need a master server to orchestrate your online game or perhaps dedicated servers for players to run, look no further. ### [MultiplayerPeer](getting_started/what_are_you_making/#multiplayer-using-godots-multiplayerpeer-nodes) Love Godot 4's multiplayer synchronizer and spawners? Merge them with the power of Steam's networking and lobbies with this handy version. ### [Skillet](https://github.com/GodotSteam/Skillet) Our free-to-play, open-source game that showcases almost all the functionality of GodotSteam. Kind of like one, large example project you can poke. Sponsors? Sponsors! ------------------- GodotSteam wouldn't keep growing without help from cool folks like these... [![Bippinbits](assets/images/home_sponsors1.png)](https://bippinbits.com/)![Maurimo](assets/images/home_sponsors2.png) [![Purple Moss Collectors](assets/images/home_sponsors3.png)](https://purplemosscollectors.com) [![Maurimo](assets/images/home_sponsors4.png)](https://rankith.itch.io/unnamed-space-idle-prototype)[![adriaan Games](assets/images/home_sponsors5.png)](https://adriaan.games) ...and our other incredible sponsors. [Considering joining them if you find the project useful!](https://github.com/sponsors/Gramps) ![Need support? Visit us on Github or Discord!](assets/images/home_support.jpg) ### Need Support? Head over to either Github Discussions or Discord to report issues / bugs, ask questions, discuss implementations, share your project, and more. Plenty of really smart folks on both. * [Github](https://github.com/GodotSteam/GodotSteam/discussions) * [Discord](https://discord.gg/SJRSq6K) ![Add your cool game to the list!](assets/images/home_games.jpg) ### Using GodotSteam? Finally got your Steam store page up? Share it with us so we can share it with others! Either send in an e-mail or add it to our documentation directly by pull-request on Github. * [E-Mail Us](mailto:games@godotsteam.com) * [Pull-Request](https://github.com/GodotSteam/GodotSteam-Docs/pulls) {% endblock %} ``` -------------------------------- ### SteamCMD Setup and Download Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/exporting_shipping.md Provides instructions on how to obtain SteamCMD, mentioning two primary methods: downloading the Steamworks SDK from the partner site or following Valve's guide for SteamCMD standalone. ```markdown - [Download the Steamworks SDK from the partner site](https://partner.steamgames.com){ target="_blank" } - [Follow Valve's guide to getting _just_ SteamCMD itself here.](https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD){ target="_blank" } ``` -------------------------------- ### GodotSteam Example Project (Skillet) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/rich_presence.md An example project named Skillet, hosted on GitHub, showcasing the practical application of GodotSteam. This project serves as a starting point for developers to explore and build upon. ```GitHub https://github.com/GodotSteam/Skillet ``` -------------------------------- ### Install MKDocs and Material For MKDocs Source: https://github.com/godotsteam/godotsteam-docs/blob/master/readme.md Installs the necessary tools for building the documentation locally. Requires pip. ```python pip install mkdocs pip install mkdocs-material ``` -------------------------------- ### Gathering User and App Data Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/initializing.md This snippet demonstrates how to retrieve various data points related to the user and the application using the GodotSteam library. It includes functions to get installed depots, available languages, owner information, build ID, current game language, install directory, Steam Deck status, VR status, online status, ownership status, launch command line, Steam ID, persona name, and UI language. ```gdscript var app_installed_depots: Array = Steam.getInstalledDepots( app_id ) var app_languages: String = Steam.getAvailableGameLanguages() var app_owner: int = Steam.getAppOwner() var build_id: int = Steam.getAppBuildId() var game_language: String = Steam.getCurrentGameLanguage() var install_dir: Dictionary = Steam.getAppInstallDir( app_id ) var is_on_steam_deck: bool = Steam.isSteamRunningOnSteamDeck() var is_on_vr: bool = Steam.isSteamRunningInVR() var is_online: bool = Steam.loggedOn() var is_owned: bool = Steam.isSubscribed() var launch_command_line: String = Steam.getLaunchCommandLine() var steam_id: int = Steam.getSteamID() var steam_username: String = Steam.getPersonaName() var ui_language: String = Steam.getSteamUILanguage() ``` -------------------------------- ### Text Tutorials and Guides for Godot and Steam Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/resources/external.md A collection of text-based tutorials and guides covering topics such as Steam Input integration, UGC management, Steamworks API, and graphical asset guidelines for the Steam store. ```blog https://furd.dev/blog/steam-input/ ``` ```blog https://forgottendreamgames.com/blog/godotsteam-how-to-upload-and-download-user-generated-content-ugc-repost.html ``` ```blog https://mreliptik.dev/godot-auto-export ``` ```blog https://michaelmacha.wordpress.com/2024/04/08/godotsteam-and-steammultiplayerpeer/ ``` ```steam https://partner.steamgames.com/doc/sdk ``` ```blog https://noblesteedgames.com/blog/a-handy-guide-to-graphical-assets-on-your-steam-store-page/ ``` ```blog https://dinoleaf.com/blog/guides/godot-achievements/ ``` -------------------------------- ### Steam and YouTube Links Example Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-b.md This example shows how to link to a Steam game page and a YouTube channel using Markdown and Font Awesome icons. ```markdown [!["Bullet Quest"](https://steamcdn-a.akamaihd.net/steam/apps/1946490/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/1946490/Bullet_Quest/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/1946490/Bullet_Quest/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-youtube: ](https://www.youtube.com/channel/UCOc_IzuiLnY4LLDc_VHOj3A){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### Audio Stream Setup Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/voice.md Configures the AudioStreamPlayer nodes for voice chat playback. It sets the mix rate and starts the playback for both local and network audio streams, obtaining their respective playback objects. ```gdscript func _ready() -> void: $Local.stream.mix_rate = current_sample_rate $Local.play() local_playback = $Local.get_stream_playback() $Network.stream.mix_rate = current_sample_rate $Network.play() network_playback = $Network.get_stream_playback() ``` -------------------------------- ### Steamworks SDK Application Launching Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/apps.md Functions for retrieving launch information when a game is started via a Steam URL. Includes getting the command line and query parameters. ```APIDOC getLaunchCommandLine( ) Description: Gets the command line if the game was launched via Steam URL, e.g. `steam://run////`. This method is preferable to launching with a command line via the operating system, which can be a security risk. In order for rich presence joins to go through this and not be placed on the OS command line, you must enable "Use launch command line" from the Installation > General page on your app. If game was already running and launched again, the [new_launch_url_parameters](#new_launch_url_parameters) callback will be fired. Returns: string Related: [new_launch_url_parameters](#new_launch_url_parameters) getLaunchQueryParam( `string` key ) Description: Returns the associated launch param if the game is run via `steam://run///?param1=value1¶m2=value2¶m3=value3` etc. Parameter names starting with the character '@' are reserved for internal use and will always return an empty string. Parameter names starting with an underscore '_' are reserved for Steam features; they can be queried by the game but it is advised that you not use param names beginning with an underscore for your own features. Check for new launch parameters on [new_launch_url_parameters](#new_launch_url_parameters) callbacks. Parameters: key (string): The launch key to test for. Ex: param1 Returns: string The value associated with the key provided. Returns an empty string if the specified key does not exist. Related: [new_launch_url_parameters](#new_launch_url_parameters) ``` -------------------------------- ### Install MKDocs Plugins Source: https://github.com/godotsteam/godotsteam-docs/blob/master/readme.md Installs required MKDocs plugins for features like badges and RSS feeds. Requires pip. ```python pip install mkdocs-badges pip install mkdocs-rss-plugin pip install "mkdocs-material[imaging]" ``` -------------------------------- ### Steam Store Link Example Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-k.md Demonstrates how to create a direct link to a game's Steam store page using Markdown and Font Awesome icons. This is useful for linking to games that utilize Steam integration. ```markdown [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/2219370/KIRO_II_The_Wizards_Guild){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### Install DLC (Steamworks ISteamApps) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/apps.md Initiates the installation of an optional downloadable content (DLC) package. This function returns void and triggers a `dlc_installed` callback upon completion. ```APIDOC installDLC(uint32_t dlc_id) dlc_id: uint32_t Returns: void Notes: Triggers a dlc_installed callback. ``` -------------------------------- ### Setting Up Rich Presence Video Tutorial Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/rich_presence.md A video tutorial by FinePointCGI demonstrating how to set up Rich Presence for GodotSteam. This resource is helpful for understanding real-time game status updates. ```URL https://www.youtube.com/watch?v=VCwNxfYZ8Cw&t=4762s ``` -------------------------------- ### Get Installed Depots (Steamworks ISteamApps) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/apps.md Retrieves a list of all installed depots for a specified App ID. The returned array contains the installed depots, ordered by their mount sequence. ```APIDOC getInstalledDepots(uint32_t app_id) app_id: uint32_t Returns: array - Contains the installed depots, returned in mount order. ``` -------------------------------- ### Get App Install Directory Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/changelog/godot3.md Modified `getAppInstallDir()` to return a dictionary containing the absolute path and install size of the application. ```gdscript func getAppInstallDir() -> Dictionary: # Returns the installation directory and size of the app. # Example return: {"path": "/path/to/game", "size": 1024} pass ``` -------------------------------- ### Get Number of Installed Apps (APIDOC) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/app_lists.md Retrieves the total count of installed applications for the current player. This function takes no parameters and returns an integer representing the count. ```APIDOC getNumInstalledApps() Returns: int ``` -------------------------------- ### Steamworks Depot Setup Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/exporting_shipping.md Steps to set up Steam depots for game builds on the Steamworks partner site. Involves navigating to Technical Tools > Edit Steamworks Settings > SteamPipe > Depots, adding new depots, and configuring OS/architecture for each. Depot IDs are crucial for subsequent steps. ```bash # On Steamworks Partner Site: # 1. Navigate to your game's landing page. # 2. Go to 'Technical Tools' -> 'Edit Steamworks Settings'. # 3. Select 'SteamPipe' -> 'Depots'. # 4. Click 'Add New Depot', name it, and configure OS/Architecture. # 5. Record the Depot IDs for each platform. ``` -------------------------------- ### Get Installed Apps (APIDOC) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/app_lists.md Retrieves a list of application IDs for all installed applications belonging to the current player. This function requires a maximum number of app IDs to retrieve and returns an array of integers. ```APIDOC getInstalledApps(uint32 max_app_ids) max_app_ids: The maximum number of app IDs to retrieve. Returns: array (list of int app IDs) ``` -------------------------------- ### Compile Godot Release Templates Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/server.md Compiles Godot release templates for production builds. Requires specifying the platform and build target. Supports both Godot 3.x and Godot 4.x. ```shell scons platform= production=yes tools=no target=release ``` ```shell scons platform= tools=no target=template_release ``` -------------------------------- ### Steam Game Integration Examples Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-f.md This section showcases examples of integrating game information, likely for display or linking purposes. It includes game titles, Steam store links, and links to other social media or platform pages. ```markdown [!["Forgotten Secrets: Escape Room"](https://steamcdn-a.akamaihd.net/steam/apps/2830320/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/2830320/Forgotten_Secrets_Escape_Room/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/2830320/Forgotten_Secrets_Escape_Room/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-youtube: ](https://www.youtube.com/channel/UCojVSa8GcxNT2ImOyvmlohg){ target="_blank" .md-button .md-button--store } ``` ```markdown [!["Fracas"](https://steamcdn-a.akamaihd.net/steam/apps/2824960/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/2824960/Fracas/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/2824960/Fracas/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-youtube: ](https://www.youtube.com/channel/UCfvMIfsupw6zfQ6Hs5W3aOA){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-instagram: ](https://www.instagram.com/rookbirdgames/){ target="_blank" .md-button .md-button--store } ``` ```markdown [!["Frame of Mind - A Game of Thoughts"](https://steamcdn-a.akamaihd.net/steam/apps/2515480/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/2515480/Frame_of_Mind__A_game_of_thoughts/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/2515480/Frame_of_Mind__A_game_of_thoughts/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-mastodon: ](https://mastodon.gamedev.place/@FrameOfMind){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-discord: ](https://discord.gg/WjduEh4htP){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-itch-io: ](https://purplesloth.itch.io/frame-of-mind){ target="_blank" .md-button .md-button--store } ``` ```markdown [!["Fruit Salad"](https://steamcdn-a.akamaihd.net/steam/apps/1848520/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/1848520/Fruit_Salad/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/1848520/Fruit_Salad/){ target="_blank" .md-button .md-button--store } ``` ```markdown [!["Fruity Rogue"](https://steamcdn-a.akamaihd.net/steam/apps/3221570/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/3221570/Fruity_Rogue/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/3221570/Fruity_Rogue/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-firefox-browser: ](https://www.fruityrogue.com/){ target="_blank" .md-button .md-button--store } ``` ```markdown [!["Full Court Heroes"](https://steamcdn-a.akamaihd.net/steam/apps/2268280/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/2268280/Full_Court_Heroes/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/2268280/Full_Court_Heroes/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-youtube: ](https://www.youtube.com/channel/UCPrIEKXiR_VI5h4XI4T5sVw){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### Linux Steam Overlay Setup Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/modules.md This snippet shows how to preload the Steam overlay library on Linux to ensure the Steam overlay functions correctly. It can be executed in a terminal or included in a startup script. ```shell export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so;~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so or export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so; export LD_PRELOAD=~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so; ``` -------------------------------- ### Steam and Social Media Links Example Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-b.md This example shows how to link to a Steam game page along with various social media profiles (Firefox, Mastodon, Bluesky, Instagram, Threads) using Markdown. It utilizes Font Awesome icons for visual representation. ```markdown [!["Bryce Tiles"](https://steamcdn-a.akamaihd.net/steam/apps/2144990/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/2144990/Bryce_Tiles/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/2144990/Bryce_Tiles/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-firefox-browser: ](http://www.brilliancegames.com/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-mastodon: ](https://mastodon.gamedev.place/@brilliance){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-bluesky: ](https://bsky.app/profile/brilliance.bsky.social){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-instagram: ](https://www.instagram.com/brilliancegames){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-threads: ](https://www.threads.com/@brilliancegames){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### GDScript - Get Real Identity for Fake IP Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/networking_utils.md Example of how to use the getRealIdentityForFakeIP function in GDScript to retrieve the real identity associated with a fake IP address. ```GDScript var real_identity_info = Steamworks.getRealIdentityForFakeIP("192.168.1.100") if real_identity_info.result == Steamworks.RESULT_OK: print("Real identity: ", real_identity_info.identity) else: print("Failed to get real identity: ", real_identity_info.result) ``` -------------------------------- ### Steam Initialization Methods Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/initializing.md Provides an overview of different methods to initialize Steamworks in Godot projects, including Project Settings, steamInitEx, and steamInit. Each method has different ways of handling initialization status and arguments. ```APIDOC Project Settings: - Navigate to Project Settings > Steam > Initialization. - Allows automatic initialization when the game starts. - Populates internal 'steam_init_result' dictionary accessible via get_steam_init_result(). steamInitEx(app_id: int = null, embed_callbacks: bool = null) -> Dictionary: - Initializes Steamworks with verbose status. - Returns a dictionary with 'verbal' (string) and 'status' (int) keys. - Status codes: - 0: Successfully initialized - 1: Some other failure - 2: Cannot connect to Steam (client not running) - 3: Steam client out of date - Populates internal 'steam_init_result' dictionary. steamInit(app_id: int = null, embed_callbacks: bool = null) -> bool: - Initializes Steamworks and returns a boolean (true/false). - Does not populate 'steam_init_result', making failure reason retrieval impossible. - Suitable when failure reason is not important. ``` -------------------------------- ### Video Tutorials for Godot and Steam Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/resources/external.md A collection of video tutorials covering various aspects of integrating Godot with Steam, including general setup, lobby systems, uploading to Steam, and multiplayer functionalities. ```youtube https://www.youtube.com/watch?v=J0GrG-AffCI ``` ```youtube https://youtu.be/si50G3S1XGU ``` ```youtube https://www.youtube.com/watch?v=VCwNxfYZ8Cw ``` ```youtube https://www.youtube.com/playlist?list=PLqF5LscxmBZWLr22FPYNkPE--T7wWXvwR ``` ```youtube https://www.youtube.com/playlist?list=PLg_8mgEWE2p8ZA-AqUUJ3CYEtrRVFhl_v ``` ```youtube https://www.youtube.com/watch?v=TPJbqA5OAmY&t=309s ``` ```youtube https://www.youtube.com/watch?v=D4i9you1_IE ``` -------------------------------- ### Godot 4 Plugin vs. Pre-compiled Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/getting_started/introduction.md Compares Godot 4 GDExtension plugins and pre-compiled editor/template bundles. Both offer similar access to the Steam object and in-editor documentation. Differences lie in export templates, shared library requirements, and debugging complexity for plugins. ```godot-gdscript ## Similarities (Godot 4) - Both have access to in-editor documentation - Both have the Steam object globally by default - Both behave exactly the same using the same code-base underneath ## Differences (Godot 4) - Pre-compiled requires its specific templates for exporting games, plug-in uses Godot's standard templates - Plug-in requires additional shared library files to function after exporting, but they are provided - Debugging plug-in failures can be a bit more complicated due to occasional downstream issues ``` -------------------------------- ### Steam and Discord Links Example Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-b.md This snippet illustrates linking to a Steam game page and a Discord server invite using Markdown and Font Awesome icons. ```markdown [!["Bubble Battle"](https://steamcdn-a.akamaihd.net/steam/apps/3180520/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/3180520/Bubble_Battle/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/3180520/Bubble_Battle/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-discord: ](https://discord.com/invite/fHJheB2JF3){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### Set Up Steam Builds Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/exporting_shipping.md Configure and deploy builds through SteamPipe. This involves selecting the correct build ID, depot IDs, and the target branch for your game's release. ```godot Navigate to the game's landing page on Steamworks. Go to **Technical Tools**. Click on **Edit Steamworks Settings**. Select **SteamPipe** then **Builds**. Verify the build ID and depot IDs. Use the drop-down to select the target branch (e.g., 'default branch' for public release). Press **Preview Changes** to add internal notes and activate the build. ``` -------------------------------- ### Steam Game Link Example Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-b.md This snippet demonstrates how to create a link to a Steam game's store page using Markdown. It includes an image preview and a direct link to the Steam store. ```markdown [!["Boosted Survivors"](https://steamcdn-a.akamaihd.net/steam/apps/3161850/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/3161850/Boosted_Survivors/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/3161850/Boosted_Survivors/){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### Godot 3 Plugin vs. Pre-compiled Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/getting_started/introduction.md Highlights the differences between Godot 3 GDNative plugins and pre-compiled editor/template bundles. While most Steam functionality is similar, plugins lack in-editor documentation, require manual Steam object instantiation, and have known issues with Rich Presence on Windows. ```godot-gdscript ## Similarities (Godot 3) - Large majority of the Steam functionality is identical ## Differences (Godot 3) - Pre-compiled requires its specific templates for exporting games, plug-in uses Godot's standard templates - Plug-in does not have access to in-editor documentation - Plug-in must instance the Steam object - Plug-in has no access to Steam constants or enums - [Plug-in has issues with Rich Presence on Windows and other minor quirks](../issues/common_issues.md/#gdnative) ``` -------------------------------- ### Steam, Discord, Website, and YouTube Links Example Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/games/games-b.md This snippet demonstrates linking to a Steam game page, Discord server, official website, and YouTube channel using Markdown and Font Awesome icons. ```markdown [!["Burgleville"](https://steamcdn-a.akamaihd.net/steam/apps/3147130/header.jpg){ loading=lazy align=left }](https://store.steampowered.com/app/3147130/Burgleville/){ target="_blank" } --- [ :fontawesome-brands-steam: ](https://store.steampowered.com/app/3147130/Burgleville/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-discord: ](https://discord.gg/vBQ93WZBGs){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-firefox-browser: ](https://www.burgleville.com/){ target="_blank" .md-button .md-button--store } [ :fontawesome-brands-youtube: ](https://www.youtube.com/@Burgleville){ target="_blank" .md-button .md-button--store } ``` -------------------------------- ### Check Steam Initialization Errors and Quit Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/initializing.md Initializes Steam and checks the returned status. If initialization fails, it prints an error message, displays a warning prompt, and quits the game. ```gdscript func initialize_steam() -> void: var initialize_response: Dictionary = Steam.steamInitEx() print("Did Steam initialize?: %s" % initialize_response) if initialize_response['status'] > Steam.STEAM_API_INIT_RESULT_OK: print("Failed to initialize Steam, shutting down: %s" % initialize_response) # Show some kind of prompt so the game doesn't suddently stop working show_warning_prompt() get_tree().quit() ``` -------------------------------- ### GodotSteam Addon Structure Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/gdextension.md Example directory structure for the GodotSteam addon within a Godot project, showing platform-specific compiled libraries and Steamworks API files. ```shell addons └─ godotsteam └─ win64 │─ libgodotsteam.windows.template_debug.x86_64.dll │─ libgodotsteam.windows.template_release.x86_64.dll └─ steam_api64.dll ``` ```shell addons └─ godotsteam └─ win32 │─ libgodotsteam.windows.template_debug.x86_32.dll │─ libgodotsteam.windows.template_release.x86_32.dll └─ steam_api.dll ``` ```shell addons └─ godotsteam └─ linux64 │─ libgodotsteam.linuxbsd.template_debug.x86_64.so │─ libgodotsteam.linuxbsd.template_release.x86_64.so └─ libsteam_api.so ``` ```shell addons └─ godotsteam └─ linux32 │─ libgodotsteam.linuxbsd.template_debug.x86_32.so │─ libgodotsteam.linuxbsd.template_release.x86_32.so └─ libsteam_api.so ``` ```shell addons └─ godotsteam └─ osx │─ libgodotsteam.debug.framework │ │─ libgodotsteam.macos.template_debug.universal │ └─ libsteam_api.dylib │─ libgodotsteam.framework │ │─ libgodotsteam.macos.template_release.universal │ └─ libgodotsteam.framework/libsteam_api.dylib └─ libsteam_api.dylib ``` -------------------------------- ### Get Friend Persona Name History Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/friends.md Retrieves a previous display name for a specified user. This function only works for names that the current user has previously seen on their local computer. The history is indexed starting from 0 for the current name. ```APIDOC getFriendPersonaNameHistory( steam_id: uint64_t, name_history: int ) Parameters: steam_id (uint64_t): The Steam ID of the friend. name_history (int): The index of the name history to retrieve (0 for current, 1 for previous, etc.). Returns: string: The player's persona name at the specified history index. Returns an empty string if no more history is available. Related: [ISteamFriends](https://partner.steamgames.com/doc/api/ISteamFriends#GetFriendPersonaNameHistory) ``` -------------------------------- ### GodotSteam Addon Structure Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/gdnative.md Example directory structure for the GodotSteam addon within a Godot project, showing platform-specific binary placement. ```shell addons └─ godotsteam └─ win64 │─ godotsteam.dll └─ steam_api64.dll ``` ```shell addons └─ godotsteam └─ x11 │─ libgodotsteam.so └─ libsteam_api.so ``` ```shell addons └─ godotsteam └─ osx │─ libgodotsteam.dylib └─ libsteam_api.dylib ``` -------------------------------- ### GodotSteam Server Project Structure Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/server.md Illustrates the expected directory and file structure for the GodotSteam server module within the Godot engine source code, including the Steamworks SDK integration. ```plaintext godot/ └─ modules/ └─ godotsteam_server/ ├─ doc_classes/ ├─ sdk/ │ ├─ public/* │ └─ redistributable_bin/* ├─ config.py ├─ godotsteam_server.cpp ├─ godotsteam_server.h ├─ register_types.cpp ├─ register_types.h └─ SCsub ``` -------------------------------- ### Compile Godot Editors Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/server.md Compiles the Godot editor with specific build configurations. Requires setting the platform and build target. Supports both Godot 3.x and Godot 4.x. ```shell scons platform= production=yes tools=yes target=release_debug ``` ```shell scons platform= tools=yes target=editor ``` -------------------------------- ### Get Achievement Status and Unlock Time Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/user_stats.md Retrieves the status of a Steam achievement for the current user, including whether it has been achieved and the time of unlocking. If the achievement was unlocked before Steam started tracking unlock times (December 2009), the unlock time will be zero. The time is returned in Unix epoch format. ```APIDOC getAchievementAndUnlockTime( achievement_name: string ) Parameters: achievement_name (string): The name of the achievement to query, as defined in the Steamworks back-end. Returns: dictionary: A dictionary containing the following keys: retrieve (bool): True if the achievement exists and is published on Steamworks, false otherwise. achieved (bool): True if the current user has unlocked the achievement, false otherwise. unlocked (uint32_t): The Unix epoch timestamp when the achievement was unlocked, if 'achieved' is true. Zero if unlocked before tracking began. Notes: If 'achieved' is true but 'unlocked' is zero, the achievement was unlocked before December 2009. Related function for other users: getUserAchievementAndUnlockTime. ``` -------------------------------- ### Linux Shared Library Preload Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/server.md On Linux, you may need to preload the overlay library for the Steam overlay to function correctly. This can be set as an environment variable before running your executable. ```shell export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so;~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so or export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so; export LD_PRELOAD=~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so; ``` -------------------------------- ### App Installed Signal (APIDOC) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/app_lists.md A signal emitted when a new application is successfully installed. This signal provides the application ID and the install folder index. ```APIDOC app_installed Returns: app_id (uint32_t) install_folder_index (uint32_t) ``` -------------------------------- ### Get GodotSteam Server Source Code Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/server.md Clones the GodotSteam server source code from its GitHub repository. Supports Godot 3.x and Godot 4.x by using different branches. ```shell git clone -b godot3 https://github.com/GodotSteam/GodotSteam-Server.git godotsteam_server ``` ```shell git clone -b godot4 https://github.com/GodotSteam/GodotSteam-Server.git godotsteam_server ``` -------------------------------- ### App Installation Directory Information Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/changelog/gdextension.md Retrieves the installation directory and size of an application. The function now returns a dictionary containing the absolute path and install size. ```gdscript func getAppInstallDir(app_id: int) -> Dictionary: # Returns a dictionary with 'path' and 'size' keys ``` -------------------------------- ### Godot Networking Setup (_ready) Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/tutorials/networking_messages.md Sets up signal connections for Steam network messages and checks command line arguments in the _ready function. This is crucial for handling incoming session requests and failures. ```gdscript func _ready() -> void: Steam.connect("network_messages_session_request", self, "_on_network_messages_session_request") Steam.connect("network_messages_session_failed", self, "_on_network_messages_session_failed") # Check for command line arguments check_command_line() ``` ```gdscript func _ready() -> void: Steam.network_messages_session_request.connect(_on_network_messages_session_request) Steam.network_messages_session_failed.connect(_on_network_messages_session_failed) # Check for command line arguments check_command_line() ``` -------------------------------- ### setListenForFriendsMessages Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/classes/friends.md Listens for Steam friends chat messages. You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2. After enabling this you will receive [connected_friend_chat_message](#connected_friend_chat_message) callbacks when ever the user receives a chat message. You can get the actual message data from this callback with [getFriendMessage](#getfriendmessage). You can send messages with [replyToFriendMessage](#replytofriendmessage). Triggers a [connected_friend_chat_message](#connected_friend_chat_message) callback. ```APIDOC setListenForFriendsMessages(intercept: bool) intercept: bool Returns: bool ``` -------------------------------- ### Get Godot Source Code Source: https://github.com/godotsteam/godotsteam-docs/blob/master/docs/howto/server.md Clones the Godot engine source code from GitHub. Supports both Godot 3.x and Godot 4.x versions by specifying the appropriate branch. ```shell git clone https://github.com/godotengine/godot.git -b 3.6-stable godot ``` ```shell git clone https://github.com/godotengine/godot.git -b 4.4-stable godot ```