Skip to content

Commit c640167

Browse files
committed
Added tournament 2 version
1 parent 48d7042 commit c640167

File tree

14 files changed

+1171
-0
lines changed

14 files changed

+1171
-0
lines changed

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# RLBotPythonExample
2+
Example of a python bot using the RLBot framework
3+
4+
## Installation
5+
6+
### Video guide
7+
8+
https://www.youtube.com/watch?v=UjsQFNN0nSA
9+
10+
### Plain instructions
11+
12+
1. Make sure you've installed [Python 3.6 64 bit](https://www.python.org/ftp/python/3.6.5/python-3.6.5-amd64.exe). During installation:
13+
- Select "Add Python to PATH"
14+
- Make sure pip is included in the installation
15+
2. Open Rocket League
16+
3. Download or clone this repository
17+
3. In the files from the previous step, find and double click on run-gui.bat
18+
4. Click the 'Run' button
19+
20+
## Changing the bot
21+
22+
- Bot behavior is controlled by `python_example/python_example.py`
23+
- Bot appearance is controlled by `python_example/appearance.cfg`
24+
25+
See https://github.com/RLBot/RLBotPythonExample/wiki for documentation and tutorials.

RefreshEnv.cmd

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
@echo off
2+
:: This file is taken from chocolatey:
3+
:: https://github.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd
4+
::
5+
:: RefreshEnv.cmd
6+
::
7+
:: Batch file to read environment variables from registry and
8+
:: set session variables to these values.
9+
::
10+
:: With this batch file, there should be no need to reload command
11+
:: environment every time you want environment changes to propagate
12+
13+
::echo "RefreshEnv.cmd only works from cmd.exe, please install the Chocolatey Profile to take advantage of refreshenv from PowerShell"
14+
echo | set /p dummy="Refreshing environment variables from registry for cmd.exe. Please wait..."
15+
16+
goto main
17+
18+
:: Set one environment variable from registry key
19+
:SetFromReg
20+
"%WinDir%\System32\Reg" QUERY "%~1" /v "%~2" > "%TEMP%\_envset.tmp" 2>NUL
21+
for /f "usebackq skip=2 tokens=2,*" %%A IN ("%TEMP%\_envset.tmp") do (
22+
echo/set "%~3=%%B"
23+
)
24+
goto :EOF
25+
26+
:: Get a list of environment variables from registry
27+
:GetRegEnv
28+
"%WinDir%\System32\Reg" QUERY "%~1" > "%TEMP%\_envget.tmp"
29+
for /f "usebackq skip=2" %%A IN ("%TEMP%\_envget.tmp") do (
30+
if /I not "%%~A"=="Path" (
31+
call :SetFromReg "%~1" "%%~A" "%%~A"
32+
)
33+
)
34+
goto :EOF
35+
36+
:main
37+
echo/@echo off >"%TEMP%\_env.cmd"
38+
39+
:: Slowly generating final file
40+
call :GetRegEnv "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" >> "%TEMP%\_env.cmd"
41+
call :GetRegEnv "HKCU\Environment">>"%TEMP%\_env.cmd" >> "%TEMP%\_env.cmd"
42+
43+
:: Special handling for PATH - mix both User and System
44+
call :SetFromReg "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" Path Path_HKLM >> "%TEMP%\_env.cmd"
45+
call :SetFromReg "HKCU\Environment" Path Path_HKCU >> "%TEMP%\_env.cmd"
46+
47+
:: Caution: do not insert space-chars before >> redirection sign
48+
echo/set "Path=%%Path_HKLM%%;%%Path_HKCU%%" >> "%TEMP%\_env.cmd"
49+
50+
:: Cleanup
51+
del /f /q "%TEMP%\_envset.tmp" 2>nul
52+
del /f /q "%TEMP%\_envget.tmp" 2>nul
53+
54+
:: capture user / architecture
55+
SET "OriginalUserName=%USERNAME%"
56+
SET "OriginalArchitecture=%PROCESSOR_ARCHITECTURE%"
57+
58+
:: Set these variables
59+
call "%TEMP%\_env.cmd"
60+
61+
:: reset user / architecture
62+
SET "USERNAME=%OriginalUserName%"
63+
SET "PROCESSOR_ARCHITECTURE=%OriginalArchitecture%"
64+
65+
echo | set /p dummy="Finished."
66+
echo .

Skybot/SkyBot.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Locations]
2+
# Path to loadout config from runner
3+
looks_config = ./Skylooks.cfg
4+
# Bot's python file.
5+
# Only need this if RLBot controlled
6+
python_file = SkyBot.py
7+
# The name that will be displayed in game
8+
name = SkyBot
9+
10+
[Bot Parameters]

0 commit comments

Comments
 (0)