Topic: Personal Modification's

A number of people are beginning to experiment more with altering maps for their own purposes. This is just intended to be a rough guide to achieving some of the things people have asked about.

It will be a work in progress as more questions are asked and more information is released.

Ok, to start with you should know that any change to files will affect your online game play. For this reason it is essential you create a copy of the First Strike folder. To do this:

1) Navigate to your 2142 installation folder, for example C:program files/electronic arts/BF2142/mods/FirstStrike. Notice that it is inside your 2142 folder, specifically the area titled MODS!

2) Copy the FirstStrike folder from inside mods. Yup, the whole thing. Just right click, ctrl C whatever your preferred method and copy that whole folder to your desktop.

3) Ok, so you should now have two folders, one regular FirstStrike in the original destination folder, and your copy one on the desktop. Now, rename that one on the desktop. Just keep it simple, I usually just add a letter on the end, for example FirstStrikeM (m for mine or mod) but you go ahead and use whatever you want.

4) Now, grab that renamed folder and go drop it back in the 2142 mods folder, you know, the same place you copied it from. Now in the Electronic arts/mods folder you should have: BF2142, FirstStrike and FirstStrikeM or whatever you renamed it.

** Because the idea here is that we swap between FirstStrike folders, it becomes very easy for mistakes to happen and for the wrong one to be modified. I reccomend that you keep a seperate copy of FirstStrike on your desktop. Its easier to drop in a copy of it when something goes wrong than have to reinstall the whole mod every time!**

5) When you modify a file, it is done from inside FirstStrikeM (or whatever you called it). When you want to play it and check out your changes you need to rename both FirstStrike folders. What????!! It's easy, basically what you do is use the regular FirstStrike launcher to play either version, BUT, it always looks for the folder named First Strike.

So lets say I made some changes and want to check them out. I rename FirstStrike (which is my regular public folder remember) to FirstStrikeP (P for public!). I then rename my mod folder (remember, FirstStrikeM the one we copied) to FirstStrike. This is why I just use a one letter rename method, its so much easier! Then, just use th elauncher as normal and it will fire up your version. Remember though, your changes wont let you join a server cause you will get kicked.

When you want to play online with folks again, just rename them back, so FirstStrike in this case becomes FirstStrikeM and FirstStrikeP becomes FirstStrike.

EASY!!

Next lesson will be an introduction to the mod file system.
After that, some basic changes you can do such as weapon tweaks, change number of bots, vehicle tweaks and the one everyone wants.....changing kits on maps.

Remember, this is just a guide, I accept no responsibility for damage to your mod folder or even your computers file system as a result of mistakes made while attempting to follow this guide.

I will only cover the basics and do not intend to go too in depth with stuff. By all means ask questions and ask for something specific, but its a side project away from other stuff. If I say no, its because I don't have time or because I feel its beyond the depth I wish to cover here. But, you don't ask you don't get.

Bite my shiny metal Tie Fighter!
http://img.photobucket.com/albums/v600/TALON_TAW/TwigsSIG.jpg
http://stats.fsmod.com/sig/pilot.JE_Twigs.png

Re: Personal Modification's

Ok, now its time to get a basic understanding of some of our mod files and folders. Navigate to your FirstStrike mod folder, right now it doesn’t matter what it is called so you don’t need to rename it right away (ie change from FirstStrikeM to FirstStrike).

Open up the folder, you should see a whole lot of folders and zip files. If you don’t have a zip tool (most version of windows can open zip files) then go get one now. There are plenty of free ones out there.

Ok, depending on what you are doing, you will probably spend most of your time adjusting settings in either the levels folder, or the objects folder. Funny old thing, the levels folder contains the maps, while objects contains all the er…objects! You may also wish to play in the ai folder to change some bot settings, later in my little series we can look at some settings in there, such as changing the number of bots.

There is no need to look in any other files or folders other than those mentioned. You will see a folder called python…really really really don’t look in there or play with any of it unless you understand python software code. You could really break your mod by faffing about in there.  Most of the other stuff is fairly easy to work out, but python is a little different.

Anyways, lets take a look at some stuff huh? Lets start with the levels folder, open that up and take a look.  Yay! More folders! Pick anyone you like, I’m going to open up endor clearing as it has all game versions, ie singleplayer, conquest and co-op. Might be easier if you do the same if you have never done this before! So, opening up any folder in here will give the same options to start with, two zip files and one folder. Open the folder titled info: inside are some of the pictures used in the small loading screen image. You could change these if you really wanted too, just make sure the new pictures have the same resolution and file name. The file named endor_clearing can be opened with notepad, but there is no real need for you to do anything with that. Navigate back out to the main folder and we’ll take a look at the zip files.

Two options here, we can extract all the contents to the folder, or just look inside each zip file. If you extract them, then if you make any changes you have to put the changed file in to the zip file. For that reason I just work inside the zips to save myself a little time . You can look inside client.zip if you like but I wouldn’t bother. There is nothing really in there that you can play with at this stage, instead open up server.zip.

Eeek! Lots of files and folders right?! Ok, well the only ones we are interested in right now are the ones that end in .con as we can open these up with notepad. Go ahead and open up staticobjects.con with notepad. This file keeps a record of where every static object is placed, from trees to buildings. It’s kinda hard to change stuff here without using the dedicated editor so lets leave it for now. Close it down and open up init.con. This file holds some basic information and we can change a few things if we want. We can change the kits, (lines titled gameLogic.SetKit) and we can also change the number of tickets. Remember though, we aren’t making changes just yet, just getting a little familiar with the mod folders. Close it down, time for a new one.

We’ll go into the folders in a minute, but the other thing you could play with if you wanted would be sky.con, you could change a day map in to a night map for example. It wouldn’t be great without changing lighting properly though and that requires some dedicated software, but its an option if you wanted it.

Anyways, open the ai folder. Inside is one file, called ai.ai. Again, we can open this with notepad so try that now. Not a great deal to play with here, but if you wanted to you could change the ai view distance. Remember init.con? Well that has a max view distance setting, you could change that, then come in here and have the ai see less than or more than that setting. Just remember though, make it too high and you’ll never see the ai before they can get a bead on you! Ok, close it and back to the main area again.

The only other thing we can play with is held in gamemodes, so open that one up. Now pick a game mode I guess tongue sp = singleplayer, cq = conquest and coop = er co-op. I’m going to open up…..singleplayer. They are all pretty similar, but coop and sp have an extra folder called ai which isn’t there in conquest. Just open the map size and you will see it, plus the gameplayobjects.con folder. Open the .con file first. Now, we don’t want to mess with too much here, but you can use this to change the vehicles that spawn on a map. But again, we’ll go in to that later. Close it up and open the levels ai folder. Pretty boring, all it really does is tell the ai what order they can take flags in. Close it up again!

Ok, so that’s a quick intro to specific map settings, we can change vehicles that spawn, weather and sky, ticket numbers and kits with a basic knowledge. Remember, we’ll look at specific changes in another post.

Next up…object changes!

Ok, head back to the main FirstStrike folder area. You can close any windows you have open. Lets take a peek inside the objects folder now. Ok, lots going on here, every area has two zip files, client and server. The client files basically just hold the visible meshes, collision meshes and things that your computer will render. The server files hold the stuff that the server is interested in and also the things we’re interested in. The ones you are most likely to want to use are vehicles_server and weapons_server. The file structures are the same, so lets stick with a simple one. Open up vehicles_server then select a category. I’m going with air, then x-wing.

Again, depending what you look at depends what you get and how much is in there, but you should generally see three bits, a .con file, a .tweak file and an ai file. In the case of vehicles you may have different numbers of them for each variant of the vehicle. Here for the xwing, we have the regular xwing for space, an atmospheric one for planet stuff and the ds one for the deathstar. The .tweak files can be opened with notepad, try that now.

Eeek! Lots of scary code type things! Don’t worry, we will look at changes we can make later, but here is where you would come to make a ship stronger or weaker, change weapons etc. Close it and open the .con. Not as much information, this just tells the puter more or less where the different pieces of the ship go. Close this and open the ai folder.
This has two files, weapons.ai and objects.ai. Both are opened with notepad (see a theme running here?!). You shouldn’t have to play with these, objects.ai tells bots how to fly if you like, and weapons tells it how to shoot.

So, to make changes to objects, find the object, then use the .tweak file to make changes. Don’t mess with the .con and don’t play with the ai folder wink

Bit of a long one that, plenty of information. Feel free to navigate round and get used to the files, but try not to make changes just yet!
Next one I will show you how to change the kits on a singleplayer map (principle will also work for other game versions) and change the numbers of bots.

Bite my shiny metal Tie Fighter!
http://img.photobucket.com/albums/v600/TALON_TAW/TwigsSIG.jpg
http://stats.fsmod.com/sig/pilot.JE_Twigs.png

Re: Personal Modification's

Ok, in this one I’m going to talk you through changing the kits on a level. I will also talk you through changing the number of bots. As we are making changes, you need to make sure that in this one you have things backed up properly and work in the right folder. So, if you haven’t renamed anything, that’s fine, just work inside FirstStrikeM, but when it comes to checking them out go through the renaming thing. I’ll cover it again later, so to make thing easy, everyone make sure you work inside your FS folder titled FirstStrikeM (or whatever you named it).

Open up the folder and go to the Endor Clearing level folder and open up the server zip file. You need to open up gamemodes, gpm_sp , 16 and then open your gameplayobjects.con file. What we are going to do is overwrite the ini.con settings! Even though that tells the game the settings for this map, we can use our gameplayobjects.con file to overwrite that a little.

If you want, you can copy and paste the kit code from init.con, or you copy mine:
gameLogic.setKit 1 0 "imp_trooper" "sb_soldier" "sb_soldier"
gameLogic.setKit 2 0 "reb_trooper" "er_soldier" "er_soldier"

gameLogic.setKit 1 1 "imp_heavy_weapons" "sb_soldier" "sb_soldier"
gameLogic.setKit 2 1 "reb_heavy_weapons" "er_soldier" "er_soldier"

gameLogic.setKit 1 2 "imp_medic" "sw_soldier" "sw_soldier"
gameLogic.setKit 2 2 "reb_medic" "ef_soldier" "ef_soldier"

gameLogic.setKit 1 3 "imp_support" "sb_soldier" "sb_soldier"
gameLogic.setKit 2 3 "reb_support" "er_soldier" "er_soldier"

gameLogic.setKit 1 4 "bounty_hunter" "sa_soldier" "sa_soldier"
gameLogic.setKit 2 4 "jedi" "er_soldier" "er_soldier"

rem ********** Object Spawner **********

Copy and paste if you like. You will see that the only thing that changes from my code and the stuff in init.con, is the last two kits. These two kits can not be used by the bots, so we can change them to anything we want for human players. In this case, I have given the Imperial officer the bounty hunter kit and the rebel officer the jedi kit.

Oh, and make sure that last line matches up and overwrites the existing  rem ********** Object Spawner *********. I mean, its not essential, but keeps things nice and neat. Close it down and save changes.

To see what other kits are available, navigate to your objects folder/kits_server. Play around and have fun with the different kits, but remember to only change that last kit one!

Ok, so now you can run around endor using force lightening, or even fly around with the bounty hunter kit, but is that really enough??
I thought not. Lets get some more bots in there! More targetz!!! Or maybe your pooter struggles and you need less….

Navigate back to the main folder (ie bf2142/mods/firststrikem) and open up the ai folder. Take a look at aidefault.ai, it should open up fine with notepad or you might need to tell it to open with notepad. Either way..open it with notepad.

EA/Dice have nicely left a little guide in here to help out! Just follow the instructions, you’ll note that we have previously done this to force it to natively run 24 bots for everyone, but now you can have lots and lots. I think someone has previously run with about 128 bots or more. Bit laggy but fun. Anyway, just follow the instructions and then save changes.

Now go back to the mods folder, by which I mean BF2142/mods. Rename FirstStrike (which should be your public online playing folder) to FirstStrikeP. Rename FirstStrikeM (the one you made these changes to) to FirstStrike. This is so we can now try out our changes.

Close it all down and fire up the first strike launcher but don’t start the game! The reason I say this is because I don’t know if you have made a copy of a patched version of FirstStrike or not! So..if you patch it, it may overwrite those changes. Tick the box that says don’t update and THEN hit launch. Go through the usual thing and then have a go at a singleplayer game of Endor Clearing. All being well you should have more (or less) bots, and the option of the jedi or bounty hunter kits!

Have fun!

Will edit later with some picks to make this wall of text easier to read!

Bite my shiny metal Tie Fighter!
http://img.photobucket.com/albums/v600/TALON_TAW/TwigsSIG.jpg
http://stats.fsmod.com/sig/pilot.JE_Twigs.png

4 (edited by Benu_Kenobi 2011-06-13 18:10:49)

Re: Personal Modification's

Twigs wrote:

EA/Dice have nicely left a little guide in here to help out! Just follow the instructions, you’ll note that we have previously done this to force it to natively run 24 bots for everyone, but now you can have lots and lots. I think someone has previously run with about 128 bots or more. Bit laggy but fun. Anyway, just follow the instructions and then save changes.

My personal record is 150 big_smile


Nice tutorial so far Twigs, should be great help to aspiring modders.

~The Farce is strong with this one

Re: Personal Modification's

Aw crud, forgot about this hmm yeah, I'll get some pics uploaded at some point to clear things up, just been really busy lately!

Bite my shiny metal Tie Fighter!
http://img.photobucket.com/albums/v600/TALON_TAW/TwigsSIG.jpg
http://stats.fsmod.com/sig/pilot.JE_Twigs.png

Re: Personal Modification's

256 bot lagfest  :  D

http://www.xfire.com/video/359b1b/