Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Author Topic: Server launching for devs  (Read 4030 times)

0 Members and 1 Guest are viewing this topic.

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Server launching for devs
« on: Saturday, February 25, 2012, 15:04:04 PM »
This tool is intended to simplify starting a LAN server and launching AA to test minor changes in a map or game code. All you have to do is enter a username (only for 2.8.5) and a map name and the program will launch a server and then automatically join that server within AA. Easy.



Version 3.2 (For AA 2.8.5):
https://dl.dropboxusercontent.com/u/464376/aac_maap/RunServer_v3.2.exe

Code: [Select]
@ECHO OFF
setlocal EnableDelayedExpansion
TITLE RunServer v3.2 for America's Army 2.8.5 by Spanky
COLOR 07


SET T0="#####################################################################"
SET T1=" _____                     _____                                     "
SET T2="|  __ \                   / ____|                                v3.2"
SET T3="| |__) |  _   _   _ __   | (___     ___   _ __  __   __   ___   _ __ "
SET T4="|  _  /  | | | | | '_ \   \___ \   / _ \ | '__| \ \ / /  / _ \ | '__|"
SET T5="| | \ \  | |_| | | | | |  ____) | |  __/ | |     \ V /  |  __/ | |   "
SET T6="|_|  \_\  \__,_| |_| |_| |_____/   \___| |_|      \_/    \___| |_|   "
SET T7="For America's Army 2.8.5                        by Spanky @ AAO25.com"


ECHO !T0:"=!
ECHO !T1:"=!
ECHO !T2:"=!
ECHO !T3:"=!
ECHO !T4:"=!
ECHO !T5:"=!
ECHO !T6:"=!
ECHO !T7:"=!
ECHO.
ECHO !T0:"=!
ECHO.
ECHO WARNING:
ECHO HAVING THIS PROGRAM IN THE ASSIST INSTALLATION MAY GET YOU KICKED/BANNED
ECHO ONLY USE THIS PROGRAM IN A SEPARATE INSTALLTION FOR MAPPING AND DEV WORK
ECHO.
ECHO Usage:
ECHO After entering a username and map name, this program will start a LAN server.
ECHO It will then launch AA to join that LAN server automatically.
ECHO Upon closing AA, it will kill the server and return to the main menu.
ECHO If the server crashes or fails to start, this program will let you know.
ECHO.
PAUSE
GOTO Username


:Username
CLS
ECHO !T0:"=!
ECHO !T1:"=!
ECHO !T2:"=!
ECHO !T3:"=!
ECHO !T4:"=!
ECHO !T5:"=!
ECHO !T6:"=!
ECHO !T7:"=!
ECHO.
ECHO !T0:"=!
ECHO.
ECHO Type the username you wish to use in the LAN server.
SET /P U=Username:
GOTO Menu


:Menu
CLS
ECHO !T0:"=!
ECHO !T1:"=!
ECHO !T2:"=!
ECHO !T3:"=!
ECHO !T4:"=!
ECHO !T5:"=!
ECHO !T6:"=!
ECHO !T7:"=!
ECHO.
ECHO !T0:"=!
ECHO.
ECHO Your current username is %U%.
ECHO.
ECHO Type the name of the map you would like to load. ex. mp_pipeline
ECHO Don't include the .aao extension, just the filename of the map.
SET /P M=Map Name:
GOTO LoadServer


:LoadServer
CLS
ECHO !T0:"=!
ECHO !T1:"=!
ECHO !T2:"=!
ECHO !T3:"=!
ECHO !T4:"=!
ECHO !T5:"=!
ECHO !T6:"=!
ECHO !T7:"=!
ECHO.
ECHO !T0:"=!
ECHO.
ECHO Your current username is %U%.
ECHO.
ECHO Loading the server... Please wait...
START server.exe LAN %M%.aao log=server.log ini=server.ini
ECHO Waiting 2 seconds to verify server has started...
PING 1.1.1.1 -n 1 -w 2000 >NUL
TASKLIST /NH /FI "imagename eq server.exe" | FIND /I "server.exe" >NUL
SET NodLevel=%ERRORLEVEL%
IF %NodLevel%==1 (GOTO ServerStartFailed) ELSE ( GOTO ServerStarted)


:ServerStarted
ECHO Server has started, launching America's Army...
START armyops.exe 127.0.0.1?Username=%U%
PING 1.1.1.1 -n 1 -w 3000 >NUL
GOTO ClientRunningCheck


:ServerStartFailed
ECHO.
ECHO Server failed to start. Please check your server.ini and try again.
ECHO.
PAUSE
GOTO MENU


:ClientRunningCheck
CLS
ECHO !T0:"=!
ECHO !T1:"=!
ECHO !T2:"=!
ECHO !T3:"=!
ECHO !T4:"=!
ECHO !T5:"=!
ECHO !T6:"=!
ECHO !T7:"=!
ECHO.
ECHO !T0:"=!
ECHO.
ECHO Your current username is %U%.
ECHO.
ECHO America's Army server and client are running.
ECHO Waiting for the client to close...
PING 1.1.1.1 -n 1 -w 2000 >NUL
TASKLIST /NH /FI "imagename eq ArmyOps.exe" | FIND /I "ArmyOps.exe" >NUL
SET NodLevel=%ERRORLEVEL%
IF %NodLevel%==1 (GOTO ClientNotRunning) ELSE ( GOTO ClientRunningCheckServer)


:ClientRunningCheckServer
TASKLIST /NH /FI "imagename eq server.exe" | FIND /I "server.exe" >NUL
SET NodLevel=%ERRORLEVEL%
IF %NodLevel%==1 (GOTO ServerNotRunningClientIs) ELSE ( GOTO ClientRunningCheck)


:ServerNotRunningClientIs
ECHO.
TASKKILL /F /IM "ArmyOps.exe" >NUL
ECHO The game was closed because the server has crashed.
ECHO Consult the server.log file.
ECHO.
PAUSE
GOTO MENU


:ClientNotRunning
CLS
ECHO !T0:"=!
ECHO !T1:"=!
ECHO !T2:"=!
ECHO !T3:"=!
ECHO !T4:"=!
ECHO !T5:"=!
ECHO !T6:"=!
ECHO !T7:"=!
ECHO.
ECHO !T0:"=!
ECHO.
ECHO Your current username is %U%.
ECHO.
ECHO America's Army client has been closed, stopping the server...
TASKKILL /F /IM "server.exe" >NUL
PING 1.1.1.1 -n 1 -w 3000 >NUL
GOTO MENU

Version 2 (For AA 2.5):
https://dl.dropbox.com/u/464376/aac_maap/RunServer_v2.exe

Code: [Select]
ECHO OFF
CLS
ECHO RunServer by Spanky from AAO25.com
ECHO.
ECHO This program will allow you to start a LAN server on any map.
ECHO It will then launch AA to join that server and wait for AA to close.
ECHO Upon closing AA, it will kill the server and return to the main menu.
ECHO.
GOTO MENU

:MENU
ECHO Type the name of the map you would like to load. ex. mp_pipeline
ECHO Don't include the .aao extension, just the filename of the map.
SET /P M=Map Name:


ECHO.
ECHO Loading the server... Please wait...
START server.exe LAN %M%.aao log=server.log ini=server.ini
ECHO Server started, launching America's Army...
START armyops.exe 127.0.0.1
PING 1.1.1.1 -n 1 -w 3000 >NUL
GOTO GameRunningCheck

:GameRunningCheck
CLS
ECHO America's Army is running, waiting for it to be closed...
PING 1.1.1.1 -n 1 -w 2000 >NUL
TASKLIST /NH | FIND /I "ArmyOps"
SET NodLevel=%ERRORLEVEL%
IF %NodLevel%==1 (GOTO GameNotRunning) ELSE ( GOTO GameRunningCheck)

:GameNotRunning
CLS
ECHO America's Army is closed, stopping the server...
TASKKILL /F /IM
server.exe"
PING 1.1.1.1 -n 1 -w 3000 >NUL
CLS
GOTO MENU

Enjoy!
« Last Edit: Friday, June 28, 2013, 19:20:22 PM by Spanky »
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #1 on: Saturday, February 25, 2012, 16:18:51 PM »
So it won't run the editor either. No need to be testing maps then.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline BlueBlaster

  • Epic Poster
  • ******
  • Posts: 2,428
    • View Profile
Re: Server launching for devs
« Reply #2 on: Saturday, February 25, 2012, 17:08:02 PM »
Nice Spanky. I sometime run into that problem too where I don't have the map in the folder anymore haha.



Offline Koden

  • Cogito Ergo Khodohn
  • Global Moderator
  • Epic Poster
  • *
  • Posts: 2,333
  • Hmmm rainbows.
    • View Profile
Re: Server launching for devs
« Reply #3 on: Saturday, February 25, 2012, 19:01:33 PM »
Downloaded asap, really needed this one / ty Nate :D

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #4 on: Sunday, June 03, 2012, 19:52:14 PM »
I updated this program. I was testing Max's Office map out and realized there were some shortcomings with this program. Now, all you have to do is put in the map name and it will launch a LAN server and then launch AA so it automatically joins that server. Once AA is closed, it kills the server and returns to the main menu to start all over again.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Maxbulldog_53

Re: Server launching for devs
« Reply #5 on: Sunday, June 03, 2012, 19:59:12 PM »
I grabbed this as well. Makes life a little easier :)
I need teepee for my bunghole!

Xfire----maxifymecaptain

http://img251.imageshack.us/img251/1696/mouseyo.gif[/img]

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #6 on: Sunday, June 03, 2012, 20:00:20 PM »
Good to know you like it!
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline BlueBlaster

  • Epic Poster
  • ******
  • Posts: 2,428
    • View Profile
Re: Server launching for devs
« Reply #7 on: Sunday, June 03, 2012, 20:14:06 PM »
Slick work sir.



Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #8 on: Sunday, June 03, 2012, 20:15:53 PM »
Thank you, thank you.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Alex

Re: Server launching for devs
« Reply #9 on: Sunday, June 03, 2012, 21:21:53 PM »
I updated this program. I was testing Max's Office map out and realized there were some shortcomings with this program. Now, all you have to do is put in the map name and it will launch a LAN server and then launch AA so it automatically joins that server. Once AA is closed, it kills the server and returns to the main menu to start all over again.
Damn, and I thought it was convenient before. :P

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #10 on: Sunday, June 03, 2012, 23:02:55 PM »
:) Effectively, you have a 2.5 install and the editor install. Your maps are made, edited and saved in the 2.5 install, this is where RunServer lives (system folder). Make a change to a map, save it, open RunServer, type map name and have a sip of coffee.

Before it was make a change to a map, save it, go to the AA 2.5 System folder, edit runserver.bat with the map name, launch the server, launch AA, type "open 127.0.0.1" in the console and wait. Doing all those steps is fine a couple of times but after a while it's so tedious and really pissed me off :)
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline MothaGoosE

Re: Server launching for devs
« Reply #11 on: Friday, August 03, 2012, 13:50:46 PM »
This is extremely useful. Thanks, Spanky :)

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #12 on: Friday, June 28, 2013, 15:43:13 PM »
I've updated this for AA 2.8.5 as it requires a username be set before joining a LAN server. I will do some other improvements such as server.ini enabling cheats and armyops.ini for brightness/contrast/gamma setting in the editor and game.

I don't have a 'compiled' script yet so just copy the code into a .txt and rename to a .bat then stick it in your System folder.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #13 on: Friday, June 28, 2013, 17:40:38 PM »
Updated v3 and included a download link.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Server launching for devs
« Reply #14 on: Friday, June 28, 2013, 19:21:08 PM »
Updated to v3.2. There are now server checks before launching AA and while AA is running. If the server fails to start or crashes, this program will tell you and automatically close AA.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

 

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager