Page 1 of 4

setting up elevators? how?

Posted: Sat May 03, 2003 3:24 pm
by ColJack
i want to include an elevator from one elevation on my map to another, i have made it the same as the elevator in the toxic caves, and have put the zselev01 spatial scritp inside the lift like it has in the toxic caves.. but my lifts don't work.
i've looked in the script files for the toxic caves map and it is not defined there, and i have looked in the header files it includes, and the definition is not there either.
there is no option to set the destinstipn map / elevation in the lift's script, or in the zselev01 script..
so where do you set it?
since a lift can have multiple destinations, then how do you set it up???

also, i have set librarian mode to 1 in the cfg file, should it open another menu or something since it still looks the same and i still cannot edit proto's..

Posted: Sun May 04, 2003 2:45 am
by Red
The new menu is with librarian_override=1, which you don't want as then you can't save maps.

I don't know about the elevetors, sorry... I think though that the Toxic caves one might only have a single exit option though it might still pop up the elevator buttons thing.

Posted: Sun May 04, 2003 12:29 pm
by ColJack
i found a tile in the scenery list that says elevator stub.. but it doesn't put anything on the map, like the blocker tiles or the light scource, just a red hex on the grid. ( yes i know about the "toggle show blockers" option in the menu. )
since it has no tile, or even a hidden tile, i cannot select it to edit it, if indeed it has variables to edit.. or to delete it even...???

i think i might try making a simple map and save it as the toxic caves map to see if it is hard coded... something to do with the map index no's??

Posted: Sun May 04, 2003 1:31 pm
by Red
Simple solution, replace the elevstub.frm with another frm (I suggest an unused art one as otherwise you might get confused on existing maps.

Still need to figure out the relation between the stub and the spatial script (ie: why does it choose that stub rather then another in a map where there are two stubs, like in SAD).

Also, how 4level elevators work together, since there's no map specified in the elevator stub, just the type of panel you see and which level you're currently on.

Posted: Sun May 04, 2003 8:49 pm
by ColJack
woot? i never even managed to select the damn thing to edit it... how did you get into it??
do you have to give it a number? then it would just look for that number on another map??
i dunno.. i'm just guessing..

Posted: Sun May 04, 2003 11:16 pm
by Red
Red wrote:Simple solution, replace the elevstub.frm with another frm (I suggest an unused art one as otherwise you might get confused on existing maps.
Your avatar is quite appropriate this time :)

Posted: Sun May 04, 2003 11:32 pm
by ColJack
yer.. i got it after i replied.. just change the actual art file for it..
i though you ment doing it in the proto edit bit where you can cycle through the images ..
i made my own.. a hex with elvstb in it.. works great.. now that i can get into it to edit it..

i've had a look at the maps, and come up with a bit of a list of types.. but it looks like the types are coded somewhere..

i made a test map, and got the elevator working, sort of..
i walked in, and the buttons came up, but when i pressed for the next floor down ( yes i set up the other elevators on the other levels ) it sent me to the second floor of vault 13... ( type 8 )

Posted: Mon May 05, 2003 12:10 am
by Red
Yeah, that's actually something that scares me... Wether they're hardcoded... I did a search in the .EXE and there's nothing specific to vault13/v13 so I don't know.

Here's the list of types, from DEFINE.H:
#define ELEV_BOS1 (0) // Brotherhood of Steel main elevator
#define ELEV_BOS2 (1) // Brotherhood of Steel surface elevator
#define ELEV_MASTR1 (2) // Master's upper-level elevator
#define ELEV_MASTR2 (3) // Master's lower-level elevator
#define ELEV_MILB1 (4) // Military Base upper-level elevator
#define ELEV_MILB2 (5) // Military Base lower-level elevator
#define ELEV_GLOW1 (6) // Glow Elevator upper
#define ELEV_GLOW2 (7) // Glow elevator lower
#define ELEV_VAULT (8) // Vault13 elevator
#define ELEV_NECVLT (9) // Necropolis elevator
#define ELEV_SIERRA1 (10) // Sierra Elev 1 (1-2-3)
#define ELEV_SIERRA2 (11) // Sierra Elev 2 (3-4)
#define ELEV_SIERRAS (12) // Sierra Service Elev (1-2-3-4)

Note that there are others:
18,19,20,21: Navaro elevators
22: SF BOS elevator

I'm starting to wonder wether the game actually looks at all the maps until it finds the first match of an elevator of the same type? Although still, how would it know which graphic to draw... I need to actually do some tests...

Posted: Mon May 05, 2003 12:29 am
by ColJack
i've just gone through all of the types ( 23 types ) and where the buttons take you..
looks like it might be hard coded to go to specific map indexes.. type 1 ( i forgot to check if there was a type 0.. duh.. ) goes to the klamath still map with the "G" button, and the Klamath Grazing map ( torr bug men map ) with the "1" button, so it looks about right.. one would have been the BOS surface map, the other the first level of the BOS bunker...

so it looks like we ought to make a list of elevator types and where they go ( both the map name, and the index number), so people can use them in a mod.. or re-name their maps to suit what type of elevator they want.. ( the easy way without editing the maps.txt file )

on a side note, where in the world are you?
i only ask so i got a rough idea what times my end i can reasonably expect a reply.. since i'm on GMT..
it's zero dark 29 here... ( 0:29 )

Posted: Mon May 05, 2003 1:42 am
by Red
EST, 8:45pm/20:45; seeing my title you should have a pretty good idea where I'm at, specially adding I speak French. I beleive replied about 15 minutes after you I beleive...

Drats, hardcoded in the maps.txt numbers, why didn't I see that... That darn arroyo hardcoded map start map confused me :P.

So I take it after those numbers it just stops working?

Way I see it though it'll probably be handyer to actually edit maps.txt even though it entails other big changes.

Posted: Mon May 05, 2003 9:00 am
by ColJack
Red wrote:EST, 8:45pm/20:45; seeing my title you should have a pretty good idea where I'm at, specially adding I speak French. I beleive replied about 15 minutes after you I beleive...
i didn't mean you were slow in responding mate.. i meant that i wanted to know roughly what times i could expect an answer from you.. like i don't expect you to answer in the middle of the night..

as for your title, i though that might be a refference to the canadian occupation in the fallout story.

i'll get a table put together on my website with the elevator types and destinaton map names and indexes..

Posted: Mon May 05, 2003 12:29 pm
by ColJack
Red wrote:Yeah, that's actually something that scares me... Wether they're hardcoded... I did a search in the .EXE and there's nothing specific to vault13/v13 so I don't know.

Here's the list of types, from DEFINE.H:
#define ELEV_BOS1 (0) // Brotherhood of Steel main elevator
#define ELEV_BOS2 (1) // Brotherhood of Steel surface elevator
#define ELEV_MASTR1 (2) // Master's upper-level elevator
#define ELEV_MASTR2 (3) // Master's lower-level elevator
#define ELEV_MILB1 (4) // Military Base upper-level elevator
#define ELEV_MILB2 (5) // Military Base lower-level elevator
#define ELEV_GLOW1 (6) // Glow Elevator upper
#define ELEV_GLOW2 (7) // Glow elevator lower
#define ELEV_VAULT (8) // Vault13 elevator
#define ELEV_NECVLT (9) // Necropolis elevator
#define ELEV_SIERRA1 (10) // Sierra Elev 1 (1-2-3)
#define ELEV_SIERRA2 (11) // Sierra Elev 2 (3-4)
#define ELEV_SIERRAS (12) // Sierra Service Elev (1-2-3-4)

Note that there are others:
18,19,20,21: Navaro elevators
22: SF BOS elevator

I'm starting to wonder wether the game actually looks at all the maps until it finds the first match of an elevator of the same type? Although still, how would it know which graphic to draw... I need to actually do some tests...
and yet it doesn't mention the other elevators..
maybe you're right...
it might look for instances of a type, and set the drawing from the elevation data.. ie type 29 has 2 stops.. 0 and 1, so it puts a G, 1 control on.. type 30 has 4 stops.. on 2 different maps.. so it puts 1,2,3,4 controls on.. type 38 has 3 stops but on levels 0, 1, and 5.. so it puts 1,2,5 controls on.. and so on..

it might do that when you do a rebuild ALL maps thing..i'll give it a try.. and get back to you...

Posted: Mon May 05, 2003 12:58 pm
by Red
ColJack wrote:i didn't mean you were slow in responding mate.. i meant that i wanted to know roughly what times i could expect an answer from you.. like i don't expect you to answer in the middle of the night..
And I meant it in an easy way to relatte my time to your time... Ie: 0:30 == 20:30 my time, whilst removing said 15 minutes.

And I doubt it works the way I epxlained, since some elevators (say BOS) have specific graphics...

But well, you never know :)

Posted: Mon May 05, 2003 1:40 pm
by ColJack
it was a little over an hour according to the time stamp on the reply..

i just tried adding an elevator to an existing map, with a new type number, and no dice.. it has to be in a file somewhere.. or hardcoded into the engine... ( god i hope not.. 23 elevator types.. and only a few of each type.. )

Posted: Mon May 05, 2003 10:37 pm
by Red
You can be quite certain it is... I've never seen anything in the files expanding on elevators... They're pretty non-standard too...

Posted: Mon May 05, 2003 11:01 pm
by ColJack
ah well, nevermind then..

but on a side note, how did they add elevators to fallout 2 that were not in fallout 1.. and at least 1 elevator is missing.. the 4,5,6 one from the glow..
unless it is something stupid like 36.. since i only tried a few past 24, and assumed that they would be sequential..

there is a section in one of the header files that says "elevator defines" but it's blank.. so i'm wondering if it was done at a late date and is in the compiled script for zselev01..??? ( they do say we don't have the scource.. just what they could gather together.. )

gonna get me a de-compiler and have a look at that script..

Posted: Tue May 06, 2003 12:47 am
by Red
Originally the elevators were mostly scripted I beleive. Either way, they hardcoded it in FO2 so it barely makes a difference. They had full source code of Fallout so it wouldn't have been a problem to add new elevators they wanted...

As for the missing Glaw elevator, chances are it got "overridden" by the newer elevators (eg: SAD).

Posted: Tue May 06, 2003 2:46 am
by TryKos
Such a pity, that Fallout engine hasn't commands to draw graphics on screen, something such as DrawFRM(name,x,y) and mouse-reading proc (GetMouseXY)... then making of new elevators would be piece of cake 8(

But we have that we have. So we can get perverted 8) and make maybe not funky, but working elevators. Spatial script to move to between 2 levels is easy thing. Multi-level elevators can be maked by keycards - just use specific keycard on elev - and we are on needed floor. I think its very logical and easy solution.

Posted: Tue May 06, 2003 7:46 pm
by Jargo
Such a pity, that Fallout engine hasn't commands to draw graphics on screen, something such as DrawFRM(name,x,y) and mouse-reading proc (GetMouseXY)... then making of new elevators would be piece of cake 8(

well you are wrong
Fallout script can draw on scren using commands like this:
createwin
(this is list of all non typical commands from Noid compiler )

"callstart" => [ 1, 0x8008, false ],
"exec" => [ 1, 0x8009, false ],
"spawn" => [ 1, 0x800a, false ],
"fork" => [ 1, 0x800b, false ],
"exit" => [ 0, 0x800e, false ],
"detach" => [ 0, 0x800f, false ],
"floor" => [ 1, 0x8044, true ],
"wait" => [ 1, 0x8047,true ]
"cancel" => [ 1, 0x8048, false ],
"cancelall" => [ 0, 0x8049, false ],
"startcritical" => [ 0, 0x804a, false ],
"endcritical" => [ 0, 0x804b, false ],
"sayquit" => [ 0, 0x804c, false ],
"sayend" => [ 0, 0x804d, false ],
"saystart" => [ 0, 0x804e, false ],
"saystartpos" => [ 1, 0x804f, false ],
"sayreplytitle" => [ 1, 0x8050, false ],
"saygotoreply" => [ 1, 0x8051, false ],
"sayreply" => [ 2, 0x8052, false ],
"sayoption" => [ 2, 0x8053, false ],
"saymessage" => [ 2, 0x8054, false ],
"sayreplywindow" => [ 5, 0x8055, false ],
"sayoptionwindow" => [ 5, 0x8056, false ],
"sayborder" => [ 2, 0x8057, false ],
"sayscrollup" => [ 6, 0x8058, false ],
"sayscrolldown" => [ 6, 0x8059, false ],
"sayspacing" => [ 1, 0x805a, false ],
"sayoptioncolor" => [ 3, 0x805b, false ],
"sayreplycolor" => [ 3, 0x805c, false ],
"sayrestart" => [ 0, 0x805d, false ],
"saygetlastpos" => [ 0, 0x805e, false ],
"sayreplyflags" => [ 1, 0x805f, false ],
"sayoptionflags" => [ 1, 0x8060, false ],
"saymessagetimeout" => [ 1, 0x8061, false ],
"createwin" => [ 5, 0x8062, false ],
"deletewin" => [ 1, 0x8063, false ],
"selectwin" => [ 1, 0x8064, false ],
"resizewin" => [ 5, 0x8065, false ],
"scalewin" => [ 5, 0x8066, false ],
"showwin" => [ 0, 0x8067, false ],
"fillwin" => [ 3, 0x8068, false ],
"fillrect" => [ 7, 0x8069, false ],
"fillwin3x3" => [ 1, 0x806a, false ],
"display" => [ 1, 0x806b, false ],
"displaygfx" => [ 5, 0x806c, false ],
"displayraw" => [ 1, 0x806d, false ],
"loadpalettetable" => [ 1, 0x806e, false ],
"fadein" => [ 1, 0x806f, false ],
"fadeout" => [ 1, 0x8070, false ],
"gotoxy" => [ 2, 0x8071, false ],
"print" => [ 1, 0x8072, false ],
"format" => [ 6, 0x8073, false ],
"printrect" => [ 3, 0x8074, false ],
"setfont" => [ 1, 0x8075, false ],
"settextflags" => [ 1, 0x8076, false ],
"settextcolor" => [ 3, 0x8077, false ],
"sethighlightcolor" => [ 3, 0x8078, false ],
"stopmovie" => [ 0, 0x8079, false ],
"playmovie" => [ 1, 0x807a, false ],
"movieflags" => [ 1, 0x807b, false ],
"playmovierect" => [ 5, 0x807c, false ],
"playmoviealpharect" => [ 2, 0x807d, false ],
"maybe_807e" => [ 0, 0x807e, false ],
"addregionflag" => [ 2, 0x8080, false ],
"addregionproc" => [ 5, 0x8081, false ],
"addregionrightproc" => [ 2, 0x8082, false ],
"deleteregion" => [ 1, 0x8083, false ],
"activateregion" => [ 2, 0x8084, false ],
"checkregion" => [ 1, 0x8085, false ],
"addbutton" => [ 5, 0x8086, false ],
"addbuttontext" => [ 2, 0x8087, false ],
"addbuttonflag" => [ 2, 0x8088, false ],
"addbuttongfx" => [ 4, 0x8089, false ],
"addbuttonproc" => [ 5, 0x808a, false ],
"addbuttonrightproc" => [ 3, 0x808b, false ],
"deletebutton" => [ 1, 0x808c, false ],
"hidemouse" => [ 0, 0x808d, false ],
"showmouse" => [ 0, 0x808e, false ],
"mouseshape" => [ 3, 0x808f, false ],
"refreshmouse" => [ 1, 0x8090, false ],
"setglobalmousefunc" => [ 4, 0x8091, false ],
"addnamedevent" => [ 2, 0x8092, false ],
"addnamedhandler" => [ 2, 0x8093, false ],
"clearnamed" => [ 1, 0x8094, false ],
"signalnamed" => [ 1, 0x8095, false ],
"addkey" => [ 2, 0x8096, false ],
"deletekey" => [ 1, 0x8097, false ],
"soundplay" => [ 2, 0x8098, true ],
"soundpause" => [ 1, 0x8099, false ],
"soundresume" => [ 1, 0x809a, false ],
"soundstop" => [ 1, 0x809b, false ],
"soundrewind" => [ 1, 0x809c, false ],
"sounddelete" => [ 1, 0x809d, false ],
"setoneoptpause" => [ 1, 0x809e, false ],
"selectfilelist" => [ 2, 0x809f, true ],
"tokenize" => [ 3, 0x80a0, true ],

Posted: Tue May 06, 2003 10:30 pm
by Red
There are some pretty standard ones in there... I'm wondering wether you just pasted a semi-random portion of it...

Anyhoo, indeed, there are quite a few non-standard commands which might be of some use to use, but note the apparant lack of any input commands? Without user feedack, showing graphics is close to pointless.

That and still we'd probably need to do some extensive testing to make sure it all works properly which involves a lot of work but is indeed doable.