BFHModsBFHeroes 42
RSS
 

Get Adobe Flash player



 





  • Page 1 of 1
  • 1
Forum moderator: Chubby  
Forum » Battlefield heroes » Battlefield Heroes moding » [Tutorial] Creating Custom Maps for BFH (A tutorial showing that custom levels can be made)
[Tutorial] Creating Custom Maps for BFH
QuisiamDate: Thursday, 2011-02-24, 10:55 PM | Message # 1
Private
Group: Users
Messages: 1
Awards: 0
Reputation: 0
Status: Offline
Modding Overview
Because Battlefield Heroes runs off the same engine as Battlefield 2 and Battlefield 2142, it means that Heroes structure is very much the same as these two other titles. And so with a little bit of modification you can, in theory, create levels for the game using the map tools for Battlefield 2. After pursuing this I found out you can indeed create playable levels for the game. This is good news because maybe the developers will allow us to have User Generated Levels implemented into the game.

feel free to share this with anyone and everyone. This information could potentially change the game as we know it.

Added (2011-02-24, 10:53 PM)
---------------------------------------------
Added (2011-02-24, 10:41 PM)
---------------------------------------------
Installing the Editor

Guide Overview/ Quick Steps-
1. Download Tools
2. Install the tools via two methods
a. Make sure Battlefield 2 is installed. Mod tools will be installed into the same directory as your Battlefield 2 game files.
b. Edit your Registry to make the install wizard think BF2 is installed into a certain directory called “BFHMods”
Finding and Downloading Tools-
The latest general release of the BF2 mod tools is 1.3. These can be found at http://battlefield2.filefront.com/file/Battlefield_2_Editor;64087
The download is 50.5MB and comes in the form of a .zip Tool

Installing the Tools-
To install the mod tools, the installer requires that Battlefield 2 is installed. Which means you can approach installation in two different ways.
1- Battlefield 2 is installed so I will have no problems installing the mod tools.
2- I don’t own a copy of BF2 so it won’t let me install the tools!
1. For those who own a copy of the game you can just open up the installer and follow all the steps to install it. The tools will be installed to the same directory as your Battlefield 2 game files

2. For those who don’t own a copy of the game, there is a way to trick the installer into thinking you own a copy of the game. This can be achieved by modifying your registry.
You can do this by following these steps-
1. You will need to create a new folder named “BFHMods” in the directory “C:\Program Files\EA GAMES\”. This is where we will install all of the tools as well as work on all of our mods.
2. You will need to create a reg file using one of the following codes-
XP

Code

[HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA GAMES\Battlefield 2]
"Language"="English"
"Locale"="en_US"
"InstallDir"="c:\\Program Files\\EA GAMES\\BFHMods"
"Version"="1.4"

Windows 7/Vista

Code
[HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA GAMES\Battlefield 2]
"Language"="English"
"Locale"="en_US"
"InstallDir"="c:\\ Program Files (x86)\\EA GAMES\\BFHMods"
"Version"="1.4"

After running these files, you should be able to install the mod tools

Added (2011-02-24, 10:54 PM)
---------------------------------------------
Added (2011-02-24, 10:41 PM)
---------------------------------------------
Configuring Mod Tools
Guide Overview/Quick Steps-
1. Copy all of the files from the Battlefield Heroes Game folder into the mod tools directory (BFHMods or Bf2 Directory)
2. Unzip all the zip files located here-
C:\Program Files\EA Games\BFHMods\mods\bfheroes
3. Create several files which will setup all of the mods settings
4. Unzip Files within Level folder to prepare for opening
5. Setting up Mod Assets within Editor

1. Moving Files-
To begin we will need to copy and paste all of the files from the Battlefield Heroes game folder into the directory with all of our mod tools (Either the BF2 Directory or the folder we made called ‘BFHMods’).
The Battlefield Heroes game folder is typically stored at the following directory-
XP

Code
C:\Program Files\EA Games\Battlefield Heroes

Windows 7/Vista

Code
C:\Program Files (x86)\EA Games\Battlefield Heroes

And we are moving these files to-

XP

Code
C:\Program Files\EA Games\BFHMods

Windows 7/Vista
Code
C:\Program Files (x86)\EA Games\BFHMods
*

Note: The BFH Games files are about 1GB. Depending on your system, this could take a while.
*If you notice, the only real difference here is XP programs are stored in ‘Program Files’, and 7/Vista Files are stored in ‘Program Files(x86)’

2. Unzip BFHeroes BFH Files**-
Even though the game is made with them, the Battlefield 2 mod tools don’t do very well with Zip Files. This means we will need to unzip the majority of the zip files within ‘C:\Program Files\EA Games\BFHMods\mods\bfheroes’.
This means we take we take file files such as “Sound_client.zip” and create a folder called “Sound_Client” which has all of the files from the zip in it.
**Winrar (http://www.rarlab.com/) and jZip (http://www.jzip.com/) are highly suggested for this process. They can be downloaded and installed for FREE

3. Creating Game Files-
To successfully install and use the mod tools we’ll need to create a set of files which help define how our mod works. To make this easy you can just copy and paste my settings and use them for your own purposes.

You will first need to create the following folders (the folder you need to create is in bold-
C:\Program Files\EA Games\BFHMods\bf2editor\mods\bfheroes\LevelEditor\
(So you will need to create the folder ‘bfheroes’ and the folder ‘LevelEditor’ within bfheroes)

LayerInit.con
C:\Program Files\EA Games\BFHMods\bf2editor\mods\bfheroes\LayerInit.con

CODE

Code
LayerManager.CreateDefaultFilter gpm_tdm Team Deathmatch
LayerManager.CreateDefaultFilter gpm_sl   
LayerManager.CreateDefaultFilter gpm_tut Tutorial
LayerManager.CreateDefaultFilter gpm_hoth Hero of the Hill   

LayerManager.CreateDefaultPlayerFilter 16

LevelSettings.con
C:\Program Files\EA Games\BFHMods\bf2editor\mods\bfheroes\LevelEditor\LevelSettings.con

CODE

Code

LevelSettings.AddTeam RA Royal
LevelSettings.AddTeam NA National

gameLogic.setTeamName 1 "National"
gameLogic.setTeamName 2 "British"

gameLogic.setTeamLanguage 1 "Russian"
gameLogic.setTeamLanguage 2 "English"

gameLogic.setTeamFlag 0 "flag_neutral"
gameLogic.setTeamFlag 1 "flag_NA"
gameLogic.setTeamFlag 2 "flag_RA"

gameLogic.setKit 1 0 "NA_Commando_kit" "german_male_commando" "german_male_commando"
gameLogic.setKit 2 0 "RA_Commando_kit" "british_male_commando" "british_male_commando"

gameLogic.setKit 1 1 "NA_Soldier_kit" "german_male_soldier" "german_male_soldier"
gameLogic.setKit 2 1 "RA_Soldier_kit" "british_male_soldier" "british_male_soldier"

gameLogic.setKit 1 2 "NA_Gunner_kit" "german_male_gunner" "german_male_gunner"
gameLogic.setKit 2 2 "RA_Gunner_kit" "british_male_gunner" "british_male_gunner"

gameLogic.setKit 1 3 "NAF_Commando_kit" "german_female_commando" "german_female_commando"
gameLogic.setKit 2 3 "RAF_Commando_kit" "british_female_commando" "british_female_commando"

gameLogic.setKit 1 4 "NAF_Soldier_kit" "german_female_soldier" "german_female_soldier"
gameLogic.setKit 2 4 "RAF_Soldier_kit" "british_female_soldier" "british_female_soldier"

gameLogic.setKit 1 5 "NAF_Gunner_kit" "german_female_gunner" "german_female_gunner"
gameLogic.setKit 2 5 "RAF_Gunner_kit" "british_female_gunner" "british_female_gunner"

ObjectSpawnerDef.con
C:\Program Files\EA Games\BFHMods\bf2editor\mods\bfheroes\ObjectSpawnerDef.con

CODE

Code

rem **************
rem *** Royals ***
rem **************

ObjectSpawnerDef.AddDef bri_jeep_willys Royal Jeep
ObjectSpawnerDef.AddDef bri_jeep_willys_night Royal Night Jeep

ObjectSpawnerDef.AddDef bri_plane_spitfire Royal Spitfire

ObjectSpawnerDef.AddDef bri_tank_sherman Royal Sherman Tank

rem ****************
rem *** Common ***
rem ****************

ObjectSpawnerDef.AddDef com_aa AA Gun
ObjectSpawnerDef.AddDef sandbagbundle Sandbag Bundle

ObjectSpawnerDef.AddDef targe_dummies

rem ****************
rem *** Nationals ***
rem ****************

ObjectSpawnerDef.AddDef ger_jeep_kubelwagen National Jeep
ObjectSpawnerDef.AddDef ger_jeep_kubelwagen_night National Night Jeep

ObjectSpawnerDef.AddDef ger_plane_messerschmitt National Messerschmitt

ObjectSpawnerDef.AddDef ger_tank_panzeriv National Tank

4. Setting up Levels-
To be able to open up levels you will need to unzip the files “client.zip” and “server.zip” within the level folder.
For example, to open Riverside Rush within the editor, you will need to open up the folder “heat” within the levels folder (C:\Program Files\EA Games\BFHMods\mods\bfheroes\Levels\heat). Then once inside, unzip “Client.zip” and “Server.zip”.

5. Setting Up Mod Inside of the Editor-
Now we have to configure the mod within the editor. We can do this by doing the following-

1. Open up the BFEditor
2. Select bfheroes as our starting mod
3. Once the editor has loaded up press the mod tab at the top of the page
4. Select “Mod Manager” from the dropdown menu
5. On the Window that appears click the “Editor Content” Tab

6. Check all of the boxes next to folder icons. These are the mod resources that the editor will load every time you start it up.
CONGRATULATIONS! YOU’RE ALL READY TO BEGIN MODDING!

Added (2011-02-24, 10:55 PM)
---------------------------------------------
Actually Creating Levels in Editor

Creating levels for Battlefield Heroes with the Battlefield Editor is almost exactly like creating levels for Battlefield 2. Iif you are unfamiliar with the tools I suggest that you try looking around the internet for battlefield 2 modding guides. Trying searching this forum, bfeditor.org (a great battlefield modding resource), or google

I know some people are probably thinking "WOW WHAT A N3WB HE ISN'T GOING TO EXPLAIN EVERY SINGLE FUNCTION IN THE EDITOR". Well the reasoning behind this is there are many people who are familiar with the BF2 tools, plus there are tons of brilliant guides out there which will explain everything you need to know. And since Battlefield Heroes levels are created in the exact same way as BF2, the BF2 guides work just as good for BFH levels (for the most part).

So basically its along the lines of create new level, mess with the terrain, place objects, place control points, place spawn points, move about until you're happy, render shadows, render the map, and do some minor tweaking.

Side Note:Control Point flag Values-
0= Neutral 1=National 2=Royal

Added (2011-02-24, 10:55 PM)
---------------------------------------------
Rendering Levels and Preparing them for play

The main difference between BF2 levels and BFH levels is a file you must create called "InitLogic.con" within your level files.
1. Open up your level files
2. Open the file "init.con"
3. At the end of the file it should say "endIf"
4. copy and paste the following code after "endif"
CODE
run InitLogic.con
5. Save the file
6. Open notepad and copy the following code into the document

CODE

Code

rem *** Generated by BF2Editor ***

rem -------------------------------- Game Modes ---------------------------------

if v_arg1 == BF2Editor

LevelSettings.ClearGameModes

endIf

rem -------------------------------- Spawn Logic --------------------------------

gameLogic.setVehiclePrioAndMax 16 1 VTLightTank 4
gameLogic.setVehiclePrioAndMax 16 1 VTScoutCar 4
gameLogic.setVehiclePrioAndMax 16 2 VTLightTank 4
gameLogic.setVehiclePrioAndMax 16 2 VTScoutCar 4

rem -----------------------------------------------------------------------------

gameLogic.setBeforeSpawnCamera 8/29/6 -176/-8/0

if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix ""
else
texturemanager.customTextureSuffix ""
endIf
rem -----------------------------------------------------------------------------

gameLogic.MaximumLevelViewDistance 400
gameLogic.useColdBreath 0

rem -----------------------------------------------------------------------------

gameLogic.setDefaultNumberOfTicketsEx 16 1 50
gameLogic.setDefaultNumberOfTicketsEx 16 2 50
gameLogic.setDefaultNumberOfTicketsEx 32 1 50
gameLogic.setDefaultNumberOfTicketsEx 32 2 50
gameLogic.setDefaultNumberOfTicketsEx 64 1 50
gameLogic.setDefaultNumberOfTicketsEx 64 2 50
gameLogic.setDefaultNumberOfTicketsEx 128 1 50
gameLogic.setDefaultNumberOfTicketsEx 128 2 50
gameLogic.setDefaultTimeToNextAIWave 8
gameLogic.setTicketLossAtEndPerMin 1000
gameLogic.setTicketLossPerMin 1 1000
gameLogic.setTicketLossPerMin 2 1000

renderer.globalStaticMeshLodDistanceScale 1
renderer.globalBundleMeshLodDistanceScale 1
renderer.globalSkinnedMeshLodDistanceScale 1
windManager.globalWindDirection 0.5/0/0.5
windManager.globalWindSpeed 3

NOTE: gameLogic.setBeforeSpawnCamera is the starting position of your camera. You can add your own camera values here.

7. Save this file as type "all file types" and name it InitLogic.con. You'll want to place this inside your level folder
(basically in the Init.con file we are saying "run the InitLogic file we just made")

When your level is ready for the world to see you must go up to Mod, hit 'Package Mod', check the box next to 'Package this level', and hit okay for the mod to be made. Wait for the level to package and you should be able to play the level inside Battlefield Heroes.

Proof this works-
Here is a rough build I made quite a while ago- http://www.mediafire.com/?ywnzwmtuzi1

Message edited by Quisiam - Thursday, 2011-02-24, 10:52 PM
 
McFluffDate: Friday, 2011-02-25, 2:55 PM | Message # 2
Lieutenant colonel
Group: Administrators
Messages: 103
Awards: 1
Reputation: 12
Status: Offline
All i can say is that this is pretty damn amazing, thanks for the tutorial.
Would be nice to see some costom made maps.


 
GuestDate: Sunday, 2011-02-27, 2:19 PM | Message # 3
Group: Guests





Nice work man, but i have one question, i did everything like it's said in here, but when I open bf2 editor, I get an error wich says: Can't find BFMFC.DLL

Added (2011-02-27, 2:19 PM)
---------------------------------------------
And another file is missing to: msvcr90.dll

 
paulDate: Tuesday, 2011-03-08, 9:21 PM | Message # 4
Group: Guests





great but my english is not so good is there a tutorial in dutch?
 
McFluffDate: Tuesday, 2011-03-08, 10:17 PM | Message # 5
Lieutenant colonel
Group: Administrators
Messages: 103
Awards: 1
Reputation: 12
Status: Offline
Try google translate wink

 
Modding_learnDate: Saturday, 2011-06-25, 2:33 PM | Message # 6
Sergeant
Group: Users
Messages: 20
Awards: 0
Reputation: 0
Status: Offline
i've tried but i don't get the buildings in the program [i've the version of bf2]
 
ByamarroDate: Wednesday, 2011-07-06, 6:52 AM | Message # 7
Private
Group: Users
Messages: 12
Awards: 0
Reputation: 0
Status: Offline
I have error
BF2Editor.exe don't run
But i have polish Windows
"Aplikacja nie została właściwie zainicjowana (0x80000003). Kliknij przycisk OK, aby zakończyć aplikację".
I tried to reinstall it. It still don't works...
 
McFluffDate: Wednesday, 2011-07-13, 1:10 PM | Message # 8
Lieutenant colonel
Group: Administrators
Messages: 103
Awards: 1
Reputation: 12
Status: Offline
I will just take a guess here but, Byamarro are you running a windows that's above XP? If you are you should run the program in windows XP compatibility mode.

 
Forum » Battlefield heroes » Battlefield Heroes moding » [Tutorial] Creating Custom Maps for BFH (A tutorial showing that custom levels can be made)
  • Page 1 of 1
  • 1
Search:








 
Statistics Forum
Recent Posts Readable topic Top Users New User
  • [mod] Dedicated Servers
  • [community] make me a mod
  • Battlefield Heroes'42
  • so close on getting a chopper ...
  • [TUTORIAL] How to start moddin...
  • Mods, Caught on Tape/Screensho...
  • Battlefield Heroes'42
  • [TUTORIAL] How to make custom ...
  • My mods
  • how to add new buildings?
  • Apache_Thunder
  • McFluff
  • SgtColbert
  • Philly
  • Conorman
  • Dutchassasin
  • Mrtn
  • Solidsnail
  • wakamonkey
  • SwiftGreen
  • sins42491
  • wildstrawberryteam
  • lfsmods
  • vicky5522kumar
  • vicky918643
  • logannwrights
  • mopsalbertovic
  • alizartash2022
  • jacobanke96
  • Sabi
  • Based on the game Battlefield Heroes By Electronic Arts™ and DICE™ | By using this website you agree to our Tearms Of Use
    Some images are taken from JW Renders, check it outs it has some cool stuff. Some translations provided by uCause.esigned by CENTROARTS