TurboWarp / extensions

User-contributed unsandboxed extension gallery for TurboWarp
https://extensions.turbowarp.org/
MIT License
117 stars 237 forks source link

Steamworks API Extension #457

Closed NDM1574 closed 3 weeks ago

NDM1574 commented 1 year ago

Like Newgrounds, Itch, and GameJolt API extensions, have one for Steamworks, pretty sure this would completely bypass piracy too since you can look for a username on launch of the project.

Alestore commented 1 year ago

I would really need and love that. I currently use a method that utilizes Steamworks.js in the Electron packaged project to run the Steam Overlay and stuff.

NDM1574 commented 1 year ago

I would really need and love that. I currently use a method that utilizes Steamworks.js in the Electron packaged project to run the Steam Overlay and stuff.

Ah, yeah i'd hope for a way more extensive system so we can add workshop support, achievements, and more

Alestore commented 1 year ago

I would really need and love that. I currently use a method that utilizes Steamworks.js in the Electron packaged project to run the Steam Overlay and stuff.

Ah, yeah i'd hope for a way more extensive system so we can add workshop support, achievements, and more

You can already add and use achievements with my method. It works.

echoless3484 commented 1 year ago

I would really need and love that. I currently use a method that utilizes Steamworks.js in the Electron packaged project to run the Steam Overlay and stuff.

Ah, yeah i'd hope for a way more extensive system so we can add workshop support, achievements, and more

You can already add and use achievements with my method. It works.

Would you mind providiing a text guide on how to do your method? it sounds awesome

echoless3484 commented 1 year ago

I would really need and love that. I currently use a method that utilizes Steamworks.js in the Electron packaged project to run the Steam Overlay and stuff.

Ah, yeah i'd hope for a way more extensive system so we can add workshop support, achievements, and more

You can already add and use achievements with my method. It works.

I saw your like, if you do end up making a guide please let me know once you do!

Alestore commented 1 year ago

I would really need and love that. I currently use a method that utilizes Steamworks.js in the Electron packaged project to run the Steam Overlay and stuff.

Ah, yeah i'd hope for a way more extensive system so we can add workshop support, achievements, and more

You can already add and use achievements with my method. It works.

I saw your like, if you do end up making a guide please let me know once you do!

Of course, I will do it today

Alestore commented 1 year ago
  1. Open your project from TurboWarp.

  2. Create an ☁ eval variable to be able to activate the JavaScript needed for achievements.

  3. Open Steamworks on a web browser and open the corresponding page of your application, then choose "Edit Steamworks settings" and choose from the menu "Stats and achievements", then choose "Achievements".

  4. Create the achievements you want and get the API Name of your achievement (In my case, I've chosen TUTORIAL_COMPLETE as the API Name for this achievement). You can also add a name, icon and description, but remember that you can change these settings at any time.

image

  1. Now go back to your TurboWarp project and set a point where to activate the achievement (for example, after completing a level, activate the corresponding achievement).

  2. To do this, you will need to set the ☁ eval variable to client.achievement.activate('YOUR_API_NAME_ACHIEVEMENT') Inside the parenthesis, replace the word with the API Name of your achievement you created.

  3. You're almost done! In order to try achievements, you need to add Steamworks.js and the Steam Overlay within your packaged project. To do this, follow the guide you find here: https://github.com/TurboWarp/packager/issues/503

Huge thanks to @GarboMuffin for helping me with this!

Alestore commented 1 year ago

@echoless3484 I've done it, contact me or leave a comment if you need more help!

echoless3484 commented 1 year ago
  1. Open your project from TurboWarp.

  2. Create an ☁ eval variable to be able to activate the JavaScript needed for achievements.

  3. Open Steamworks on a web browser and open the corresponding page of your application, then choose "Edit Steamworks settings" and choose from the menu "Stats and achievements", then choose "Achievements".

  4. Create the achievements you want and get the API Name of your achievement (In my case, I've chosen TUTORIAL_COMPLETE as the API Name for this achievement). You can also add a name, icon and description, but remember that you can change these settings at any time.

image

  1. Now go back to your TurboWarp project and set a point where to activate the achievement (for example, after completing a level, activate the corresponding achievement).

  2. To do this, you will need to set the ☁ eval variable to client.achievement.activate('YOUR_API_NAME_ACHIEVEMENT') Inside the parenthesis, replace the word with the API Name of your achievement you created.

  3. You're almost done! In order to try achievements, you need to add Steamworks.js and the Steam Overlay within your packaged project. To do this, follow the guide you find here: https://github.com/TurboWarp/packager/issues/503

Huge thanks to @GarboMuffin for helping me with this!

Thank you both so much! Using this method but doing something different, could I in theory use this for workshop support?

Alestore commented 1 year ago
  1. Open your project from TurboWarp.

  2. Create an ☁ eval variable to be able to activate the JavaScript needed for achievements.

  3. Open Steamworks on a web browser and open the corresponding page of your application, then choose "Edit Steamworks settings" and choose from the menu "Stats and achievements", then choose "Achievements".

  4. Create the achievements you want and get the API Name of your achievement (In my case, I've chosen TUTORIAL_COMPLETE as the API Name for this achievement). You can also add a name, icon and description, but remember that you can change these settings at any time.

image

  1. Now go back to your TurboWarp project and set a point where to activate the achievement (for example, after completing a level, activate the corresponding achievement).

  2. To do this, you will need to set the ☁ eval variable to client.achievement.activate('YOUR_API_NAME_ACHIEVEMENT') Inside the parenthesis, replace the word with the API Name of your achievement you created.

  3. You're almost done! In order to try achievements, you need to add Steamworks.js and the Steam Overlay within your packaged project. To do this, follow the guide you find here: https://github.com/TurboWarp/packager/issues/503

Huge thanks to @GarboMuffin for helping me with this!

Thank you both so much! Using this method but doing something different, could I in theory use this for workshop support?

I don't really know how this would work, but practically yes. Once you have Steamworks.js, you have Steam Support.

LilyMakesThings commented 1 year ago

I'll see what I can do about getting an actual Steamworks API extension onto TurboWarp, because it seems easier than I would've expected it to be lol.

Keep in mind that 1 of the biggest hurdles about making TurboWarp extensions for APIs like this is coming up with a block palette that makes sense and fills every need, without straying too far away from the Scratch block-style and having too many arguments inside of 1 block. I think if I make it the first version might not have workshop content just yet, since that'll take more time to get right.

Edit: no longer planned

Alestore commented 1 year ago

I'll see what I can do about getting an actual Steamworks API extension onto TurboWarp, because it seems easier than I would've expected it to be lol.

Keep in mind that 1 of the biggest hurdles about making TurboWarp extensions for APIs like this is coming up with a block palette that makes sense and fills every need, without straying too far away from the Scratch block-style and having too many arguments inside of 1 block. I think if I make it the first version might not have workshop content just yet, since that'll take more time to get right.

Super interested in that. I wonder if it will be possible to also add in-app purchases in it. It would be really awesome!

echoless3484 commented 1 year ago

I'll see what I can do about getting an actual Steamworks API extension onto TurboWarp, because it seems easier than I would've expected it to be lol.

Keep in mind that 1 of the biggest hurdles about making TurboWarp extensions for APIs like this is coming up with a block palette that makes sense and fills every need, without straying too far away from the Scratch block-style and having too many arguments inside of 1 block. I think if I make it the first version might not have workshop content just yet, since that'll take more time to get right.

Sick, if you need help coming up with a block pallete I'm here, I'm in a Harvard course learning all the different important languages and hopefully by the time I'm done I could help a bit more, but my peers have said I'm quite nice at making easy to use UI, so I'm all up to help even if code is not my strong suite

DDDD100 commented 1 year ago

It's still hard for me :(

softedco commented 1 year ago

image

SharkPool-SP commented 3 weeks ago

this was added