Godot-steam-api - Godot Steam integration using GDNative.

Overview

Godot-Steam-API

Godot Steam integration without rebuilding Godot. Supports ๐Ÿ’ฐ Windows, ๐Ÿง Linux & ๐Ÿ MacOS (x86_x64/arm64).

Getting Started

  1. Download this plugin through Godot's asset library https://godotengine.org/asset-library/asset/1020
  2. There should now be a SteamAPI tab in your Project Settings, follow the instructions to configure the SteamAPI for your game (Takes a few seconds).

Now you can use the following functions:

# acheivements
Steam.set_achievement("gator_god")
Steam.get_achievement("gator_god")
Steam.clear_achievement("gator_god")

# leaderboards
Steam.set_leaderboard_score("High Scores", 1000)
# Get the first 10 global high scores
var top_10_global_scores = yield(Steam.get_leaderboard_scores("High Scores", 0, 10), "done")
# Get just the current user's high score
var players_score = yield(Steam.get_leaderboard_scores("High Scores", 0, 0, Steam.LeaderboardDataRequest.GlobalAroundUser), "done")
# Get the current user's high score and the two scores infront and behind
var player_rivals_score = yield(Steam.get_leaderboard_scores("High Scores", -1, 1, Steam.LeaderboardDataRequest.GlobalAroundUser), "done")

# overlay
Steam.activate_game_overlay_to_web_page("https://steamcommunity.com/")
Steam.activate_game_overlay_to_store(1435470, Steam.OverlayToStoreFlag.AddToCart)

Testing an exported build

Steam integration doesn't work with exported builds straight away. You'll have to either:

  • Upload your build to Steam or
  • Create a file in the same directory as your exported build named steamapp_id.txt with just your steam app id in it. Though do not upload this file as part of your build.

Troubleshooting

  • Did you follow the instruction in the project settings Steam tab?
  • Is Steam running?
  • Have you published your acheivments in the SteamWorks console? Publishing isn't releasing the game, I mean the button that publishes your Store page.
Issues
  • Not getting results

    Not getting results

    Hey :) I followed the youtube video, found that things were a bit different and then followed the instructions here also and made sure EVERYTHING was properly set up. txt file, sdk source path, appid, singleton, enabled, etc etc. And I am getting no achievement from it. REstarted Steam, made sure the overlay showed me online, etc etc. Any ideas?

    opened by mojoyup 8
  • [BUG] Couldn't fully load the singleton script

    [BUG] Couldn't fully load the singleton script "Steam" (possible cyclic reference or parse error)

    • OS: MacOS

    Describe the issue Basically, if I try to use a function with the Steam library (like, say, Steam.clear_achievement("test") for example), I have an error message saying that "Couldn't fully load the singleton script "Steam" (possible cyclic reference or parse error)". At first I did not have any message errors in the console, but now I have a few (listed below). I tried it on a copy of my current project, and for one of them it seems to work fine, but not for the other one. Weirdly enough, even in the one with all the error messages, it now seems to work (in the sense that the achievement is unlocked), even though I have a bunch of scary error messages.

    Paste the code causing the issue

    func _ready():
    # Test steam achievements
    	Steam.clear_achievement("test")
    	Steam.set_achievement("test")
    	print(Steam.user_stats.get_achievement_name(0))
    

    Paste any error appearing in the console

     Resource: 'res://addons/steam_api/steam.gd' is already being loaded. Cyclic reference?
     res://addons/steam_api/steam.gd:5 - Parse Error: The identifier "Steam" isn't declared in the current scope.
     modules/gdscript/gdscript.cpp:566 - Method failed. Returning: ERR_PARSE_ERROR
     Resource: 'res://addons/steam_api/steam.gd' is already being loaded. Cyclic reference?
     res://addons/steam_api/steam.gd:5 - Parse Error: The identifier "Steam" isn't declared in the current scope.
     modules/gdscript/gdscript.cpp:566 - Method failed. Returning: ERR_PARSE_ERROR
    
    
    opened by DotSquareGames 5
  • [BUG] Cannot get it to work between Godot and Steam

    [BUG] Cannot get it to work between Godot and Steam

    • OS: Windows 10 / Godot 3.4.4

    I don't think it is necessarily a bug, but I cannot get it to work.

    Describe the issue The game/ID is in my library (but there is no game executable on Steamworks yet), steam_appid.txt has the correct number, and is located next to godot.exe. Steam.is_init() returns true after launch. Steam.set_achievement("xyz") does nothing, and Steam.get_achievement("xyz") returns false. Same for the leaderboards, which are also defined in Steamworks. I must have missed something, but cannot locate the error.

    Paste the code causing the issue

    func _ready():
    	if(steamVersion):
    		if Steam.is_init():
    			Steam.set_achievement("burger_time")
    			var has_alredy_unlocked_achievement:bool = Steam.get_achievement("burger_time")
    			print(has_alredy_unlocked_achievement) #prints false
    			set_steam_leaderboards()
    
    func set_steam_leaderboards():
    	if GameManager.current_game_mode == GameManager.current_player_game_data["easy_mode"]:
    		Steam.set_leaderboard_score("EasyMedium", GameManager.Score)
    	elif GameManager.current_game_mode == GameManager.current_player_game_data["medium_mode"]:
    		Steam.set_leaderboard_score("MediumHard", GameManager.Score)
    	elif GameManager.current_game_mode == GameManager.current_player_game_data["speedrun_mode"]:
    		Steam.set_leaderboard_score("SugarRushSpeedrun", GameManager.TotalGameTime)
    	elif GameManager.current_game_mode == GameManager.current_player_game_data["daily_challenge"]:
    		Steam.set_leaderboard_score("DailyHighScore", GameManager.Score)
    	print("Leaderboards updated") #number of entries on Steamworks are still at 0
    

    Paste any error appearing in the console

    None
    

    godot_steam

    The ID (1779560) is also correct (https://store.steampowered.com/app/1779560/Donut_Dodo/) Thanks.

    opened by zapposh 4
  • Can't get Steam Username

    Can't get Steam Username

    There doesn't seem to be a way to get the user's Steam name.

    Steamworks API docs say that I need to call ISteamFriends.GetPersonaName, but for some reason that's not exposed in the API here.

    This seems like a very basic thing I might want to do, so is a different method to achieve this already implemented?

    opened by DaelonSuzuka 4
  • Not working on Linux

    Not working on Linux

    I've tried to download the add-on to Godot 3.4.3 on Ubuntu 20.04 though the AssetLib section of the client, and I followed all of the steps in the video and added a steam_appid.txt to the root of my project folder.

    The example scene starts without any errors, but I don't get the Steam achievement notification, even after I've added the achievement through the steamworks dashboard.

    I don't have any errors to put here, and all I get on the console is []

    I'm sorry I don't have any more information to provide at the moment. What do I do?

    opened by Cobradabest 4
  • Is it possible to separate out NDA files into a subdirectory?

    Is it possible to separate out NDA files into a subdirectory?

    Background: I'm working on a (currently) closed-source game that I'm hoping to open-source. If that happens, I need to make sure I don't have anything in Git that is covered under the Steam NDA.

    From what I can see, right now, running the plugin with it being correctly configured, copies three files into the addons/steam_api directory.

    Is it possible to, instead, move those files into a subdirectory? That would make it rather easy for developers to open-source their games, while only needing to add a single directory to the .gitignore file.

    opened by nightblade9 4
  • Add bindings for headless Linux

    Add bindings for headless Linux

    I'm currently exporting my project using Godot's headless build. When doing this, it complains - but the build does complete just fine:

    ERROR: init_library: does not have a library for the current platform.
    

    This can be fixed by adding Server lines to the .gdnlib:

    [general]
    
    singleton=false
    load_once=true
    symbol_prefix="godot_"
    reloadable=true
    
    [entry]
    
    OSX.64="res://addons/steam_api/libsteamsdk-godot.dylib"
    Windows.64="res://addons/steam_api/steamsdk-godot.dll"
    X11.64="res://addons/steam_api/libsteamsdk-godot.so"
    Server="res://addons/steam_api/libsteamsdk-godot.so"
    
    [dependencies]
    
    OSX.64=[ "res://addons/steam_api/libsteam_api.dylib" ]
    Windows.64=[ "res://addons/steam_api/steam_api64.dll" ]
    X11.64=[ "res://addons/steam_api/libsteam_api.so" ]
    Server=[ "res://addons/steam_api/libsteam_api.so" ]
    

    I reckon this wouldn't have any implications outside of build time, as it's unlikely a user will be making a server build which needs the Steam API (for now?)

    opened by snoopdouglas 4
  • Godot exports Steam dlls even when Plugin is disabled.

    Godot exports Steam dlls even when Plugin is disabled.

    Hey, I disabled your plugin, even removed Steam.tscn from autoload but when I export my project, it creates the steam_api64.dll and steamsdk-godot.dll anyway.

    opened by DaisyGames 3
  • Problem with files in linux

    Problem with files in linux

    • OS: Manjaro Linux

    Hi, once I try to import the SDK Directory it says that it cannot create the file at usr/bin, and I created it myself (just a file with the id and nothing else), however once I try print(Steam.is_init()) it stills return false, and I don't know what I'm doing wrong.

    I am using the id of 480 which is just for testing.

    opened by PinyaColada 2
  • Prevent orphan node warnings on export

    Prevent orphan node warnings on export

    When exporting, I'm finding that Godot spits out a lot of warnings saying that steam.gd has been orphaned, a la:

    WARNING: cleanup: ObjectDB instances leaked at exit (run with -
    -verbose for details).
    

    It appears this can be fixed by changing _exit_tree to disable_plugin in plugin.gd.

    opened by snoopdouglas 2
  • Changing Steam App ID doesn't work

    Changing Steam App ID doesn't work

    Hi, I needed to change the Steam App ID for my project and it doesn't work.

    I go into Project Settings -> SteamAPI. Then I rewrite the ID in Steam App ID and it keeps connecting to the old ID.

    Thanks!

    opened by DaisyGames 2
  • Plugin unable to connect after Godot version change

    Plugin unable to connect after Godot version change

    • OS: Windows 10

    Describe the issue When changing Godot versions (e.g. 3.4.4 > 3.5 or 3.4.3 > 3.4.4) the plugin seems to stop working. I get the error message that the plugin is unable to connect to Steam.

    Fix What helped now for a second time was completely removing the plugin and deleting the directoy in addons - then doing a clean install.

    opened by RPicster 2
Owner
Sam Murray
Sam Murray
Godot module to use ROS2 within Godot

godot_ros This repo is a Godot Module meant to connect Robotic Operating System 2 (ROS2) and the Godot Game Engine. Quick Start Make sure to have both

Evan Flynn 23 Jun 23, 2022
sc-ble-bridge is a utility that for every connected Steam Controller creates a virtual one acting as a bridge between SC and Steam

sc-ble-bridge The main goal of this utility is to provide workaround for steam-for-linux issue which makes Valve's Steam Controller unusable in BLE mo

null 5 Apr 19, 2022
This project contains three scripts to help working with the steam-runtime, especially outside of Steam.

This project contains three scripts to help working with the steam-runtime, especially outside of Steam. See these blog posts for more details: steam-

Jรธrgen P. Tjernรธ 11 Oct 22, 2021
R integration for edlib, a C/C++ library for pairwise sequence alignment using edit distance (Levenshtein distance).

edlibR Introduction Main Features Usage Background Alignment Methods Algorithmic Design Installation References edlibR: R integration for edlib The R

null 5 Mar 2, 2022
ToPS is an objected-oriented framework implemented using C++ that facilitates the integration of probabilistic models for sequences over a user defined alphabet

ToPS is an objected-oriented framework implemented using C++ that facilitates the integration of probabilistic models for sequences over a user defined alphabet

Andre Yoshiaki Kashiwabara 35 Mar 6, 2022
This is a metamod plugin for Fall Guys maps in Sven Co-op (Steam version) (Windows or Linux)

metamod-fallguys This is a metamod plugin for Fall Guys maps in Sven Co-op (Steam version) (Windows or Linux) Installation Copy everything from build

hzqst 4 Feb 11, 2022
Send virtual keyboard presses in godot on linux/windows

gdvk - Godot Virtual Keyboard Send virtual keyboard presses in godot on linux/windows Please inform me about how my code is shit; I'm new to C++. Comp

CrispyPin 3 Dec 30, 2021
A module for Godot 3.x that makes it easy to send crash reports to Backtrace

Godot Backtrace Module This module adds automatic crash generation support to Godot 3.x with the intent of making it possible to send the crash data t

null 12 Apr 3, 2022
A proof-of-oncept module adding real-time Wren support to Godot

Godot Wren Module This module adds a new node, called WrenManager, that allows for executing Wren code in Godot during runtime! Wren is a cool lightwe

null 3 Nov 28, 2021
Sea of Thieves - Advanced ESP /w ImGui for XBox Version (Steam has to be written)

??โ€โ˜ ๏ธ Sea of Thieves - External Tool Premium Sea of Thieves - Advanced ESP /w ImGui for XBox Version (Steam has to be written) How to: Check latest ga

Kamil 7 May 15, 2022
Compatibility tool for Steam Play based on Wine and additional components

Introduction Proton is a tool for use with the Steam client which allows games which are exclusive to Windows to run on the Linux operating system. It

Valve Software 17.5k Jun 24, 2022
SAM (Software Automatic Mouth) for Godot

gdsam SAM (Software Automatic Mouth) for Godot 3.4+ A GDNative library wrapper around the C port of SAM by Sebastian Macke over at https://github.com/

null 2 Dec 28, 2021
Node1D and other 1-dimensional node types for making 1D games in Godot.

Godot 1D Node1D and other 1-dimensional node types for making 1D games in Godot. Have you ever wanted to make 1D games in Godot? ...no? You say you ha

Aaron Franke 11 May 30, 2022
Valve's Steam Deck kernel (5.13.10; x86_64; linux-neptune)

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

Adam Jafarov 6 Jun 14, 2022
Raspberry Pi Pico (RP2040) and Micro-ROS (ROS 2) Integration

The Pico is an amazing microcontroller and I couldn't wait for ROS 2 support or Arduino Core, so here is my approach. Once the Arduino Core for RP2040 is out it will be easier to use micro_ros_arduino.

Darko Lukiฤ‡ 19 Jun 19, 2022
Solving Kepler's equation via contour integration, implemented in C++

Kepler's Goat Herd Code for solving Kepler's equation using contour integration, following Philcox et al. (2021, arXiv). This uses a method originally

Oliver Philcox 45 Nov 8, 2021
ESPHome integration for the Xiaomi Mijia Bedside Lamp v2.

esphome-xiaomi_bslamp2 Warning: this code is still under development This code might not yet be production-ready. At this point, it is declared beta-q

Maurice Makaay 111 Jun 21, 2022
font rendering, Zep vim emulator, microui integration

LabFont This project is an exploration of getting text into a rendeing pipeline based on @floooh's sokol. Frameworks such as Dear ImGui solve text ren

Nick Porcino 13 Jan 23, 2022
JWM is a cross-platform Java window management and OS integration library.

JWM aims to expose an interface that abstracts over window creation, input handling and OS integration

JetBrains 338 Jun 22, 2022