-
Notifications
You must be signed in to change notification settings - Fork 7
/
makeMod.bat
205 lines (177 loc) · 4.82 KB
/
makeMod.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
@echo off
set COMPILEDIR=%CD%
set IWDNAME=ht.iwd
color f0
title Explicit Bouncers Compiler
for %%* in (.) do set modname=%%~n*
:MAKEOPTIONS
cls
:MAKEOPTIONS
echo.
echo Please select an option:
echo 1. Build Fast File
echo 2. Build IWD File
echo 3. Start Game
echo 4. Dedicated Server
echo 5. Asset Manager
echo.
echo 0. Exit
echo.
echo ________________________________________________________________________
echo.
echo Mod currently being worked on = %modname%
echo.
echo ________________________________________________________________________
echo.
set /p make_option=:
set make_option=%make_option:~0,1%
if "%make_option%"=="1" goto build_ff
if "%make_option%"=="2" goto build_iwd
if "%make_option%"=="3" goto STARTGAME
if "%make_option%"=="4" goto dedicated
if "%make_option%"=="5" goto STARTASSET
if "%make_option%"=="0" goto FINAL
goto :MAKEOPTIONS
:dedicated
echo %date% - %time% Dedicated Mode >> LOG.TXT
cd ..\..\
START iw3mp.exe +set dedicated 2 +set fs_game mods/%modname% +devmap mp_shipment +set net_port 28960
TIMEOUT /T 2 > NUL
START iw3mp.exe +set fs_game mods/%modname% +connect 127.0.0.1:28960
cd %COMPILEDIR%
goto :MAKEOPTIONS
:build_iwd
cls
cd
echo ________________________________________________________________________
echo.
echo Building %IWDNAME%:
if exist %IWDNAME% del %IWDNAME%
7za a -r -tzip %IWDNAME% images > NUL
7za a -r -tzip %IWDNAME% sound > NUL
7za a -r -tzip %IWDNAME% weapons > NUL
echo.
echo %date% - %time% %IWDNAME% Completed >> LOG.TXT
echo.
echo ________________________________________________________________________
echo.
pause
goto :MAKEOPTIONS
:build_ff
cls
cd
echo ________________________________________________________________________
echo.
echo Building mod.ff:
echo Deleting old mod.ff file...
if exist mod.ff del mod.ff
echo Copying rawfiles...
xcopy shock ..\..\raw\shock /SYI > NUL
xcopy images ..\..\raw\images /SYI > NUL
xcopy materials ..\..\raw\materials /SYI > NUL
xcopy material_properties ..\..\raw\material_properties /SYI > NUL
xcopy sound ..\..\raw\sound /SYI > NUL
xcopy soundaliases ..\..\raw\soundaliases /SYI > NUL
xcopy fx ..\..\raw\fx /SYI > NUL
xcopy mp ..\..\raw\mp /SYI > NUL
xcopy mp ..\..\zone_source\mp /SYI > NUL
xcopy weapons\mp ..\..\raw\weapons\mp /SYI > NUL
xcopy xanim ..\..\raw\xanim /SYI > NUL
xcopy xmodel ..\..\raw\xmodel /SYI > NUL
xcopy xmodelparts ..\..\raw\xmodelparts /SYI > NUL
xcopy xmodelsurfs ..\..\raw\xmodelsurfs /SYI > NUL
xcopy ui ..\..\raw\ui /SYI > NUL
xcopy ui_mp ..\..\raw\ui_mp /SYI > NUL
xcopy english ..\..\raw\english /SYI > NUL
xcopy vision ..\..\raw\vision /SYI > NUL
xcopy rumble ..\..\raw\rumble /SYI > NUL
xcopy animtrees ..\..\raw\animtrees /SYI > NUL
echo Copying source code...
xcopy maps ..\..\raw\maps /SYI > NUL
echo Copying MOD.CSV...
xcopy mod.csv ..\..\zone_source /SYI > NUL
echo Compiling mod...
cd ..\..\bin
linker_pc.exe -language english -compress -cleanup mod
cd %COMPILEDIR%
copy ..\..\zone\english\mod.ff
echo New mod.ff file successfully built!
echo.
echo %date% - %time% MOD.FF Completed >> LOG.TXT
echo.
echo ________________________________________________________________________
echo.
pause
goto :MAKEOPTIONS
:STARTGAME
cls
echo ________________________________________________________________________
echo.
echo Write Map Name:
echo.
set /p make_opt=:
echo.
echo.
echo Map Name: %make_opt%
echo.
echo ________________________________________________________________________
echo.
echo.
echo Write Game Type:
echo.
set /p make_optgt=:
echo.
echo.
echo Game Type: %make_optgt%
echo.
echo ________________________________________________________________________
echo.
echo %date% - %time% Play Game >> LOG.TXT
cd ..\..\
START iw3mp.exe +g_gametype %make_optgt% +set fs_game mods/%modname% +developer 2 +devmap %make_opt%
cd %COMPILEDIR%
goto :MAKEOPTIONS
:STARTASSET
cls
echo %date% - %time% Asset Manager >> LOG.TXT
cd ..\..\bin
START asset_manager.exe
cd %COMPILEDIR%
goto :MAKEOPTIONS
:STARTRGB
cls
set /p r=Red:
set /p g=Green:
set /p b=Blue:
set /a r=%r%
set /a g=%g%
set /a b=%b%
set /a divider=255
set /a floats=3
set /a rd=r/divider
set /a gd=g/divider
set /a bd=b/divider
set ro=%rd%.
set go=%gd%.
set bo=%bd%.
:work
set /a r=(r-rd*divider)*10
set /a g=(g-gd*divider)*10
set /a b=(b-bd*divider)*10
set /a rd=r/divider
set /a gd=g/divider
set /a bd=b/divider
set /a floats=floats-1
if "%floats%"=="0" goto clean_up
set ro=%ro%%rd%
set go=%go%%gd%
set bo=%bo%%bd%
goto work
:clean_up
echo %ro% %go% %bo%
echo %date% - %time% RGB Converted : %ro% %go% %bo% >> LOG.TXT
echo %ro% %go% %bo% | clip
echo Copied to clipboard.
TIMEOUT /T 2 > NUL
goto :MAKEOPTIONS
:FINAL