gametechmods

Robot Arena => Modifications => Topic started by: G.K. on April 18, 2010, 03:00:34 PM

Title: Arena Name Generator
Post by: G.K. on April 18, 2010, 03:00:34 PM
With the help of Squashman from the Tech Gut  :FFFUUU Guy Support froum, I have created a batch file that allows for quick printing of the names of all of the arenas you have.

Copy/paste this into notepad and save it as a  .bat.
Code: [Select]
@echo off
setlocal enabledelayedexpansion

:: Output file
Set _oFile=Names.txt

:: Directory with python files
Set _Path=C:/Program Files/Infogrames/Robot Arena 2/Arenas (Change if necessary to the location of your arenas folder. Oh, and delete this bracketed stuff in the actual file. And the space before it.)

:: Used to search and output your files
PushD "%_Path%"
FOR /F "tokens=*" %%I IN ('dir /b /a-d *.py') DO (
    For /F "tokens=1* delims== " %%a In ('Type "%%I"^|findstr /B /I /C:"    name"') Do (
    echo.%%~b|findstr /B /I /V /C:"Practice Arena" /C:"Event Results" /C:"No Name" /C:"Small Arena No Hazards" /C:"Electric Arena 2T">nul
    If !errorlevel!==0 echo.%%~b>>%_oFile%
    )
)
PopD

The names will be saved as Names.txt in your arenas folder.

If you're wondering why I have posted this for you guys, I know this won't be useful on an everyday basis. However, if you're making a Mod or an Arena Compilation, it is very helpful for quick and easy notation of all arenas you are using.
Title: Re: Arena Name Generator
Post by: Naryar on April 18, 2010, 03:05:29 PM
why bother
Title: Re: Arena Name Generator
Post by: G.K. on April 18, 2010, 03:06:05 PM
Read the last 2 sentences.
Title: Re: Arena Name Generator
Post by: Naryar on April 18, 2010, 03:12:02 PM
why bother
Title: Re: Arena Name Generator
Post by: G.K. on April 18, 2010, 03:12:29 PM
Read the last 2 sentences.
Title: Re: Arena Name Generator
Post by: Naryar on April 18, 2010, 03:14:19 PM
why bother

Also it's "sentence" not "sentance"
Title: Re: Arena Name Generator
Post by: Reier on April 18, 2010, 03:15:06 PM
hi
Title: Re: Arena Name Generator
Post by: Naryar on April 18, 2010, 03:15:45 PM
hi
Title: Re: Arena Name Generator
Post by: G.K. on April 18, 2010, 03:16:36 PM
Seriously guys, stop spamming. I created this thread to be helpful for people like Joe and Badnik, not for you to have chit-chat in.
Title: Re: Arena Name Generator
Post by: Naryar on April 18, 2010, 03:26:39 PM
No.
Title: Re: Arena Name Generator
Post by: G.K. on April 18, 2010, 03:30:01 PM
STFU or GTFO.
Title: Re: Arena Name Generator
Post by: Jonzu95 on April 18, 2010, 03:31:12 PM
Seconded.
Title: Re: Arena Name Generator
Post by: kill343gs on April 18, 2010, 08:37:37 PM
Enough, Nar. This is not a bad thing just because you personally have no use for it. Any further useless comments will not be tolerated.
Title: Re: Arena Name Generator
Post by: Little lost bot on April 18, 2010, 11:27:53 PM
Its a tool Nar, ok not every one will use this but it will be useful to others.
Title: Re: Arena Name Generator
Post by: Serge on April 18, 2010, 11:31:51 PM
G.K.: Nice job, I personally suck at .bat files. You shouls learn "proper" python someday, it's really easier than using batch scripts :P.
Title: Re: Arena Name Generator
Post by: G.K. on April 19, 2010, 12:57:16 AM
I keep meaning to, but I'm always busy. Maybe the summer will give me some time.
Title: Re: Arena Name Generator
Post by: JoeBlo on April 19, 2010, 01:23:08 AM
nice work GK, I read the code on my phone so I may be wrong :P but if it works how I think it works it could be a useful debug tool.

I started a study in Python as a class but then a place for Graphic Design opened up and I took that option as its my ambition

Madiaba still has taught me a lot of python..

Title: Re: Arena Name Generator
Post by: Stagfish on April 19, 2010, 11:51:17 AM
nice work GK, I read the code on my phone so I may be wrong :P but if it works how I think it works it could be a useful debug tool.

I started a study in Python as a class but then a place for Graphic Design opened up and I took that option as its my ambition

Madiaba still has taught me a lot of python..

were you thinking about splash?
Title: Re: Arena Name Generator
Post by: JoeBlo on April 19, 2010, 09:57:19 PM
LOLWUT ?

I have a general talent for Graphic Design which is why Im studying it now.