+steam_init(appid:int, allowscreenshots:int) -> int | initializes SteamWorks. returns 1 if succesful, 0 on failure. Specify a non-0 appid if you want to restart from steam if this wasn't started from steam (the return value in this case will be -1 to indicate you should terminate this instance). If you don't specify an appid here or in steam_appid.txt, init will likely fail. The other functions can still be called even if steam isn't active. allowscreenshots automatically uploads screenshots to steam (triggered by steam). |
+steam_overlay() -> int | returns true if the steam overlay is currently on (you may want to auto-pause if so) |
+steam_username() -> string | returns the name of the steam user, or empty string if not available. |
+steam_unlock_achievement(achievementname:string) -> int | Unlocks an achievement and shows the achievement overlay if not already achieved before. Will also Q-up saving achievement to Steam. Returns true if succesful. |
+steam_write_file(file:string, contents:string) -> int | writes a file with the contents of a string to the steam cloud, or local storage if that fails, returns false if writing wasn't possible at all |
+steam_read_file(file:string) -> string | returns the contents of a file as a string from the steam cloud if available, or otherwise from local storage, or nil if the file can't be found at all. |
+