This is not a complete tutorial but I hope this will give you (and others) a good idea of how the mode works.
First you have to place the vehicles you want to use as objects (just like putting regular vehicles on the map). The vehicles have to spawn at the controlpoint you want to affect when those vehicles are destroyed.
Check the mapdata.py used for Hyacinth (located in the level folder of Hyacinth). As you can see the plugin ‘destroyObjective’ is imported, you can find the corresponding python file in the python folder (default= C:\Program Files\EA GAMES\Battlefield 2\mods\fh2\python\game\plugins):
from game.plugins import plugin, destroyObjective, limitKit
What controlpoints, number of objects and objects are used are defined here:
objective_32 = [
plugin(destroyObjective, controlpoint = 'CP_64_Hy_Airfield', \
refcount = 6, \
template = 'mc202_objective'),
plugin(destroyObjective, controlpoint = 'CP_64_Hy_BarceCompound', \
refcount = 4, \
template = 'pziic'),
plugin(destroyObjective, controlpoint = 'CP_32_Hyacinth_Barce', \
refcount = 2, \
template = ['hqradio1','hqradio2']),
]
As you can see the Airfield will be captured by the british if they destroy 6 planes (mc202). The name of the object is the exact name used in the gameplayobjects.con.
This tells the game when the objective mode is used (the 32-players map in conquest mode):
gpm_cq = {
16: common_kitlimit,
32: common_kitlimit + objective_32,
64: common_kitlimit,
}
Things like locking the vehicles is done in the tmp.con (located in the server.zip). The entry radius of the pz2 is changed to 0 to prevent players from entering and moving them.
rem disable pziic
ObjectTemplate.activeSafe EntryPoint pziic_EntryPoint
ObjectTemplate.setEntryRadius 0
The following lines change how the pz2 can be destroyed.
rem make pziic never destroyable
ObjectTemplate.activeSafe PlayerControlObject pziic
ObjectTemplate.armor.canBeRepairedWhenWreck 0
ObjectTemplate.armor.wreckExplosionForce 7
ObjectTemplate.armor.wreckExplosionMaterial 70
ObjectTemplate.armor.wreckHitPoints 500
ObjectTemplate.armor.timeToStayAsWreck 60
ObjectTemplate.armor.criticalDamage 500
ObjectTemplate.armor.canBeDestroyed 1
ObjectTemplate.armor.defaultMaterial 127
The icon for the minimap is replaced for a yellow star to indicate it is an objective:
rem objective icon
ObjectTemplate.vehicleHud.miniMapIcon Ingame\Vehicles\Icons\Minimap\mini_Objective.dds
I think this prevents a destroyed pz2 from damaging the nearby panzers but I’m not sure:
rem and don't cause huge explosion
ObjectTemplate.armor.explosionForce 15
ObjectTemplate.armor.explosionForceMod 7
ObjectTemplate.armor.explosionForceMax 4000
ObjectTemplate.armor.explosionDamage 0
ObjectTemplate.armor.explosionRadius 0
ObjectTemplate.armor.explosionMaterial 99
The code in the tmp.con is not required so you can decide whether an objective should be able to move etc.
You can copy the files from Hyacinth and change them to use on your map.