Jump to content
Official BF Editor Forums
clemenz

Adding New Weapons To Kits

Recommended Posts

Hey all,

I am new to this forum and i dont know if im in the right section and if you do support my question.

Okay so here is my question,

i have battlefield 2 installed with the modification Forgotten Hope 2.

Now I only play single player just to practice and mess around with the game since there are not many populated FH2 servers.

There are some maps where you have a kit spawned on the ground with a mortar. Since the bots dont spot targets for artillery fire i wanted to add an binoculars to the kit. I searched around on the internet but could only find such a tutorial for BF2 itself.

In that tutorial they sayd i had to open the objects_server.rar so i opened it up. Since FH2 doesn't use the standard files i explored the rar file a bit and found some .con files for the mortar kits. There are several mortar kits for different countries. I tried opening one and this is what i saw:

run ../BA/BA_kits_spawner.con
include ../geoms.con
ObjectTemplate.create Kit BA_PickUpMortar
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.networkableInfo KitInfo
ObjectTemplate.kitType Assault
ObjectTemplate.aiTemplate Assault
ObjectTemplate.geometry kitmesh_3inchmortar
ObjectTemplate.geometry.kit c_kit_rifleassault
ObjectTemplate.geometry.dropGeom c_drop_rifleassault
ObjectTemplate.collisionMesh kit_collision
ObjectTemplate.physicsType Point
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.mapMaterial 0 material 76
ObjectTemplate.dropHeadwear helmet
ObjectTemplate.cullRadiusScale 2.4

rem -------------------------------------
ObjectTemplate.addTemplate Sykes_knife
ObjectTemplate.addTemplate webleymk6-i3
ObjectTemplate.addTemplate 3inchmortar_dep
ObjectTemplate.addTemplate dressing_gb
include ../debug.con
rem -------------------------------------

ObjectTemplate.createComponent AbilityHud
ObjectTemplate.abilityHud.ammoSound S_Resupply
ObjectTemplate.abilityHud.healingSound S_Heal
ObjectTemplate.abilityHud.repairingSound S_Repair

ObjectTemplate.createComponent VehicleHud
ObjectTemplate.vehicleHud.hudName 		"HUD_TEXT_MENU_SPAWN_KIT_ASSAULT"
ObjectTemplate.vehicleHud.miniMapIcon		"Ingame\Kits\Icons-FH2\kit_mortar_outline.tga"
ObjectTemplate.vehicleHud.vehicleIcon		"Ingame\Kits\Icons-FH2\kit_mortar.tga"
ObjectTemplate.vehicleHud.spottedIcon 		"Ingame\Player\Icons\Minimap\mini_Soldier.dds"

ObjectTemplate.vehicleHud.pantingSound		S_SprintBreath
ObjectTemplate.vehicleHud.injurySound			S_Injury
ObjectTemplate.vehicleHud.vehicleType 		7

ObjectTemplate.sprintStaminaDissipationFactor 0.6

rem ---BeginComp:Radio ---
ObjectTemplate.createComponent Radio
ObjectTemplate.Radio.spottedMessage	"infantry_spotted"
rem ---EndComp ---

In the tutorial they said i needed to place the new weapon at the place where the others are placed. So i figured out this was the piece:

rem -------------------------------------
ObjectTemplate.addTemplate Sykes_knife
ObjectTemplate.addTemplate webleymk6-i3
ObjectTemplate.addTemplate 3inchmortar_dep
ObjectTemplate.addTemplate dressing_gb
include ../debug.con
rem -------------------------------------

I looked at the sniper kit .con file and found the code for a binoculars:

ObjectTemplate.addTemplate no2_binocs

I tried placing this after the webleymk6. and saved the file. (i backed up the original .rar, then unpacked it, edited the file, saved it, and repacked it all and replaced it) After doing this i started FH2 and tried to load a map. This is the part where it goes wrong. At about 15% (whilst loading the objects) FH2 just crashes. I tried modifying all the mortar .con files but that didn't change anything.

What to do to add a new weapon?

Thanks in advance, greetz clemenz!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×