HOW TO: Add vehicles to a map

Started by Led, March 12, 2011, 07:35:20 AM

Previous topic - Next topic
March 12, 2011, 07:35:20 AM Last Edit: July 23, 2014, 05:34:06 AM by Led
edit by buckler:  attached zip file to this tutorial


Majin Revan tutorial on adding vehicles.

I successfully used these steps to add vehicles to cloud city.

----------------------------

Here are a couple of things to keep in mind:

-vehicle spawns will only work in the CP control zones (although I thought I got around this once...)
-control zones can be displayed by the Regions option in zeroedit
-be careful when placing vehicle spawns so that they are not in the air--vehicles will drop down to the floor!


--------------------------------
Made by: Majin Revan
Contact: MajinRevan@gmail.com

Description:

This is just a tutorial for beginner mappers on how to add vehicles to thier maps, for SWBF.

Good luck!!



-------------------------


How to Add Vehicles to Your Map for SWBF
Author: Majin Revan
Date Created: February 19th, 2005

This tutorial is for any beginning mapper on how to add vehicles to a map for SWBF. This tutorial will not include how to modify vehicles for your map. Let's get started:
1.   Run BFBuilder (found in the main folder of the mod tools, HTML type application) and create a new project. Name it whatever you would like to name it. Let's use the name Test1 for this tutorial.
2.   When it is done, make sure your mod is loaded in BFBuilder. Click on Edit Test1 and wait for Zeroedit to load. When it loads, if a prompt comes up, hit "I Agree."
3.   Terrain implementation shall not be explained in this tutorial, so please choose Wire under the Terrain View: box on the toolbar. After that, choose Object under the Edit Mode: panel on the toolbar.
4.   Make sure the Action in the Edit Object: panel is set to Place. Browse for com_item_vehicle_spawn.odf in DataTest1\Common\ODFs. Once you find it, select it and place it near the command post that you want it to spawn for.
5.   Choose Select under Action and in the Object Instance panel fill in the correct name of the ControlZone. The name of the ControlZone is the name of the command post that you are setting the vehicle for. To find out that name, select the command post object and find out. If it is CP1, type that into the ControlZone area in the Object Instance panel for your vehicle spawn. Modify the numbers of the other entities if wanted.
6.   If you have your attacking army is set as the Rebel Alliance or the CIS (default set up), enter in the spawn name of the vehicle in the correct box. So, if it is set to default armies, CP1 is set as attacking. If you are adding a vehicle to the CP1 ControlZone, you will need to type in the spawn names for the vehicles in ClassAllATK and ClassCISATK. The spawn names of those vehicles can be found in Assets\Sides\CIS\cis.req or Assets\Sides\ALL\all.req. If you want to spawn an Alliance Combat Speeder, you would type all_hover_combatspeeder in the box under ClassAllATK in the Object Instance panel. Make sure you type in values for what the vehicles are for the opposing teams if the base is captured. If you only want certain armies to have vehicles for a certain base, do not enter the vehicle spawn name of the other armies
7.   Add any other vehicles that you would like to add. All vehicles are added the same way, no exceptions. Make sure that you are typing in the vehicle in the correct Class___ATK or Class___DEF areas. The Galactic Empire and the Galactic Republic are set as defending armies by default. That means that side 2 is for defending and side 1 is for attacking. Hence, CP2 is a defending command post by default. You can change which command post is for what team under the Team area in the Object Edit: panel for a command post. The value of 3 is locals, and the value of 0 is neutral.
8.   Save your map. You must overwrite the file DataTest1\Worlds\Test1\World1\Test1.wld when saving. Exit Zeroedit.
9.   In BFBuilder, choose Edit and choose the GCW Era Mission LUA or the CW Era Mission LUA option accordingly.
10.   If you choose GCW Era Mission LUA, look under the file for the line ReadDataFile("SIDE\\all.lvl",. If you had added the Alliance Combat Speeder to your map, you must type "all_hover_combatspeeder", under "all_inf_basicdesert",. Now, scroll down until you can see the following lines:
--  Level Stats
    ClearWalkers()
    AddWalkerType(0, 0)
   -- AddWalkerType(1, 4)
    AddWalkerType(2, 0)
    --SetMemoryPoolSize("EntityHover", 12)
    --SetMemoryPoolSize("EntityFlyer", 5)
--  SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
--  SetMemoryPoolSize("EntityTauntaun", 0)
--  SetMemoryPoolSize("MountedTurret", 22)
    SetMemoryPoolSize("PowerupItem", 60)
--    SetMemoryPoolSize("SoundSpaceRegion", 85)
    SetMemoryPoolSize("EntityMine", 40)
    --SetMemoryPoolSize("Aimer", 200)
--    SetMemoryPoolSize("Obstacle", 725)
    --SetMemoryPoolSize("EntityLight", 150)
    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:Test1\\Test1.lvl")
    SetDenseEnvironment("false")
    --AddDeathRegion("Sarlac01")
  --  SetMaxFlyHeight(90)
  --  SetMaxPlayerFlyHeight(90)
11.   You must remove the "--" (comment outs) before the SetMemoryPoolSize("EntityHover", 12) line. You may change the number at the end of the line to accommodate for the amount of this type of vehicle in your map. Make sure you uncomment the lines for flying vehicles if you have those in your map. As for large walkers such as the AT-AT and the AT-TE, this area might look a bit like my Naboo: Encounter (Version 2.0)'s GCW Era Mission LUA, here:
--  Level Stats
    ClearWalkers()
    SetMemoryPoolSize("EntityWalker", -4)
    AddWalkerType(0, 0) -- 0 droidekas
    AddWalkerType(2, 4) -- 4 atats with 2 leg pairs each
    AddWalkerType(1, 14)
    SetMemoryPoolSize("CommandWalker", 4)
    SetMemoryPoolSize("WalkerBlendUnit", 200)
    SetMemoryPoolSize("EntityHover", 20)
    SetMemoryPoolSize("EntityFlyer", 20)
    SetMemoryPoolSize("EntityCarrier", 10)
--  SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
--  SetMemoryPoolSize("MountedTurret", 100)
    SetMemoryPoolSize("PowerupItem", 60)
--    SetMemoryPoolSize("SoundSpaceRegion", 85)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("Aimer", 160)
--    SetMemoryPoolSize("Obstacle", 725)
    --SetMemoryPoolSize("EntityLight", 150)
    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:Nab3\\Nab3.lvl")
    SetDenseEnvironment("false")
    --AddDeathRegion("Sarlac01")
  --  SetMaxFlyHeight(90)
  --  SetMaxPlayerFlyHeight(90)

12.    You would need all of those walker lines. The MTT would use "CommandHover" instead of "CommandWalker" though. If you want to add an MTT to your map, this part of your file for the CW Era might look a bit like my Naboo: Encounter (Version 2.0)'s CW Era Mission LUA, here:
--  Level Stats
    ClearWalkers()
    SetMemoryPoolSize("EntityWalker", -4)
    AddWalkerType(0, 8) -- 8 droidekas (special case: 0 leg pairs)
    AddWalkerType(2, 2) -- 2 spider walkers with 2 leg pairs each
    AddWalkerType(3, 4) -- 4 attes with 3 leg pairs each
    AddWalkerType(1, 4)
    SetMemoryPoolSize("WalkerBlendUnit", 200)
    SetMemoryPoolSize("CommandHover", 6)
    SetMemoryPoolSize("CommandWalker", 4)
    SetMemoryPoolSize("EntityHover", 20)
    SetMemoryPoolSize("EntityFlyer", 20)
    SetMemoryPoolSize("EntityCarrier", 10)
--  SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
--  SetMemoryPoolSize("MountedTurret", 100)
--  SetMemoryPoolSize("SoundSpaceRegion", 81)
    SetMemoryPoolSize("PowerupItem", 60)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("Aimer", 160)
    SetMemoryPoolSize("Obstacle", 725)
    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:Nab3\\Nab3.lvl")
    SetDenseEnvironment("true")
  --AddDeathRegion("Sarlac01")
  --SetMaxFlyHeight(90)
  --SetMaxPlayerFlyHeight(90)

13.   Now, save the files. Choose Clean Test1 and then Munge Test1. When you are all done, copy the folder in BFBuilder\AddOn into the SWBF game add-on folder Program Files\LucasArts\Star Wars Battlefront\GameData\AddOn.

Now that's it! Play the game and test it out! Any added vehicles should spawn. Now you can make maps with many vehicles! You are one step closer to becoming a better mapper. Help others that need help with this as well!

(Note: This tutorial may have resemblances to Saturn_V_SWBF's tutorial thread on Want to add a Vehicle to your map? Here's how.... It is not a copy of his thread, but a more thorough tutorial, released for many to read, in an easy format to read. I did not look at what he had typed and copied any of it, save maybe one directory line. This is completely original. His thread was used to check to see if I had left out anything.)




Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet