Keyboard shortcuts for Rallyman GT! (here's how to add) UPDATED VERSION!

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
Post Reply
User avatar
Murrur
Posts: 31
Joined: 28 March 2020, 15:06

Keyboard shortcuts for Rallyman GT! (here's how to add) UPDATED VERSION!

Post by Murrur »

I have been playing this game for far too many times lately. I've been thinking it's some what impractical to have to click the dice every time with the mouse. Wouldn't it be so much easier to be able to just press the numbers on the keyboard? Or how about if you could just press the key S to secure with focus, or press a space to progress instead of clicking roll dice button?

And now it's possible! Yay!

I've coded a javascript bookmarklet to do just that :) No need to install any software, just add small code to your web browser bookmarks and click it when it's your turn to make first move in game. It's perfectly safe to use, you can the read source code if you're suspicious.

HOW DOES IT WORK?
  • Go to bookmarks and manage..
  • Create new bookmark with "Rallyman GT keyboard shortcuts by Murrur" title and copy the code below for the link URL address: (THE LINK BELOW IS NEWEST VERSION 2020.1.1)

Code: Select all

javascript:(function()%7Bfunction %24%24(e)%7Breturn document.getElementById(e)%7Dvar %24M%3D%7Bo%3A"Keyboard shortcuts ON!"%2Cx%3A"Click to activate keyboard shortcuts"%2Ca%3A"CLICK TO ACTIVATE SHORTCUTS!"%2Ci%3A"WELCOME TO RALLYMAN GT KEYBOARD SHORTCUTS! (version 2020.1.1 by Murrur)%5Cn%5CnWhen the tool is active%2C you may use the keyboard to enter dice. The tool is automatically disabled%2C when you click the game board or chat. Reactivate it by clicking the box. Double click it for this help message. %5Cn%5CnKEYBOARD SHORTCUTS%3A%5Cn%5Cn1%2C2%2C3%2C4%2C5%2C6 %3D select this gear%5CnQ%2C W%2C (E) %3D white dice (E only in GT-4)%5CnSPACE %3D Roll dice one by one%5CnS %3D Secure (use focus)%5CnD %3D Don't roll anymore (stop rolling)%5CnF %3D Flatout%5CnC %3D Clear dice%5Cn%5CnV %3D Flying start%5CnB %3D Boost with green die (no flying start)%5CnX %3D Confirm your crash location%5CnN %3D No pitstop%5CnT %3D Change tyres (O %3D Asphalt%2C P %3D Rain tyres)%5CnR %3D Repair car%5CnY %3D Repair car and change tyres"%2Ce%3A"ERROR! Unsupported GT%2C default setting GT-4 used."%7D%3Blet GT%3D0%3B%24C%3Dfunction(e)%7B%24%24(e).click()%2C%24%24("W").value%3D%24M.o%7D%2C%24D%3Dfunction(e)%7B%24%24("dices").childNodes%5Be-1%5D.click()%2C%24%24("W").value%3D%24M.o%7D%2C%24G%3Dfunction()%7Bdocument.getElementsByClassName("GT4").length>0%26%26(GT%3D4)%2Cdocument.getElementsByClassName("GT5").length>0%26%26(GT%3D5)%2Cdocument.getElementsByClassName("GT6").length>0%26%26(GT%3D6)%2C0%3D%3DGT%26%26(alert(%24M.e)%2CGT%3D4)%7D%2C%24U%3Dfunction(e)%7Bvar t%3De.data.toUpperCase()%3Bswitch(t)%7Bcase"1"%3Acase"2"%3Acase"3"%3Acase"4"%3A%24D(Number(t))%3Bbreak%3Bcase"5"%3AGT>%3D5%26%26%24D(Number(t))%3Bbreak%3Bcase"6"%3A6%3D%3DGT%26%26%24D(Number(t))%3Bbreak%3Bcase"Q"%3A%24D(GT%2B1)%3Bbreak%3Bcase"W"%3A%24D(GT%2B2)%3Bbreak%3Bcase"E"%3A4%3D%3DGT%26%26%24D(GT%2B3)%3Bbreak%3Bcase"F"%3A%24C("flatout_button")%3Bbreak%3Bcase"C"%3A%24C("clean_button")%3Bbreak%3Bcase"S"%3A%24C("buy_button")%3Bbreak%3Bcase" "%3Anull!%3D%24%24("start_rolling_button")%3F%24C("start_rolling_button")%3A%24C("roll_dice_button")%3Bbreak%3Bcase"D"%3A%24C("roll_pass_button")%3Bbreak%3Bcase"X"%3A%24C("finishSetBack_button")%3Bbreak%3Bcase"V"%3A%24C("flystart_true_button")%3Bbreak%3Bcase"B"%3A%24C("flystart_false_button")%3Bbreak%3Bcase"T"%3A%24C("pit_tire_button")%3Bbreak%3Bcase"R"%3A%24C("pit_repair_button")%3Bbreak%3Bcase"Y"%3A%24C("pit_tirerepair_button")%3Bbreak%3Bcase"O"%3A%24C("tire_asphalt_button")%3Bbreak%3Bcase"P"%3A%24C("tire_rain_button")%3Bbreak%3Bdefault%3A%24%24("W").value%3D%24M.o%7D%7D%2C%24s%3Dfunction()%7Bvar %24i%3Ddocument.createElement("INPUT")%3Bwith(%24i.value%3D%24M.a%2C%24i)%7Bwith(id%3D"W"%2Cstyle)background%3D"%23ff0000"%2Ccolor%3D"%23ffffff"%2Cwidth%3D"100%25"%2Cheight%3D"50px"%2Calignment%3D"center"%2CpaddingBottom%3D"10px"%3Bonfocus%3Dfunction()%7Bvalue%3D%24M.o%2Cstyle.background%3D"%2300bb00"%2Cstyle.color%3D"%23ffffff"%7D%2Conblur%3Dfunction()%7Bvalue%3D%24M.x%2Cstyle.background%3D"%23dddddd"%2Cstyle.color%3D"%23000000"%7D%2Condblclick%3Dfunction()%7Balert(%24M.i)%2Cfocus()%7D%7D%24%24("player_boards").insertBefore(%24i%2C%24%24("player_boards").childNodes%5B0%5D)%2C%24%24("W").addEventListener("input"%2C%24U)%2C%24G()%7D%2C%24s()%2Calert(%24M.i)%3B%7D)()%3B
  • Join a rallyman GT game
  • When it's your first turn, click the bookmark. The tool loads itself.
  • Click the square added on the top of the player list to activate the keyboard shortcuts
  • You can press the keys listed below to enter dice etc.
  • When you click a dice or a button on game site, or go to the chat, the keyboard shortcuts tool will automatically turn itself off. To turn it on again, click the square and the tool turns green again to indicate it's on.
  • If you don't wish to use it anymore, reload the website with F5 and it's gone. Also when ever you need to reload the website, you also need to reload the keyboard shortcuts!
INSTRUCTIONS: (for version 2020.1.1)
KEYBOARD SHORTCUTS:

1,2,3,4,5,6 = select this gear
Q, W, (E) = white dice (E only in GT-4) IMPORTANT - please note that in the new version, the white dice are always entered with the same keys, regardless of which GT you are playing, thanks to newly added GT detection system :)

SPACE = Roll dice one by one
S = Secure (use focus)
D = Don't roll anymore (stop rolling)
F = Flatout
C = Clear dice

V = Flying start
B = Boost with green die (no flying start)
X = Confirm your crash location
N = No pitstop
T = Change tyres (O = Asphalt, P = Rain tyres)
R = Repair car
Y = Repair car and change tyres
ALTERNATIVE VERSION for the professional/hard core gamers. Works otherwise the same, but it doesn't display the help message in the beginning. If you play a lot, you might not want to see it every time. Not recommended for the first time users:

Code: Select all

javascript:(function()%7Bfunction%20%24%24(e)%7Breturn%20document.getElementById(e)%7Dvar%20%24M%3D%7Bo%3A%22Keyboard%20shortcuts%20ON!%22%2Cx%3A%22Click%20to%20activate%20keyboard%20shortcuts%22%2Ca%3A%22CLICK%20TO%20ACTIVATE%20SHORTCUTS!%22%2Ci%3A%22WELCOME%20TO%20RALLYMAN%20GT%20KEYBOARD%20SHORTCUTS!%20(version%202020.1.1%20by%20Murrur)%5Cn%5CnWhen%20the%20tool%20is%20active%2C%20you%20may%20use%20the%20keyboard%20to%20enter%20dice.%20The%20tool%20is%20automatically%20disabled%2C%20when%20you%20click%20the%20game%20board%20or%20chat.%20Reactivate%20it%20by%20clicking%20the%20box.%20Double%20click%20it%20for%20this%20help%20message.%20%5Cn%5CnKEYBOARD%20SHORTCUTS%3A%5Cn%5Cn1%2C2%2C3%2C4%2C5%2C6%20%3D%20select%20this%20gear%5CnQ%2C%20W%2C%20(E)%20%3D%20white%20dice%20(E%20only%20in%20GT-4)%5CnSPACE%20%3D%20Roll%20dice%20one%20by%20one%5CnS%20%3D%20Secure%20(use%20focus)%5CnD%20%3D%20Don't%20roll%20anymore%20(stop%20rolling)%5CnF%20%3D%20Flatout%5CnC%20%3D%20Clear%20dice%5Cn%5CnV%20%3D%20Flying%20start%5CnB%20%3D%20Boost%20with%20green%20die%20(no%20flying%20start)%5CnX%20%3D%20Confirm%20your%20crash%20location%5CnN%20%3D%20No%20pitstop%5CnT%20%3D%20Change%20tyres%20(O%20%3D%20Asphalt%2C%20P%20%3D%20Rain%20tyres)%5CnR%20%3D%20Repair%20car%5CnY%20%3D%20Repair%20car%20and%20change%20tyres%22%2Ce%3A%22ERROR!%20Unsupported%20GT%2C%20default%20setting%20GT-4%20used.%22%7D%3Blet%20GT%3D0%3B%24C%3Dfunction(e)%7B%24%24(e).click()%2C%24%24(%22W%22).value%3D%24M.o%7D%2C%24D%3Dfunction(e)%7B%24%24(%22dices%22).childNodes%5Be-1%5D.click()%2C%24%24(%22W%22).value%3D%24M.o%7D%2C%24G%3Dfunction()%7Bdocument.getElementsByClassName(%22GT4%22).length%3E0%26%26(GT%3D4)%2Cdocument.getElementsByClassName(%22GT5%22).length%3E0%26%26(GT%3D5)%2Cdocument.getElementsByClassName(%22GT6%22).length%3E0%26%26(GT%3D6)%2C0%3D%3DGT%26%26(alert(%24M.e)%2CGT%3D4)%7D%2C%24U%3Dfunction(e)%7Bvar%20t%3De.data.toUpperCase()%3Bswitch(t)%7Bcase%221%22%3Acase%222%22%3Acase%223%22%3Acase%224%22%3A%24D(Number(t))%3Bbreak%3Bcase%225%22%3AGT%3E%3D5%26%26%24D(Number(t))%3Bbreak%3Bcase%226%22%3A6%3D%3DGT%26%26%24D(Number(t))%3Bbreak%3Bcase%22Q%22%3A%24D(GT%2B1)%3Bbreak%3Bcase%22W%22%3A%24D(GT%2B2)%3Bbreak%3Bcase%22E%22%3A4%3D%3DGT%26%26%24D(GT%2B3)%3Bbreak%3Bcase%22F%22%3A%24C(%22flatout_button%22)%3Bbreak%3Bcase%22C%22%3A%24C(%22clean_button%22)%3Bbreak%3Bcase%22S%22%3A%24C(%22buy_button%22)%3Bbreak%3Bcase%22%20%22%3Anull!%3D%24%24(%22start_rolling_button%22)%3F%24C(%22start_rolling_button%22)%3A%24C(%22roll_dice_button%22)%3Bbreak%3Bcase%22D%22%3A%24C(%22roll_pass_button%22)%3Bbreak%3Bcase%22X%22%3A%24C(%22finishSetBack_button%22)%3Bbreak%3Bcase%22V%22%3A%24C(%22flystart_true_button%22)%3Bbreak%3Bcase%22B%22%3A%24C(%22flystart_false_button%22)%3Bbreak%3Bcase%22T%22%3A%24C(%22pit_tire_button%22)%3Bbreak%3Bcase%22R%22%3A%24C(%22pit_repair_button%22)%3Bbreak%3Bcase%22Y%22%3A%24C(%22pit_tirerepair_button%22)%3Bbreak%3Bcase%22O%22%3A%24C(%22tire_asphalt_button%22)%3Bbreak%3Bcase%22P%22%3A%24C(%22tire_rain_button%22)%3Bbreak%3Bdefault%3A%24%24(%22W%22).value%3D%24M.o%7D%7D%2C%24s%3Dfunction()%7Bvar%20%24i%3Ddocument.createElement(%22INPUT%22)%3Bwith(%24i.value%3D%24M.a%2C%24i)%7Bwith(id%3D%22W%22%2Cstyle)background%3D%22%23ff0000%22%2Ccolor%3D%22%23ffffff%22%2Cwidth%3D%22100%25%22%2Cheight%3D%2250px%22%2Calignment%3D%22center%22%2CpaddingBottom%3D%2210px%22%3Bonfocus%3Dfunction()%7Bvalue%3D%24M.o%2Cstyle.background%3D%22%2300bb00%22%2Cstyle.color%3D%22%23ffffff%22%7D%2Conblur%3Dfunction()%7Bvalue%3D%24M.x%2Cstyle.background%3D%22%23dddddd%22%2Cstyle.color%3D%22%23000000%22%7D%2Condblclick%3Dfunction()%7Balert(%24M.i)%2Cfocus()%7D%7D%24%24(%22player_boards%22).insertBefore(%24i%2C%24%24(%22player_boards%22).childNodes%5B0%5D)%2C%24%24(%22W%22).addEventListener(%22input%22%2C%24U)%2C%24G()%7D%2C%24s()%3B%7D)()%3B
You'll find the source code in a human readable form in the message below along with the release notes! It is also possible translate it using the human readable source code. I used https://javascript-minifier.com/ to compress it to a smaller size and https://caiorss.github.io/bookmarklet-maker/ to convert it to a bookmarklet for the web browsers. I advice you to do same, if you make a translation.

Enjoy!!

Any comments welcome :)

I'd be happy to know if people are actually using this, so please comment so I know if it's worth to keep on updating this :)
Last edited by Murrur on 11 July 2020, 13:06, edited 3 times in total.
User avatar
ObiQuiet
Posts: 17
Joined: 24 May 2020, 03:42

Re: Keyboard shortcuts for Rallyman GT! (here's how to add)

Post by ObiQuiet »

Nice, thank you for taking the time to put it together and share!
User avatar
Murrur
Posts: 31
Joined: 28 March 2020, 15:06

Re: Keyboard shortcuts for Rallyman GT! (here's how to add)

Post by Murrur »

UPDATED VERSION V 2020.1.1

If you are using old version, please update to the new one. Also, please check this thread once per month for updates and translations :)

Version 2020.1.1 Release Notes

Changes in this version:

* I've rewritten the entire code to make it easier to read
* The tool now detects which GT you are playing, and white dice are always Q and W (and E in GT-4)
* Added keyboard shortcuts for changing the tires, selecting rain or asphalt tyres, repairing, and, repairing and changing tires
* New safety mechanism now prevents from attempting to add dices 5 and 6 with GT-4, and dice 6 with GT-5
* Game messages are now placed to the start of code, to allow for easy translation (Please post your translation to this thread! :) )
* The help message is now displayed when the box is double clicked
* The help message is now always displayed when it starts.
* See alternative version for hard core gamers: this version does not display the help message in the beginning (not recommended for first time users)

TODO:

* Create update system, so that the code can be updated automatically without needing to reinstall/edit bookmark
* Create more sophisticated help message
* Polish interface to more beautiful
* Create better instructions on how to install
* Display error message, if someone tries to use it on other games (doesn't work)
* Add buttons for which side to crash on (maybe L = left, K= right?)

Keyboard shortcuts in newest version 2020.1.1:
WELCOME TO RALLYMAN GT KEYBOARD SHORTCUTS! (version 2020.1.1 by Murrur)

When the tool is active, you may use the keyboard to enter dice. The tool is automatically disabled, when you click the game board or chat. Reactivate it by clicking the box. Double click it for this help message.

KEYBOARD SHORTCUTS:

1,2,3,4,5,6 = select this gear
Q, W, (E) = white dice (E only in GT-4)
SPACE = Roll dice one by one
S = Secure (use focus)
D = Don't roll anymore (stop rolling)
F = Flatout
C = Clear dice

V = Flying start
B = Boost with green die (no flying start)
X = Confirm your crash location
N = No pitstop
T = Change tyres (O = Asphalt, P = Rain tyres)
R = Repair car
Y = Repair car and change tyres
Bookmarklet URL:

Code: Select all

javascript:(function()%7Bfunction %24%24(e)%7Breturn document.getElementById(e)%7Dvar %24M%3D%7Bo%3A"Keyboard shortcuts ON!"%2Cx%3A"Click to activate keyboard shortcuts"%2Ca%3A"CLICK TO ACTIVATE SHORTCUTS!"%2Ci%3A"WELCOME TO RALLYMAN GT KEYBOARD SHORTCUTS! (version 2020.1.1 by Murrur)%5Cn%5CnWhen the tool is active%2C you may use the keyboard to enter dice. The tool is automatically disabled%2C when you click the game board or chat. Reactivate it by clicking the box. Double click it for this help message. %5Cn%5CnKEYBOARD SHORTCUTS%3A%5Cn%5Cn1%2C2%2C3%2C4%2C5%2C6 %3D select this gear%5CnQ%2C W%2C (E) %3D white dice (E only in GT-4)%5CnSPACE %3D Roll dice one by one%5CnS %3D Secure (use focus)%5CnD %3D Don't roll anymore (stop rolling)%5CnF %3D Flatout%5CnC %3D Clear dice%5Cn%5CnV %3D Flying start%5CnB %3D Boost with green die (no flying start)%5CnX %3D Confirm your crash location%5CnN %3D No pitstop%5CnT %3D Change tyres (O %3D Asphalt%2C P %3D Rain tyres)%5CnR %3D Repair car%5CnY %3D Repair car and change tyres"%2Ce%3A"ERROR! Unsupported GT%2C default setting GT-4 used."%7D%3Blet GT%3D0%3B%24C%3Dfunction(e)%7B%24%24(e).click()%2C%24%24("W").value%3D%24M.o%7D%2C%24D%3Dfunction(e)%7B%24%24("dices").childNodes%5Be-1%5D.click()%2C%24%24("W").value%3D%24M.o%7D%2C%24G%3Dfunction()%7Bdocument.getElementsByClassName("GT4").length>0%26%26(GT%3D4)%2Cdocument.getElementsByClassName("GT5").length>0%26%26(GT%3D5)%2Cdocument.getElementsByClassName("GT6").length>0%26%26(GT%3D6)%2C0%3D%3DGT%26%26(alert(%24M.e)%2CGT%3D4)%7D%2C%24U%3Dfunction(e)%7Bvar t%3De.data.toUpperCase()%3Bswitch(t)%7Bcase"1"%3Acase"2"%3Acase"3"%3Acase"4"%3A%24D(Number(t))%3Bbreak%3Bcase"5"%3AGT>%3D5%26%26%24D(Number(t))%3Bbreak%3Bcase"6"%3A6%3D%3DGT%26%26%24D(Number(t))%3Bbreak%3Bcase"Q"%3A%24D(GT%2B1)%3Bbreak%3Bcase"W"%3A%24D(GT%2B2)%3Bbreak%3Bcase"E"%3A4%3D%3DGT%26%26%24D(GT%2B3)%3Bbreak%3Bcase"F"%3A%24C("flatout_button")%3Bbreak%3Bcase"C"%3A%24C("clean_button")%3Bbreak%3Bcase"S"%3A%24C("buy_button")%3Bbreak%3Bcase" "%3Anull!%3D%24%24("start_rolling_button")%3F%24C("start_rolling_button")%3A%24C("roll_dice_button")%3Bbreak%3Bcase"D"%3A%24C("roll_pass_button")%3Bbreak%3Bcase"X"%3A%24C("finishSetBack_button")%3Bbreak%3Bcase"V"%3A%24C("flystart_true_button")%3Bbreak%3Bcase"B"%3A%24C("flystart_false_button")%3Bbreak%3Bcase"T"%3A%24C("pit_tire_button")%3Bbreak%3Bcase"R"%3A%24C("pit_repair_button")%3Bbreak%3Bcase"Y"%3A%24C("pit_tirerepair_button")%3Bbreak%3Bcase"O"%3A%24C("tire_asphalt_button")%3Bbreak%3Bcase"P"%3A%24C("tire_rain_button")%3Bbreak%3Bdefault%3A%24%24("W").value%3D%24M.o%7D%7D%2C%24s%3Dfunction()%7Bvar %24i%3Ddocument.createElement("INPUT")%3Bwith(%24i.value%3D%24M.a%2C%24i)%7Bwith(id%3D"W"%2Cstyle)background%3D"%23ff0000"%2Ccolor%3D"%23ffffff"%2Cwidth%3D"100%25"%2Cheight%3D"50px"%2Calignment%3D"center"%2CpaddingBottom%3D"10px"%3Bonfocus%3Dfunction()%7Bvalue%3D%24M.o%2Cstyle.background%3D"%2300bb00"%2Cstyle.color%3D"%23ffffff"%7D%2Conblur%3Dfunction()%7Bvalue%3D%24M.x%2Cstyle.background%3D"%23dddddd"%2Cstyle.color%3D"%23000000"%7D%2Condblclick%3Dfunction()%7Balert(%24M.i)%2Cfocus()%7D%7D%24%24("player_boards").insertBefore(%24i%2C%24%24("player_boards").childNodes%5B0%5D)%2C%24%24("W").addEventListener("input"%2C%24U)%2C%24G()%7D%2C%24s()%2Calert(%24M.i)%3B%7D)()%3B
Here's the newest version 2020.1.1 source code in human readable form:
https://www.dropbox.com/s/bqwijifeehqsn ... -1.js?dl=0

Here is the source code of outdated old version 2020.1.0 in a human readable form:
https://www.dropbox.com/s/swy9cejbwggr2 ... 00.js?dl=0
Post Reply

Return to “Rallyman: GT”