6

As the title states. Sometimes running with the steam overlay is a bad idea, but I find myself wanting to put screenshots on my Steam profile, which the built-in game screenshot functionality does not allow me to. Is there a way to accomplish that, be it via a trick, or running the overlay without actually overlaying anything?

7

Here's a thread from the steam forums which gives a very roundabout way of taking screenshots without using the steam overlay (I've duplicated what's said there with a few edits as Jonathan Drapeau recommended). Some games just don't work with it. Basically, you have to manually create a remote folder under the appid of the particular game and store screenshots in there.

  1. First find the appid of the game. An easy way of doing this is searching for the game in the steam store on store.steampowered.com and noting the number in the URL. Here's an example using Teslagrad
  2. Take your screenshots using ALT-PrtScrn (windowed) or PrtScrn (full desktop) or use Camtasia, FRAPS, etc.
  3. Close Steam.
  4. Create the App ID folder in the following file path: Program Files\Steam\userdata\X(number may vary)\760\remote
  5. Create a "screenshots" folder inside 249590 (that's the number from the example for Teslagrad yours will vary). Inside screenshots create a folder called "thumbnails". So now you have: Program Files\Steam\userdata\X\760\remote\249590\screenshots & Program Files\Steam\userdata\X\760\remote\249590\screenshots\thumbnails
  6. Each screenshot is named with the date and a number. Structure is year-month-date: 2015-XX-XX_00001.jpg.
  7. Create the thumbnails for your screens. Thumbnails resolution size is 200x150. The max horizontal resolution is 200 and the max vertical resolutiono is 150. You can scale either way within those bounds as needed (eg. 200x94 or 180x150). Screenshots need a thumbnail. They need to be named with the same file name as the full size screenshot.
  8. Open Steam again. Let it synchronise and scan your files. Open your screenshots folder. Voilá! The newly taken screenshots will be there, ready to be uploaded to the cloud so you can carry them everywhere!

Good luck! This steps will be useful for other games that fail to take screenshots or have problems too.

  • 1
    While the link can answer the question, you should add the needed information for this answer to be useful even if the link dies. – Jonathan Drapeau Sep 29 '15 at 20:13
  • @m0nde thanks for the great info. But I hope somebody scripts this process to avoid so much manual steps. – chicks Sep 30 '15 at 5:26
  • Damn, this is horribly complex. Really needs an utility program for this, badly. – Llamageddon Sep 30 '15 at 14:31
  • @Llamageddon I am working on such program, and it's almost done; I'll squash some bugs and release it soon. Hopefully next week. – Neurotransmitter Sep 11 '16 at 22:36
  • @TranslucentCloud Ah, cool :P – Llamageddon Sep 13 '16 at 9:56
2

I've tried to automate the process described by m0nde. It requires PowerShell to run, but if you have Windows 7 or newer you have it preinstalled.

Save this as run.bat:

@powershell -NoProfile -ExecutionPolicy Bypass -File main.ps1

And this as main.ps1:

Function Get-VDFContent ([string] $path)
{
  $fileContent = Get-Content $path
  $obj = @{}
  $stack = New-Object System.Collections.Stack

  $group = [regex] '^\s*"([^"]+)"\s*$'
  $keyVal = [regex] '^\s*"([^"]+)"\s*"([^"]+)"\s*$'
  $bracket = $False

  ForEach ($line in $fileContent)
  {
    If ($bracket)
    {
      If ($line -Like "*{*")
      {
        $bracket = $False
      }
    }
    ElseIf (($match = $group.Match($line)) -And $match.Success)
    {
      $obj.($match.Groups[1].Value) = @{}
      $stack.Push($obj)
      $obj = $obj.($match.Groups[1].Value)
      $bracket = $True
    }
    ElseIf (($match = $keyVal.Match($line)) -And $match.Success)
    {
      $obj.($match.Groups[1].Value) = $match.Groups[2].Value
    }
    ElseIf ($line -Like "*}*")
    {
      $obj = $stack.Pop()
    }
    Else
    {
      Throw
    }
  }

  Return $obj
}

Function Create-ScreenshotPath([string] $screenshots, [string] $date, [string] $i)
{
  Return Join-Path $screenshots ($date + ($i.PadLeft(5, "0")) + ".jpg")
}

$steamPath = ""
If (Test-Path "HKCU:\Software\Valve\Steam")
{
  $steamPath = (Get-ItemProperty "HKCU:\Software\Valve\Steam").SteamPath
}
If (-Not $steamPath)
{
  $steamPath = Read-Host 'Enter Steam install folder path (example: "c:/program files (x86)/steam")'
}

$loginUsers = Join-Path $steamPath "config/loginusers.vdf"
$users = (Get-VDFContent $loginUsers).users
$lastUser = ($users.GetEnumerator() | Sort-Object { [int]$_.Value.Timestamp } -Descending)[0].Name
$lastUserShort = $lastUser - 0x110000100000000

$userPath = Join-Path $steamPath ("userdata/" + $lastUserShort)
$localConfig = Join-Path $userPath "/config/localconfig.vdf"
$apps = (Get-VDFContent $localConfig).UserLocalConfigStore.Software.Valve.Steam.apps
$lastPlayed = ($apps.GetEnumerator() | Sort-Object { [int]$_.Value.LastPlayed } -Descending)[0].Name

$screenshots = Join-Path $userPath ("760/remote/" + $lastPlayed + "/screenshots")
$thumbnails = Join-Path $screenshots "thumbnails"
New-Item -Force -ItemType directory -Path $thumbnails >$null

$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition
$date = Get-Date -Format yyyy-MM-dd_
$i = 1

While (Test-Path (Create-ScreenshotPath $screenshots $date $i)) { $i++ }

$filesToMove = Get-ChildItem $scriptPath -Filter "*.jpg" | % { $_.FullName }

ForEach ($file in $filesToMove)
{
  Move-Item $file (Create-ScreenshotPath $screenshots $date $i)
  $i++
}

Now put those files in one directory with screenshots you want to upload and launch run.bat. This script finds last logged-in user and last played game so keep it in mind before running.

  • Not sure if I know exactly how it's meant to be used - is it meant to be ran after pressing PrintScrn to copy the screen's contents to the clipboard, or..? Also, presume you did try and find a way to make it work 100% automatically for the currently running game, and had no success, right? Well, I don't really imagine there being a way of detecting if steam is running a game. – Llamageddon Sep 30 '15 at 23:58
  • 1
    @Llamageddon The script in this post only automates steps 4, 5, and 6 of m0nde's answer. You should place it in the same folder you've saved the screenshots you created in step 2. Unfortunately you'll also need to create thumbnails as described in step 7 and manually move them to the thumbnail directory. – user86571 Oct 1 '15 at 0:21
  • Ouch. Guess that makes it far less practical, still, an upvote for the effort. – Llamageddon Oct 1 '15 at 2:16
  • @RossRidge Did you even try m0nde's method? You don't need to create thumbnails nor close Steam (you can even have your game still running), so steps 3, 7 and 8 are not needed. You forgot about step 1, my script also covers that. – Tithen-Firion Oct 1 '15 at 5:03
  • @Llamageddon Just take screenshots using any tool (with saving them to file if you use PrtScrn), move them to the same folder as scripts above and launch run.bat. – Tithen-Firion Oct 1 '15 at 5:09
1

A small modification to Piotr Kowalski's answer. Now it also makes thumbnails for your screenshots.

Take the file from this gist or just paste the code into your main.ps1

file:

# Modified version of @piotr-kowalski's script 
# Now also makes thumbnails for screenshots
# https://gaming.stackexchange.com/a/238288/212957
#
# Note:
# This script finds last logged-in user and last played game so keep it in mind before running.
#
# Usage:
# 1) Save this as run.bat:
# @powershell -NoProfile -ExecutionPolicy Bypass -File main.ps1
# 2) Download this file
# 3) Put both files in one directory with screenshots you want to upload and launch run.bat.

Function Get-VDFContent ([string] $path)
{
  $fileContent = Get-Content $path
  $obj = @{}
  $stack = New-Object System.Collections.Stack

  $group = [regex] '^\s*"([^"]+)"\s*$'
  $keyVal = [regex] '^\s*"([^"]+)"\s*"([^"]+)"\s*$'
  $bracket = $False

  ForEach ($line in $fileContent)
  {
    If ($bracket)
    {
      If ($line -Like "*{*")
      {
        $bracket = $False
      }
    }
    ElseIf (($match = $group.Match($line)) -And $match.Success)
    {
      $obj.($match.Groups[1].Value) = @{}
      $stack.Push($obj)
      $obj = $obj.($match.Groups[1].Value)
      $bracket = $True
    }
    ElseIf (($match = $keyVal.Match($line)) -And $match.Success)
    {
      $obj.($match.Groups[1].Value) = $match.Groups[2].Value
    }
    ElseIf ($line -Like "*}*")
    {
      $obj = $stack.Pop()
    }
    Else
    {
      Throw
    }
  }

  Return $obj
}

Function Create-ScreenshotPath([string] $screenshots, [string] $date, [string] $i)
{
  Return Join-Path $screenshots ($date + ($i.PadLeft(5, "0")) + ".jpg")
}

Function Save-Thumbnail([string] $imagePath, [string] $pathToSave)
{
  $wia = New-Object -com wia.imagefile
  $wia.LoadFile($imagePath)
  $wip = New-Object -ComObject wia.imageprocess
  $scale = $wip.FilterInfos.Item("Scale").FilterId                    
  $wip.Filters.Add($scale)
  $wip.Filters[1].Properties("MaximumWidth") = 200
  $wip.Filters[1].Properties("MaximumHeight") = 150
  #aspect ratio should be set as false if you want the pics in exact size 
  $wip.Filters[1].Properties("PreserveAspectRatio") = $true
  $wip.Apply($wia) 
  $newimg = $wip.Apply($wia)
  $newimg.SaveFile($pathToSave)
}

$steamPath = ""
If (Test-Path "HKCU:\Software\Valve\Steam")
{
  $steamPath = (Get-ItemProperty "HKCU:\Software\Valve\Steam").SteamPath
}
If (-Not $steamPath)
{
  $steamPath = Read-Host 'Enter Steam install folder path (example: "c:/program files (x86)/steam")'
}

$loginUsers = Join-Path $steamPath "config/loginusers.vdf"
$users = (Get-VDFContent $loginUsers).users
$lastUser = ($users.GetEnumerator() | Sort-Object { [int]$_.Value.Timestamp } -Descending)[0].Name
$lastUserShort = $lastUser - 0x110000100000000

$userPath = Join-Path $steamPath ("userdata/" + $lastUserShort)
$localConfig = Join-Path $userPath "/config/localconfig.vdf"
$apps = (Get-VDFContent $localConfig).UserLocalConfigStore.Software.Valve.Steam.apps
$lastPlayed = ($apps.GetEnumerator() | Sort-Object { [int]$_.Value.LastPlayed } -Descending)[0].Name

$screenshots = Join-Path $userPath ("760/remote/" + $lastPlayed + "/screenshots")
$thumbnails = Join-Path $screenshots "thumbnails"
New-Item -Force -ItemType directory -Path $thumbnails >$null

$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition
$date = Get-Date -Format yyyy-MM-dd_
$i = 1

While (Test-Path (Create-ScreenshotPath $screenshots $date $i)) { $i++ }

$filesToMove = Get-ChildItem $scriptPath -Filter "*.jpg" | % { $_.FullName }

ForEach ($file in $filesToMove)
{
  $thumbnailPath = (Create-ScreenshotPath $thumbnails $date $i)
  (Save-Thumbnail $file $thumbnailPath)

  Move-Item $file (Create-ScreenshotPath $screenshots $date $i)
  $i++
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.