No need for any input, just run it and a folder in your "My documents\RND " directory will be created called "NewGame_x" (x is the next free game). All the conf indexes will also be called this, as well as the RND game name itself.
Its not rocket science I know, but its handy
You may ask "Why not just make an empty game and copy that?", well you'd have to hand edit all the conf files in it because they'd all use the same index, even if the folder name is different.
Save this text as Makegame.vbs and run it. Windows only.
Code: Select all
Dim FSO,strWrite,strLevPath,strLevName,intLevNum,strTemp
Set Shell = CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
strLevPath = Shell.SpecialFolders("MyDocuments") & "\Rocks'n'Diamonds\levels\"
If (fso.FolderExists(strLevPath)) = false then
msgbox "Missing RND folders in My Documents, using C:\ instead":strLevPath = "C:\"
End If
do until (fso.FolderExists(strLevPath & strLevName)) = false
intLevNum = intLevNum + 1:strLevName = "NewGame_" & intLevNum
loop
strLevPath = strLevPath & strLevName & "\":fso.CreateFolder(strLevPath)
Set strWrite = fso.CreateTextFile(strLevPath & "levelinfo.conf", True)
wr "file_identifier: ROCKSNDIAMONDS_LEVELINFO_FILE_VERSION_3.2"
wr "name: " & strLevName
wr "author: Your Name"
wr "levels: 100"
wr "first_level: 1"
wr "sort_priority: 100"
wr "level_group: false"
wr "readonly: false"
wr "graphics_set gfx_" & strLevName
wr "sounds_set sfx_" & strLevName
wr "music_set mus_" & strLevName:strWrite.Close
MakeConf strLevPath & "\Graphics\","graphicsinfo.conf","gfx_"
MakeConf strLevPath & "\Sounds\","soundsinfo.conf","sfx_"
MakeConf strLevPath & "\Music\","musicinfo.conf","mus_"
msgbox "Game number " & intLevNum & " has been created in:-" & chr(13) & strLevPath
sub wr (strLine):strWrite.WriteLine(strLine):end sub
sub MakeConf (strPath,strName,strIndex)
fso.CreateFolder(strPath)
Set strWrite = fso.CreateTextFile(strPath & strName, True)
wr "name " & strIndex & strLevName
wr "sort_priority: 100":strWrite.Close
end sub