I can't seem to get GodotSteam to work no matter what I try.
Pre-compiled version:
Tried the windows 64bit zip and at first I couldn't extract it. The default zip program gave error 0x800040005 and WinZip said the files were corrupt. 7zip finally worked, but after placing the steam_api64.dll and steam_appid.txt files in the same folder as the two .exe (which I think is correct, documentation really isn't too clear on where to place the files) i still get an error saying the program can't start (0xc000007b).
Manually compiling:
After installing all the necesarry programs it seemed at first that the compiling was going fine until suddenly it kept giving errors like:
C:\godot\modules\godotsteam\godotsteam\godotsteam.h(611): error C2327: 'Steam::unit32': is not a type name, static or enumerator (note: xx are two numbers)
Most were the same except for different numbers instead of 611. Also a few that mentioned "syntax error" "unknown override specifier" and various other bad things.
Finally it says:
C:\godot\modules\godotsteam\godotsteam\godotsteam.h(799): fatal error C1003: error count exceeds 100; stopped compilation
scons * [modules\godotsteam\godotsteam.windows.tools.64.obj] Error 2
scons: building terminated because of errors
How do I get any of these two versions to work?
Hey there! Hmm, it does indeed seem the zip file is corrupted. I just downloaded it and it will not open; clearly something in my zipping process went haywire. That said, if you do get the file extracted, it wouldn't work.
But yes, both the steam_api64.dll and steam_appid.txt must be in the same folder as the executable. Were you referring to the documentation being unclear or the repo's readme file?
The only thing I'm unsure of is I cannot find "Steam::unit32" anywhere especially in line 611. Line 611, for me, is:
bool addPromoItems(const PoolIntArray items);
Which branch did you download from?
Either way I will repackage the pre-compiles and upload them again.
Its possible I accidentally looked at two different lines when typing out the error message and ended up combining some things, in any case I just downloaded the master branch.
Glad to hear it might just have been something wrong with the zipping, hoping I can make it work after the reupload.
In regards to the "unclear" part it was indeed the readme that confused me. Maybe I'm missing something but to me it doesn't seem like those two files are mentioned anywhere in relation to the pre-compiled version and since it has both the editor and template files, it doesn't quite match the finished hierachy which it is written that the manual version should have:
steam_api64.dll
steam_appid.txt
./godot.windows.tools.64.exe
Also as a side note is it correctly understood that the "steam_appid.txt" file should only contain your game's appid and no other text?
Yeah, that error is odd because I get no compilation errors on either Windows or Linux. Also cannot find "unit32", which looks like a misspelled uint32, anywhere in the code. You weren't compiling with MinGW, were you?
Yep, the new zips are uploading now. Seems my 7Zip app is messed up. I double-checked these ones first.
Well, the readme is, I guess, meant to explain the compiling process. I usually rename my compiles after the operating system, version number, and type; but I can see where that would be confusing. I will update the readme.
Yes, steam_appid.txt should only have one app ID in it. If you don't have a game on Steam yet, use 480.
Pre-compiles are updated.
As for the compiling errors, since I cannot find the error it gave you (specifically the wording) nor can I reproduce it I will need more specifics.
Nice with the update.
Guess I'll attempt another compile to see if I can replicate the error again and get it right this time.
Alright here's what I got wrong before. The line was 621 not 611 and it was indeed "uint32" not unit.
Uploaded 2 screenshots with all the errors here: https://imgur.com/a/RDexza9
As a sidenote it started getting errors and stopped compiling much earlier this time.
Huh, well, whatever compiler you are using is spitting out what are really non-errors. What exactly are you compiling with?
Well I followed the instructions on here: https://docs.godotengine.org/en/stable/development/compiling/compiling_for_windows.html and installed Visual Studio (with C++ enabled), Python and SCons. Then in a cmd put in changed the root path to where the Godot folder was and put in "scons platform=windows". I can't guarantee completely that I didn't do something wrong when installing one of the programs, but I'm not sure what that would be.
Off-topic for a second: I'm trying now to make a build of my game for testing and it crashes whenever I try to run it. The readme seems to both tell me to include and not include the "steam_appid.txt" file:
"Lack of the Steam API DLL/SO/DyLib (for your respective OS) or the steam_appid.txt will cause it fail and crash. Do not include the steam_appid.txt or any .lib files."
But well, neither option seems to work atm. I'll try out the 32bit version.
Edit: same result with the 32bit
Huh, that should be fine then. I'm not sure why it's giving you those errors but it shouldn't. Those are definitely integer types. I have never used the command prompt to compile, I always use VS Native Tools Command Prompts (both x86 and x64).
That was a bit unclear in the readme and has been fixed. The steam_appid.txt must be included when you are testing your game outside of the Steam client because Steam does not know what game you are running unless it is run -through- the Steam client.
That being said, do not upload the steam_appid.txt to Steam when getting ready to ship your game.
Ok, good to have that clarified.
But the game still crashes instantly whether I include the file or not.
Tried uploading to Steam (without the steam_appid.txt) and the same thing happens.
Well, gonna need a bit more than "it crashes".
How is the initialization implemented? Does it show anything before crashing or does it never start? Is there any output in the Godot editor debug window? Did you compile it with the template from the pre-compile folders before uploading to Steam?
The godot window starts up then closes down again nearly instantly. Its so fast that I couldn't really see anything in the debugger, but now I managed to capture some screenshots: https://imgur.com/a/RDexza9 (below the ones from before).
"MainMenu.tscn" is my starting scene, which it apparently can't load.
I can see from the screenshot you are not using an editor with GodotSteam. You are running the official stable build of 3.2.2.
Well it sure does say that at the top yea now that you mention it. This is exported using the pre-compiled GodotSteam for 32bit windows though.
Edit: Checked it and the engine says .custom_build in its debug window, but after I've exported it shows up as .official
You are using the pre-compiled template? There shouldn't be a debug window for exported games. When exporting make sure you uncheck the debug option in the export window. Even then it shouldn't show up as official.
I only enabled the debug option because it wasn't working. And no I was using the pre-compiled editor, thought that was right since I couldn't even get the template to start. When I try to I get this message:
"Error: Couldn't load project data at path ".". Is the .pck file missing? If you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension)."
Yeah, you can only use the debug option if you have a release_debug template, which the pre-compiled versions are not. Armed with all this new knowledge I'd start over from the beginning and try again using the right stuff in the right order then see what happens.
Okay here's what I found after some testing:
After exporting the game instantly crashes if I use the "Steam" object anywhere in my code.
The game can run with the "Steam" object without crashing if I test it before exporting, but afterwards, godot logo shows up then instantly shuts down again.
My assumption would be that the exported version is somehow just regular Godot instead of GodotSteam, because I know for a fact that that is the respone Godot gives if I try to run it with code that it doesn't reconize.
Debug is not enabled for export, and has not at any point been enabled since this fresh installation of pre-configured GodotSteam windows 32bit.
Edit: If its relevant Windows Defender sees the precompiled .exe as a threat and I have to give it permission the first time I open it after each installation. Also I tested the 64bit version and the result is the same.
So if it crashes after export then one of two things is happening:
When you export do you manually select the GodotSteam template in the Custom Template field? Or are you installing them to the templates folder like the documentation says? I usually select them in the Custom Template field.
The exported executable has to have the API DLL in the same folder, along with the steam_appid.txt or it will crash immediately.
As for Windows Defender, I have no idea. I don't use it. But it blocking or removing the executable could be an issue.
Okay, my bad. I screwed up.
I had just figured out before you wrote how the template was supposed to be used (didn't even know it was for exporting, which is why your previous comments didn't make much sense to me.)
After I selected it in the Custom Template section, like you just said, the export seems to be working fine.
Thanks for the help
Hey! Glad it got sorted out. You aren't the first to have that issue with the templates and won't be the last. I had that issue when I first started with the project, honestly.
To save others the headache I think I will write up a "testing and shipping" tutorial that covers things like this. Thanks again for helping me find weak spots in the readme, too!