How to create a shortcut to start a game mod? (BF2142)

I have downloaded several mods (modifications) to Battlefield 2142.
These are installed in a folder inside the Battlefield.app

To start a mods you will have to Launch BF2142 as normal.
After you have logged in, press the Community button and then the Custoam Games button.
Choose Clan Mod and press the Launch Button.
Press Ok on the message that pops up. Bf 2142 will quit.
Launch BF2142 and you will now be running the Clan Mod

I´m looking for a way to start the mod directly.

In windows you can modify the ikon on the desktop to open the mod by changing a field that tell the icon what to start:
"C:\Program Files\Battlefield 2142\BF2142.exe" +menu 1 +fullscreen 1
+modPath mods/clanmod

Can this be done on a mac?


##
The mods folder can be found by doing:
a. To do this you must right click on the Battlefield 2142 Application file and choose "Show Package Contents".
b. A new Finder window will open. Browse through Contents -> Resources and you will find a Battlefield 2142 file.
c. Right click on the Battlefield 2142 file and choose "Show Package Contents"
d. A new Finder windows will open. Browse through contents -> Resources-> Transgaming-> c_drive-> Programfiles-> Electronic Arts-> Battlefield 2142
4. Copy the contents of the zip file into the Mods folder.

Message was edited by: ipmil

MacPro, Mac OS X (10.5.2)

Posted on May 4, 2008 2:35 PM

Reply
5 replies

May 5, 2008 5:09 AM in response to joshz

I don´t think it that simple.

The problem is that the mod don´t have a .app or. .exe witch it can be started from.
It´s just a folder with information.
So I need a shortcut that starts Battlefield2142.app with the information from the mod.

The original bf2142 game is in the mods folder to so somewhere there is a file directing the app to witch mod to start.

May 6, 2008 11:22 AM in response to ipmil

To pass command line arguments to an application, you need to set up a script to run a command directly to the binary file in the application package. If you point to the application package you're essentially pointing to a folder that contains the application and a few resources for that application. This wont do, so you'll have to set up a script.

Basically, the command should be the same as that string you have for your windows shortcut, but you'll need to change the path to something like this:

/Applications/Battlefield\ 2142/BF2142.app/Contents/MacOS/BF2142

The names might be different, depending on the program, but once the path points to the ".app" application package, you'll need to add the /Contents/MacOS/ appname where the appname is the name of the program (inside the application package).

As such, the full command will be:

/Applications/Battlefield\ 2142/BF2142.app/Contents/MacOS/BF2142 +menu 1 +fullscreen1 +modPath mods/clanmod

The "modPath" string might be different from the PC as well, but you'll just have to point it to the root folder of the mod itself. This command setup should work, though you might have to mess around with path names to get it working.

You can put that in an automator workflow (have it run that command as a shell script) and save the workflow as an application, which should open the game in the desired mod when you run the workflow application.

Message was edited by: Topher Kessler

Message was edited by: Topher Kessler

May 6, 2008 1:41 PM in response to Topher Kessler

This is how I've created a direct link to the q3ut4 (Urban Terror v4) mod for Quake 3 (old app, but the principle is the same).

1. Open Automator and create a simple one-item workflow of the "Run Shell Script" action (available in the "Utilities" group).

2. In the text field I type the following code (backslashes are to include the space in the pathname. ie: "Quake 3.app" is put "Quake\ 3.app"):

/Applications/Games/Quake\ 3/Quake3\ G4.app/Contents/MacOS/Quake3\ G4 +set fs_game q3ut4

3. All other items are left at their default settings.

4. Save the workflow as an application and place it anywhere.

5. Optionally, if you have a cool icon for the item, use the "get info" window on the new application to change the workflow app's icon to something better than the automator robot.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to create a shortcut to start a game mod? (BF2142)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.