Using a script to capture scape photos in bulk?

17,409
United Kingdom
United Kingdom
I'm just wondering if anyone out there with experience of using scripts to grind in GT7 could say whether it would be possible to automate the process of taking photos in scapes in bulk.

I'm concerned that at some point in the future certain cars will disappear from the game, and once the servers go down we might loose access to those cars and their liveries. It would be nice to capture them as much as possible before that happens.

Any thoughts?
 
Just some thoughts since I don't have experience with scripting GT7, but website scraping and testing which can work in a similar way. Given what I've read about automating grinding, this should be possible with Remote Play, although it's from 2022/2023



You'd need to think of a loop that can be repeated in the game. Let's say you put two scapes locations into your favourites, they are always at the same place in the selection menu, and the overall interface (like the camera tab) are in the same places, and the photo settings are always the same too - I think this would be easy to automate to click through.

I struggle to come up with a good way to loop through the car selection though, since you'd have to remember the current position in the script and go to the next one on each iteration.

Maybe you can automate just parts of it, for example:

You select a scape, and place a car, then you start the script:
  • it rotates the car to a certain angle
  • goes to the camera tab
  • takes a photo, clicks ok
  • goes back to car view, flips it around
  • takes another photo

You select the next car, repeat
 
Just some thoughts since I don't have experience with scripting GT7
Neither do I.

So, using the macro software I normally do will kind of work, but it only works if the game recognises the input as keystrokes... so I can navigate around the basics and get it take a photo, back out, select the next scene, etc. etc. but if there's not an on screen control for something, it won't work. So I can't pan, zoom, roll etc... it'll just take whatever the default position and framing is.

So I looked into AHK, and it seems that it recognises controller inputs, but it won't mimic the controller with PS Remote Play App, which I'm guessing is intentional on Sony's part.

I'm now thinking that I have to go through and set up all the photos once, then use a macro to simply swap the car in the original scape with the current one. Which I think will probably work.
 
I think I got this to work.

I know that Sony's remote play blocks keyboard inputs, so for remote play I use chiaki-ng, a fork of chiaki, which is an alternative software for using remote play features. (I had no particular reason for the fork but it's more actively developed currently, didn't have experience with either of them before today)

My Autohotkey v2 script makes use of chiaki's default keybinds. I found that pressing several keys in quick succession via remote play a bit unreliable, even over local network (2 meters of 1Gbit LAN cable and a router between my PC and PS5), that's why I put such large delays in it. There is certainly potential for improvement here.

I've kept these two tasks separate for now, I'm sure you can keep them running forever in a loop but there's no way to detect if remote play dropped some inputs and you end up in the wrong path:
  • Pressing F1 starts the photo routine (it currently presses No to not save photos)
  • Pressing F2 changes to the next car. I found that as long as you don't leave the current scape, it remembers the cursor position in the car list, and you can just go "1 down" and select the next without much trouble.

Before starting the routine:
  • Place a car and rotate as desired, check if the flipped view is working also (R2), do any other cosmetic changes as desired (steering angle, lights, etc.)
  • Change the car selection to list view,
  • Change camera Focus Mode to Full Auto,
  • then go back to the Car tab and put the cursor in the box in the top right which contains the current car.
If you have a controller connected make absolutely sure it's not sending inputs from the analogue sticks (because stick drift, etc.) which can interfere with some inputs

1740762775154.png


Code:
Delay := 1000 ; 1 second
SetKeyDelay 150, 30 ; delay & make each key press last at least a bit, otherwise they are not always recognized

#HotIf WinActive("ahk_exe chiaki.exe")
F1::
{
    Sleep Delay
    ; Starting point: "Car" tab in scape
    ; Put the cursor on the car button thing right below the text "Select Car/Driver" that shows the currently placed car, if you want to be able to automate the next car selection with F2 (see script below)
    SendEvent "3"           ; R1 - switch to Camera tab
    Sleep Delay
    SendEvent "c"           ; triangle - shoot photo
    Sleep Delay*15
    SendEvent "{Backspace 5}" ; circle - press back several times, select "no"
    Sleep Delay*2
    SendEvent "{Enter}"     ; x - confirm "no"
    Sleep Delay*3
    SendEvent "2"           ; L1 - switch to Car tab
    Sleep Delay
    SendEvent "4"           ; R2 - flip car around
    Sleep Delay

    ; shoot another photo, then go back to Car tab
    SendEvent "3"           ; R1 - switch to Camera tab
    Sleep Delay
    SendEvent "c"           ; triangle - shoot photo
    Sleep Delay*15
    SendEvent "{Backspace 5}" ; circle - press back several times, select "no"
    Sleep Delay*2
    SendEvent "{Enter}"     ; x - confirm "no"
    Sleep Delay*3
    SendEvent "2"           ; L1 - switch to Car tab
    Sleep Delay
    SendEvent "4"           ; R2 - flip car around
}

F2::{
    ; Go to next car
    Sleep Delay
    ; Going all the way down, then two up, somehow is more reliable than going down 9x
    SendEvent "{Down 20}"
    Sleep Delay
    SendEvent "{Up 2}"
    SendEvent "{Enter}"
    Sleep Delay*2
    SendEvent "{Down}"
    Sleep Delay
    SendEvent "{Enter}"
    ;Sleep Delay*5
}
#HotIf
 
Last edited:
I thought it was an interesting enough idea and I already had experience with Autohotkey, figuring out required details like button press duration (SetKeyDelay 150, 30) is a pain 😄 Let me know how it works out for you
 
Last edited:
Back