Page 1 of 2
Problems with "tall" space maps & spawning [solved]
Posted: Fri Apr 16, 2010 9:03 pm
by stardestroyer001
It seems, when testing my map, the troopers in the Venator high above the rest of the battle insta-die when they spawn in. I double-checked the LUA file (particularily the line SetPlayerMax and SetPlayerFlyMax or something) and entered an insanely large number and still this problem occurs. The other side (CIS) spawns in fine, yet when I take a ship up to the Venator, land in the hangar bay, and exit, I die as well. What is going on and how can I fix this?
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 8:08 am
by MercuryNoodles
Battlefront II Space LUA Guide.doc wrote:>>SetWorldExtents and ScriptPreInit go hand in hand. When building a Space level, you may notice that when you exit your ship you instantly die. You also might find that running around certain parts of your ship you will die without taking damage. That’s what SetWorldExtents is for. If you have this set to 2500, but you’re still finding that the world is killing you (and you’re not walking into a death region) then bump it up to enlarge the soldier based playable space.
function ScriptPreInit()
SetWorldExtents(2500)
end
Try increasing that number a few times, and see if that helps.
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 4:59 pm
by stardestroyer001
I did this and now the level refuses to load, it crashes back to desktop.
I'll do some tinkering and try to see what the problem is.
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 6:05 pm
by Eggman
How high did you set it? If you make the value too large, your map will crash.
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 6:31 pm
by stardestroyer001
I simply added another zero on the end of the number (2500 -> 25000)
Is there a "number limit" where if you go over it will probably crash?
(Also: how do I make the map larger, as in longer, so I can fit more stuff in?)
EDIT: I even tried 7500 and 5000, it still crashed.
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 7:08 pm
by MercuryNoodles
Try something less drastic. Increase the value incrementally until you get the desired result.
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 7:24 pm
by stardestroyer001
Now I'm confused. I reset the value to 2500 and it still crashes!
Since my map wasn't that good to start with (my first map) I'll just start over.
Does someone know how to make the map larger (more room to fly around in, increase the grid)?
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 8:02 pm
by MercuryNoodles
If it's crashing at the original SetWorldExtents value, then you have another problem that needs to be addressed. The last thing you want to do is make lots of changes while modding. It makes finding the cause of a problem that much harder. Generate an error log, and see if you have any errors that are Severity 3 or above.
Also, giving up after running into a problem is not a good philosophy. If you go that route, you'll never get a map to release quality. Crashing the game is just a fact of life in modding, and so is debugging. If you think it's a bad map, make it better.
Re: Problems with "tall" space maps & spawning
Posted: Sat Apr 17, 2010 10:08 pm
by stardestroyer001
I decided to start over because I realized the whole point of my map was to be as entertaining and canon as possible, and now that I step back and take a look I know it wouldn't do very well, to myself and to other gamers who want to play on my map.
Thanks everyone for your quick responses, I've definitely learned something new today.
EDIT: There seems to be a recurring problem, I've created another space map and it crashes to desktop as well. The only things I notably added other than stock rooms is another DeathRegion. [In my first map I didn't make new DeathRegions, only landing regions (rep_cp2spawn).] What's going on?
Re: Problems with "tall" space maps & spawning
Posted: Sun Apr 18, 2010 5:48 am
by MercuryNoodles
You need to generate an error log by running the map from the debug executable. The log would provide clues as to what's wrong.
Re: Problems with "tall" space maps & spawning
Posted: Sun Apr 18, 2010 11:01 am
by stardestroyer001
What is the "debug executable"?
If you're referring to "BF2_modtools.exe" in the BF2_ModTools directory, it doesn't work.
EDIT: Okay, I guess it did. Here's what it said:
______________________________________________________________________
Opened logfile BFront2.log 2010-04-18 1140
Message Severity: 3
.\Source\GameState.cpp(1562)
Could not open core.lvl
Message Severity: 3
.\Source\GameState.cpp(1609)
Could not open common.lvl
Message Severity: 3
.\Source\ShellLoop.cpp(281)
Could not open shell.lvl
Message Severity: 3
.\Source\LuaScript.cpp(435)
Script file shell_interface not found
______________________________________________________________________
This log was for the second (latest) map I made.
After renaming the log and running BF2_modtools.exe again, I tried to find the problem for my first map. I select my first map, select Assault, add it, and press Launch. The program, after blacking out for a second (still with the console down), abruptly closed with no indication of a log being made.
Edit #2: Sorry, it was my second map that closed the debug program, the error log report above belongs to my first map.
Re: Problems with "tall" space maps & spawning
Posted: Sun Apr 18, 2010 12:18 pm
by 501st_commander
It looks like it not copying the map's .lvl files over.
Re: Problems with "tall" space maps & spawning
Posted: Sun Apr 18, 2010 12:57 pm
by stardestroyer001
I suppose so, other than the various folders (### and in one of them SIDE) there is only mission.lvl and core.lvl in the mod's folder (in the Addon folder).
Re: Problems with "tall" space maps & spawning
Posted: Sun Apr 18, 2010 7:58 pm
by lucasfart
I'm guessing you stopped a munge halfway through or something, because it doesn't seem like the munge has ceated/copied over all the files. Try a manual clean and munge, and it should work.....hopefully.
Re: Problems with "tall" space maps & spawning
Posted: Sun Apr 18, 2010 11:00 pm
by [RDH]Zerted
It looks like your game is completely broken. Can you run any map? Did you just install a shell related mod such as the Unofficial v1.3 path or the Conv. Pack?
Re: Problems with "tall" space maps & spawning
Posted: Mon Apr 19, 2010 7:44 am
by stardestroyer001
@lucasfart: Thanks, my first map now runs properly. Unfortunately the second one still crashes, even after manual-cleaning it twice. I'll look at it in ZeroEditor and try and find the problem.
Just asking: do I have to manual clean before applying new changes to my map or only if it has problems?
@[RDH]Zerted: Yes, I can run all stock and mod maps except the second map I made. I installed The Dark Times (found it on FileFront) and canceled it a quarter of the way through (it did say "Rolling back changes..." when I canceled it) and no apparent changes have been observed. Other than that no changes to core files have been made.
Re: Problems with "tall" space maps & spawning
Posted: Mon Apr 19, 2010 8:36 am
by Eggman
stardestroyer001 wrote:
Just asking: do I have to manual clean before applying new changes to my map or only if it has problems?
No. The only time you should really need to do a clean or manual clean is when files aren't munging properly for some reason, or in the words of Teancum, when you munge and have all sorts of really wild errors. So basically, if your map works, don't do a manual clean.
Re: Problems with "tall" space maps & spawning
Posted: Tue Apr 20, 2010 7:58 am
by stardestroyer001
@Eggman: Ok, thanks. I'll keep that in mind.
There are still problems with both maps. The first map works, however I cannot spawn in and live, even after raising the roof a lot and fixing SetWorldExtents to 15000. The second map mysteriously crashes, and the debug program refuses to make another BFront.log. I have (already) decided my first map is a sandbox, so if anyone can help with the second map, that would be greatly appreciated.
What's changed in the second map (from default set to what it is now):
-two extra CIS Bridges (Team 0)
-extra roof chainguns (Team 2)
-Mustafar rooms, windows, doors, and hallways
-Endor bunker hallways, rooms, generator room
-Invisible Hand moved to near edge of map, but not off the map or touching the edge
-along with Invisible Hand, all regions, spawn paths, CPs have been moved as well
-vehicle "arrows" have been moved too
-no more shield generator room, transplanted the SGblender to the Endor bunker power room, with DeathRegion moved there as well, deleted the CIS Shield generator room and spinny blade
Re: Problems with "tall" space maps & spawning
Posted: Tue Apr 20, 2010 4:39 pm
by Eggman
For the original problem of spawning, my experience has been that the maximum an minimum spawn heights are fixed - SetWorldExtents only seems to work horizontally, and MaxFlyHeight doesn't seem to affect the height at which you can spawn. Somebody would need to confirm all of this since it's been a long time since I've worked on a space map and I don't have access to the tools to test this right now, but if I'm not just imagining all this information, I think the max/min spawn heights are approximately 327 and -327, respectively (you'll notice these are the highest/lowest values that can appear in the height box for objects in ZE).
But yeah, I can't stress enough that someone would need to double-check this first, since it's based simply off of memory from when I had this same problem two or more years ago.
Re: Problems with "tall" space maps & spawning
Posted: Tue Apr 20, 2010 6:22 pm
by stardestroyer001
Okay, thanks, I'll lower the height of my ships and get back to you.
EDIT: Yes! My first map now works perfectly, as it seems that SetWorldExtents couldn't handle numbers higher than around 15000, and the spawn ship was too high. Now both sides spawn in properly and (once I learn how to path in Space) I can soon get all ships in the air and dogfighting. Again, a very big thanks to you and everyone who helped here.