Closed bozhodimitrov closed 4 years ago
Hey there. The current module should work for every SDK version 1.44 and up. The only time it wouldn't work, I think, if it is using a function introduced in a later version; all the SDK's are backwards compatible with each other.
That being said, I will be doing an update relatively soon.
Very nice! Thank you for the fast response. A quick additional question - I am trying to import your python package to my project.
Is this the correct way to install it as a python package?
pip install -U git+https://github.com/Gramps/SteamworksPy.git
Also - I want to use the 64 bit version for Windows - should I rename the .dll files and remove the 64
suffix or it will still recognize the 64 bit versions automatically?
Also, thank you for providing this package! I will try to contribute to the documentation, once I figure out the details - so more ppl can play with it :)
Hey and welcome! Hmm, you know, I'm not sure. I've never installed it through pip. However, let me know what happens if you manage it and I can add that to the documentation!
Leave the 64 in the .dll files. The module should recognize you are using 64-bit.
Awesome! Feel free to tinker with it and contribute! Pull requests and issue posting are big helps.
The installation works ok via pip + git. But unfortunately I have a problem between the python 3.8 version and the ctype stuff:
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from steamworks import STEAMWORKS
>>> steamworks = STEAMWORKS()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "E:\project\env\lib\site-packages\steamworks\__init__.py", line 50, in __init__
self._initialize()
File "E:\project\env\lib\site-packages\steamworks\__init__.py", line 93, in _initialize
self._load_steamworks_api()
File "E:\project\env\lib\site-packages\steamworks\__init__.py", line 106, in _load_steamworks_api
f = getattr(self._cdll, method_name)
File "c:\program files\python38\lib\ctypes\__init__.py", line 386, in __getattr__
func = self.__getitem__(name)
File "c:\program files\python38\lib\ctypes\__init__.py", line 391, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'SteamShutdown' not found
I tried both SDK versions 1.46 and 1.48a (latest). Let me know if you need additional info about this error. And sorry for bothering you with this. Feel free to ignore me if you don't have time to deal with this now.
PS: Btw, I am using existing Steam AppID for Dota 2 (570) and not my own AppID (I don't want to develop a game - I want to create a Host Bot for an existing game). Not sure if this is related.
Hey, no bother. Let me look into why this might be happening really quick.
Hmm, seems the current version is using steam_api_flat.h which causes an issue. The flat version should be moved to the experimental branch until that is all sorted out.
Here is the SteamworksPy64.dll I compiled real quick after fixing that issue: SteamworksPy64.zip
Once that was done, the example project worked fine. Let me know if this helps. I'm gonna push compile fix to the repo.
Thank you very much! The provided SteamworksPy64 version works ok and the error is gone. I will let you know if there are any other issues.
Welcome! Glad it worked. I will compile a 32-bit version and put them in the release section.
I want to test a Steam Lobby Host Bot - can I use the SteamworksPy latest build (for steamworks 1.46) with Steamworks SDK 1.48a or I need to build myself a new version of SteamworksPy? I managed to download the older Steamworks SDK 1.46, but can you build a new version of SteamworksPy for the latest SDK? Because I am not sure if 1.46 will work with the Steam Network properly.