Vehicle not spawning; Map crashes randomly

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Vehicle not spawning; Map crashes randomly

Post by Fingerfood »

Questions:
So I put some vehicle spawns in, fill in the labels, and try out my map. Now what do I see where I put my spawn node? NOTHING! Do I have to do something else to make vehicles spawn besides placing the node and filling out the labels?

Crash:
I play my map for a bit, but then it just randomly crashes. I DO NOT have a BF2_log or whatever, because I have my mod tools in a different location. In my map, I have a large body of water, and the map size is either 256x256 or 512x512. Also, in the past I have had trouble with lowering the terrain below 0, and I have A LOT of terrain below 0, could any or all of these factors cause the crash? And I haven't messed with any scripts or luas, fyi.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: A Q and a Crash = WAH!

Post by Maveritchell »

Fingerfood wrote:I play my map for a bit, but then it just randomly crashes. I DO NOT have a BF2_log or whatever, because I have my mod tools in a different location. In my map, I have a large body of water, and the map size is either 256x256 or 512x512. Also, in the past I have had trouble with lowering the terrain below 0, and I have A LOT of terrain below 0, could any or all of these factors cause the crash? And I haven't messed with any scripts or luas, fyi.
Water could cause it, if it's set up incorrectly. And why do you have your modtools in the wrong location? Just fix it and get a BF2log.
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Re: A Q and a Crash = WAH!

Post by Fingerfood »

I tried once, but it took a long time to copy everything andonce it copied, some programs didn't work. Strangely enough, when I copied it back it worked fine.

And I used this one by Ace:
Hidden/Spoiler:
[quote="AceMastermind"]Try this, it works everytime for me.

How to add water to your map(ponds, lakes, rivers....etc):
NOTE: "ABC" IS ONLY AN EXAMPLE OF A modID, your 3 letter name may be different.

We will use the water of Kashyyyk (kas2), of course it can be other maps used as the base file that also contain water.

First you have to open your "ABC.req" file (data_ABC/worlds/ABC/world1/ABC.req),in that file is where you have to set your water textures!

Then open kas2.req (Assets/Worlds/Kas/world2) and scroll down the column for:
[code]REQN {
"texture"
"platform=pc"[/code]

and just copy this part of kas2.req (Assets/Worlds/Kas/world2) then paste it in your ABC.req under "texture", then save it.

[code] "water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"[/code]

With your ABC.req still open scroll down to this section:
[code]REQN {
"envfx"
"ABC"
} [/code]
This section calls the envfx(environment effects) file and is called ABC.fx which has not been created yet.
We need another .fx file to know what it does.
We used Kashyyyk as the sample map so we have to go in the world folder of Kashyyyk (Assets/Worlds/Kas/World2) and search for the kas2.fx file then copy it and paste it into your:
data_ABC/worlds/ABC/world1 folder.
Now you have kas2.fx in your folder and have to rename it because your ModID(ABC) is not kas2 right?
Rename the kas2.fx file to ABC.fx.

Now open your ABC.fx file and scroll down to this section:

[code]PC()
{
Tile(2.0,2.0);
MainTexture("kas2_water.tga"); <================
LODDecimation(1);
RefractionColor(5, 217, 255, 255);
ReflectionColor(57,90,138,255);
UnderwaterColor(61, 124, 144, 128);
FresnelMinMax(0.3,0.6);
FarSceneRange(1500)[/code]

The file needs a texture called: kas2_water.tga

Now go to:
Assets/Worlds/Kas/world2
folder and search for this .tga and copy it into your:
data_ABC/worlds/ABC/world1 folder!

You also have to copy the other necessary files!
Go to:
assets/worlds/kas/effects/PC
and copy the whole "PC" folder which contains all of the files required for water to work, and paste it into your:
data_ABC/worlds/ABC/effects folder!
If you don't have an effects folder in data_ABC/worlds/ABC then create one.


Now you have to place water on your map using ZeroEditor:

1. Click on the Water edit mode between Texture and Foliage
2. You see on the left side a box with fields to change. Make these changes:
width = "1" and depth = "1"
Layer = "1"
u vel = "0.02" and v vel = "0.02" (This helps to modify it for waves, if required)
u rept = "1" and v rept = "1"
texture = blank (Don't fill anything in there)
color = 0, 0, 200
alpha = 255 (Alpha is the transparency of the water. 0 = Invisible, 255 = Completely Visible)
glow = off <------unused

Add water as you would texture the terrain.
Save world, munge and try it out!

Rippentuck's original tutorial[/quote]
I did have to add some indents to some lines, but that shouldn't affect it, should it?

Here's my req.
Hidden/Spoiler:
[code]ucft
{
REQN
{
"config"
}

REQN
{
"texture"
"TGL_map"
"platform=pc"
"height0"
"fractal0"
"noise0"
"diffuse0"
"diffuse1"
"diffuse2"
"diffuse3"

"water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"
}
REQN
{
"path"
"TGL"
}
REQN
{
"congraph"
"TGL"
}
REQN
{
"envfx"
"TGL"
}
REQN
{
"world"
"TGL"
}
REQN
{
"prop"
"TGL"
}
REQN
{
"class"
"bluelight"
"redlight"
"greenlight"
"whitelight"
}
REQN
{
"config"
"flyerspray"
"walkerstomp"
"hailfire_wake"
}
REQN
{
"lvl"
"TGL_conquest"
"TGL_ctf"
}
}[/code]
Penguin
Jedi Admin
Jedi Admin
Posts: 2541
Joined: Sun Mar 05, 2006 12:00 am
Location: Australia

Re: A Q and a Crash = WAH!

Post by Penguin »

Fingerfood wrote:I tried once, but it took a long time to copy everything andonce it copied, some programs didn't work. Strangely enough, when I copied it back it worked fine.

And I used this one by Ace:
Hidden/Spoiler:
[quote="AceMastermind"]Try this, it works everytime for me.

How to add water to your map(ponds, lakes, rivers....etc):
NOTE: "ABC" IS ONLY AN EXAMPLE OF A modID, your 3 letter name may be different.

We will use the water of Kashyyyk (kas2), of course it can be other maps used as the base file that also contain water.

First you have to open your "ABC.req" file (data_ABC/worlds/ABC/world1/ABC.req),in that file is where you have to set your water textures!

Then open kas2.req (Assets/Worlds/Kas/world2) and scroll down the column for:
[code]REQN {
"texture"
"platform=pc"[/code]

and just copy this part of kas2.req (Assets/Worlds/Kas/world2) then paste it in your ABC.req under "texture", then save it.

[code] "water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"[/code]

With your ABC.req still open scroll down to this section:
[code]REQN {
"envfx"
"ABC"
} [/code]
This section calls the envfx(environment effects) file and is called ABC.fx which has not been created yet.
We need another .fx file to know what it does.
We used Kashyyyk as the sample map so we have to go in the world folder of Kashyyyk (Assets/Worlds/Kas/World2) and search for the kas2.fx file then copy it and paste it into your:
data_ABC/worlds/ABC/world1 folder.
Now you have kas2.fx in your folder and have to rename it because your ModID(ABC) is not kas2 right?
Rename the kas2.fx file to ABC.fx.

Now open your ABC.fx file and scroll down to this section:

[code]PC()
{
Tile(2.0,2.0);
MainTexture("kas2_water.tga"); <================
LODDecimation(1);
RefractionColor(5, 217, 255, 255);
ReflectionColor(57,90,138,255);
UnderwaterColor(61, 124, 144, 128);
FresnelMinMax(0.3,0.6);
FarSceneRange(1500)[/code]

The file needs a texture called: kas2_water.tga

Now go to:
Assets/Worlds/Kas/world2
folder and search for this .tga and copy it into your:
data_ABC/worlds/ABC/world1 folder!

You also have to copy the other necessary files!
Go to:
assets/worlds/kas/effects/PC
and copy the whole "PC" folder which contains all of the files required for water to work, and paste it into your:
data_ABC/worlds/ABC/effects folder!
If you don't have an effects folder in data_ABC/worlds/ABC then create one.


Now you have to place water on your map using ZeroEditor:

1. Click on the Water edit mode between Texture and Foliage
2. You see on the left side a box with fields to change. Make these changes:
width = "1" and depth = "1"
Layer = "1"
u vel = "0.02" and v vel = "0.02" (This helps to modify it for waves, if required)
u rept = "1" and v rept = "1"
texture = blank (Don't fill anything in there)
color = 0, 0, 200
alpha = 255 (Alpha is the transparency of the water. 0 = Invisible, 255 = Completely Visible)
glow = off <------unused

Add water as you would texture the terrain.
Save world, munge and try it out!

Rippentuck's original tutorial

I did have to add some indents to some lines, but that shouldn't affect it, should it?

Here's my req.
Hidden/Spoiler:
[code]ucft
{
REQN
{
"config"
}

REQN
{
"texture"
"TGL_map"
"platform=pc"
"height0"
"fractal0"
"noise0"
"diffuse0"
"diffuse1"
"diffuse2"
"diffuse3"

"water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"
}
REQN
{
"path"
"TGL"
}
REQN
{
"congraph"
"TGL"
}
REQN
{
"envfx"
"TGL"
}
REQN
{
"world"
"TGL"
}
REQN
{
"prop"
"TGL"
}
REQN
{
"class"
"bluelight"
"redlight"
"greenlight"
"whitelight"
}
REQN
{
"config"
"flyerspray"
"walkerstomp"
"hailfire_wake"
}
REQN
{
"lvl"
"TGL_conquest"
"TGL_ctf"
}
}[/code]
[/quote]

That tutorial is for SWBF 1
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: A Q and a Crash = WAH!

Post by AceMastermind »

Penguin wrote:That tutorial is for SWBF 1
No, this works fine in BF2, look at how the shipped worlds added water if you have any doubts.


There have been reports in the past that claim there were some problems when filling your whole world with water, so knowing this, you should only paint the water where you need it.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: A Q and a Crash = WAH!

Post by MercuryNoodles »

And I haven't messed with any scripts or luas, fyi.
The vehicle has to be loaded in the lua, and the appropriate memory pools have to be filled out.
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Re: A Q and a Crash = WAH!

Post by Fingerfood »

@Noodles: Oh..... Is there a chart or tut on that? Or is it in the docs...

@Ace: I haven't filled my world with water, but thre is a LOT.....
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: A Q and a Crash = WAH!

Post by woner11 »

Just like you do a unit, do a vehicle, with the whole readdata thing. Just don't put the vehicle on a specific team. Just do the ReadData thing.
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Re: A Q and a Crash = WAH!

Post by Fingerfood »

See..... I've never done anything with units....... except take a unit out. My biggest achievement is getting water in my map.......
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: A Q and a Crash = WAH!

Post by woner11 »

As for getting a log. I too have it installed in a different place. What you need to do is get a dedicated server, change the bat or create on, I can't fully remember to whatever your map and mode is. Put the map in the dedicated server's addon folder and run the bat file. (Just a note this isn't the dedicated server like online).
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: A Q and a Crash = WAH!

Post by MercuryNoodles »

Custom side tut

As for info on memory pools, they should be mentioned in the docs.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: A Q and a Crash = WAH!

Post by Aman/Pinguin »

Just wondering, whats so special when you have it installed in "a different place"? :|
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: A Q and a Crash = WAH!

Post by MercuryNoodles »

I'm glad someone caught that. The BFront2.log is created in the game's Gamedata directory where the executables are kept, if I remember correctly.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: A Q and a Crash = WAH!

Post by FragMe! »

Fingerfood wrote: Crash:
I play my map for a bit, but then it just randomly crashes. I DO NOT have a BF2_log or whatever, because I have my mod tools in a different location. In my map, I have a large body of water, and the map size is either 256x256 or 512x512. Also, in the past I have had trouble with lowering the terrain below 0, and I have A LOT of terrain below 0, could any or all of these factors cause the crash? And I haven't messed with any scripts or luas, fyi.
Putting things below zero height and having lots of water do not necessarily make a map crash. Case in point my Naboo Sewers map is 50% below 0 level and there is lots of water (hey it's a sewer :lol: ) What can cause random crashes without the log file reporting anything is moded sides or certain vehicles. Sometimes from a death animation not being there, from experience when trying to get the walking Bantha in game if it was self piloted it would die (with anims) and respawn no problem. When I tried just commenting out the self pilot line it would spawn once but as soon as it died and started going through the death anims the game would CTD. I will have to get back to you on what I had to fix to make it not CTD.

What vehicles are you trying to add?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: A Q and a Crash = WAH!

Post by Aman/Pinguin »

MercuryNoodles wrote:I'm glad someone caught that. The BFront2.log is created in the game's Gamedata directory where the executables are kept, if I remember correctly.
Ehm....Why not simply copy the BF2_modtools.exe to Star Wars Battlefront II\GameData?
I did the same and it works. (my location: F:\Programme\Star Wars Battlefront II\GameData)
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: A Q and a Crash = WAH!

Post by MercuryNoodles »

*slaps Pinguin with a trout* No redundancy! :P Mostly, I just wanted to call attention to how the location of the modtools isn't necessarily relevant, since the debug exe and the error log it creates are completely independent of the rest of the SDK.

While I'm here...Fingerfood contacted me on X-Fire, so I think the vehicle question has been resolved. Hopefully, my being half-awake didn't do any lasting damage. Heh.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: A Q and a Crash = WAH!

Post by Aman/Pinguin »

MercuryNoodles wrote:*slaps Pinguin with a trout*
*slaps MercuryNoodles with an elephant ear*
MercuryNoodles wrote:No redundancy! :P Mostly, I just wanted to call attention to how the location of the modtools isn't necessarily relevant, since the debug exe and the error log it creates are completely independent of the rest of the SDK.
Ah ok lol.
Sorry my english isn't good. :|
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: A Q and a Crash = WAH!

Post by MercuryNoodles »

Ah. I don't always catch on to who isn't a native English speaker. I knew that directory looked a little odd.. :P
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Re: A Q and a Crash = WAH!

Post by Fingerfood »

Well, I was half asleep too, but I did notice there was no vehicles...
But I'll have to mess with some MemoryPools and control regions later, as I'm off to play RedLine's New Death Star. :P
Post Reply