Skip to content

Commit

Permalink
More updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Gramps committed Dec 1, 2023
1 parent 24334f3 commit 69f2f4d
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 2 deletions.
13 changes: 13 additions & 0 deletions docs/changelog/gdextension.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

---

**Version 4.5 Changes**

- Added: two new arguments to `steamInit` and `steamInitEx` to set your app ID and run_callbacks interally, thanks to _GreenFox_
- Added: two Music class callbacks
- Changed: `generateItems`, `exchangeItems`, `getItemsByID`, and `startPurchase` all list-based arguments are now PoolIntArrays
- Changed: `getItemsByID` now takes one argument, counts the elements in the passed array instead
- Changed: `getItemsWithPrices` no longer requires any arguments passed to it
- Changed: in-editor docs have been updated
- Fixed: `getResultItems` now returns all item data
- Fixed: missing DEFVAL for `steamInitEx`
- Fixed: Joy Con name in `getInputTypeForHandle`
- Removed: `getNumItemsWithPrices` as it was unnecessary

**Version 4.4.3 Changes**

- Fixed: `requestEquippedProfileItems` was missing method bind, thanks to _BOTLANNER_
Expand Down
17 changes: 17 additions & 0 deletions docs/changelog/gdnative.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ www# GDNative Change-Log

------

**Version 3.22.1 Changes**

- Added: two new arguments to `steamInit` and `steamInitEx` to set your app ID and run_callbacks interally, thanks to _GreenFox_
- Fixed: issue with callback that caused compiling failure in Linux

**Version 3.22 Changes**

- Added: two Music class callbacks
- Changed: `generateItems`, `exchangeItems`, `getItemsByID`, and `startPurchase` all list-based arguments are now PoolIntArrays
- Changed: `getItemsByID` now takes one argument, counts the elements in the passed array instead
- Changed: `getItemsWithPrices` no longer requires any arguments passed to it
- Changed: in-editor docs have been updated
- Fixed: `getResultItems` now returns all item data
- Fixed: missing DEFVAL for `steamInitEx`
- Fixed: Joy Con name in `getInputTypeForHandle`
- Removed: `getNumItemsWithPrices` as it was unnecessary

**Version 3.21.3 Changes**

- Fixed: `requestEquippedProfileItems` was missing method bind, thanks to _BOTLANNER_
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/godot3.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

---

**Version 3.22.1 Changes**

- Added: two new arguments to `steamInit` and `steamInitEx` to set your app ID and run_callbacks interally, thanks to _GreenFox_
- Fixed: issue with callback that caused compiling failure in Linux

**Version 3.22 Changes**

- Added: two Music class callbacks
Expand Down
13 changes: 13 additions & 0 deletions docs/changelog/godot4.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

---

**Version 4.5 Changes**

- Added: two new arguments to `steamInit` and `steamInitEx` to set your app ID and run_callbacks interally, thanks to _GreenFox_
- Added: two Music class callbacks
- Changed: `generateItems`, `exchangeItems`, `getItemsByID`, and `startPurchase` all list-based arguments are now PoolIntArrays
- Changed: `getItemsByID` now takes one argument, counts the elements in the passed array instead
- Changed: `getItemsWithPrices` no longer requires any arguments passed to it
- Changed: in-editor docs have been updated
- Fixed: `getResultItems` now returns all item data
- Fixed: missing DEFVAL for `steamInitEx`
- Fixed: Joy Con name in `getInputTypeForHandle`
- Removed: `getNumItemsWithPrices` as it was unnecessary

**Version 4.4.2 Changes**

- Fixed: `requestEquippedProfileItems` was missing method bind, thanks to _BOTLANNER_
Expand Down
12 changes: 10 additions & 2 deletions docs/classes/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ These are only available in the main [GodotSteam branches](https://github.com/Co

### steamInit

!!! function "steamInit( ```bool``` retrieve_stats = true )"
!!! function "steamInit( ```bool``` retrieve_stats = true, ```uint32_t``` app_id, ```bool``` embed_callbacks )"
Starts up the Steam API.

**Return:** dictionary
Expand All @@ -55,12 +55,16 @@ These are only available in the main [GodotSteam branches](https://github.com/Co
* 20 / "Steam not running"
* 79 / "Invalid app ID or app not installed"

You can pass your app ID to the second argument and GodotSteam will set the OS environment for you so you do not have to do this manually anymore. By default, it sets your game's app ID to 480.

You can pass true to the third argument to have GodotSteam connect and use run_callbacks internally so you do not have to do this manually anymore. By default, it does not do this.

------
[:fontawesome-brands-steam: Read more in the official Steamworks SDK documentation](https://partner.steamgames.com/doc/api/steam_api#SteamAPI_Init){ .md-button .md-button--store target="_blank" }

### steamInitEx

!!! function "steamInitEx( ```bool``` retrieve_stats = true )"
!!! function "steamInitEx( ```bool``` retrieve_stats = true, ```uint32_t``` app_id, ```bool``` embed_callbacks )"
Initialize the Steamworks SDK. On success **STEAM_API_INIT_RESULT_OK** is returned. Otherwise, if **error_message** is non-NULL, it will receive a non-localized message that explains the reason for the failure.

**Returns:** dictionary
Expand All @@ -75,6 +79,10 @@ These are only available in the main [GodotSteam branches](https://github.com/Co
* 2 / "Cannot connect to Steam, client probably isn't running"
* 3 / "Steam client appears to be out of date"

You can pass your app ID to the second argument and GodotSteam will set the OS environment for you so you do not have to do this manually anymore. By default, it sets your game's app ID to 480.

You can pass true to the third argument to have GodotSteam connect and use run_callbacks internally so you do not have to do this manually anymore. By default, it does not do this.

### steamShutdown

!!! function "steamShutdown"
Expand Down
18 changes: 18 additions & 0 deletions docs/tutorials/initializing.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,24 @@ func _process(_delta: float) -> void:

I highly suggest, much like the initialization process, you put this `_process()` function with the `Steam.run_callbacks()` in a global (singleton) script so it is always checking for callbacks. Though, if you want, you can put it in any `_process()` function in any given script that might be using callback information.

## New Shortcuts

We recently introduced some new shortcuts by way of extra arguments to send to `steamInit` and `steamInitEx`. These exist in GodotSteam 3.22 and GodotSteam 4.5 or newer.

First, you can pass your app ID as the second argument and GodotSteam will internally set your OS enviroment variable. This will tell Steam what game you are playing. By default this is set as 480 so if you are using the newer versions, you no longer have to set your app ID in your code; just pass it to the initialization function.

Second, you can pass **true** as the third argument and GodotSteam will internally hook up your `run_callbacks()` function. You will no longer have to add this to your `_process()` function as it will already be present and running.

**Please note:** if you want to use these, you must set the prior arguments too or you may have some weird issues. You can use the full range of options like so:

```
# This asks for stats upon success, sets the app ID as 480, then embeds run_callbacks() automatically.
steamInit( true, 480, true )
steamInitEx( true, 480, true )
```

---

## Altogether Now
Expand Down

0 comments on commit 69f2f4d

Please sign in to comment.