Sample Mod Launcher Batch file

Download for Command & Conquer 3 C&C3, Generals Gen, Renegade Ren, Zero Hour ZH

Avatar of Radspakr


Category: Software
Created: Thursday May 2, 2013 - 14:14
Updated: Thursday May 2, 2013 - 14:15
Views: 4216
Summary: A simple mod launcher batch file that can be customised for you mod.
  • Staff-
  • Members-
  • Average-

0 votes

This is a batch mod launcher I made based on DIGI_Byte's Battlegrid launcher.
This is a copy of a download article I made for the T3A page but it can be used for CNC games as well just edit the paths.

How it works:
This launcher is pretty straight forward it moves the mod file(s)from "My Battle for Middle-Earth Files" to the original game folder and renames them with an underscore so the game and worldbuilder will read the data.
It also moves the original asset.dat into the "My Battle for Middle-Earth Files" and renames it and moves a custom asset.dat from "My Battle for Middle-Earth Files" into the game folder.
The launcher stays open while the game/Worldbuilder is open and automatically closes and cleans up when you finish.

Things to know:
I've put the batch file inside a .7z file so you'll 7zip to extract it.
To edit the .bat file open it up in an editor like Notepad++
I haven't tested this on 32 bit systems since I run a 64 bit one.
You'll need to put your mod files and asset.dat in "My Battle for Middle-Earth Files".
This only supports the default installation directories.

When running:
When you first launch it you'll be asked which version of Windows you are running 64 or 32 bit.
Chose your OS or you can close the launcher here.
Next you chose whether to launch your mod or launch it in Worldbuilder or you could play the game without a mod.
Once you've selected either the mod or WB there'll be a confirmation "Press any key" then the game/WB will automatically launch.

Additional notes:
A benefit of this sort of launcher is the ability to split your files so for bigger mods you can just add the paths for those files.

You can even patch a mod by launching an additional mod file and updating the launcher.
For instance your mod might be samplemod.big but you've got a small update big file consisting of only what you need for the patch (for instance a single file for hotfixing) you simply add it to the launcher and make sure it is alphabetically after the original mod file.
So if your mod launches as _samplemod.big your patch might be _xpatch.big and it should run the patch.

There's also bat-to-exe converters on the internet if you want to give an icon and so on.

Important note:
Some antiviruses will give false positive reports of trojans because of the way this launcher works and being a bat file.
The code as is harmless and only ever moves your mod files.
Simply add the file to the antivirus' exemptions list.

Editing this thing should be simply just changing the directory codes (make you rename them all and double check your code before launching because it may delete your mod files).
Always back up your mod files before testing.

Links / Downloads

Sample Batch file1893May 2, 2013 - 14:14


Radspakr - Coding
DIGI_Byte - Providing the original version (based off of his original Battlegrid launcher)
Elvenstar team - Studied their launcher when putting this one together.

Return to top