Call of Duty 5: Flak 88

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Jump to: navigation, search
Nutshell.png
Allow mappers and modder to include Flak 88 on their maps/mods

Visual Examples


Download Files

Download all files HERE and copy them onto your raw directory, following this structure:

Xmodel (Original from Call of Duty World at War, modified):

raw/xmodel/zweimann_flak88_turret_mp
raw/xmodelparts/zweimann_flak88_turret_mp0
raw/xmodelparts/zweimann_flak88_turret_mp1
raw/xmodelsurfs/zweimann_flak88_turret_mp0
raw/xmodelsurfs/zweimann_flak88_turret_mp1

Custom Turret Weapon file:

raw/weapons/mp/zweimann_flak88_turret_mp

Custom Shellshock:

raw/shock/zweimann_flak88.shock

Sounds (Original from Call of Duty 2, modified):

* If you have not a customsound folder, create it
raw/sound/customsound/flak88fire
raw/sound/customsound/flak88reload
raw/sound/customsound/flak88spin
raw/soundaliases/flak88sound.csv

Script:

raw/maps/mp/_zweimann_flak88_turret_mp.gsc

Scripting

Adding Dynamic Barricades Files to your zone_source/<yourmapname>.csv file Open your zone source file and add these lines:

// Zweimann Flak88 Turret
fx,weapon/artillery/fx_artillery_pak43_muz
fx,explosions/fx_explosion_charge_large
fx,env/smoke/fx_smk_window_lg_smldr_lf

// Shock, needed
rawfile,shock/zweimann_flak88.shock

// Materials
material,mtl_flak88_body_d
material,compass_objpoint_flak

// Custom Turret
weapon,mp/zweimann_flak88_turret_mp

// Xmodels
xmodel,zweimann_flak88_turret_mp
xmodel,artillery_ger_flak88_d

// Sound
sound,customsound/flak88fire,,all_mp
sound,customsound/flak88reload,,all_mp
sound,customsound/flak88spin,,all_mp
sound,flak88sound,,all_mp

// Script
rawfile,maps/mp/_zweimann_flak88_turret_mp.gsc

Mapping

  • Open your map and add your MISC > Turret wherever you want.
  • Add these three keys and values:
model: zweimann_flak88_turret_mp
weaponinfo: zweimann_flak88_turret_mp
targetname: zweimann_flak88_turret_mp


Flak88tutorial1.jpg

Flak88tutorial2.jpg

Information.png
No need to add destroyed model nor clipping, script does it itself.

More Scripts

  • Open your raw/maps/mp/<yournmapname>.gsc and before the closing "}", add these lines:
level.zsbsfx = loadfx("temp_effects/fx_tmp_bullet_impact_dirt_generic");
level.flakExp = loadfx("explosions/fx_explosion_charge_large");
level.flakSmk = loadfx("env/smoke/fx_smk_window_lg_smldr_lf");
precachemodel("artillery_ger_flak88_d");
precacheshellshock("zweimann_flak88");
precacheitem("zweimann_flak88_turret_mp");

maps\mp\_zweimann_flak88_turret_mp::init();

As on this example:

main()
{

maps\mp\_load::main();

setExpFog(300, 1400, 0.9, 0.9, 0.7, 0.0);

level.zsbsfx = loadfx("temp_effects/fx_tmp_bullet_impact_dirt_generic");

level.flakExp = loadfx("explosions/fx_explosion_charge_large");

level.flakSmk = loadfx("env/smoke/fx_smk_window_lg_smldr_lf");

precachemodel("artillery_ger_flak88_d");

precacheshellshock("zweimann_flak88");

precacheitem("zweimann_flak88_turret_mp");

maps\mp\_zweimann_flak88_turret_mp::init();

}

Compile and enjoy

  • IMPORTANT: Add the weapon file to your .iwd file or you'll get a G_SPAWNTURRET error.

It's been a little hard to do this, but I think it gives a new dimension to some maps.

Currently there are two thins I would like to enhance:

1. When on ERM it does not happen, but with other mods or with no mod, the player suffers a shock for 1 and a half seconds when it gets into the turret. Why? I force a customized shellshock on the turret to cause slower pitch and yaw movement.
2. Animations. Seems that Cod Engine does not thread animations on turrets, so there is no recoil animation. I would have to script every part of the xmodel to do this. I think it does not worth a minute. The result is fantastic right now.
How did I do this?

1. Exported the artillery_ger_flak88 model using XME.
2. Deleted all useless tags (it was made for Single Player)
3. Added needed tags to become a turret:

- bi_base
- bi_l
- bi_r
- tag_aim
- tag_player
- tag_weapon
- tag_flash
- tag_butt
- tag_pivot

4. Had to make a few tricks to make it work
5. Exported to Xmodel using the CoD:WaW model exporter plugin for Maya
Flak88tutorial3.jpg


By Zweimann