MODSon[line.com] Wiki - Beta 1.0

World at War: SP Vehicles

From MODSonline Wiki

Jump to: navigation, search

Contents

[edit] AI Vehicles in Singleplayer CODWAW

(the following includes a work around for the opel blitz - please correct this if there's an easier way - alternatively if not using a 'truck'/opel the skip any "notes")

Using AI vehicles in Singleplayer is relatively the same as the past games in the COD series, since COD4 it is not necessary to include custom sound aliases or scripts.

A moving vehicle is a script_vehicle xmodel which has a path (vehicle_nodes or origins)and has the appropirate script reference. (see below for pre-cache)

The "shift V" method can still be used to edit and create vehicle paths along with path_nodes. Shift+v works by selecting any node in the vehicles path, pressing shift+v then typing in the desired values and clicking on the needed option, you can enter the settings manually too.

[edit] Scripts

We must load the needed vehicle scripts for our level before loading the _load function:

main()
{

maps\_truck::main( "vehicle_ger_wheeled_opel_blitz", "opel" );
maps\_load::main();

}

So here we are loading the script associated with our TYPE of vehicle, in this case a "truck" and we are calling the model, in this case vehicle_ger_wheeled_opel_blitz and the name of the vehicle "opel".

For other vehicles scripts:

_80s_hatch1
_80s_sadan1
_80s_wagon1
_aircraft
_amtank
_buffalo
_tanker
_truck
_sherman
Image:Note.pngNote: Skip to vehicle entity setup if not using the opel. The opel truck seems to have been broken. You need to copy the "opel" file in the raw/vehicles directory and rename it to "truck" without the quotes

Next we need to add a list to the _vehicletypes.gsc in the raw/maps folder: before:


	set_type( "truck", "vehicle_pickup_roobars");
	set_type( "truck", "vehicle_pickup_4door");
	set_type( "truck", "vehicle_opfor_truck");
	set_type( "truck", "vehicle_pickup_technical");
	set_compassType( "truck", "automobile" );

after:

	set_type( "truck", "vehicle_pickup_roobars");
	set_type( "truck", "vehicle_pickup_4door");
	set_type( "truck", "vehicle_opfor_truck");
	set_type( "truck", "vehicle_pickup_technical");
	set_type( "truck", "vehicle_ger_wheeled_opel_blitz" );
	set_compassType( "truck", "automobile" );

So we added: set_type( "truck", "vehicle_ger_wheeled_opel_blitz" ) to the 'truck' section.

So now the vehicletype 'opel' or 'truck' is valid for the vehicle entity in radiant and both vehicle files are present

[edit] Vehicle Entity Setup

In the Editor: (quotes "" and brackets() should never be used in the Entity Dialogue)

Vehicle:

KEY VALUE
classname Script_vehicle
model vehicle_opel_blitz
origin (origin is created automatically)
script_noteworthy (any name to define the vehicle in a script)
script_team axis (allies/axis to define friendly/foe)
script_vehicleride 2 (any number from 0+, used for linking ai to said vehicle)
script_vehiclestartmove 0 (vehicle moves on spawn)
target (usually the name of the first vehicle_path node)
vehicletype opel
script_vehiclespawngroup 0 (defines a group to spawn with of the same number)

AI ride/drive vehicle:

KEY VALUE
classname actor_axis_ger_ber_volk_reg_kar98k
model char_ger_wrmcht_fullbody1
origin (automatic - deselect and reselct actor for updated origin)
script_startingposition 0 (0= driver 1=cargo/gunner 2=cargo 3=cargo etc)
script_vehicleride 2 (the number corresponds with the vehicles "vehicleride" number)
Image:Note.pngNote: script_startingposition positions are designated in said vehicles script files, for the 'opel' truck for instance there are 9 passenger seats and 1 driver seat. Passenger number "1" is riding in the front passenger seat, the 8 other passengers are in the backseats, the AI with "0" is the driver.


A vehicle can be a spawner when linked via a trigger, the vehicles properties should then include.

Select the Vehicle in the editor and in the Entity Editor tick the boxes:

  • Spawner
  • ForceSpawn
  • Undeletable

[edit] Vehicle Sounds

Vehicle sounds must be loaded from the levels zone source file.

sound,vehicles,see2,all_sp
sound,vehicles,see1,all_sp
sound,vehicles,yourlevelname,all_sp

[edit] Vehicle List

Vehicle typeVehicle model name
80s_hatch1 vehicle_80s_hatch1_brn_destructible
80s_hatch1 vehicle_80s_hatch1_green_destructible
80s_wagon1
amtank vehicle_usa_tracked_lvta4_amtank
opel vehicle_ger_wheeled_opel_blitz
truck vehicle_opfor_truck
truck vehicle_pickup_4door

[edit] Vehicle Example Files

WIP - just posting this so far so I don't lose it

Vehicle tutorial, example, modules and AI setups by techno2sl.

Download:

Installation: Before you do this, be aware that I have modified some module files in codwaw/zone_source and have created new ones. This is simply because the originals were missing required assets or had out of date assets, you can revert back at any time by installing the zone_source folder from any relevant build of the mod tools.

Open vehicle_tutorial.zip with WINRAR or Winzip and extract the folder to CODWAW installation directory.

Files inside:


Readme.txt raw/

  maps/vehicle.gsc
  maps/vehicle_fx.gsc
  maps/vehicle_amb.gsc
  maps/vehicle_anim.gsc

zone_source/

  vehicle.csv
  module_triple25.csv
  modeul_flak88.csv
  module_tiger.csv
  module_shermantank.csv
  module_truck.csv
  module_pak43.csv
  module_panther.csv
  module_halftrack.csv


User guide:

Image:Note.pngNote: THESE ARE FOR SINGLE PLAYER AND CO-OP ONLY! Some vehicles will require additional 3rd person anims or scripts in co-op, check missingassets.csv.

Step 1 First choose a vehicle, "AI_vehiclename" means the vehicle is operated by AI - "usable_vehiclename" means the vehicle can be used by the player. Once you have chosen a vehicle, simply place it in the map via right clicking the 2d view and select misc>Prefab

Once you have the prefab in your level and in the place you want it... STAMP IT! Click the button to the top right of the toolbar in Radiant which resembles a 'stamp', hover the mouse over it to be sure.

This explodes the prefab vehicle into your level so you can manipulate it easily without going back and forth into a prefab.

Be sure to check out the ones that have different variants like the Sherman.

Image:Note.pngNote: YES you can make some vehicles usable which are not in the prefabs, why didn't I include them? Because the player view is not set properly as the tag on the vehicle does not exist or is in the wrong place. All vehicles that are being used by AI are non-usable until the AI dismount, but I haven't checked the Usable option on these as it's safer to do it by script

For vehicle paths, set down info>vehicle_nodes and rotate nodes, make sure you set their directions using "R" and have the first node as the start node (press "N" on it). Connect the nodes one by one. You can hit shift+v on the nodes and vehicle now to set other options.

The vehicle should have "script_vehiclestartmove 0" in order to move right away.

Image:Note.pngNote: Check the vehicle.map for an example of moving vehicles and moving AI with them

Choose a vehicle from the list below, then Press F3 and search for your vehicle and it's instructions. After choosing the vehicle you must add the script to your levels script (check the vehicle.gsc for an example) and add the module to your zone file. (include,module_vehiclename - check the vehicle.csv for an example)

Sherman
Tiger
Pak43
Flak88
Triple25
Halftrack
Panther
Opel Blitz

Vehicle List and Instructions:

              • FLAK 88 *******

Usable: map_source/_prefab/usable_flak88.map

AI: map_source/_prefab/AI_flak88.map

include,module_flak88

Image:Note.pngNote: Always make sure there are path nodes surrounding the flak gun and cover nodes, when the AI jump off they will need somewhere to go, check out Berlin scripts for the satchel charge explosives
              • Sherman *******

map_source/_prefab/ai_sherman.map

// Note, the sherman zone source uses several features from the Tiger tank, keep these!

              • Halftrack *******

map_source/_prefab/usable_halftrack.map

map_source/_prefab/ai_halftrack.map


              • Tiger *******

map_source/_prefab/ai_tiger.map

include,module_tiger

              • Triple25 *******

map_source/_prefab/usable_triple25.map

include,module_triple25

              • Panther *******
              • Opel Blitz *******


// END NOTES:

Yes there are default modules included with the tools, but these will present a huge list of errors as lots of files are missing. I've compiled test levels in order to gain all assets needed for each vehicle and then made my own custom modules which have been tested locally.

I haven't tested anything in co-op (YET), so good luck.... but there are hidden clientside scripts for some vehicles, I have not read through them yet but will look into them and co-op in general if any issues arise.

Personal tools