Home  Mods  Forum  Tutorials
How to start modding  Texture modding  Map modding 


Starting to mod part 2

Bassics of map modding

Modding the vehicle spawners


Chose a map you would like to mod. Now open the map and open "server.zip" then open "GameModes" And finaly open "gpm_tut"1 Inside you should find a file called "GamePlayObjects.con" open that file with notepad. All the code might be overwhelming but dont worry we are only interested in a small part of it. The code we are interested are ObjectSpawnerTemplate. Now this is the code we are looking for, you probobly will see many different versions of it. Since every vehicle that has to spawn uses it.


rem [ObjectSpawnerTemplate: WEST_CPNAME_CC_16_National_HQ_(VehicleType)]

ObjectTemplate.create ObjectSpawner WEST_CPNAME_CC_16_National_HQ_(VehicleType)

ObjectTemplate.activeSafe ObjectSpawner WEST_CPNAME_CC_16_National_HQ_(VehicleType)

ObjectTemplate.isNotSaveable 1

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.setObjectTemplate 1 ger_jeep_kubelwagen <-- We are looking for this part in the code, this shows what will spawn in this area. Its now set to be a National jeep.

ObjectTemplate.minSpawnDelay 0

ObjectTemplate.maxSpawnDelay 10

ObjectTemplate.TimeToLive 10

pro_modder
You can replace the vehicle with any of these.

 

List of all vehicles:

bri_jeep_willys               Royal Jeep

bri_plane_spitfire            Royal Plane

bri_tank_sherman              Royal Tank

bri_tank_sherman_TUT          Royal Tank from SS tutorial mode (no idea what's the difference)

ger_jeep_kubelwagen           National Jeep

ger_plane_messerschmitt       National Plane

ger_tank_panzeriv             National Tank

ger_tank_panzeriv_TUT         National Tank from SS tutorial mode (40 HP, and messed up camera)

Don't know if those will work this way (haven't tried):

com_aa                        AA Gun

COM_Parachute                 Parachute

target_dummies                Target dummy from SS tutorial mode
pro_modder

Now ounce you have replaced it, just save and close the file.


Adding vehicle spawners

Want infantry maps to have tanks or planes? Well then what you need are some vehicle spawners. Coincidentely I will teach you how to add them right now.

Lets start by adding vehicle spawners to Riverside Rush. First open the file "GamePlayObjects" like before.

First few lines look like this:

 

rem ********** Object Spawner **********

if v_arg1 == host

 

endIf

 

Delete them and replace with this:

 

rem ********** Object Spawner **********

rem [ObjectSpawnerTemplate: spawnpoint_behind_royal_base_bridge]

ObjectTemplate.create ObjectSpawner spawnpoint_behind_royal_base_bridge

ObjectTemplate.activeSafe ObjectSpawner spawnpoint_behind_royal_base_bridge

ObjectTemplate.isNotSaveable 1

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.setObjectTemplate 1 AS_TANK

ObjectTemplate.setObjectTemplate 2 bri_jeep_willys

 

rem [ObjectSpawnerTemplate: spawnpoint_national_base_bridge]

ObjectTemplate.create ObjectSpawner spawnpoint_national_base_bridge

ObjectTemplate.activeSafe ObjectSpawner spawnpoint_national_base_bridge

ObjectTemplate.isNotSaveable 1

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.setObjectTemplate 1 ger_jeep_kubelwagen

ObjectTemplate.setObjectTemplate 2 EU_TANK

 

 

 

if v_arg1 == host

 

   rem [ObjectSpawner: spawnpoint_behind_royal_base_bridge]

   Object.create spawnpoint_behind_royal_base_bridge

   Object.absolutePosition 89.060/35.639/-163.000

   Object.rotation 0.000/0.000/0.000

   Object.setControlPointId 104

   Object.layer 3

 

   rem [ObjectSpawner: spawnpoint_national_base_bridge]

   Object.create spawnpoint_national_base_bridge

   Object.absolutePosition -77.227/34.013/47.283

   Object.rotation 0.000/0.000/0.000

   Object.setControlPointId 101

   Object.layer 3

 

endIf

pro_modder

You have now added two vehicle spawners, first one is on the bridge behid the royal base. Second one is on the bridge going to the national base. Now let us take a quick look at the code.



rem ********** Object Spawner **********

rem [ObjectSpawnerTemplate: spawnpoint_behind_royal_base_bridge]

The name of the spawner. This is the name you will place in the second part of the code, were you set the cordinates of it.

ObjectTemplate.create ObjectSpawner spawnpoint_behind_royal_base_bridge

ObjectTemplate.activeSafe ObjectSpawner spawnpoint_behind_royal_base_bridge

ObjectTemplate.isNotSaveable 1

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.setObjectTemplate 1 AS_TANK

ObjectTemplate.setObjectTemplate 2 bri_jeep_willys

What is object spawner will spawn (Currently set to Royal jeep)



rem [ObjectSpawner: spawnpoint_behind_royal_base_bridge]

The name of the spawner of which location you want to set.

   Object.create spawnpoint_behind_royal_base_bridge

   Object.absolutePosition 89.060/35.639/-163.000

Map cordinates of the spawner.

   Object.rotation 0.000/0.000/0.000

   Object.setControlPointId 104

   Object.layer 3


Part 3 The basics of map modding



1.If you do not have a folder by this name, please read the first part of the tutorial on how to add it.



Source: http://bfhmods.ucoz.com/tut.rtf
Views: 1640 Added by: McFluff (2011-08-31) Author: McFluff and pro_modder

 

Hosted by uCoz | By using this site you agree to our terms of use
Radošās komūnas licence