Call of Duty 5: Vehicles in MP: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Image:Nutshell.png]] This tutorial will explain how to add Tanks to your Multiplayer levels.
[[Image:Nutshell.png]] This tutorial will explain how to add Tanks to your Multiplayer levels.
[[Image:Noobs.png|200px|right]]


'''The tanks contained in the pack below (second download) are as follow:'''
== From Stock (non-custom) ==
 
'''The Stock Tanks are as follow:'''


  Panzer IV: Armored MG, Unarmored MG - Armored Flamethrower, Unarmored Flamethrower
  Panzer IV: Armored MG
  T34      : Armored MG, Unarmored MG - Armored Flamethrower, Unarmored Flamethrower
  T34      : Armored MG


''They all have fully working FXs, Sounds, Damage, HUD stuff;''
''They all have fully working FXs, Sounds, Damage, HUD stuff;''


== Pre-requisite ==
=== Pre-requisite ===


* [[Image:data.png]][http://wiki.modsrepository.com/index.php/Call_of_Duty_5:_Launcher_Overview#Download_Mirrors Modtools patch 1.1]
* [[Image:data.png]][http://wiki.modsrepository.com/index.php/Call_of_Duty_5:_Launcher_Overview#Download_Mirrors Modtools patch 1.1]
* [[Image:data.png]][http://files.filefront.com/cod5+tank+pack+v13+zeroyzip/;13084471;/fileinfo.html Additional files]


**The latter contains soundaliases/sound/vehicle/destructibledef/destructiblepieces/gsc/clientscripts/physic and map example;<br>
*[[Image:data.png]][http://wiki.modsrepository.com/codww_files/cod5_missing_physics.zip Missing Physic (for T34 mainly)]
**Simply unzip in your Call Of Duty 5 Installation folder;<br><br>


<font color="red" size="4">[[Image:Warning.png]] All files contained in the pack are custom or stock but one stock file ONLY is modded </font><font color="yellow" size="4">/maps/mp/_vehicles.gsc</font> <font color="red" size="4">so make sure to backup this file!</font><br><br>
*[[Image:data.png]][http://wiki.modsrepository.com/codww_files/codww_clientscripts.zip Missing Clientscripts]


== In Radiant ==
=== In Radiant ===


* Open your map in Radiant and place the Tank prefabs by right-clicking on the 2D view > misc > prefab
* Open your map in Radiant and place the Tank prefabs by right-clicking on the 2D view > misc > prefab
Line 36: Line 37:
* Save your map and exit radiant
* Save your map and exit radiant


== Update the Zone file ==
 
=== Check Map GSC file ===
 
* Check that your main Map GSC contains the line <font color="blue">'''maps\mp\_load::main();'''</font> as shown in the example map in pack:
 
<syntaxhighlight>
main()
{
maps\mp\_load::main();
 
game["allies"] = "marines";
game["axis"] = "japanese";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "pacific";
game["axis_soldiertype"] = "pacific";
 
}
</syntaxhighlight>
 
=== Create Clientscript File ===
 
*You now need to create a new file similar to your Map GSC
*Assuming your Map GSC in \raw\maps\mp\ is like this:
 
<syntaxhighlight>
main()
{
maps\mp\_load::main();
game["allies"] = "marines";
game["axis"] = "japanese";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "pacific";
game["axis_soldiertype"] = "pacific";
 
}
</syntaxhighlight>
 
Then create a new file '''mp_yourmap.csc''' under \raw\clientscripts\mp\ with the following in:
 
<syntaxhighlight>
#include clientscripts\mp\_utility;
 
main()
{
// If the team nationalites change in this level's gsc file,
// you must update the team nationality here!
level.allies_team = "marines";
level.axis_team  = "japanese";
 
// For tanks Eexhaust and treads
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
 
// _load!
clientscripts\mp\_load::main();
 
//clientscripts\mp\mp_yourmap_fx::main();
 
thread clientscripts\mp\_fx::fx_init(0);
thread clientscripts\mp\_audio::audio_init(0);
 
//thread clientscripts\mp\mp_yourmap_amb::main();
 
// This needs to be called after all systems have been registered.
thread waitforclient(0);
 
println("*** Client : mp_test_tanks running...");
}
</syntaxhighlight>
 
You will notice that in the example above the two Tanks type are called:
 
<syntaxhighlight>
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
</syntaxhighlight>
 
*If you were only using the Panzer IV then the file would only have those lines:
 
<syntaxhighlight>
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
//clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
</syntaxhighlight>
 
=== Update the Zone file ===


* Open your Map Zone File (in ..\Call of Duty - World at War\zone_source\) and add the following lines:
* Open your Map Zone File (in ..\Call of Duty - World at War\zone_source\) and add the following lines:


<pre>
<syntaxhighlight>
// added for tanks
include,vehicles_drivable_mp
include,vehicles_drivable_mp
rawfile,clientscripts/mp/mp_test_tanks.csc
rawfile,clientscripts/mp/mp_yourmap.csc
sound,vehicles,veh_mp,all_mp
sound,vehicles,veh_mp,all_mp
rawfile,clientscripts/mp/_t34_flm.csc
</syntaxhighlight>
rawfile,clientscripts/mp/_panzeriv_flm.csc
 
rawfile,maps/mp/_t34_flm.gsc
<font color="red"> [[Image:Warning.png]] Make sure to comment out or remove the line '''impactfx,mp_test_tanks''' or the map will not start!!</font>
rawfile,maps/mp/_panzeriv_flm.gsc
 
rawfile,maps/mp/_vehicles.gsc
*Example Zone file:
</pre>
 
<syntaxhighlight>
col_map_mp,maps/mp/mp_test1234.d3dbsp
rawfile,maps/mp/mp_test1234.gsc
//impactfx,mp_test1234
sound,common,mp_test1234,!all_mp
sound,generic,mp_test1234,!all_mp
sound,voiceovers,mp_test1234,!all_mp
sound,multiplayer,mp_test1234,!all_mp
character,char_usa_raider_player_rifle
character,char_usa_raider_player_cqb
character,char_usa_raider_player_assault
character,char_usa_raider_player_lmg
character,char_usa_raider_player_smg
character,char_jap_impinf_player_smg
character,char_jap_impinf_player_rifle
character,char_jap_impinf_player_lmg
character,char_jap_impinf_player_cqb
character,char_jap_impinf_player_assault


<font color="red">[[Image:Warning.png]] Make sure to comment out or remove the line '''impactfx,mp_test_tanks''' or the map will not start!!</font>
include,vehicles_drivable_mp
rawfile,clientscripts/mp/mp_yourmap.csc
sound,vehicles,veh_mp,all_mp
</syntaxhighlight>


* Save and close
* Save and close
* Using Launcher compile your map and test!
=== Problems? ===
* If you previsously had the _vehicles.gsc modded belwo then you might get a script error, if this happens simply open up you original 1.0 ModTools Archive and restore the file <font color="blue" >/maps/mp/_vehicles.gsc</font>.
*Getting a message "Exceeded 400Fxs assets"? Make sure to comment out or remove the line <font color="blue" >impactfx,mp_yourmap</font> from your Zone File to fix;<br><br>
----
== Custom Tanks addition ==
'''The tanks contained in the pack below (second download) are as follow:'''
Panzer IV: Armored MG, Unarmored MG - Armored Flamethrower, Unarmored Flamethrower
T34      : Armored MG, Unarmored MG - Armored Flamethrower, Unarmored Flamethrower
''They all have fully working FXs, Sounds, Damage, HUD stuff;''
=== Pre-requisite ===
* [[Image:data.png]][http://wiki.modsrepository.com/index.php/Call_of_Duty_5:_Launcher_Overview#Download_Mirrors Modtools patch 1.1]
* [[Image:data.png]][http://files.filefront.com/cod5+tank+pack+v13+zeroyzip/;13084471;/fileinfo.html Additional files]
<br>
*The latter contains soundaliases/sound/vehicle/destructibledef/destructiblepieces/gsc/clientscripts/physic and map example;<br>
*Simply unzip in your Call Of Duty 5 Installation folder;<br><br>
<font color="red" size="3">[[Image:Warning.png]] All files contained in the pack are custom or stock but a few stock files are modded </font><font color="blue" size="3">/maps/mp/_vehicles.gsc <font color="red" size="3">and</font> <font color="blue" size="3">/soundaliases/vehicles.csv</font> <font color="red" size="3">so make sure to backup those files!</font></font><br><br>
=== In Radiant ===
* Open your map in Radiant and place the Tank prefabs by right-clicking on the 2D view > misc > prefab
[[Image:tanks_1.png|700px]]
* Browse to '''..\Call of Duty - World at War\map_source\_prefabs\MP\''' and pick the desired prefab
* Place in map and drop to ground using the drop to ground tool as shown below:
[[Image:tanks_2.png]]
* Add more tank prefabs if desired
* Save your map and exit radiant


== Check the map GSC file ==
=== Check Map GSC file ===


* Check that your main Map GSC contains the line '''maps\mp\_load::main();''' as shown in the example map in pack:
* Check that your main Map GSC contains the line <font color="blue">'''maps\mp\_load::main();'''</font> as shown in the example map in pack:


<pre>
<syntaxhighlight>
main()
main()
{
{
Line 73: Line 231:


}
}
</pre>
</syntaxhighlight>
 
=== Create Clientscript File ===
 
*You now need to create a new file similar to your Map GSC
*Assuming your Map GSC in \raw\maps\mp\ is like this:
 
<syntaxhighlight>
main()
{
maps\mp\_load::main();
game["allies"] = "marines";
game["axis"] = "japanese";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "pacific";
game["axis_soldiertype"] = "pacific";
 
}
</syntaxhighlight>
 
Then create a new file '''mp_yourmap.csc''' under \raw\clientscripts\mp\ with the following in:
 
<syntaxhighlight>
#include clientscripts\mp\_utility;
 
main()
{
// If the team nationalites change in this level's gsc file,
// you must update the team nationality here!
level.allies_team = "marines";
level.axis_team  = "japanese";
 
// For tanks Eexhaust and treads
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
clientscripts\mp\_panzeriv_flm::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34_flm::main( "vehicle_rus_tracked_t34_mp" );
 
// _load!
clientscripts\mp\_load::main();
 
//clientscripts\mp\mp_yourmap_fx::main();
 
thread clientscripts\mp\_fx::fx_init(0);
thread clientscripts\mp\_audio::audio_init(0);
 
//thread clientscripts\mp\mp_yourmap_amb::main();
 
// This needs to be called after all systems have been registered.
thread waitforclient(0);
 
println("*** Client : mp_test_tanks running...");
}
</syntaxhighlight>
 
You will notice that in the example above (taken from map example) all 4 Tanks type are called:
 
<syntaxhighlight>
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
clientscripts\mp\_panzeriv_flm::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34_flm::main( "vehicle_rus_tracked_t34_mp"
</syntaxhighlight>
 
*If you were only using the main Panzer and T34 then the file would only have those lines:
 
<syntaxhighlight>
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
</syntaxhighlight>
 
=== Update the Zone file ===
 
* Open your Map Zone File (in ..\Call of Duty - World at War\zone_source\) and add the following lines:


== Compile ==
<syntaxhighlight>
// added for tanks
include,vehicles_drivable_mp
rawfile,clientscripts/mp/mp_yourmap.csc
sound,vehicles,veh_mp,all_mp
rawfile,clientscripts/mp/_t34_flm.csc
rawfile,clientscripts/mp/_panzeriv_flm.csc
rawfile,maps/mp/_t34_flm.gsc
rawfile,maps/mp/_panzeriv_flm.gsc
rawfile,maps/mp/_vehicles.gsc
</syntaxhighlight>


<font color="red"> [[Image:Warning.png]] Make sure to comment out or remove the line '''impactfx,mp_test_tanks''' or the map will not start!!</font>
* Save and close
* Using Launcher compile your map and test! All going well you will have something like this:
* Using Launcher compile your map and test! All going well you will have something like this:




[[Image:tanks_3.png|700px]]
[[Image:tanks_3.png|700px]]
=== Problems? ===
*Getting a message "Exceeded 400Fxs assets"? Make sure to comment out or remove the line <font color="blue" >impactfx,mp_yourmap</font> from your Zone File to fix<br><br><br>




''Thanks to Sven71, ChrisP.''
''Thanks to Sven71, ChrisP.''


--[[User:Zeroy|Zeroy.]] 02:04, 25 January 2009 (UTC)
--[[User:Zeroy|Zeroy.]] 02:04, 25 January 2009 (UTC)

Latest revision as of 15:06, 16 December 2010

This tutorial will explain how to add Tanks to your Multiplayer levels.

From Stock (non-custom)

The Stock Tanks are as follow:

Panzer IV: Armored MG
T34      : Armored MG

They all have fully working FXs, Sounds, Damage, HUD stuff;

Pre-requisite

In Radiant

  • Open your map in Radiant and place the Tank prefabs by right-clicking on the 2D view > misc > prefab



  • Browse to ..\Call of Duty - World at War\map_source\_prefabs\MP\ and pick the desired prefab
  • Place in map and drop to ground using the drop to ground tool as shown below:



  • Add more tank prefabs if desired
  • Save your map and exit radiant


Check Map GSC file

  • Check that your main Map GSC contains the line maps\mp\_load::main(); as shown in the example map in pack:
main()
{
	maps\mp\_load::main();

	game["allies"] = "marines";
	game["axis"] = "japanese";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["allies_soldiertype"] = "pacific";
	game["axis_soldiertype"] = "pacific";

}

Create Clientscript File

  • You now need to create a new file similar to your Map GSC
  • Assuming your Map GSC in \raw\maps\mp\ is like this:
main()
{
	maps\mp\_load::main();
	
	game["allies"] = "marines";
	game["axis"] = "japanese";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["allies_soldiertype"] = "pacific";
	game["axis_soldiertype"] = "pacific";

}

Then create a new file mp_yourmap.csc under \raw\clientscripts\mp\ with the following in:

#include clientscripts\mp\_utility;

main()
{
	// If the team nationalites change in this level's gsc file,
	// you must update the team nationality here!
	level.allies_team = "marines";
	level.axis_team   = "japanese";

	// For tanks Eexhaust and treads
	clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
	clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );

	// _load!
	clientscripts\mp\_load::main();

	//clientscripts\mp\mp_yourmap_fx::main();

	thread clientscripts\mp\_fx::fx_init(0);
	thread clientscripts\mp\_audio::audio_init(0);

	//thread clientscripts\mp\mp_yourmap_amb::main();

	// This needs to be called after all systems have been registered.
	thread waitforclient(0);

	println("*** Client : mp_test_tanks running...");
}

You will notice that in the example above the two Tanks type are called:

clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
  • If you were only using the Panzer IV then the file would only have those lines:
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
//clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );

Update the Zone file

  • Open your Map Zone File (in ..\Call of Duty - World at War\zone_source\) and add the following lines:
include,vehicles_drivable_mp
rawfile,clientscripts/mp/mp_yourmap.csc
sound,vehicles,veh_mp,all_mp

Make sure to comment out or remove the line impactfx,mp_test_tanks or the map will not start!!

  • Example Zone file:
col_map_mp,maps/mp/mp_test1234.d3dbsp
rawfile,maps/mp/mp_test1234.gsc
//impactfx,mp_test1234
sound,common,mp_test1234,!all_mp
sound,generic,mp_test1234,!all_mp
sound,voiceovers,mp_test1234,!all_mp
sound,multiplayer,mp_test1234,!all_mp
character,char_usa_raider_player_rifle
character,char_usa_raider_player_cqb
character,char_usa_raider_player_assault
character,char_usa_raider_player_lmg
character,char_usa_raider_player_smg
character,char_jap_impinf_player_smg
character,char_jap_impinf_player_rifle
character,char_jap_impinf_player_lmg
character,char_jap_impinf_player_cqb
character,char_jap_impinf_player_assault

include,vehicles_drivable_mp
rawfile,clientscripts/mp/mp_yourmap.csc
sound,vehicles,veh_mp,all_mp
  • Save and close
  • Using Launcher compile your map and test!

Problems?

  • If you previsously had the _vehicles.gsc modded belwo then you might get a script error, if this happens simply open up you original 1.0 ModTools Archive and restore the file /maps/mp/_vehicles.gsc.
  • Getting a message "Exceeded 400Fxs assets"? Make sure to comment out or remove the line impactfx,mp_yourmap from your Zone File to fix;



Custom Tanks addition

The tanks contained in the pack below (second download) are as follow:

Panzer IV: Armored MG, Unarmored MG - Armored Flamethrower, Unarmored Flamethrower
T34      : Armored MG, Unarmored MG - Armored Flamethrower, Unarmored Flamethrower

They all have fully working FXs, Sounds, Damage, HUD stuff;

Pre-requisite


  • The latter contains soundaliases/sound/vehicle/destructibledef/destructiblepieces/gsc/clientscripts/physic and map example;
  • Simply unzip in your Call Of Duty 5 Installation folder;

All files contained in the pack are custom or stock but a few stock files are modded /maps/mp/_vehicles.gsc and /soundaliases/vehicles.csv so make sure to backup those files!

In Radiant

  • Open your map in Radiant and place the Tank prefabs by right-clicking on the 2D view > misc > prefab



  • Browse to ..\Call of Duty - World at War\map_source\_prefabs\MP\ and pick the desired prefab
  • Place in map and drop to ground using the drop to ground tool as shown below:



  • Add more tank prefabs if desired
  • Save your map and exit radiant


Check Map GSC file

  • Check that your main Map GSC contains the line maps\mp\_load::main(); as shown in the example map in pack:
main()
{
	maps\mp\_load::main();

	game["allies"] = "marines";
	game["axis"] = "japanese";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["allies_soldiertype"] = "pacific";
	game["axis_soldiertype"] = "pacific";

}

Create Clientscript File

  • You now need to create a new file similar to your Map GSC
  • Assuming your Map GSC in \raw\maps\mp\ is like this:
main()
{
	maps\mp\_load::main();
	
	game["allies"] = "marines";
	game["axis"] = "japanese";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["allies_soldiertype"] = "pacific";
	game["axis_soldiertype"] = "pacific";

}

Then create a new file mp_yourmap.csc under \raw\clientscripts\mp\ with the following in:

#include clientscripts\mp\_utility;

main()
{
	// If the team nationalites change in this level's gsc file,
	// you must update the team nationality here!
	level.allies_team = "marines";
	level.axis_team   = "japanese";

	// For tanks Eexhaust and treads
	clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
	clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
	clientscripts\mp\_panzeriv_flm::main( "vehicle_ger_tracked_panzer4_mp" );
	clientscripts\mp\_t34_flm::main( "vehicle_rus_tracked_t34_mp" );

	// _load!
	clientscripts\mp\_load::main();

	//clientscripts\mp\mp_yourmap_fx::main();

	thread clientscripts\mp\_fx::fx_init(0);
	thread clientscripts\mp\_audio::audio_init(0);

	//thread clientscripts\mp\mp_yourmap_amb::main();

	// This needs to be called after all systems have been registered.
	thread waitforclient(0);

	println("*** Client : mp_test_tanks running...");
}

You will notice that in the example above (taken from map example) all 4 Tanks type are called:

clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );
clientscripts\mp\_panzeriv_flm::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34_flm::main( "vehicle_rus_tracked_t34_mp"
  • If you were only using the main Panzer and T34 then the file would only have those lines:
clientscripts\mp\_panzeriv::main( "vehicle_ger_tracked_panzer4_mp" );
clientscripts\mp\_t34::main( "vehicle_rus_tracked_t34_mp" );

Update the Zone file

  • Open your Map Zone File (in ..\Call of Duty - World at War\zone_source\) and add the following lines:
// added for tanks
include,vehicles_drivable_mp
rawfile,clientscripts/mp/mp_yourmap.csc
sound,vehicles,veh_mp,all_mp
rawfile,clientscripts/mp/_t34_flm.csc
rawfile,clientscripts/mp/_panzeriv_flm.csc
rawfile,maps/mp/_t34_flm.gsc
rawfile,maps/mp/_panzeriv_flm.gsc
rawfile,maps/mp/_vehicles.gsc

Make sure to comment out or remove the line impactfx,mp_test_tanks or the map will not start!!

  • Save and close
  • Using Launcher compile your map and test! All going well you will have something like this:



Problems?

  • Getting a message "Exceeded 400Fxs assets"? Make sure to comment out or remove the line impactfx,mp_yourmap from your Zone File to fix



Thanks to Sven71, ChrisP.



--Zeroy. 02:04, 25 January 2009 (UTC)