setting up elevators? how?
I mean in my post, that we dont have standard, described in any manual commands. Yes, I saw these in Noid compiler manual, but they can be some of "internal" commands, cannot say without testing. AFAIK almost all of them not used in Fallout 2 scripts at all.
If anyone can play with this commands ang get results - it will be very good.
If anyone can play with this commands ang get results - it will be very good.
In this world there are two kinds of people, my friend...those with Power of Moon Prism, and those who dig. You dig.
-
- SDF!
- Posts: 17
- Joined: Tue May 06, 2003 3:26 pm
- Location: Somewhere in france
all commands in noid's compiler are somewhere in the exe.
in uk exe, you'll find the "standard" commands init from 466C20 to 467118
you'll also find the basic scripts commands (like move_obj_inven_to_obj or metarule) init from 45CF88 to 45DA25.
In noid's compiler there's still some missing stuff...
in uk exe, you'll find the "standard" commands init from 466C20 to 467118
Code: Select all
00466C3A mov edx, offset sub_464594 ; deletebutton ; The address put in edx is the adress of the routine for the script command
00466C3F mov eax, 808Ch ;in eax you have the hex number corresponding to the command in the int file
00466C44 call sub_46E518 ;I think this call loads the command in memory, it's the same for all of them
In noid's compiler there's still some missing stuff...
- Red
- Hero of the Glowing Lands
- Posts: 2085
- Joined: Wed May 15, 2002 11:58 am
- Location: Nowhere (important anyway)
- Contact:
Yeah, he mentioned it wasn't complete... He worked with what he could and what he knew about from the EXE, KA Academy scripts and what was already documented for IPP. It brought him much closer to what IPP ever was and includes indeed includes commands which were never intended for normal scripters (at BIS/IPLY) to access.
Two questions:
Can the real BIS compiler recognize these commands, if so wouldn't it be eayser to check for them in that exe instead of Fallout2.exe?
And a third one, which debugger do you use that can actually save comments like that... There's nothing worst then working in MSDEV and not being able to leave comments anywhere... I also beleive the various exes include some debug information. It was compiled with Watcom so it should be something fairly standard... Is there a debugger that'll use this information isntead of the offsets where it can?
Two questions:
Can the real BIS compiler recognize these commands, if so wouldn't it be eayser to check for them in that exe instead of Fallout2.exe?
And a third one, which debugger do you use that can actually save comments like that... There's nothing worst then working in MSDEV and not being able to leave comments anywhere... I also beleive the various exes include some debug information. It was compiled with Watcom so it should be something fairly standard... Is there a debugger that'll use this information isntead of the offsets where it can?
...
I found that list in compile.exe :
loadpalettetable
displaygfx
selectwin
createwin
deletewin
resizewin
scalewin
showwin
fillwin
fillrect
fillwin3x3
display
displayraw
playmovie
playmoviealpha
playmoviealpharect
movieflags
playmovierect
stopmovie
print
format
printrect
setfont
settextflags
settextcolor
sethighlightcolor
gotoxy
addregion
addregionproc
addregionflag
addregionrightproc
deleteregion
activateregion
checkregion
fadein
fadeout
addbutton
addbuttontext
addbuttongfx
addbuttonproc
addbuttonflag
addbuttonrightproc
deletebutton
saystartpos
saystart
sayreply
saygotoreply
sayreplytitle
sayoption
sayend
sayquit
saymessage
sayreplyflags
sayoptionflags
sayreplywindow
sayoptionwindow
sayborder
sayscrollup
sayscrolldown
saysetspacing
sayoptioncolor
sayreplycolor
sayrestart
saygetlastpos
saymessagetimeout
hidemouse
showmouse
mouseshape
refreshmouse
setglobalmousefunc
addnamedevent
addnamedhandler
clearnamed
signalnamed
addkey
deletekey
soundplay
soundpause
soundresume
soundstop
soundrewind
sounddelete
setoneoptpause
selectfilelist
textshadow
textunderline
textmonospace
textdirect
textnofill
texttrunc
justifyleft
justifyright
justifycenter
soundnormal
soundloop
sound8bit
sound16bit
soundmemory
soundstreamed
soundmono
soundstereo
moviescale
moviedirect
moviecenter
moviesubtitle
mousepress
mouserelease
mouseon
mouseoff
mouseheld
mouseright
buttontab
regiontab
so i suppose you can use them.
I don't know how you could use debug informations in the exe... i think it would require some other files (like these files contained in the debug directory when you compile some project with vc++) ... my debugger is a classical one : softice, and the disassembler I use is IDA (according to me the best disassembler)
loadpalettetable
displaygfx
selectwin
createwin
deletewin
resizewin
scalewin
showwin
fillwin
fillrect
fillwin3x3
display
displayraw
playmovie
playmoviealpha
playmoviealpharect
movieflags
playmovierect
stopmovie
format
printrect
setfont
settextflags
settextcolor
sethighlightcolor
gotoxy
addregion
addregionproc
addregionflag
addregionrightproc
deleteregion
activateregion
checkregion
fadein
fadeout
addbutton
addbuttontext
addbuttongfx
addbuttonproc
addbuttonflag
addbuttonrightproc
deletebutton
saystartpos
saystart
sayreply
saygotoreply
sayreplytitle
sayoption
sayend
sayquit
saymessage
sayreplyflags
sayoptionflags
sayreplywindow
sayoptionwindow
sayborder
sayscrollup
sayscrolldown
saysetspacing
sayoptioncolor
sayreplycolor
sayrestart
saygetlastpos
saymessagetimeout
hidemouse
showmouse
mouseshape
refreshmouse
setglobalmousefunc
addnamedevent
addnamedhandler
clearnamed
signalnamed
addkey
deletekey
soundplay
soundpause
soundresume
soundstop
soundrewind
sounddelete
setoneoptpause
selectfilelist
textshadow
textunderline
textmonospace
textdirect
textnofill
texttrunc
justifyleft
justifyright
justifycenter
soundnormal
soundloop
sound8bit
sound16bit
soundmemory
soundstreamed
soundmono
soundstereo
moviescale
moviedirect
moviecenter
moviesubtitle
mousepress
mouserelease
mouseon
mouseoff
mouseheld
mouseright
buttontab
regiontab
so i suppose you can use them.
I don't know how you could use debug informations in the exe... i think it would require some other files (like these files contained in the debug directory when you compile some project with vc++) ... my debugger is a classical one : softice, and the disassembler I use is IDA (according to me the best disassembler)
-
- SDF!
- Posts: 17
- Joined: Tue May 06, 2003 3:26 pm
- Location: Somewhere in france
- Red
- Hero of the Glowing Lands
- Posts: 2085
- Joined: Wed May 15, 2002 11:58 am
- Location: Nowhere (important anyway)
- Contact:
Yeah, I've yet to install SoftIce (Last time I used it it was back in the DOS 5.0 days... sheesh], I don't know why I keep putting it off... Gives me an excuse not to reverse engeneer anything I guess .
There SHOULD be a way to access the simple debug info provided in the EXE itself given a debugger understands the format... I've debugged vcpp without the debug files and though it wasn't much help, it was a heck of a lot more useful then (not being able to) put comments everywhere since most calls actually had name rather then just offset, which is a bit more descriptive...
I tried using the openwatcom debugger but I think it's simply not compatible with the older version as it just crashes with the debug infor (while it worked fine on files without debug info). A guess though, might be something else for all I know right now.
Anyway the compiler accepting the commands is good news, another source to test things out. Right now I'm guessing most of the commands were actually used in the recording mode since the recording mode takes into account every letter you type, every mouse movement and the normal game... So the whole mouse* keysets might be used by it... Although why leave that in script rather then in real code? So I dunno...
There SHOULD be a way to access the simple debug info provided in the EXE itself given a debugger understands the format... I've debugged vcpp without the debug files and though it wasn't much help, it was a heck of a lot more useful then (not being able to) put comments everywhere since most calls actually had name rather then just offset, which is a bit more descriptive...
I tried using the openwatcom debugger but I think it's simply not compatible with the older version as it just crashes with the debug infor (while it worked fine on files without debug info). A guess though, might be something else for all I know right now.
Anyway the compiler accepting the commands is good news, another source to test things out. Right now I'm guessing most of the commands were actually used in the recording mode since the recording mode takes into account every letter you type, every mouse movement and the normal game... So the whole mouse* keysets might be used by it... Although why leave that in script rather then in real code? So I dunno...
...
getting back to the original track.. have you tried de-compiling the zselev01 script to see if the lifts are listed in there??
i tried to but i can't get the damn de-compiler to work..
there is a section in maps.h that says "elevator defines" but it is empty..
also the section you mentioned further up the thread are just number defines for the "elevator" command ( as ilustrated in the zselev01 script.. )
i tried to but i can't get the damn de-compiler to work..
there is a section in maps.h that says "elevator defines" but it is empty..
also the section you mentioned further up the thread are just number defines for the "elevator" command ( as ilustrated in the zselev01 script.. )
-
- Vault Veteran
- Posts: 292
- Joined: Fri Apr 19, 2002 11:51 am
'k Here's what I have so far.. [Fallout2.exe version is 1.02 US]
Everything is just a list- that is, everything is just [Data for elevator1][DataForElevator2], etc.
Buttons Count: 2ee1C (Fallout2.exe) 37ccc (mapper2.exe)
[00-03] # of buttons for each elevator
Elevator Image: 37c0c (mapper2.exe) 2ed5c (fallout2.exe)
[00-03] Base image to use (In \art\intrface\INTRFACE.LST)
[04-07] Button panel image overlay (In \art\intrface\INTRFACE.LST) (FFFF FFFF if none- that is, to use just the base image button panel)
Everything below has 4 entries per elevator- one for each possible button the elevator can have. The description is per button
Button Keys- 2f2fc (fallout2.exe) 381ac (mapper2.exe)
[00-00] Character to use for keyboard input for that button (00 if N/A)
Button Destinations:
Dest: 2ee7c (fallout2.exe) 37d2c (mapper2.exe)
Format:
[00-03] Target Map ID (0000 0000 if N/A)
[04-07] Target Elevation (0000 0000 if N/A)
[08-0B] Target Tile (FFFF FFFF if N/A)
Everything has been tested with two elevators (0 and 5), and all changes have produced the expected results. Haven't had any external (somebody other than me) tests yet, though.
Everything is just a list- that is, everything is just [Data for elevator1][DataForElevator2], etc.
Buttons Count: 2ee1C (Fallout2.exe) 37ccc (mapper2.exe)
[00-03] # of buttons for each elevator
Elevator Image: 37c0c (mapper2.exe) 2ed5c (fallout2.exe)
[00-03] Base image to use (In \art\intrface\INTRFACE.LST)
[04-07] Button panel image overlay (In \art\intrface\INTRFACE.LST) (FFFF FFFF if none- that is, to use just the base image button panel)
Everything below has 4 entries per elevator- one for each possible button the elevator can have. The description is per button
Button Keys- 2f2fc (fallout2.exe) 381ac (mapper2.exe)
[00-00] Character to use for keyboard input for that button (00 if N/A)
Button Destinations:
Dest: 2ee7c (fallout2.exe) 37d2c (mapper2.exe)
Format:
[00-03] Target Map ID (0000 0000 if N/A)
[04-07] Target Elevation (0000 0000 if N/A)
[08-0B] Target Tile (FFFF FFFF if N/A)
Everything has been tested with two elevators (0 and 5), and all changes have produced the expected results. Haven't had any external (somebody other than me) tests yet, though.
since there are 50 possible types of lift, does this mean there are 50 entries in the list? with the remaining ones as blanks??? and does this mean that every mod that wants to use lifts different than those in the list have to make their own exe??? ( on the up-side, it also saves the hassle of the vsuit movie problem.. )
so let me see if i've understood the post right??...
at address 0002EE1C: in the fallout2.exe, and at address 00037CCC: in the mapper2.exe is the 4 BYTES that lists how many buttons a lift has..
followed by 4 bytes for how many buttons the next lift type has.. and so on..
at address 0002ED5C: in the fallout2.exe, and at address 00037C0C: in the mapper2.exe is the 4 BYTES that list what image number from the art\interface\interface.lst to use for the background to the lift
at address 0002ED60: ( fallout2.exe ) and at address 00037C10: ( mapper2.exe ) is the 4 BYTES that list what image number from the art\interface\interface.lst to use for the buttons
everything below has 4 entries- one for each button the elevator can have.
BUTTON 1:
at address 0002F2FC: ( fallout2.exe ) and at address 000381AC: ( mapper2.exe ) is the BYTE that lists what key to use for the keyboard input for that button ( 00 if no key shortcut )
at address 0002EE7C: ( fallout2.exe ) and at address 00037D2C: ( mapper2.exe ) is the 4 BYTES that list what map number from data\maps.txt that button goes to
at address 0002EE80: ( fallout2.exe ) and at address 00037D30: ( mapper2.exe ) is the 4 BYTES that list what elevation on the destination map the button goes to.
at address 0002EE84:( fallout2.exe ) and at address 00037D34: ( mapper2.exe ) is the 4 BYTES that list what tile number on the destination map the button goes to..
BUTTON 2:
same as above but starting at what address???
at address 0002EE1C: in the fallout2.exe, and at address 00037CCC: in the mapper2.exe is the 4 BYTES that lists how many buttons a lift has..
followed by 4 bytes for how many buttons the next lift type has.. and so on..
at address 0002ED5C: in the fallout2.exe, and at address 00037C0C: in the mapper2.exe is the 4 BYTES that list what image number from the art\interface\interface.lst to use for the background to the lift
at address 0002ED60: ( fallout2.exe ) and at address 00037C10: ( mapper2.exe ) is the 4 BYTES that list what image number from the art\interface\interface.lst to use for the buttons
everything below has 4 entries- one for each button the elevator can have.
BUTTON 1:
at address 0002F2FC: ( fallout2.exe ) and at address 000381AC: ( mapper2.exe ) is the BYTE that lists what key to use for the keyboard input for that button ( 00 if no key shortcut )
at address 0002EE7C: ( fallout2.exe ) and at address 00037D2C: ( mapper2.exe ) is the 4 BYTES that list what map number from data\maps.txt that button goes to
at address 0002EE80: ( fallout2.exe ) and at address 00037D30: ( mapper2.exe ) is the 4 BYTES that list what elevation on the destination map the button goes to.
at address 0002EE84:( fallout2.exe ) and at address 00037D34: ( mapper2.exe ) is the 4 BYTES that list what tile number on the destination map the button goes to..
BUTTON 2:
same as above but starting at what address???
-
- Vault Veteran
- Posts: 292
- Joined: Fri Apr 19, 2002 11:51 am
There are only 24 entries (0-23), which is probably why anything above 23 doesn't work- it is out of bounds.ColJack wrote:since there are 50 possible types of lift, does this mean there are 50 entries in the list? with the remaining ones as blanks??? and does this mean that every mod that wants to use lifts different than those in the list have to make their own exe??? ( on the up-side, it also saves the hassle of the vsuit movie problem.. )
And yes, every mod that wants to use lifts differently will either need to change the exe or provide a loader to edit the memory (probably the better way to go about it).
The in-memory offsets appear to be:
Count: 4388cc (mapper) 43ea1c (fallout2)
Keys: 438dac (mapper) 43eefc (fallout2)
Image: 43880c (mapper) 43e95c (fallout2)
Destination: 43892c (mapper) 43ea7c (fallout2)
[These have not been independently verified.]
-
- Vault Veteran
- Posts: 292
- Joined: Fri Apr 19, 2002 11:51 am
Correct.ColJack wrote:so let me see if i've understood the post right??...
at address 0002EE1C: in the fallout2.exe, and at address 00037CCC: in the mapper2.exe is the 4 BYTES that lists how many buttons a lift has..
followed by 4 bytes for how many buttons the next lift type has.. and so on..
Right, for elevator 0. And then those addresses for the elevator 1 would be (in fallout2.exe) 0002ED64 and 0002ED68, and so forth.at address 0002ED5C: in the fallout2.exe, and at address 00037C0C: in the mapper2.exe is the 4 BYTES that list what image number from the art\interface\interface.lst to use for the background to the lift
at address 0002ED60: ( fallout2.exe ) and at address 00037C10: ( mapper2.exe ) is the 4 BYTES that list what image number from the art\interface\interface.lst to use for the buttons
Just for simplicity, any addresses I give will be fallout2.exe addresses.everything below has 4 entries- one for each button the elevator can have.
BUTTON 1:
at address 0002F2FC: ( fallout2.exe ) and at address 000381AC: ( mapper2.exe ) is the BYTE that lists what key to use for the keyboard input for that button ( 00 if no key shortcut )
at address 0002EE7C: ( fallout2.exe ) and at address 00037D2C: ( mapper2.exe ) is the 4 BYTES that list what map number from data\maps.txt that button goes to
at address 0002EE80: ( fallout2.exe ) and at address 00037D30: ( mapper2.exe ) is the 4 BYTES that list what elevation on the destination map the button goes to.
at address 0002EE84:( fallout2.exe ) and at address 00037D34: ( mapper2.exe ) is the 4 BYTES that list what tile number on the destination map the button goes to..
BUTTON 2:
same as above but starting at what address???
Each button is just one right after another, so
The key to use forButton Keys- 2f2fc (fallout2.exe) 381ac (mapper2.exe)
[00-00] Character to use for keyboard input for that button (00 if N/A)
button 0 of elevator 0 will be at 2f2fc
button 1 of elevator 0 will be at 2f2fd
button 2 of elevator 0 will be at 2f2fe
button 3 of elevator 0 will be at 2f2ff
button 0 of elevator 1 will be at 2f300
button 1 of elevator 0 will be at 2f301
So if we number the buttons from 0 to 3, we'll have
(2f2c + 4*ElevatorNumber + ButtonNumber) for the address of any given button.
This will be the same- each button is 12 bytes, so you'll just add C to the first address of the previous button to get the address of the next one, soButton Destinations:
Dest: 2ee7c (fallout2.exe) 37d2c (mapper2.exe)
Format:
[00-03] Target Map ID (0000 0000 if N/A)
[04-07] Target Elevation (0000 0000 if N/A)
[08-0B] Target Tile (FFFF FFFF if N/A)
2ee7c-2ee87 - Destination info for Elevator 0 Button 0
2ee88-2ee93 - Destination info for Elevator 0 Button 1
2ee94-2ee9f - Destination info for Elevator 0 Button 2
2eea0-2eeab - Destination info for Elevator 0 Button 3
2eeac-2eeb7 - Destination info for Elevator 0 Button 0
and so forth.
So the target elevation for button 3 (counting 0-3) of elevator 0 would be at 2eea4-2eeea7..
I hope that's clear- other people could probably explain it better than I.
i've had a poke about in the exe code and can confirm you have the right offsets for the UK version too..
although since the blocks follow on from one another, then the info is only of use to those who wish to use more 4 button lifts than the game currently has and so on...
most of us can make do with the elevators as they are and will just have to index our maps according to the list to get them to work properly..
the only regret i have is that in order to get the 4,5,6 elevator working and looking right in the GLOW i will need to edit the fallout 2 exe... why couldn't they use an external look-up file to find the lift data.. would have been of much more use...
maybe someone can code a script or two to make virtual lifts..
( talking lifts??? spatial that when you step into the lift it comes up with the dialogue screen and say's "Thank you for choosing Lift-Co (tm). What floor please?" and then having it send you to a destination acording to the response.. you would have to code the destinations into the map script as m_vars.. so you could script a generic lift, have it look in the mapname.msg file or whatever for the brurb and options, and then send you to m_var destination1 for answer 1 and so on.. )
anyone feel brave enough to try that yet??
it sounds simpler than having the game draw a lift panel on the screen and retrieving a player mouse click to send you to the new map...???
although since the blocks follow on from one another, then the info is only of use to those who wish to use more 4 button lifts than the game currently has and so on...
most of us can make do with the elevators as they are and will just have to index our maps according to the list to get them to work properly..
the only regret i have is that in order to get the 4,5,6 elevator working and looking right in the GLOW i will need to edit the fallout 2 exe... why couldn't they use an external look-up file to find the lift data.. would have been of much more use...
maybe someone can code a script or two to make virtual lifts..
( talking lifts??? spatial that when you step into the lift it comes up with the dialogue screen and say's "Thank you for choosing Lift-Co (tm). What floor please?" and then having it send you to a destination acording to the response.. you would have to code the destinations into the map script as m_vars.. so you could script a generic lift, have it look in the mapname.msg file or whatever for the brurb and options, and then send you to m_var destination1 for answer 1 and so on.. )
anyone feel brave enough to try that yet??
it sounds simpler than having the game draw a lift panel on the screen and retrieving a player mouse click to send you to the new map...???
There can be various ways to solve this.
Lifts with voice interface, as you suggest, and lift, reacting on keycards (script checks which keykard used on lift).
Maybe I try do this after some research.
Lifts with voice interface, as you suggest, and lift, reacting on keycards (script checks which keykard used on lift).
Maybe I try do this after some research.
In this world there are two kinds of people, my friend...those with Power of Moon Prism, and those who dig. You dig.
-
- Vault Veteran
- Posts: 292
- Joined: Fri Apr 19, 2002 11:51 am