add versions of clubman and tokyo
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/GT7_Tokyo.ico
Normal file
|
After Width: | Height: | Size: 12 KiB |
336
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/doc.html
Normal file
@@ -0,0 +1,336 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>GT7 - Tokyo X by problemz.</title>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800,900" rel="stylesheet">
|
||||
<link rel="stylesheet" href="scribbler-global.css">
|
||||
<link rel="stylesheet" href="scribbler-doc.css">
|
||||
<link rel="author" href="humans.txt">
|
||||
</head>
|
||||
<body>
|
||||
<div class="doc__bg"></div>
|
||||
<nav class="header">
|
||||
|
||||
|
||||
<h1 class="logo">Tokyo X <span class="logo__thin">Doc</br>by problemz.</span></h1>
|
||||
|
||||
<ul class="menu">
|
||||
<div class="menu__item toggle"><span></span></div>
|
||||
<li class="menu__item"><a href="https://discord.gg/CfppVp7VXV" target="_blank" class="link link--dark"><i class="fa-brands fa-discord"></i> Join our Discord server</a></li>
|
||||
</ul>
|
||||
</br>
|
||||
<div class="position-relative marquee-container d-none d-sm-block">
|
||||
<div class="marquee d-flex justify-content-around">
|
||||
<span>Shoutout (alphabetic order) to all these <b>AMAZING PEOPLE</b> from the Discord Tokyo Beta Channel. Thank you for helping me bringing the <b>TOKYO X</b> script to life - it was a great time!</span>
|
||||
</br>
|
||||
<span><shadow2>andow</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Atoms4Piece</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>BeefSupreme</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>BobGT</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>CarapauCorrida</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Chester</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>🐐 </shadow2>(you know)</span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>GTMaster</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>heidi</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>hitomi</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>j0shjones</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>JordanD123</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Krazyy</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>NavS</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Rossey</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Scany</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Septomor</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Sevencuts</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Solisu</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>TheScythed</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>x34uvc</shadow2></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
</nav>
|
||||
|
||||
<div class="wrapper">
|
||||
<aside class="doc__nav">
|
||||
|
||||
<ul>
|
||||
<li class="js-btn selected">Welcome to Tokyo</li>
|
||||
<li class="js-btn">The Masterplan</li>
|
||||
<li class="js-btn">Setting everything up</li>
|
||||
<li class="js-btn">FAQ/Changelog</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<article class="doc__content">
|
||||
<section class="js-section">
|
||||
<h3 class="section__title">Konnichiwa friend o/</h3>
|
||||
<p>In this documentation you learn how the Tokyo WTC 600 race works and how to set up the <b>Tokyo X</b> AHK script to farm GT7 credits when you are away from your computer or busy doing other tasks.</br></br>Please <b><u>read carefully and double-check</u></b> everything in this documentation if something isn't working as described. The PSNProfiles Discord has many helpful members that will assist you in getting the script running for your configuration, provided you have read and followed the directions below first.</p></br>
|
||||
<div class="callout">
|
||||
<a href="https://discord.gg/CfppVp7VXV" target="_blank" class="button--primary"><i class="fa-brands fa-discord"></i> Join our Discord server</a></a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="js-section">
|
||||
<h3 class="section__title">Problemz, what is happening and why does it all work? </h3>
|
||||
<p>Some time ago i started to look for the race with the best credits per hour ratio. <i class="fa-solid fa-arrow-trend-up"></i></br>After an update, the WTC 600 - Tokyo Race became the clear winner and i started writing the script.</p><h4>For this race we have different obstacles:</h4>
|
||||
<table id="obstacles">
|
||||
<tr>
|
||||
<th>Obstacle</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PP restriction</td>
|
||||
<td>We are only allowed to enter a car with a maximum of 600 PP.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tire/fuel consumption</td>
|
||||
<td>Tire (9x) and fuel (3x) consumption is active. That means we must find the best way to finish the race with the least RNG possible. (Worn tires can lead to spinouts, we must not not run out of fuel, etc.)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Track condition</td>
|
||||
<td>Track conditions There are 12 laps total, and the race starts with a very wet track. The track dries throughout the race and and we must react accordingly in order to not spin out or run into obstacles that we can’t recover from (mainly barrels in the hairpin turn).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AI/Opponents</td>
|
||||
<td>You start the race with 15 other opponents. We try to avoid them as much as possible in order to not spin out or miss set detection pixels (explained later).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hairpin turn</td>
|
||||
<td>There is a hairpin in this track. And it is here to make our scripting lives horrible.</br>The inner side is blocked by big cones, hindering us from just grinding the inner part of the turn.</br>On the outer side we have small cones and 90° walls. The walls are hindering us from just grinding the outside, the small cones often resets our car (when stuck under the car), spawning us back in the first gear.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2> Let's start explaining how we mastered this race to earn some good credits:</h2>
|
||||
<div class="obstacles">
|
||||
<h3 class="section__title">Overcoming the obstacles. 1 by 1.</h3>
|
||||
</br>
|
||||
<div class="tab__container">
|
||||
<ul class="tab__menu">
|
||||
<li class="tab active" data-tab="pp">PP restriction</li>
|
||||
<li class="tab" data-tab="track">Track condition</li>
|
||||
<li class="tab" data-tab="consumption">Tire/fuel consumptions</li>
|
||||
<li class="tab" data-tab="ai">AI/Opponents</li>
|
||||
<li class="tab" data-tab="hairpin">Final boss: Hairpin</li>
|
||||
</ul>
|
||||
<pre class="nohighlight code">
|
||||
<code class="tab__pane active pp">We use a bug in the code to jump below the allowed PP, but still having the fastest car (<i class="fa-solid fa-car"></i> Dodge SRT Tomahawk X VGT). </br></br>We manipulate the gear ratios to a point, where the PP calculation shows <i class="fa-solid fa-triangle-exclamation"></i> PP.</br>From there we fiddle with values until the PP calculation is under 600 PP.</br></br>This still works after the PP-Patch. <i class="fa-solid fa-square-check"></i> </code>
|
||||
<code class="tab__pane track"><i class="fa-solid fa-water"></i> The race starts with a very wet track. We have to start with <b>intermediates.</b></br></br>After a few laps, the track starts to get dryer, but we can't just switch to Hards. We are not driving the ideal line. <br>We hit some wet spots here and there, therefore we stay on <b>intermediates</b> for the whole race.</br></br> <i class="fa-solid fa-circle-exclamation"></i> Otherwise we would risk to RNG-Spin at many different spots, which endangers ours <b>consistency</b>.</code>
|
||||
<code class="tab__pane pen"><i class="fa-solid fa-clock-rotate-left"></i> I found out, that there is an internal cooldown for the penalty counter.</br></br>If you receive a penalty and hit or grind a wall/part of the track within 6 seconds, the internal cooldown gets reset.</br>You still collect penalties in a internal penalty storage.</br></br>The first time you're not hitting something for 6 seconds, the penalty gets triggered and is added to your current penalty.</br></br>I also found out, that if you keep grinding the wall while serving a penalty, your penalty storage gets reset. <i class="fa-solid fa-square-check"></i></br></br>If we just keep collecting penalties and finish the race without ever triggering/serving them, we end in a blackscreen and have to close the game and never receive credits.<b></br></br>We use all of this to our advantage:</b></br>We only trigger and serve a 5 second penalty every lap and reset our internal penalty storage, even if we are grinding walls 90% of the time, filling our internal storage.</br></code>
|
||||
<code class="tab__pane consumption"><b><i class="fa-regular fa-circle"></i> The tires consumption rate is at 9x.</b></br>We already know that we keep the Intermediates. We use the pit stop to always, <b>consistently</b>, trigger a new 5 second penalty</br>We're switching tires every lap - to always have the same behaviour on track, with our set timings/speeds.</br></br><i class="fa-solid fa-gas-pump"></i><b> The fuel consumtion rate is at 3x.</b></br>Because of our frequent pit visits, we can drive with the fuel map setting 1 (Power).</br>We fill up completely in Lap 6 and continiue driving until the race is finish, after lap 12.</code>
|
||||
<code class="tab__pane ai">We mainly use the pit stops to control our distance to the AI cars.</br>We are using set wait times, depending on our current lap and AI position at this time of the race. There are 2 timings at the momement.</br></br><i class="fa-solid fa-shield"></i> <b>Safest:</b> This one always stays behind AI, therefore its slower but we never see AI.</br></br><i class="fa-solid fa-shield-halved"></i> <b>Risky:</b> With this timings, we overtake AI on different parts of the track, but never in the hairpin turn.</code>
|
||||
<code class="tab__pane hairpin"><i class="fa-solid fa-radiation"></i> Welcome to the run/consisteny killer #1, the hairpin. <i class="fa-solid fa-skull-crossbones"></i></br></br>After many hours and iterations, our current most consistent way to handle the hairpin is this:</br></br>We place our car on the left wall, controlling our speed, when reaching the turn detection point. We then steer to the right, release acceleration and reach the other side's left wall. This reads so simple, but it's really much more complicated.</br></br>You will see why, pretty soon, running the script. <i class="fa-solid fa-person-harassing"></i></code>
|
||||
</pre>
|
||||
</div>
|
||||
<h4>About pixel detection:</h4>This script relies on the detection of specific color pixels at given coordinates to determine the position of the car relative to the racetrack, also some UI elements and respond accordingly. Pixel detection can be affected by a number of factors such as PlayStation version, PC performance, and network throughput, latency and stability.</br></br>
|
||||
There is also a degree of variance that happens with every race. Although we have tried to remove as much of this as possible by pitting every lap and avoiding AI in the hairpin, there is still randomness in AI behavior or in things like how the cones in the hairpin react when hit.</br></br>
|
||||
As such, although we have included a number of variables that allow you to fine tune the script for your specific setup (hairpin turn delay/pit timings), but do not expect to see a 100% completion/win rate. A 75%-90% success is achievable for most people when the correct hairpin turn delay was found.
|
||||
|
||||
<hr>
|
||||
</section>
|
||||
<section class="js-section">
|
||||
<h3 class="section__title">Requirements & Informations</h3>
|
||||
<h3>Hardware:</h3>
|
||||
<li>A computer running <i class="fa-brands fa-windows"></i> Microsoft Windows (must be X86 processor, ARM is not supported!)</li>
|
||||
<li>Do <b>NOT</b> connect a <i class="fa-solid fa-gamepad"></i> Controller to your <i class="fa-brands fa-playstation"></i> Playstation or <i class="fa-solid fa-computer"></i> Computer</li>
|
||||
<li><i class="fa-solid fa-network-wired"></i> Wired internet connection for stable operation of the script. If you do not have both, <i class="fa-solid fa-computer"></i> PC and <i class="fa-brands fa-playstation"></i> Playstation connected by <i class="fa-solid fa-network-wired"></i> wired internet, you may experience all kinds of different problems. If you use <i class="fa-solid fa-wifi"></i> WiFi, we cannot guarantee good operation.</li>
|
||||
<hr>
|
||||
<h3>Software:</h3>
|
||||
<h4><i class="fa-solid fa-download"></i> Download and install:</h4>
|
||||
<li><a href="https://remoteplay.dl.playstation.net/remoteplay/" target:"_blank"><i class="fa-brands fa-playstation"></i> PS Remote Play</a></br></li>
|
||||
<li><a href="https://www.autohotkey.com/" target:"_blank"><i class="fa-regular fa-keyboard"></i> AutoHotkey</a></br></li>
|
||||
<li><a href="https://github.com/ViGEm/ViGEmBus" target:"_blank"><i class="fa-solid fa-gamepad"></i> ViGEmBus Driver (including dependencies)</a></br></li></br>
|
||||
<h4><i class="fa-brands fa-windows"></i> Windows Settings:</h4>
|
||||
<li><i class="fa-brands fa-windows"></i> Windows scaling set to <b>100%</b> </li>
|
||||
<li><i class="fa-solid fa-toggle-off"></i> HDR <b>off</b></li>
|
||||
<li> Run <b>GT7-TokyoX.exe</b> as <i class="fa-solid fa-person-arrow-up-from-line"></i> Administrator</li>
|
||||
<li><b>Do NOT</b> minimize <i class="fa-brands fa-playstation"></i> Remote Play. Having other windows or programs on top of it is okay, minimizing is <b>NOT</b>. </li>
|
||||
<hr>
|
||||
<h4><i class="fa-brands fa-playstation"></i> Playstation settings:</h4>
|
||||
<li><b><i class="fa-solid fa-toggle-off"></i> Turn off <i class="fa-brands fa-playstation"></i> Playstation system notifications (these can cover the track map, causing issues with our detections)</br>[Example: "Your friend had come online"]</li></br>
|
||||
<b><i class="fa-solid fa-triangle-exclamation"></i> <u>IMPORTANT FOR YOUR OWN SAFETY:</b></u></br>
|
||||
<li><b>Turn ON</b> a password requirement for making any purchases on <i class="fa-brands fa-playstation"></i> PlayStation.</br>This way, when the script has any problems, it will not be possible to buy any MTX by accident.</li></br></br><b><i class="fa-solid fa-circle-exclamation"></i> THEREFORE, WE ARE NOT RESPONSIBLE FOR ACCIDENTAL PURCHASES IF YOU DON’T TURN THIS ON AS A PRECAUTION. <i class="fa-solid fa-circle-exclamation"></i></b>
|
||||
<hr>
|
||||
<h3>Ingame:</h3>
|
||||
<li>Player must have finished all Café Menu Books and the final championship (the one with 5 races). </br> This makes sure you have the <b>Tokyo WTC600 championship unlocked. <i class="fa-solid fa-lock-open"></i></b></li>
|
||||
<li>Player has the <i class="fa-solid fa-car"></i> Dodge SRT Tomahawk X VGT. ($1.000.000)</li>
|
||||
<li>Player has <i class="fa-solid fa-wrench"></i> tuning parts for the <i class="fa-solid fa-car"></i> Dodge SRT Tomahawk X VGT: </br>Ballast, customisable racing transmission, fully adjustable LSD, Racing Hard tires, Intermediate tires. (~$150.000)</li>
|
||||
<hr>
|
||||
<h2>GT7 Settings:</h2>
|
||||
<h3>_car build:</h3>
|
||||
<img class="enlarge-image" src="tokyo_car1.png" alt="Tokyo Car 1" /></br><b>//car settings - 1</b>
|
||||
</br></br>
|
||||
<img class="enlarge-image" src="tokyo_car2.png" alt="Tokyo Car 2" /></br><b>// car settings - 2</b>
|
||||
</br></br>
|
||||
<img class="enlarge-image" src="tokyo_car3.png" alt="Tokyo Car 2" /></br><b>// car settings - 3</b>
|
||||
</section>
|
||||
<h3>_misc settings:</h3>
|
||||
<img class="enlarge-image" src="tokyo_difficulty.png" alt="Tokyo Difficulty" /></br><b>// difficulty Setting</b>
|
||||
</br></br>
|
||||
<img class="enlarge-image" src="tokyo_display.png" alt="Tokyo Display" /></br><b>// display settings</b>
|
||||
</br></br>
|
||||
<img class="enlarge-image" src="tokyo_drivinggear.png" alt="Tokyo Driving Gear" /></br><b>// driving gear</b>
|
||||
</br></br>
|
||||
<h3>_after race start:</h3>
|
||||
<h4>_-controller settings:</h4>
|
||||
<img class="enlarge-image" src="tokyo_controller1.png" alt="Tokyo Controller 1" /></br><b>// controller - 1</b>
|
||||
</br></br>
|
||||
<img class="enlarge-image" src="tokyo_controller2.png" alt="Tokyo Controller 2" /></br><b>// controller - 2</b>
|
||||
</br></br>
|
||||
<h4>_-assists settings:</h4>
|
||||
<img class="enlarge-image" src="tokyo_assists1.png" alt="Tokyo Assists 1" /></br><b>// assists - 1</b>
|
||||
</br></br>
|
||||
<img class="enlarge-image" src="tokyo_assists2.png" alt="Tokyo Assists 2" /></br><b>// assists - 2</b>
|
||||
</br></br>
|
||||
<h4>_-cockpit:</h4>
|
||||
<img class="enlarge-image" src="tokyo_cockpitview.png" alt="Tokyo Cockpit" /></br><b>// cockpit - 1</b>
|
||||
</br></br>
|
||||
<hr>
|
||||
<h2>Tokyo X features:</h2>
|
||||
<h3>The script offers you following features:</h3>
|
||||
</br>
|
||||
<div class="tab__container">
|
||||
<ul class="tab__menu">
|
||||
<li class="tab active" data-tab="main">Main GUI</li>
|
||||
<li class="tab" data-tab="race">Settings: Race</li>
|
||||
<li class="tab" data-tab="machine">Settings: Machine/Setup</li>
|
||||
<li class="tab" data-tab="notifications">Settings: Notification</li>
|
||||
<li class="tab" data-tab="endafter">End after X wins</li>
|
||||
</ul>
|
||||
<pre class="nohighlight code">
|
||||
<code class="tab__pane active main">
|
||||
<img class="enlarge-image" src="tokyo_script1.png" alt="Tokyo Script 1" /></br>You <b>start</b> after entering the WTC 600 Tokyo race, pause and hover over "Retry".</br>Tokyo WTC600 championship can be found in Asia, it is (currently) the last race option at the Tokyo Expressway track.</br><p>In the main GUI you can see your current location on the track, in which lap you are (also visualized by a progress bar) and check out your session/all time stats.</br></br></p></code>
|
||||
<code class="tab__pane race"><img class="enlarge-image" src="tokyo_script2.png" alt="Tokyo Script 2" /></br>Select between 2 different pit stop timings.</br></br><img class="enlarge-image" src="tokyo_script3.png" alt="Tokyo Script 3" /></br>Safe (slower): You always stay behind the AI cars after you are in first place.</br>
|
||||
</br></br><img class="enlarge-image" src="tokyo_script4.png" alt="Tokyo Script 4" /></br>Risky (faster): You overtake AI cars, exception: hairpin turn.</br></br><p>Select an option from the dropdown menu, the values are instantly saved and active.</br>You can check out both timings and decide whats suits you better.</p>
|
||||
<p align = "right">...myths says there is even a 3rd option <i class="fa-solid fa-hand-fist"></i></p></code>
|
||||
<code class="tab__pane machine"><img class="enlarge-image" src="tokyo_script5.png" alt="Tokyo Script 5" /></br><p><i class="fa-solid fa-u"></i> <b>Hairpin settings:</br></b></br>The <b>hairpin turn delay</b> in ms dictates how fast the script reacts and turns right after fining the pixel we defined. Start with default settings and watch how your hairpin turns look. In the first lap, the hairpin turn can be pretty wide, they will then be good/perfect for the remaining laps.</br></br>You can try out the option <b>"Dynamic Turn Delay"</b> and find your perfect setup. It measures the time between two detection points and increases/decreases the delay depending on your speed.</p></br><p><i class="fa-solid fa-eye-dropper"></i> <b>Set detection colors:</b></br></br><b>Grab: Pit stop Color</b> - here you can grab the current color when you are <b>stuck in the pit menu </b>(tire selection).</br>You can also manually enter the Hex-Color code when double-clicking on the colored rectangle.</br></br><b>Grab: Restart color</b> - here you can grab the current color when you are <b>stuck in the replay window.</b></br>You can also manually enter the Hex-Color code when double-clicking on the colored rectangle.</p></br><p><i class="fa-solid fa-video"></i> <b>Other Features:</b></br></br><b>Save clip after reset</b> - use the <i class="fa-brands fa-playstation"></i> Playstation feature to record a 3 minutes clip after a reset is triggered.</p></code>
|
||||
<code class="tab__pane notifications"><img class="enlarge-image" src="tokyo_script6.png" alt="Tokyo Script 6" /><p>You can send race reports to your <i class="fa-brands fa-telegram"></i> Telegram Account.</br></br>Here is a <i class="fa-solid fa-book"></i> <b>quick guide</b> how to set it up:</br></br>
|
||||
<ol><li>Open Telegram, and start a conversation with @BotFather</li>
|
||||
<li>In the conversation with @BotFather, type ‘/newbot’.</li>
|
||||
<li>Give your bot a nickname, like BotFather instructs you.</li>
|
||||
<li>Pick a username for the bot as BotFather instructs you.</li>
|
||||
<li>BotFather congratulates you and gives you the HTTP API token. This is what you plug into ‘Telegram Bot Token’ inside the Notifications/API settings in the script.</li>
|
||||
<li>Create a new group chat in Telegram, where you invite your bot and @RawDataBot</li>
|
||||
<li>Type ‘/start’ and the Raw Data Bot will spit out some data. Look for “chat” and specifically “id”. This is what you plug into ‘Telegram Chat ID’. Caution: the ID is not just a number, it also has a special character before the number that you <b>MUST include!</b></li></ol>
|
||||
</p></code>
|
||||
<code class="tab__pane endafter"><img class="enlarge-image" src="tokyo_script1.png" alt="Tokyo Script 1" /><p>You can set the number of wins until the script stops. Default value is 0 (infinite). </br></br>To activate this feature, enter your wanted number with the Up-Down control and HIT the button below. It is changing its text, depending on how many wins you set.</p></code>
|
||||
</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<section class="js-section">
|
||||
<h3 class="section__title">FAQ</h3>
|
||||
<p><i class="fa-solid fa-question"></i> Can i change the pit stop timings while the script is running?</br><i class="fa-solid fa-exclamation"></i> Yes, you can do it and the script will pull the correct timing for the coming pit stop.</p>
|
||||
<p><i class="fa-solid fa-question"></i> My race failed. Is something wrong?</br><i class="fa-solid fa-exclamation"></i> No. Failures will happen due to Randomness. Script is designed to work most of the time, but failures are inevitable.</p>
|
||||
<p><i class="fa-solid fa-question"></i> I can't get my PP to match yours! Help?!</br><i class="fa-solid fa-exclamation"></i> CHECK THE TOE!!!!!</p>
|
||||
<p><i class="fa-solid fa-question"></i> Why do I pit every lap? Wouldn't it be faster to not pit so much?</br><i class="fa-solid fa-exclamation"></i> Faster, yes. But slow is more reliable and the benefit doesn't outweigh the risk.</p>
|
||||
<p><i class="fa-solid fa-question"></i> How long can I safely keep my Playstation running?</br><i class="fa-solid fa-exclamation"></i> That's not up to us. Your mileage may vary. Be responsible.</p>
|
||||
<p><i class="fa-solid fa-question"></i> What do I do with all these credits?</br><i class="fa-solid fa-exclamation"></i> You do you, pikachu.</p>
|
||||
<p><i class="fa-solid fa-question"></i> How long do I have before this gets fixed?</br><i class="fa-solid fa-exclamation"></i> Probably best to think of a patch coming immediately.</p>
|
||||
<p><i class="fa-solid fa-question"></i> Why are you doing this?</br><i class="fa-solid fa-exclamation"></i> To show that we can.</p>
|
||||
<p><i class="fa-solid fa-question"></i> Can I get a beta version of whatever you are working on next?</br><i class="fa-solid fa-exclamation"></i> If this lives long enough for updates to be made, they will be released as they are finished.</p>
|
||||
<p><i class="fa-solid fa-question"></i> Do starting grids matter?</br><i class="fa-solid fa-exclamation"></i> No.</p>
|
||||
<p><i class="fa-solid fa-question"></i> How fast are the laps?</br><i class="fa-solid fa-exclamation"></i> Anywhere between 2:00 and 3:00 depending on pit delay timings and if you happen to get stuck on something for a moment. Before you @ us... slow is reliable. Reliable is enriching.</p>
|
||||
<p><i class="fa-solid fa-question"></i> What should I do if I can't get it to work?</br><i class="fa-solid fa-exclamation"></i> Clubman is great. Panam still works. Ask in the Discord, but know you have options.</p>
|
||||
<hr>
|
||||
<h3>Changelog</h3>
|
||||
<div class="changelog__item">
|
||||
<div class="changelog__meta">
|
||||
<h4 class="changelog__title">Tokyo X</h4>
|
||||
<small class="changelog__date"></small>
|
||||
</div>
|
||||
<div class="changelog__detail">
|
||||
<ul>
|
||||
<li>Initial public release</li>
|
||||
Please provide as much information as possible when asking for help (last status text, lap, location - optimally with a video clip).
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
</br>
|
||||
<div class="position-relative marquee-container d-none d-sm-block">
|
||||
<div class="marquee d-flex justify-content-around">
|
||||
<span>Shoutout (alphabetic order) to all these <b>AMAZING PEOPLE</b> from the Discord Tokyo Beta Channel. Thank you for helping me bringing the <b>TOKYO X</b> script to life - it was a great time!</span>
|
||||
</br>
|
||||
<span><shadow2>andow</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Atoms4Piece</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>BeefSupreme</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>BobGT</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>CarapauCorrida</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Chester</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>🐐 </shadow2>(you know)</span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>GTMaster</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>heidi</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>hitomi</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>j0shjones</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>JordanD123</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Krazyy</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>NavS</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Rossey</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Scany</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Septomor</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Sevencuts</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>Solisu</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>TheScythed</shadow2></span>
|
||||
<span><shadow>//</shadow></span>
|
||||
<span><shadow2>x34uvc</shadow2></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<footer class="footer">GG! - Tokyo X by problemz
|
||||
|
||||
</footer>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
<script src="scribbler.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,115 @@
|
||||
html, body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* layout */
|
||||
.header {
|
||||
border-bottom: 1px solid var(--code-bg-color);
|
||||
grid-template-columns: 1fr 150px 60% 1fr;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
/* logo */
|
||||
.logo {
|
||||
font-weight: 900;
|
||||
color: var(--primary-color);
|
||||
font-size: 1.4em;
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.logo__thin {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
/* menu */
|
||||
.menu {
|
||||
grid-template-columns: 1fr 180px 60% 1fr;
|
||||
}
|
||||
|
||||
.menu__item {
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
/* doc */
|
||||
.doc__bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 28%;
|
||||
background-color: var(--bg-color);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.doc__nav {
|
||||
flex-basis: 20%;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
.doc__nav ul {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.doc__nav ul.fixed {
|
||||
position: fixed;
|
||||
top: 2rem;
|
||||
}
|
||||
|
||||
.doc__nav li:hover {
|
||||
color: var(--primary-color-light);
|
||||
cursor: pointer;
|
||||
transition: color .3s ease-in-out;
|
||||
}
|
||||
|
||||
.doc__nav .selected {
|
||||
color: var(--accent-color);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.doc__nav .selected:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
background-color: var(--accent-color);
|
||||
left: -1.5rem;
|
||||
top: 0.3rem;
|
||||
}
|
||||
|
||||
.doc__content {
|
||||
flex-basis: 80%;
|
||||
padding: 0 0 5rem 1rem;
|
||||
}
|
||||
|
||||
@media (max-width: 750px) {
|
||||
.wrapper {
|
||||
flex-direction: column;
|
||||
}
|
||||
.doc__content {
|
||||
padding-left: 0;
|
||||
}
|
||||
.doc__nav ul {
|
||||
border-bottom: 1px solid var(--code-bg-color);
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
.doc__nav ul.fixed {
|
||||
/* nutralized the fixed menu for mobile*/
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
.doc__nav li {
|
||||
display: inline-block;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
.doc__nav .selected:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
/* css variables*/
|
||||
:root {
|
||||
--primary-color: #432E30;
|
||||
--primary-color-light: #8E7474;
|
||||
--accent-color: #FE6A6B;
|
||||
--accent-color-light: #FFE4E4;
|
||||
--accent-color-dark: #B94B4C;
|
||||
--white-color: #FAFBFC;
|
||||
--light-gray-color: #C6CBD1;
|
||||
--medium-gray-color: #959DA5;
|
||||
--dark-gray-color: #444D56;
|
||||
--bg-color: #F8F8FA;
|
||||
--code-bg-color: #F0E8E8;
|
||||
}
|
||||
|
||||
/* normalized */
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: 'Nunito Sans', sans-serif;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
p {
|
||||
font-weight: 300;
|
||||
color: #4A4A4A;
|
||||
}
|
||||
|
||||
a, a:hover {
|
||||
text-decoration: none;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
hr {
|
||||
padding: 1rem 0;
|
||||
border: 0;
|
||||
border-bottom: 1px solid var(--bg-color);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* global components */
|
||||
|
||||
/* typography */
|
||||
.section__title {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.tab__container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab__container > ul {
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
right: 1rem;
|
||||
top: -2rem;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.tab__container .code {
|
||||
white-space: normal;
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: inline-block;
|
||||
padding: 0.3rem 0.5rem;
|
||||
font-weight: 200;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tab.active {
|
||||
border-bottom: 1px solid var(--primary-color);
|
||||
font-weight: 700;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tab__pane {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab__pane.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* code */
|
||||
.code {
|
||||
border-radius: 3px;
|
||||
font-family: Space Mono, SFMono-Regular, Menlo,Monaco, Consolas, Liberation Mono, Courier New, monospace;
|
||||
background: var(--bg-color);
|
||||
border: 1px solid var(--code-bg-color);
|
||||
color: var(--primary-color-light);
|
||||
}
|
||||
|
||||
.code--block {
|
||||
white-space: pre-line;
|
||||
padding: 0 1.5rem;
|
||||
}
|
||||
|
||||
.code--inline {
|
||||
padding: 3px 6px;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/* buttons */
|
||||
.button--primary {
|
||||
padding: 10px 22px;
|
||||
background-color: var(--accent-color);
|
||||
color: white;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
transition: all .3s ease-out;
|
||||
}
|
||||
|
||||
.button--primary:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
background-color: var(--accent-color-light);
|
||||
right: -0.4rem;
|
||||
top: -0.4rem;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
.button--primary:hover {
|
||||
text-shadow: 0px 1px 1px var(--accent-color-dark);
|
||||
color: white;
|
||||
transform: translate3D(0, -3px, 0);
|
||||
}
|
||||
|
||||
.button--primary:hover::after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.button--secondary {
|
||||
padding: 10px 22px;
|
||||
border: 2px solid var(--primary-color);
|
||||
transition: all 0.5s ease-out;
|
||||
}
|
||||
|
||||
.button--secondary:hover {
|
||||
border-color: var(--accent-color);
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
/* links */
|
||||
.link {
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.link--dark {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.link--light {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
/* menu */
|
||||
nav {
|
||||
display: grid;
|
||||
grid-template-columns: 70px auto;
|
||||
}
|
||||
|
||||
.menu {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
display: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.toggle span,
|
||||
.toggle span:before,
|
||||
.toggle span:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 2px;
|
||||
width: 18px;
|
||||
border-radius: 2px;
|
||||
background: var(--primary-color);
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease-in-out;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.toggle span:before {
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
.toggle span:after {
|
||||
bottom: -6px;
|
||||
}
|
||||
|
||||
.toggle.open span{
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.toggle.open span:before,
|
||||
.toggle.open span:after {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.toggle.open span:before {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.toggle.open span:after {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.menu__item {
|
||||
padding: 1rem;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.menu__item.toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* table */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
transition: color .3s ease-out;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
table td, table th {
|
||||
border: 1px solid var(--code-bg-color);
|
||||
padding: 0.8rem;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
table th {
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
border-color: white;
|
||||
border-bottom-color: var(--code-bg-color);
|
||||
}
|
||||
|
||||
table td:first-child {
|
||||
background-color: var(--bg-color);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
nav {
|
||||
grid-template-columns: 70px auto;
|
||||
}
|
||||
|
||||
.menu__item{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu__item.toggle {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.menu {
|
||||
text-align: right;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu.responsive .menu__item:not(:first-child) {
|
||||
display: block;
|
||||
padding: 0 0 0.5rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* layout */
|
||||
.wrapper {
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
background-color: var(--primary-color);
|
||||
padding: 2rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@keyframes fadeUp {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(0,30px,0);
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(0,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.enlarge-image {
|
||||
margin-top: 0px;
|
||||
width: 32%;
|
||||
float: center;
|
||||
-webkit-transition: all 0.5s ease-in-out;
|
||||
-moz-transition: all 0.5s ease-in-out;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
.enlarge-image:hover {
|
||||
-webkit-transition: all 0.5s ease-in-out;
|
||||
-moz-transition: all 0.5s ease-in-out;
|
||||
transition: all 0.5s ease-in-out;
|
||||
-moz-transform: scale(3);
|
||||
-webkit-transform: scale(3);
|
||||
-o-transform: scale(3);
|
||||
-ms-transform: scale(3);
|
||||
transform: scale(3);
|
||||
|
||||
}
|
||||
|
||||
.marquee-container {
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
line-height: 20px;
|
||||
}
|
||||
.marquee-container .marquee {
|
||||
left: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
animation: marquee 25s linear infinite;
|
||||
}
|
||||
.marquee-container .marquee2 {
|
||||
animation-delay: 20s;
|
||||
}
|
||||
.marquee-container shadow {
|
||||
color: #ffffff;
|
||||
color: #616161;
|
||||
text-shadow: #e0e0e0 1px 1px 0;
|
||||
font-size: 1em;
|
||||
vertical-align: middle;
|
||||
|
||||
}
|
||||
.marquee-container shadow2 {
|
||||
color: #fe6a6b;
|
||||
font-size: 1em;
|
||||
text-shadow: rgba(255,255,255,.1) -1px -1px 1px,rgba(0,0,0,.5) 1px 1px 1px;
|
||||
vertical-align: middle;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@keyframes marquee {
|
||||
0% {
|
||||
left: 100%;
|
||||
}
|
||||
100% {
|
||||
left: -100%;
|
||||
}
|
||||
}
|
||||
145
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/scribbler.js
Normal file
@@ -0,0 +1,145 @@
|
||||
// utilities
|
||||
var get = function (selector, scope) {
|
||||
scope = scope ? scope : document;
|
||||
return scope.querySelector(selector);
|
||||
};
|
||||
|
||||
var getAll = function (selector, scope) {
|
||||
scope = scope ? scope : document;
|
||||
return scope.querySelectorAll(selector);
|
||||
};
|
||||
|
||||
// setup typewriter effect in the terminal demo
|
||||
if (document.getElementsByClassName('demo').length > 0) {
|
||||
var i = 0;
|
||||
var txt = `scribbler
|
||||
[Entry mode; press Ctrl+D to save and quit; press Ctrl+C to quit without saving]
|
||||
|
||||
###todo for new year dinner party
|
||||
|
||||
- milk
|
||||
- butter
|
||||
- green onion
|
||||
- lots and lots of kiwis 🥝`;
|
||||
var speed = 60;
|
||||
|
||||
function typeItOut () {
|
||||
if (i < txt.length) {
|
||||
document.getElementsByClassName('demo')[0].innerHTML += txt.charAt(i);
|
||||
i++;
|
||||
setTimeout(typeItOut, speed);
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(typeItOut, 1800);
|
||||
}
|
||||
|
||||
// toggle tabs on codeblock
|
||||
window.addEventListener("load", function() {
|
||||
// get all tab_containers in the document
|
||||
var tabContainers = getAll(".tab__container");
|
||||
|
||||
// bind click event to each tab container
|
||||
for (var i = 0; i < tabContainers.length; i++) {
|
||||
get('.tab__menu', tabContainers[i]).addEventListener("click", tabClick);
|
||||
}
|
||||
|
||||
// each click event is scoped to the tab_container
|
||||
function tabClick (event) {
|
||||
var scope = event.currentTarget.parentNode;
|
||||
var clickedTab = event.target;
|
||||
var tabs = getAll('.tab', scope);
|
||||
var panes = getAll('.tab__pane', scope);
|
||||
var activePane = get(`.${clickedTab.getAttribute('data-tab')}`, scope);
|
||||
|
||||
// remove all active tab classes
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
tabs[i].classList.remove('active');
|
||||
}
|
||||
|
||||
// remove all active pane classes
|
||||
for (var i = 0; i < panes.length; i++) {
|
||||
panes[i].classList.remove('active');
|
||||
}
|
||||
|
||||
// apply active classes on desired tab and pane
|
||||
clickedTab.classList.add('active');
|
||||
activePane.classList.add('active');
|
||||
}
|
||||
});
|
||||
|
||||
//in page scrolling for documentaiton page
|
||||
var btns = getAll('.js-btn');
|
||||
var sections = getAll('.js-section');
|
||||
|
||||
function setActiveLink(event) {
|
||||
// remove all active tab classes
|
||||
for (var i = 0; i < btns.length; i++) {
|
||||
btns[i].classList.remove('selected');
|
||||
}
|
||||
|
||||
event.target.classList.add('selected');
|
||||
}
|
||||
|
||||
function smoothScrollTo(element, event) {
|
||||
setActiveLink(event);
|
||||
|
||||
window.scrollTo({
|
||||
'behavior': 'smooth',
|
||||
'top': element.offsetTop - 20,
|
||||
'left': 0
|
||||
});
|
||||
}
|
||||
|
||||
if (btns.length && sections.length > 0) {
|
||||
// for (var i = 0; i<btns.length; i++) {
|
||||
// btns[i].addEventListener('click', function(event) {
|
||||
// smoothScrollTo(sections[i], event);
|
||||
// });
|
||||
// }
|
||||
btns[0].addEventListener('click', function (event) {
|
||||
smoothScrollTo(sections[0], event);
|
||||
});
|
||||
|
||||
btns[1].addEventListener('click', function (event) {
|
||||
smoothScrollTo(sections[1], event);
|
||||
});
|
||||
|
||||
btns[2].addEventListener('click', function (event) {
|
||||
smoothScrollTo(sections[2], event);
|
||||
});
|
||||
|
||||
btns[3].addEventListener('click', function (event) {
|
||||
smoothScrollTo(sections[3], event);
|
||||
});
|
||||
}
|
||||
|
||||
// fix menu to page-top once user starts scrolling
|
||||
window.addEventListener('scroll', function () {
|
||||
var docNav = get('.doc__nav > ul');
|
||||
|
||||
if( docNav) {
|
||||
if (window.pageYOffset > 63) {
|
||||
docNav.classList.add('fixed');
|
||||
} else {
|
||||
docNav.classList.remove('fixed');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// responsive navigation
|
||||
var topNav = get('.menu');
|
||||
var icon = get('.toggle');
|
||||
|
||||
window.addEventListener('load', function(){
|
||||
function showNav() {
|
||||
if (topNav.className === 'menu') {
|
||||
topNav.className += ' responsive';
|
||||
icon.className += ' open';
|
||||
} else {
|
||||
topNav.className = 'menu';
|
||||
icon.classList.remove('open');
|
||||
}
|
||||
}
|
||||
icon.addEventListener('click', showNav);
|
||||
});
|
||||
|
After Width: | Height: | Size: 462 KiB |
|
After Width: | Height: | Size: 412 KiB |
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/tokyo_car1.png
Normal file
|
After Width: | Height: | Size: 332 KiB |
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/tokyo_car2.png
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/tokyo_car3.png
Normal file
|
After Width: | Height: | Size: 276 KiB |
|
After Width: | Height: | Size: 513 KiB |
|
After Width: | Height: | Size: 430 KiB |
|
After Width: | Height: | Size: 266 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 292 KiB |
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/Assets/tokyo_gui.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/AutoHotkey.exe
Normal file
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/GT7-TokyoX.exe
Normal file
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/config.ini
Normal file
211
bnowakow/old versions/5 Tokyo/GT7-TokyoX/lib/AHK-ViGEm-Bus.ahk
Normal file
@@ -0,0 +1,211 @@
|
||||
#include %A_LineFile%\..\CLR.ahk
|
||||
|
||||
; Static class, holds ViGEm Client instance
|
||||
class ViGEmWrapper {
|
||||
static asm := 0
|
||||
static client := 0
|
||||
|
||||
Init(){
|
||||
if (this.client == 0){
|
||||
this.asm := CLR_LoadLibrary(A_LineFile "\..\ViGEmWrapper.dll")
|
||||
}
|
||||
}
|
||||
|
||||
CreateInstance(cls){
|
||||
return this.asm.CreateInstance(cls)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
; Base class for ViGEm "Targets" (Controller types - eg xb360 / ds4) to inherit from
|
||||
class ViGEmTarget {
|
||||
target := 0
|
||||
helperClass := ""
|
||||
controllerClass := ""
|
||||
|
||||
__New(){
|
||||
;~ this.asm := CLR_LoadLibrary(A_LineFile "\..\ViGEmWrapper.dll")
|
||||
ViGEmWrapper.Init()
|
||||
this.Instance := ViGEmWrapper.CreateInstance(this.helperClass)
|
||||
|
||||
if (this.Instance.OkCheck() != "OK"){
|
||||
msgbox ViGEmWrapper.dll failed to load!
|
||||
ExitApp
|
||||
}
|
||||
}
|
||||
|
||||
SendReport(){
|
||||
this.Instance.SendReport()
|
||||
}
|
||||
|
||||
SubscribeFeedback(callback){
|
||||
this.Instance.SubscribeFeedback(callback)
|
||||
}
|
||||
}
|
||||
|
||||
; DS4 (DualShock 4 for Playstation 4)
|
||||
class ViGEmDS4 extends ViGEmTarget {
|
||||
helperClass := "ViGEmWrapper.Ds4"
|
||||
__New(){
|
||||
static buttons := {Square: 16, Cross: 32, Circle: 64, Triangle: 128, L1: 256, R1: 512, L2: 1024, R2: 2048
|
||||
, Share: 4096, Options: 8192, LS: 16384, RS: 32768 }
|
||||
static specialButtons := {Ps: 1, TouchPad: 2}
|
||||
static axes := {LX: 2, LY: 3, RX: 4, RY: 5, LT: 0, RT: 1}
|
||||
|
||||
this.Buttons := {}
|
||||
for name, id in buttons {
|
||||
this.Buttons[name] := new this._ButtonHelper(this, id)
|
||||
}
|
||||
for name, id in specialButtons {
|
||||
this.Buttons[name] := new this._SpecialButtonHelper(this, id)
|
||||
}
|
||||
|
||||
this.Axes := {}
|
||||
for name, id in axes {
|
||||
this.Axes[name] := new this._AxisHelper(this, id)
|
||||
}
|
||||
|
||||
this.Dpad := new this._DpadHelper(this)
|
||||
base.__New()
|
||||
}
|
||||
|
||||
class _ButtonHelper {
|
||||
__New(parent, id){
|
||||
this._Parent := parent
|
||||
this._Id := id
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
this._Parent.Instance.SetButtonState(this._Id, state)
|
||||
this._Parent.Instance.SendReport()
|
||||
return this._Parent
|
||||
}
|
||||
}
|
||||
|
||||
class _SpecialButtonHelper {
|
||||
__New(parent, id){
|
||||
this._Parent := parent
|
||||
this._Id := id
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
this._Parent.Instance.SetSpecialButtonState(this._Id, state)
|
||||
this._Parent.Instance.SendReport()
|
||||
return this._Parent
|
||||
}
|
||||
}
|
||||
|
||||
class _AxisHelper {
|
||||
__New(parent, id){
|
||||
this._Parent := parent
|
||||
this._Id := id
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
this._Parent.Instance.SetAxisState(this._Id, this.ConvertAxis(state))
|
||||
this._Parent.Instance.SendReport()
|
||||
return this._Parent
|
||||
}
|
||||
|
||||
ConvertAxis(state){
|
||||
return round(state * 2.55)
|
||||
}
|
||||
}
|
||||
|
||||
class _DpadHelper {
|
||||
__New(parent){
|
||||
this._Parent := parent
|
||||
this._Id := id
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
static dPadDirections := {Up: 0, UpRight: 1, Right: 2, DownRight: 3, Down: 4, DownLeft: 5, Left: 6, UpLeft: 7, None: 8}
|
||||
this._Parent.Instance.SetDpadState(dPadDirections[state])
|
||||
this._Parent.Instance.SendReport()
|
||||
return this._Parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
; Xb360
|
||||
class ViGEmXb360 extends ViGEmTarget {
|
||||
helperClass := "ViGEmWrapper.Xb360"
|
||||
__New(){
|
||||
static buttons := {A: 4096, B: 8192, X: 16384, Y: 32768, LB: 256, RB: 512, LS: 64, RS: 128, Back: 32, Start: 16, Xbox: 1024}
|
||||
static axes := {LX: 2, LY: 3, RX: 4, RY: 5, LT: 0, RT: 1}
|
||||
|
||||
this.Buttons := {}
|
||||
for name, id in buttons {
|
||||
this.Buttons[name] := new this._ButtonHelper(this, id)
|
||||
}
|
||||
|
||||
this.Axes := {}
|
||||
for name, id in axes {
|
||||
this.Axes[name] := new this._AxisHelper(this, id)
|
||||
}
|
||||
|
||||
this.Dpad := new this._DpadHelper(this)
|
||||
|
||||
base.__New()
|
||||
}
|
||||
|
||||
class _ButtonHelper {
|
||||
__New(parent, id){
|
||||
this._Parent := parent
|
||||
this._Id := id
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
this._Parent.Instance.SetButtonState(this._Id, state)
|
||||
this._Parent.Instance.SendReport()
|
||||
return this._Parent
|
||||
}
|
||||
}
|
||||
|
||||
class _AxisHelper {
|
||||
__New(parent, id){
|
||||
this._Parent := parent
|
||||
this._id := id
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
this._Parent.Instance.SetAxisState(this._Id, this.ConvertAxis(state))
|
||||
this._Parent.Instance.SendReport()
|
||||
}
|
||||
|
||||
ConvertAxis(state){
|
||||
value := round((state * 655.36) - 32768)
|
||||
if (value == 32768)
|
||||
return 32767
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
class _DpadHelper {
|
||||
_DpadStates := {1:0, 8:0, 2:0, 4:0} ; Up, Right, Down, Left
|
||||
__New(parent){
|
||||
this._Parent := parent
|
||||
}
|
||||
|
||||
SetState(state){
|
||||
static dpadDirections := { None: {1:0, 8:0, 2:0, 4:0}
|
||||
, Up: {1:1, 8:0, 2:0, 4:0}
|
||||
, UpRight: {1:1, 8:1, 2:0, 4:0}
|
||||
, Right: {1:0, 8:1, 2:0, 4:0}
|
||||
, DownRight: {1:0, 8:1, 2:1, 4:0}
|
||||
, Down: {1:0, 8:0, 2:1, 4:0}
|
||||
, DownLeft: {1:0, 8:0, 2:1, 4:1}
|
||||
, Left: {1:0, 8:0, 2:0, 4:1}
|
||||
, UpLeft: {1:1, 8:0, 2:0, 4:1}}
|
||||
newStates := dpadDirections[state]
|
||||
for id, newState in newStates {
|
||||
oldState := this._DpadStates[id]
|
||||
if (oldState != newState){
|
||||
this._DpadStates[id] := newState
|
||||
this._Parent.Instance.SetButtonState(id, newState)
|
||||
}
|
||||
this._Parent.SendReport()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
151
bnowakow/old versions/5 Tokyo/GT7-TokyoX/lib/CLR.ahk
Normal file
@@ -0,0 +1,151 @@
|
||||
; ==========================================================
|
||||
; .NET Framework Interop
|
||||
; https://autohotkey.com/boards/viewtopic.php?t=4633
|
||||
; ==========================================================
|
||||
;
|
||||
; Author: Lexikos
|
||||
; Version: 1.2
|
||||
; Requires: AutoHotkey_L v1.0.96+
|
||||
;
|
||||
|
||||
CLR_LoadLibrary(AssemblyName, AppDomain=0)
|
||||
{
|
||||
if !AppDomain
|
||||
AppDomain := CLR_GetDefaultDomain()
|
||||
e := ComObjError(0)
|
||||
Loop 1 {
|
||||
if assembly := AppDomain.Load_2(AssemblyName)
|
||||
break
|
||||
static null := ComObject(13,0)
|
||||
args := ComObjArray(0xC, 1), args[0] := AssemblyName
|
||||
typeofAssembly := AppDomain.GetType().Assembly.GetType()
|
||||
if assembly := typeofAssembly.InvokeMember_3("LoadWithPartialName", 0x158, null, null, args)
|
||||
break
|
||||
if assembly := typeofAssembly.InvokeMember_3("LoadFrom", 0x158, null, null, args)
|
||||
break
|
||||
}
|
||||
ComObjError(e)
|
||||
return assembly
|
||||
}
|
||||
|
||||
CLR_CreateObject(Assembly, TypeName, Args*)
|
||||
{
|
||||
if !(argCount := Args.MaxIndex())
|
||||
return Assembly.CreateInstance_2(TypeName, true)
|
||||
|
||||
vargs := ComObjArray(0xC, argCount)
|
||||
Loop % argCount
|
||||
vargs[A_Index-1] := Args[A_Index]
|
||||
|
||||
static Array_Empty := ComObjArray(0xC,0), null := ComObject(13,0)
|
||||
|
||||
return Assembly.CreateInstance_3(TypeName, true, 0, null, vargs, null, Array_Empty)
|
||||
}
|
||||
|
||||
CLR_CompileC#(Code, References="", AppDomain=0, FileName="", CompilerOptions="")
|
||||
{
|
||||
return CLR_CompileAssembly(Code, References, "System", "Microsoft.CSharp.CSharpCodeProvider", AppDomain, FileName, CompilerOptions)
|
||||
}
|
||||
|
||||
CLR_CompileVB(Code, References="", AppDomain=0, FileName="", CompilerOptions="")
|
||||
{
|
||||
return CLR_CompileAssembly(Code, References, "System", "Microsoft.VisualBasic.VBCodeProvider", AppDomain, FileName, CompilerOptions)
|
||||
}
|
||||
|
||||
CLR_StartDomain(ByRef AppDomain, BaseDirectory="")
|
||||
{
|
||||
static null := ComObject(13,0)
|
||||
args := ComObjArray(0xC, 5), args[0] := "", args[2] := BaseDirectory, args[4] := ComObject(0xB,false)
|
||||
AppDomain := CLR_GetDefaultDomain().GetType().InvokeMember_3("CreateDomain", 0x158, null, null, args)
|
||||
return A_LastError >= 0
|
||||
}
|
||||
|
||||
CLR_StopDomain(ByRef AppDomain)
|
||||
{ ; ICorRuntimeHost::UnloadDomain
|
||||
DllCall("SetLastError", "uint", hr := DllCall(NumGet(NumGet(0+RtHst:=CLR_Start())+20*A_PtrSize), "ptr", RtHst, "ptr", ComObjValue(AppDomain))), AppDomain := ""
|
||||
return hr >= 0
|
||||
}
|
||||
|
||||
; NOTE: IT IS NOT NECESSARY TO CALL THIS FUNCTION unless you need to load a specific version.
|
||||
CLR_Start(Version="") ; returns ICorRuntimeHost*
|
||||
{
|
||||
static RtHst := 0
|
||||
; The simple method gives no control over versioning, and seems to load .NET v2 even when v4 is present:
|
||||
; return RtHst ? RtHst : (RtHst:=COM_CreateObject("CLRMetaData.CorRuntimeHost","{CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}"), DllCall(NumGet(NumGet(RtHst+0)+40),"uint",RtHst))
|
||||
if RtHst
|
||||
return RtHst
|
||||
EnvGet SystemRoot, SystemRoot
|
||||
if Version =
|
||||
Loop % SystemRoot "\Microsoft.NET\Framework" (A_PtrSize=8?"64":"") "\*", 2
|
||||
if (FileExist(A_LoopFileFullPath "\mscorlib.dll") && A_LoopFileName > Version)
|
||||
Version := A_LoopFileName
|
||||
if DllCall("mscoree\CorBindToRuntimeEx", "wstr", Version, "ptr", 0, "uint", 0
|
||||
, "ptr", CLR_GUID(CLSID_CorRuntimeHost, "{CB2F6723-AB3A-11D2-9C40-00C04FA30A3E}")
|
||||
, "ptr", CLR_GUID(IID_ICorRuntimeHost, "{CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}")
|
||||
, "ptr*", RtHst) >= 0
|
||||
DllCall(NumGet(NumGet(RtHst+0)+10*A_PtrSize), "ptr", RtHst) ; Start
|
||||
return RtHst
|
||||
}
|
||||
|
||||
;
|
||||
; INTERNAL FUNCTIONS
|
||||
;
|
||||
|
||||
CLR_GetDefaultDomain()
|
||||
{
|
||||
static defaultDomain := 0
|
||||
if !defaultDomain
|
||||
{ ; ICorRuntimeHost::GetDefaultDomain
|
||||
if DllCall(NumGet(NumGet(0+RtHst:=CLR_Start())+13*A_PtrSize), "ptr", RtHst, "ptr*", p:=0) >= 0
|
||||
defaultDomain := ComObject(p), ObjRelease(p)
|
||||
}
|
||||
return defaultDomain
|
||||
}
|
||||
|
||||
CLR_CompileAssembly(Code, References, ProviderAssembly, ProviderType, AppDomain=0, FileName="", CompilerOptions="")
|
||||
{
|
||||
if !AppDomain
|
||||
AppDomain := CLR_GetDefaultDomain()
|
||||
|
||||
if !(asmProvider := CLR_LoadLibrary(ProviderAssembly, AppDomain))
|
||||
|| !(codeProvider := asmProvider.CreateInstance(ProviderType))
|
||||
|| !(codeCompiler := codeProvider.CreateCompiler())
|
||||
return 0
|
||||
|
||||
if !(asmSystem := (ProviderAssembly="System") ? asmProvider : CLR_LoadLibrary("System", AppDomain))
|
||||
return 0
|
||||
|
||||
; Convert | delimited list of references into an array.
|
||||
StringSplit, Refs, References, |, %A_Space%%A_Tab%
|
||||
aRefs := ComObjArray(8, Refs0)
|
||||
Loop % Refs0
|
||||
aRefs[A_Index-1] := Refs%A_Index%
|
||||
|
||||
; Set parameters for compiler.
|
||||
prms := CLR_CreateObject(asmSystem, "System.CodeDom.Compiler.CompilerParameters", aRefs)
|
||||
, prms.OutputAssembly := FileName
|
||||
, prms.GenerateInMemory := FileName=""
|
||||
, prms.GenerateExecutable := SubStr(FileName,-3)=".exe"
|
||||
, prms.CompilerOptions := CompilerOptions
|
||||
, prms.IncludeDebugInformation := true
|
||||
|
||||
; Compile!
|
||||
compilerRes := codeCompiler.CompileAssemblyFromSource(prms, Code)
|
||||
|
||||
if error_count := (errors := compilerRes.Errors).Count
|
||||
{
|
||||
error_text := ""
|
||||
Loop % error_count
|
||||
error_text .= ((e := errors.Item[A_Index-1]).IsWarning ? "Warning " : "Error ") . e.ErrorNumber " on line " e.Line ": " e.ErrorText "`n`n"
|
||||
MsgBox, 16, Compilation Failed, %error_text%
|
||||
return 0
|
||||
}
|
||||
; Success. Return Assembly object or path.
|
||||
return compilerRes[FileName="" ? "CompiledAssembly" : "PathToAssembly"]
|
||||
}
|
||||
|
||||
CLR_GUID(ByRef GUID, sGUID)
|
||||
{
|
||||
VarSetCapacity(GUID, 16, 0)
|
||||
return DllCall("ole32\CLSIDFromString", "wstr", sGUID, "ptr", &GUID) >= 0 ? &GUID : ""
|
||||
}
|
||||
2714
bnowakow/old versions/5 Tokyo/GT7-TokyoX/lib/Gdip.ahk
Normal file
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/lib/SuperSleep.dll
Normal file
BIN
bnowakow/old versions/5 Tokyo/GT7-TokyoX/lib/ViGEmWrapper.dll
Normal file
@@ -0,0 +1,191 @@
|
||||
|
||||
/**********************************************
|
||||
* Controller methods for simplicity *
|
||||
***********************************************/
|
||||
*/
|
||||
|
||||
GoTo EndControllerFunctionsDef
|
||||
|
||||
;;;;;;;;;;;; Turning functions
|
||||
;;;;;;;;;;;; For holding the stick in a specific position for a period of time
|
||||
;;;;;;;;;;;; Note no other button may be pressed or released when these functions are ran
|
||||
|
||||
; Set the time you want to turn for in miliseconds and how hard (50, 100), 100 being the most, 50 being neutral
|
||||
Turn_Right(sleept, inten){
|
||||
t := sleept
|
||||
controller.Axes.LX.SetState(inten)
|
||||
gosub, Turn
|
||||
controller.Axes.LX.SetState(50)
|
||||
}
|
||||
|
||||
; Set the time you want to turn for in miliseconds and how hard (0, 50), 0 being the most
|
||||
Turn_Left(sleept, inten){
|
||||
t := sleept
|
||||
controller.Axes.LX.SetState(inten)
|
||||
gosub, Turn
|
||||
controller.Axes.LX.SetState(50)
|
||||
}
|
||||
|
||||
;;;;;;;;;;;; Simple button press functions
|
||||
;;;;;;;;;;;; You can pass a delay amount or leave it blank
|
||||
;;;;;;;;;;;; Longer delays hold the button longer
|
||||
|
||||
; Press X button
|
||||
Press_X(delay:=200){
|
||||
controller.Buttons.Cross.SetState(true)
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Buttons.Cross.SetState(false)
|
||||
return
|
||||
}
|
||||
|
||||
; Press O button
|
||||
Press_O(delay:=200){
|
||||
controller.Buttons.Circle.SetState(true)
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Buttons.Circle.SetState(false)
|
||||
return
|
||||
}
|
||||
|
||||
; Press Triangle button
|
||||
Press_Triangle(delay:=200){
|
||||
controller.Buttons.Triangle.SetState(true)
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Buttons.Triangle.SetState(false)
|
||||
return
|
||||
}
|
||||
|
||||
; Press Square button
|
||||
Press_Square(delay:=200){
|
||||
controller.Buttons.Square.SetState(true)
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Buttons.Square.SetState(false)
|
||||
return
|
||||
}
|
||||
|
||||
; Press R1 button
|
||||
Press_L1(delay:=200){
|
||||
controller.Buttons.L1.SetState(true)
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Buttons.L1.SetState(false)
|
||||
return
|
||||
}
|
||||
|
||||
; Press R1 button
|
||||
Press_R1(delay:=200){
|
||||
controller.Buttons.R1.SetState(true)
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Buttons.R1.SetState(false)
|
||||
return
|
||||
}
|
||||
|
||||
; Press Right on D-pad
|
||||
Press_Right(delay:=200){
|
||||
controller.Dpad.SetState("Right")
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Dpad.SetState("None")
|
||||
return
|
||||
}
|
||||
|
||||
; Press Left on D-pad
|
||||
Press_Left(delay:=200){
|
||||
controller.Dpad.SetState("Left")
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Dpad.SetState("None")
|
||||
return
|
||||
}
|
||||
|
||||
; Press Up on D-pad
|
||||
Press_Up(delay:=200){
|
||||
controller.Dpad.SetState("Up")
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Dpad.SetState("None")
|
||||
return
|
||||
}
|
||||
|
||||
; Press Down on D-pad
|
||||
Press_Down(delay:=200){
|
||||
controller.Dpad.SetState("Down")
|
||||
DllCall("Sleep", "UInt", delay)
|
||||
controller.Dpad.SetState("None")
|
||||
return
|
||||
}
|
||||
|
||||
;;;;;;;;;;; Other functions specific to GT7
|
||||
|
||||
; Turn on nitrous
|
||||
Nitrous_On(){
|
||||
controller.Buttons.RS.SetState(true)
|
||||
}
|
||||
|
||||
; Turn off nitrous
|
||||
Nitrous_Off(){
|
||||
controller.Buttons.RS.SetState(false)
|
||||
}
|
||||
|
||||
Accel_On(control:=100){
|
||||
controller.Buttons.R2.SetState(true)
|
||||
controller.Axes.RT.SetState(control)
|
||||
}
|
||||
|
||||
Accel_Off(){
|
||||
controller.Buttons.R2.SetState(false)
|
||||
controller.Axes.RT.SetState(0)
|
||||
}
|
||||
|
||||
Brake_On(control:=100){
|
||||
controller.Buttons.L2.SetState(true)
|
||||
controller.Axes.LT.SetState(control)
|
||||
}
|
||||
|
||||
Brake_Off(){
|
||||
controller.Buttons.L2.SetState(false)
|
||||
controller.Axes.LT.SetState(0)
|
||||
}
|
||||
; given time t in miliseconds, turn right for that long, with intensity being how much the turn button is held for
|
||||
Turn:
|
||||
t0 := A_TickCount
|
||||
tf := t0+t
|
||||
loop {
|
||||
Sleep(100)
|
||||
} until A_TickCount > tf
|
||||
return
|
||||
|
||||
|
||||
Press_Options(){
|
||||
controller.Buttons.Options.SetState(true)
|
||||
Sleep, 50
|
||||
controller.Buttons.Options.SetState(false)
|
||||
}
|
||||
|
||||
PressShare(){
|
||||
controller.Buttons.Share.SetState(true)
|
||||
Sleep, 50
|
||||
controller.Buttons.Share.SetState(false)
|
||||
}
|
||||
|
||||
PressX:
|
||||
; Just for menuing, does not hold X down
|
||||
controller.Buttons.Cross.SetState(true)
|
||||
DllCall("Sleep", "UInt", 200)
|
||||
controller.Buttons.Cross.SetState(false)
|
||||
return
|
||||
|
||||
PressO:
|
||||
; Just for menuing, does not hold O down
|
||||
controller.Buttons.Circle.SetState(true)
|
||||
DllCall("Sleep", "UInt", 200)
|
||||
controller.Buttons.Circle.SetState(false)
|
||||
return
|
||||
|
||||
PressRight:
|
||||
; For turning
|
||||
controller.Dpad.SetState("Right")
|
||||
Sleep, 50
|
||||
controller.Dpad.SetState("None")
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
EndControllerFunctionsDef:
|
||||
136
bnowakow/old versions/5 Tokyo/GT7-TokyoX/lib/__utility__.ahk
Normal file
@@ -0,0 +1,136 @@
|
||||
/**********************************************
|
||||
* Only place functions here, no sub routines *
|
||||
***********************************************/
|
||||
|
||||
|
||||
; Grabs the colors of the pixels (x-b, y-b) to (x+b, y+b)
|
||||
; returns the array of colors
|
||||
*/
|
||||
|
||||
BitGrab(x, y, b)
|
||||
{
|
||||
HWND := WinExist("PS Remote Play")
|
||||
pToken := Gdip_Startup()
|
||||
pBitmap := Gdip_BitmapFromHWND2(hwnd)
|
||||
|
||||
pixs := []
|
||||
for i in range(-1*b, b+1){
|
||||
for j in range(-1*b, b+1){
|
||||
pixel := Gdip_GetPixel(pBitmap,x+i,y+j)
|
||||
rgb := ConvertARGB( pixel )
|
||||
pixs.Push(rgb)
|
||||
}
|
||||
}
|
||||
|
||||
Gdip_DisposeImage(pBitmap)
|
||||
Gdip_Shutdown(pToken)
|
||||
return pixs
|
||||
}
|
||||
|
||||
Gdip_BitmapFromHWND2(hwnd)
|
||||
{
|
||||
WinGetPos,,, Width, Height, ahk_id %hwnd%
|
||||
hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC(), obm := SelectObject(hdc, hbm)
|
||||
RegExMatch(A_OsVersion, "\d+", Version)
|
||||
PrintWindow(hwnd, hdc, Version >= 8 ? 2 : 0)
|
||||
pBitmap := Gdip_CreateBitmapFromHBITMAP(hbm)
|
||||
SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc)
|
||||
return pBitmap
|
||||
}
|
||||
|
||||
range(start, stop:="", step:=1) {
|
||||
static range := { _NewEnum: Func("_RangeNewEnum") }
|
||||
if !step
|
||||
throw "range(): Parameter 'step' must not be 0 or blank"
|
||||
if (stop == "")
|
||||
stop := start, start := 0
|
||||
; Formula: r[i] := start + step*i ; r = range object, i = 0-based index
|
||||
; For a postive 'step', the constraints are i >= 0 and r[i] < stop
|
||||
; For a negative 'step', the constraints are i >= 0 and r[i] > stop
|
||||
; No result is returned if r[0] does not meet the value constraint
|
||||
if (step > 0 ? start < stop : start > stop) ;// start == start + step*0
|
||||
return { base: range, start: start, stop: stop, step: step }
|
||||
}
|
||||
|
||||
_RangeNewEnum(r) {
|
||||
static enum := { "Next": Func("_RangeEnumNext") }
|
||||
return { base: enum, r: r, i: 0 }
|
||||
}
|
||||
|
||||
_RangeEnumNext(enum, ByRef k, ByRef v:="") {
|
||||
stop := enum.r.stop, step := enum.r.step
|
||||
, k := enum.r.start + step*enum.i
|
||||
if (ret := step > 0 ? k < stop : k > stop)
|
||||
enum.i += 1
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
Sleep(ms=1)
|
||||
{
|
||||
global timeBeginPeriodHasAlreadyBeenCalled
|
||||
if (timeBeginPeriodHasAlreadyBeenCalled != 1)
|
||||
{
|
||||
DllCall("Winmm.dll\timeBeginPeriod", UInt, 1)
|
||||
timeBeginPeriodHasAlreadyBeenCalled := 1
|
||||
}
|
||||
|
||||
DllCall("Sleep", UInt, ms)
|
||||
}
|
||||
|
||||
|
||||
|
||||
PixelColorSimple(pc_x, pc_y)
|
||||
{
|
||||
WinGet, remotePlay_id, List, ahk_exe RemotePlay.exe
|
||||
if (remotePlay_id = 0)
|
||||
{
|
||||
MsgBox, PS4 Remote Play not found
|
||||
return
|
||||
}
|
||||
if remotePlay_id
|
||||
{
|
||||
pc_wID := remotePlay_id[0]
|
||||
pc_hDC := DllCall("GetDC", "UInt", pc_wID)
|
||||
pc_fmtI := A_FormatInteger
|
||||
SetFormat, IntegerFast, Hex
|
||||
pc_c := DllCall("GetPixel", "UInt", pc_hDC, "Int", pc_x, "Int", pc_y, "UInt")
|
||||
pc_c := pc_c >> 16 & 0xff | pc_c & 0xff00 | (pc_c & 0xff) << 16
|
||||
pc_c .= ""
|
||||
SetFormat, IntegerFast, %pc_fmtI%
|
||||
DllCall("ReleaseDC", "UInt", pc_wID, "UInt", pc_hDC)
|
||||
return pc_c
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
GetClientSize(hWnd, ByRef w := "", ByRef h := "")
|
||||
{
|
||||
VarSetCapacity(rect, 16)
|
||||
DllCall("GetClientRect", "ptr", hWnd, "ptr", &rect)
|
||||
w := NumGet(rect, 8, "int")
|
||||
h := NumGet(rect, 12, "int")
|
||||
}
|
||||
|
||||
Distance(c1, c2)
|
||||
{ ; function by [VxE], return value range = [0, 441.67295593006372]
|
||||
return Sqrt((((c1>>16)-(c2>>16))**2)+(((c1>>8&255)-(c2>>8&255))**2)+(((c1&255)-(c1&255))**2))
|
||||
}
|
||||
|
||||
ConvertARGB(ARGB, Convert := 0)
|
||||
{
|
||||
SetFormat, IntegerFast, Hex
|
||||
RGB += ARGB
|
||||
RGB := RGB & 0x00FFFFFF
|
||||
if (Convert)
|
||||
RGB := (RGB & 0xFF000000) | ((RGB & 0xFF0000) >> 16) | (RGB & 0x00FF00) | ((RGB & 0x0000FF) << 16)
|
||||
|
||||
return RGB
|
||||
}
|
||||
|
||||
ToolTipper(msg, x := 100, y := 100)
|
||||
{
|
||||
if (debug_mode = 1)
|
||||
ToolTip, %msg%, x, y, Screen
|
||||
return
|
||||
}
|
||||