How to Create a New Weapon or Player Controlled Object using the Object Generator
-MDT tools version 2.75 or higher.
The object Generator is a tool designed to speed up the creation of new player control objects and weapons by copying an existing PCO or weapon, giving it a new name of your choosing, and rewriting all relevant code within the files to match that name.
Note: this tool does most, but not all, of the work necessary to make the new object "work". You will still have to manually edit some entries in the files, such as liking up the correct meshes in the Geometries.con, so it is recommended that you become familiar with editing the various .con files before attempting to use this tool. Please see the readme included in the folder with this tool for details on what does and doesn't get changed and what files are produced.
No setup is necessary with this tool other than to have the MDT tools installed.
Creating the new Object
1. Launch the MDT tools, and from the main screen click on the "Show All Tools" button.
2. Open the folder labeled "Object Generator" and double-click on "ObjectGenerator.exe". You should see the following screen:
3. Select either BF1942 or BFV in the pulldown box, depending on which game you are working on, and then choose your mod from the list at the bottom. Click "Okay" and you should see the following screen:
4. Under "Type", choose either "HandFireArms" or "Player Controlled Object", then under "Object Name" choose the object that you want to start with. This is the object that will be duplicated and become your new object.
Note: if you choose "PlayerControlObject", the "Mobile Physics" option becomes available. This is a filter for the list of object names that toggles between mobile and non-mobile vehicles. If you are duplicating a standard, mobile vehicle, check this option. If you are trying to duplicate a non-mobile "vehicle" such as an anti-aircraft gun, you will need to uncheck the option in order for it to show up in the list. The reason for this checkbox is that the tool scans the entire mod folder for both moving and non-moving vehicles. Unfortunately, it can't differentiate between an anti-aircraft gun and a passenger position in a jeep, so it lists both of them. When duplicating a non-mobile vehicle, you should not choose anything that has "PCO" as part of the name, such as "WillyPassengerPCO". These are subobjects of the vehicle and won't work correctly. In this case, if what you want to do is duplicate the jeep, it would actually be considered a mobile vehicle. You would check the box next to "Mobile Physics" and select "willy" as the object name.
5. In the field next to "New Object Name", enter the name that you want to call the new object. (Remember, no spaces in the name.)
6. Click on "Make Object".
The tool will now generate all the basic files necessary for your new object.
7. Clicking on "View Files" will now open the directory where these new files have been placed. (You can also navigate to these files by going to "Battlefield Mod Development Toolkit\Object Generator\_RawFiles.
You would now copy these files to the appropriate places in your mod structure and edit the final bits necessary by hand to make your new object work in the game.
Once again, this tool is meant for more experienced modders. You will have to change such things as the geometry files that are called, Icon references, and so on, but this takes a lot of the tedious renaming work out of the process.