Tue Jul 03, 2018 4:39 pm
Tue Jul 03, 2018 4:43 pm
Tue Jul 03, 2018 5:05 pm
Tue Jul 03, 2018 9:51 pm
Wed Jul 18, 2018 6:30 pm
bongo88 wrote:John_Hippie wrote:Wild Idea but, is it possible to have all these scoreboards randomly selected before the start of a game?
Here is a bat file that'll pick a random scorebaord file and move/rename it to the mods folder.
set source=path to the folder where the scoreboards are kept
set target=path to your modded folder
- Code:
@echo off
setlocal enabledelayedexpansion
set source=C:\Steam\steamapps\common\NBA 2K18\scoreboards
set target=C:\Steam\steamapps\common\NBA 2K18\waigua
set count=0
set x=0
:: put all the files into a pseudo-array prefixed with "TXT_"
for /r "%source%" %%a in (*.*) do (
set IFF_!count!=%%~a
set /a count+=1
)
:: Use the 'modulo' function to get a usable value from system variable %random%
set /a x="%random% %% count"
:: Pull the relevant item out of the "TXT_" 'array'
set chosen=!IFF_%x%!
echo:Random Scoreboard Chosen :: %chosen%
copy /y "%chosen%" "%target%\newscorebug.iff" 1>nul
echo Copying Scoreboard Files
echo msgbox "File %chosen% set as Scoreboard. Press OK to Launch NBA 2K18" > "%temp%\popup.vbs"
wscript.exe "%temp%\popup.vbs"
START steam://rungameid/577800
del "%temp%\popup.vbs"
endlocal
[ Image ]
Wed Jul 18, 2018 7:10 pm
Wed Jul 18, 2018 8:08 pm