Author Topic: Adding a command to an exe?  (Read 1147 times)

Like what some .bat's do, to open the exe under a special guideline, such as blockland with the mission editor. I was reading a few topics about it and I didn't quite think they were clear enough as far as what to do. I wanted to know how to do this so that I could get rid of the .bat that I have to open Blockland with the mission editor, and so that I could add stuff such as this to other games as well so that I can get rid of the .bat's for those as well.

Also I am running Windows Vista, if that makes any difference from XP.

You can use a shortcut instead of a bat, apart from that I don't think you can add the command to the exe yourself. But you may be able to add it to main.cs

Strange, I'll try what you said, but when I downloaded the mission editor for blockland and read the readme (yes, I do that.), it said to add "-mod editor" to the exe. I'm confused.

Weird, you're meant to add it to the target on the shortcut, like so.
Quote
"C:\Program Files\Blockland\Blockland.exe" -mod editor
I think that you can add
Quote
exec("editor/main.cs");
In onStart(); in main.cs
Quote
function onStart()
{   
   echo("\n--------- Initializing FPS ---------");

   // Load the scripts that start it all...
   exec("base/client/init.cs");
   exec("base/server/init.cs");
   exec("base/data/init.cs");


   initCommon();
   
   // Server gets loaded for all sessions, since clients
   // can host in-game servers.
   initServer();

   serverPart2();
}