Created
March 29, 2022 16:08
-
-
Save snipem/5e8192aa7be29da4e2cf325732f76649 to your computer and use it in GitHub Desktop.
Tool for mirroring scapes in Gran Turismo 7 scape editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#run: python3 granturismo_mirror.py | |
import os | |
import time | |
from appscript import app, k | |
from pynput.keyboard import Key, Controller | |
keyboard = Controller() | |
A = "i" | |
O = "l" | |
X = "k" | |
LEFT = Key.left | |
RIGHT = Key.right | |
UP = Key.up | |
DOWN = Key.down | |
SECONDS_BETWEEN_BUTTON_PRESSES=1 | |
NUMBER_OF_LAYERS=93 | |
def press(button): | |
time.sleep(SECONDS_BETWEEN_BUTTON_PRESSES) | |
print("Press %s: " % button) | |
# pyautogui.press(button) | |
keyboard.press(button) | |
time.sleep(0.2) | |
keyboard.release(button) | |
app('Chiaki').activate() | |
print ("Please NOW Activate chiaki") | |
for i in range(5): | |
print("%d ..." % i) | |
time.sleep(1) | |
print ("Starting") | |
j = 1 | |
while j < NUMBER_OF_LAYERS: | |
print ("New Layer") | |
# Get into deep menu | |
press(X) | |
# Select "Schicht Steuerung" | |
press(LEFT) | |
press(LEFT) | |
press(X) | |
# Select "duplizieren auf anderer seite" | |
press(X) | |
# Go back | |
press(O) | |
# Select next Layer | |
press(RIGHT) | |
# Go one layer up, because the currently selected is the currently placed one | |
press(UP) | |
# Repeat | |
time.sleep(1) # Sleep additional seconds | |
j=j+1 | |
# Tool for mirroring scapes in Gran Turismo 7 scape editor | |
# This is a dull task that has to be controlled manually. | |
# In my case: copy 93 layers, 7 key presses each | |
# I had to monitor the whole process because Remote Play did not | |
# register all key presses. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment