i have created a side called vehicles in my side folder but i do not really know how to edit the lua part......when adding the readdatafile ("side\\rep.lvl" bit do i only need to replace the rep.lvl with vehicles.lvl and add the name of the vehicle or do i create a new readdatafile .lvl?
also what new lines do i add to the lua for command vehicles like atte's and atat's?
sorry for asking all these questions but i am a newby and have only been modding for 1 week..
custom vehicles....
Moderator: Moderators
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: custom vehicles....
if you want rep soldiers in your map then you need to keep the line that says ReadDataFile("SIDE\\rep.lvl",
to add your new side put this ReadDataFile("dc:SIDE\\(3 letter side name).lvl",
right before this line
ReadDataFile("SIDE\\cis.lvl",
in order to add in vehicles you must call them in the .lua by putting their .odf names with quotes and a ,
ie
ReadDataFile("dc:SIDE\\(3 letter side name).lvl",
"vehicle1_name",
"vehicle2_name",
"vehicle3_name")
put in the parentheses when you are done
in order to add command vehicles you must put this line
SetMemoryPoolSize("CommandWalker", #)
SetMemoryPoolSize("CommandFlyer", #)
after this line
SetMemoryPoolSize("Aimer", 75)
obviously #= a number and
CommandWalker is for Walkers
Flyers is for flyers
and just a side note you can put the SetMemory Pool lines pretty much anywhere is Script Post Load (few exceptions) but just put it after the line I told you too and you'll be fine
to add your new side put this ReadDataFile("dc:SIDE\\(3 letter side name).lvl",
right before this line
ReadDataFile("SIDE\\cis.lvl",
in order to add in vehicles you must call them in the .lua by putting their .odf names with quotes and a ,
ie
ReadDataFile("dc:SIDE\\(3 letter side name).lvl",
"vehicle1_name",
"vehicle2_name",
"vehicle3_name")
put in the parentheses when you are done
in order to add command vehicles you must put this line
SetMemoryPoolSize("CommandWalker", #)
SetMemoryPoolSize("CommandFlyer", #)
after this line
SetMemoryPoolSize("Aimer", 75)
obviously #= a number and
CommandWalker is for Walkers
Flyers is for flyers
and just a side note you can put the SetMemory Pool lines pretty much anywhere is Script Post Load (few exceptions) but just put it after the line I told you too and you'll be fine
- Superm9
- Second Lance Corporal

- Posts: 104
- Joined: Thu Aug 23, 2007 8:41 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: custom vehicles....
Technically correct, except I think he was looking for a bit less jargon.YaNkFaN wrote:if you want rep soldiers in your map then you need to keep the line that says ReadDataFile("SIDE\\rep.lvl",
to add your new side put this ReadDataFile("dc:SIDE\\(3 letter side name).lvl",
right before this line
ReadDataFile("SIDE\\cis.lvl",
in order to add in vehicles you must call them in the .lua by putting their .odf names with quotes and a ,
ie
ReadDataFile("dc:SIDE\\(3 letter side name).lvl",
"vehicle1_name",
"vehicle2_name",
"vehicle3_name")
put in the parentheses when you are done
in order to add command vehicles you must put this line
SetMemoryPoolSize("CommandWalker", #)
SetMemoryPoolSize("CommandFlyer", #)
after this line
SetMemoryPoolSize("Aimer", 75)
obviously #= a number and
CommandWalker is for Walkers
Flyers is for flyers
and just a side note you can put the SetMemory Pool lines pretty much anywhere is Script Post Load (few exceptions) but just put it after the line I told you too and you'll be fine
For adding new vehicles, first ensure that you have that side's "side" file copied over correctly; read this skinning tutorial:
http://www.gametoast.com/forums/viewtop ... =27&t=3726
it explains pretty well how to add the side folder correctly. After you accomplish this, follow the instructions in the Getting Started guide that comes with the modtools on adding vehicle spawns. I reccommend starting out with the vehicles that are already loaded in your .lua (as you know those work). When you want to add new vehicles to the .lua (so that you can spawn them using the vehicle spawns), just add the name of the vehicle's .odf file (for example, "rep_hover_barcspeeder") exactly as the other ones are in the .lua.
If you need more help, just post here!
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: custom vehicles....
thanks yankfan and superm9 for that help.
with the side.lvl file does it have to be 3 letters because i have just called the side vehicles, so would it therefore be vehicles.lvl or would i need to shorten the side name??
BTW i already know how to add vehicles and have aded about 100 to my map lol so no need to get super simple, but i don't mind if you do...
also i have been having issues with my map crashing. i only have 2 severity errors, i will post them up.
There are several other errors that pop up but they have nearly always bee there and would not cause it, they are something to do with the HUD.
the game works fine on GCW but CW crashes halfway through the load screen. i have not touched any weapons in my map so i think it has something to do with the ClothData......
Here is my CW .lua
with the side.lvl file does it have to be 3 letters because i have just called the side vehicles, so would it therefore be vehicles.lvl or would i need to shorten the side name??
BTW i already know how to add vehicles and have aded about 100 to my map lol so no need to get super simple, but i don't mind if you do...
also i have been having issues with my map crashing. i only have 2 severity errors, i will post them up.
Code: Select all
Message Severity: 2
.\Memory\RedMemoryPool.cpp(317)
Memory pool "ClothData" set item count after being allocated
Message Severity: 3
.\Source\weapon.cpp(1604)
Weapon base class "com_weap_inf_lightsaber" not foundthe game works fine on GCW but CW crashes halfway through the load screen. i have not touched any weapons in my map so i think it has something to do with the ClothData......
Here is my CW .lua
Hidden/Spoiler:
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: custom vehicles....
here's one problem with your.lua
"rep_hover_swampspeeder_2man",
"rep_walk_atxt"
must be changed to
"rep_hover_swampspeeder_2man",
"rep_walk_atxt" )
try that and see if it works
and also for that error you must i repeat must copy the common folder from assets/sides into data_abc/sides this is a must remunge and try with the fixed .lua as well
"rep_hover_swampspeeder_2man",
"rep_walk_atxt"
must be changed to
"rep_hover_swampspeeder_2man",
"rep_walk_atxt" )
try that and see if it works
and also for that error you must i repeat must copy the common folder from assets/sides into data_abc/sides this is a must remunge and try with the fixed .lua as well
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: custom vehicles....
ok i'll try that.
thanks....
thanks....
