Fallout 1/2 windowed mode possible?

Wild_qwerty said:
If you need a hand with any graphics I can help :)

Hey qwerty ... I was doing some experiments with interface graphics changes last week. Here's an FRM that changes the AC and HP numbers to a blue LCD style look (which would actually be more like a vacuum flourescent display).

http://home.cogeco.ca/~desolation/numbers.frm

Try dropping that into \art\intrface. It looks better when the iface.frm has a black background behind it. I have a modified iface.frm that does this along with other changes but its not done yet.

I also tried using these nixie tube style number, which would be more appropriate for fallout, but they didn't look very good:
http://www.cim.mcgill.ca/~danny/jsfonts//nixie/6.png

The blue LCD look is actually this one with a color and size change:
http://www.cim.mcgill.ca/~danny/jsfonts//7led_red/6.png

Those are from this clock program:
http://www.cim.mcgill.ca/~danny/jsclock.php

I looked all over for better nixie tube style fonts but didn't find any :(
 
jdoe407 said:
I would love to be able to add a large empty space into the executable where I could put all the new stuff so i didn't have to delete error checking functions to make room

I think there might be some space. Rumor has it that the exe used to have mapper functions but they were taken out before shipping. Take a look at hex offsets from B1E0-BBDF in the exe. It starts with a bunch of FF and then a huge section of 00. Maybe this is where the mapper functions used to be. There is a large contiguous space of all zeros between B204-B95F, maybe you can use that. Hopefully its not a space where stuff gets initialized after loaded into RAM, I have no idea how this could be checked.
 
Great job you did jdoe :D

I remember that when i was working on 12 years limit problem I found a "small" gap at the end of CODE segment.
This gap was on 12CF88 - 52DB88 (dynamic) but I worked on mapper.exe not Fallout2.exe so you need to confirm this.

BTW Have you used Abel Names script?
 
jdoe407 said:
I would love to be able to add a large empty space into the executable where I could put all the new stuff so i didn't have to delete error checking functions to make room, but like I said, i really don't know how to go about doing this yet.

Why not insert a small jump in place of the error checking code, which jumps to a new region in memory created by extending the size of the executable? This new region of memory could include the error checking code that was replaced by the jump, as well as the resolution switching code.
 
Why not insert a small jump in place of the error checking code, which jumps to a new region in memory created by extending the size of the executable? This new region of memory could include the error checking code that was replaced by the jump, as well as the resolution switching code.

Hmm that would be great but do you know how to do this?
Add new code segment or something?
 
jargo said:
Why not insert a small jump in place of the error checking code, which jumps to a new region in memory created by extending the size of the executable? This new region of memory could include the error checking code that was replaced by the jump, as well as the resolution switching code.

Hmm that would be great but do you know how to do this?
Add new code segment or something?

It has been a long time since I have done any PC assembler programming, but you should just be able to extend the existing code segment. Various console game translations from Japanese to English work this way: replace instruction X with an unconditional branch/jump to the first free address A after the last instruction of the program. Then at A you have the first instruction as the one previously removed, i.e. X. The rest of the instructions are new code for whatever you are trying to do with the last instruction an unconditional branch/jump to the instruction just after the first unconditional jump.

Between this high-resolution hack and Seraph's patch, all of the new locations, addons, and mods, Fallout 2 is just screaming for a unified addon packaged into a user-friendly single-click auto-installer. Who would want Fallout 3 when you have a perfected Fallout 2?
 
I'll probably continue working on this stuff this weekend (friday). I don't have much time during the weekdays to do much. I'll worry about cleaning up the executable after I kinda figure out what I'm doing ; ). thanks for the support
 
Sorry for bad English.

About windowed mod and flags. I almost newbie in asm and disassembling (I join to TeamX as a scripter, now try to dig engine), I know nothing about DDraw programming also. But But maybe you find something usefull in this post[all for Mapper.exe, not for FO itself].

0x3b788 [01h by default] - this byte set resolution to set before window/ddraw surface created.

Table:
Code:
DGROUP:005624C8 _gfx_init       dd offset init_mode_320_200 ;[0]
DGROUP:005624CC                 dd offset init_mode_640_480 ;[1]
DGROUP:005624D0                 dd offset init_mode_640_240 ;[2]
DGROUP:005624D4                 dd offset init_mode_320_400 ;[3]
DGROUP:005624D8                 dd offset init_mode_640_200 ;[4]
DGROUP:005624DC                 dd offset init_mode_640_400 ;[5]
DGROUP:005624E0                 dd offset init_mode_800_300 ;[6]
DGROUP:005624E4                 dd offset init_mode_800_600 ;[7]
DGROUP:005624E8                 dd offset init_mode_1024_384 ;[8]
DGROUP:005624EC                 dd offset init_mode_1024_768 ;[9]
DGROUP:005624F0                 dd offset init_mode_1280_512 ;[10]
DGROUP:005624F4                 dd offset init_mode_1280_1024 ;[12]

All none-standart modes drop an error. I set 800x600 [set byte to 07] and 1024x768 [09], but:
1. in 1024 mapper set resolution, create window, paint in something and then generate an error
2. in 800x600 mapper look weird, pallete is not being loaded I supose. On exit there is an error window

0xeb9ba - [11h by def] I belive it`s a flag for SetCooperative level. But set it to 08h does nothing [well, nothing more then weird colors].

Disasm listing for this piece:
Code:
mov     eax, ds:GNW95_DDObject
mov     eax, [eax]
push    11h
push    ds:GNW95_hwnd
push    ds:GNW95_DDObject
call    dword ptr [eax+50h]

0xeb820 - [00 00 08 90 == 90080000h] dwStyle flag for mapper window
0xeb83b 0 [08] - dwExStyle for mapper window

You can set it to popup window style and set nWidth and nHeight to fixed values [by default there is GetSistemMetrics(0/1) for this] - smaller window would be created, but ddraw surface steel be use fullscreen, so any mouse move would repaint original fullscreen mapper window :-(

Disasm:
Code:
AUTO:004EC405                 push    0               ; lpParam
AUTO:004EC407                 push    ds:GNW95_hInstance ; hInstance
AUTO:004EC40D                 push    0               ; hMenu
AUTO:004EC40F                 push    0               ; hWndParent
AUTO:004EC411                 push    1               ; nIndex
AUTO:004EC413                 call    cs:GetSystemMetrics
AUTO:004EC41A                 push    eax             ; nHeight
AUTO:004EC41B                 push    0               ; nIndex
AUTO:004EC41D                 call    cs:GetSystemMetrics
AUTO:004EC424                 push    eax             ; nWidth
AUTO:004EC425                 push    0               ; Y
AUTO:004EC427                 push    0               ; X
AUTO:004EC429                 push    90080000h       ; dwStyle
AUTO:004EC42E                 mov     eax, offset GNW95_title
AUTO:004EC433                 push    eax             ; lpWindowName
AUTO:004EC434                 mov     eax, offset ClassName ; "GNW95 Class"
AUTO:004EC439                 push    eax             ; lpClassName
AUTO:004EC43A                 push    8               ; dwExStyle
AUTO:004EC43C                 call    cs:CreateWindowExA

Seems that surface sizes are equal to screen resolution, they use one table for set resolution/surface sizes:
Code:
DGROUP:00562528 _sizes          dd 320
DGROUP:0056252C dword_56252C    dd 200
DGROUP:00562530                 dd 640
DGROUP:00562534                 dd 480
DGROUP:00562538                 dd 640
DGROUP:0056253C                 dd 240
DGROUP:00562540                 dd 320
DGROUP:00562544                 dd 400
DGROUP:00562548                 dd 640
DGROUP:0056254C                 dd 200
DGROUP:00562550                 dd 640
DGROUP:00562554                 dd 400
DGROUP:00562558                 dd 800
DGROUP:0056255C                 dd 300
DGROUP:00562560                 dd 800
DGROUP:00562564                 dd 600
DGROUP:00562568                 dd 1024
DGROUP:0056256C                 dd 384
DGROUP:00562570                 dd 1024
DGROUP:00562574                 dd 768
DGROUP:00562578                 dd 1280
DGROUP:0056257C                 dd 512
DGROUP:00562580                 dd 1280
DGROUP:00562584                 dd 1024
Maybe some of you find this useful...

BTW, where I can find info about addkey, playmovie, soundplay, say* functions? About interface mode (CreateWin and stuff)?

[EDIT]

BTW2. What did you know about flags in mapper2.cfg [Debug]->mode ? There is "environment" by default, but you can set "log", "gnw", "mono" and "screen". Why mono and screen mode need for?
 
>>Well best source is TeamX http://www.teamx.ru/docs/bis_help.zip

LOL 8-) I am from TeamX. I am one of the moderators of Tech Support and Research forums :-) And research of playsound, movieplay and say*-functions in bis_help.zip are mostly my work. I hope to find some *other* info here, at NMA.
 
I am from TeamX. I am one of the moderators of Tech Support and Research forums :-) And research of playsound, movieplay and say*-functions in bis_help.zip are mostly my work. I hope to find some *other* info here, at NMA.

I know that Raven ;), good job witch that btw.
Well i read that doc and it covers all that prety good, there is not much to add.
For what function you need info?

BTW The very very best source of script information is.... Abel :o
 
For functions than was not covered by this doc :-) List:

Say-mode funcs:
sayScrollUp [6]
sayScrollDown [6]
sayGetLastPos
saystartpos
sayrestart


Movie funcs:
playmoviealpha - fake (there is no code for it in .exe)
playmoviealpharect - fake
playmovierect, playmovie - they work, but the pallete get screwed and game crashes after movie end

Mouse funcs:
setglobalmousefunc(p1,p2,p3,p4)
refreshmouse(p1)
mousepress
mouserelease
mouseon
mouseoff
mouseheld
mouseright

There is more.

BTW, mouseshape("file.pcx",int x,int y) load file.pcs as a mouse cursor. Only in say-mode, of course. AddKey warks only in say mode also.

And now we dig this say-mode. Well ... how it english? ... thats rock. Currently WG and I wrote the script that allow you to construct your own item from components. Like in Arcanum :-) Not in dilog mode, with pictures of items and stuff.

>>BTW The very very best source of script information is.... Abel

:-( I can rare see Abel this days. He now work on three jobs :-( And he is .. an aspirant. Don`t know how it in english.
 
Uhm looks just like mine todo list.
Have the same problem with playmovie :/.

And now we dig this say-mode. Well ... how it english? ... thats rock. Currently WG and I wrote the script that allow you to construct your own item from components. Like in Arcanum :-) Not in dilog mode, with pictures of items and stuff.

I didn't (yet) do much work on this say mode functions, but this can be interesting.

Yup ,Scripts can create custom windows with gfx,buttons.
Recently for NA mod I made full working elevator ;).


mouseshape("file.pcx",int x,int y) load file.pcs as a mouse cursor. Only in say-mode, of course. AddKey warks only in say mode also.
Yes i think about using this for drag and drop items in custom iterfaces(say...).
 
Raven_2 said:
I wrote the script that allow you to construct your own item from components. Like in Arcanum :-) Not in dilog mode, with pictures of items and stuff.

Wow that's cool. Can you share any screen shots?


jargo said:
Yup ,Scripts can create custom windows with gfx,buttons.

I didn't know scripts could do this. Could you post some example script code that shows how this works?
 
Indeed. If I'm not misreading what you mean, I'd be rather interested in how that works.

Specifically, things such as a script popping up a dialogue box with a cusom message and a couple buttons -like the one you get when you click the exit button- which would then pass the result as a boolean or int back to the script depending on which button was pushed.

That'd be handy...

-Wraith
 
No problem ;)

Ok this is a simple procedure that creates custom window (for elevator this case)
with background, 4 animated buttons, and one animated image (for displaying elevator arrow)
Code:
// 'createwin' procedure will create a new window
// createwin("name",posx,posy,widht,height)

createwin("win1",150,50,230,284);

//Now we will add four buttons to this window
//addbutton("nameofbutton",posx,posy,widht,height)
// 0,0 point for posx and posy paremeters is left upper corner of a new window.
AddButton("button1",17,44,44,43);
AddButton("button2",17,104,44,43);
AddButton("button3",17,164,44,43);
AddButton("button4",17,224,44,43);

//adding procedures to buttons
//addbuttonproc("nameofbutton",mouse_on_procedure,mouse_out_procedure,buttonpres_procedure,buttonrelase_procedure);)
AddButtonProc("button1",buton,butoff,butpres,butoff);
AddButtonProc("button2",buton,butoff,butpres2,butoff);
AddButtonProc("button3",buton,butoff,butpres3,butoff);
AddButtonProc("button4",buton,butoff,butpres4,butoff);

//adding graphics to buttons
//addbuttongfx("buttonname","buttonpres_file.pcx","buttonrelise_file.pcx","mouse_over_file.pcx")
//graph files must be in pcx format and in fallout2 standart color palette
addbuttongfx("button1","ebut_in.pcx","ebut_out.pcx"," ");
addbuttongfx("button2","ebut_in.pcx","ebut_out.pcx"," ");
addbuttongfx("button3","ebut_in.pcx","ebut_out.pcx"," ");
addbuttongfx("button4","ebut_in.pcx","ebut_out.pcx"," ");

//create window bakground graphics
//display("graph_filename.pcx")
//file must be in pcx format and have fallout2 standart palette
display("el_base1.pcx");

//this command draws sprite on given coordinates in window
//displaygfx("filename.pcx",posx,posy,hight,weight)
//it draws elevator level arrow
displaygfx("1.pcx",120,40,92,55);

//This command will redraw curent window
ShowWin;

ah i forgot to add that we must use pcx format and is best to put all gfx files in main data (fallout2/data/)
 
:shock:

Um... Ok, n00b question #1042 here but...

I just searched everything I have on script commands, including all the FO2 headers I could think of that would potentially hold defines for these, and they don't appear anywhere...

So, assuming they do in fact work in scripts, er... Are these simply undocumented commands? If so, is there somwhere you could point me to lists of such things since I would presume if this is the case, there must be some more of them as well.

Grrr... I hate it when they keep secrets! lol

-Wraith
 
So, assuming they do in fact work in scripts, er... Are these simply undocumented commands? If so, is there somwhere you could point me to lists of such things since I would presume if this is the case, there must be some more of them as well.

Well yes i think you can call them undocumented.
This are all built in functions not macros from header files and they were never used in any Fo2 Scripts (why use them when you can do all this in source code).

Here is list of this functions from FSE function list(there are some more):


Code:
callstart
exec
spawn
fork
detach
startcritical
endcritical
sayquit
sayend
saystart
saystartpos
sayreplytitle
saygotoreply
sayreply(p1:number,p2:number);
sayoption(p1:number,p2:number);
saymessage(p1:number,p2:number);
sayreplywindow
sayoptionwindow
sayborder
sayscrollup
sayscrolldown
sayspacing
sayoptioncolor
sayreplycolor
sayrestart
saygetlastpos
sayreplyflags
sayoptionflags
saymessagetimeout(time:number);
createwin(name:string,X:number,Y:number,Width:number,heigth:number);
deletewin(name:string);
selectwin(name:string);
resizewin(name:string,X:number,Y:number,Width:number,heigth:number);
scalewin(name:string,X:number,Y:number,Width:number,heigth:number);
showwin;
fillwin
fillrect
fillwin3x3
display(filename:string);
displaygfx(filename:string,X:number,Y:number,Width:number,heigth:number););
displayraw(filename:string);
loadpalettetable(palette_file:string);
fadein
fadeout
gotoxy
print
format
printrect
setfont
settextflags
settextcolor
sethighlightcolor
stopmovie
playmovie
movieflags
playmovierect
playmoviealpharect
addregionflag
addregionproc
addregionrightproc
deleteregion
activateregion
checkregion
addbutton(button_name:string,posx:number,posy:number,widht:number,height:number);
addbuttontext(button_name:string,text:string);
addbuttonflag
addbuttongfx
addbuttonproc
addbuttonrightproc <-- (this function is disabled)
deletebutton(button_name:string);
hidemouse
showmouse
mouseshape
refreshmouse
setglobalmousefunc
addnamedevent
addnamedhandler
clearnamed
signalnamed
addkey
deletekey
soundplay
soundpause
soundresume
soundstop
soundrewind
sounddelete
setoneoptpause
selectfilelist

For full list of opcodes see http://www.teamx.ru/fop/index.php
 
Here's a list of the BIS compiler supported script commands. This is simply taken from compile.exe. I did that list quite a while ago when I stumbled upon them. I nerver looked into them further then this, hope it can be useful.

Those with a * mean they are not documented (while those without may or not be)

action_being_used
activateregion *
add_mult_objs_to_inven
add_obj_to_inven
add_timer_event
addbutton *
addbuttonflag *
addbuttongfx *
addbuttonproc *
addbuttonrightproc *
addbuttontext *
addkey *
addnamedevent *
addnamedhandler *
addregion *
addregionflag *
addregionproc *
addregionrightproc *
anim
anim_action_frame
anim_busy
animate_move_obj_to_tile
animate_stand_obj
animate_stand_reverse_obj
art_anim
attack
attack_complex
attack_setup
buttontab *
checkregion *
clearnamed *
combat_difficulty
combat_is_initialized
create_object_sid
createwin *
critter_add_trait
critter_attempt_placement
critter_dmg
critter_heal
critter_injure
critter_inven_obj
critter_is_fleeing
critter_mod_skill
critter_rm_trait
critter_set_flee_state
critter_state
critter_stop_attacking
cur_map_index
days_since_visited
debug_msg
deletebutton *
deletekey *
deleteregion *
deletewin *
destroy_mult_objs
destroy_object
dialogue_reaction
dialogue_system_enter
difficulty_level
display *
display_msg
displaygfx *
displayraw *
do_check
drop_obj
dude_obj
elevation
end_dialogue
endgame_movie
endgame_slideshow
explosion
fadein *
fadeout *
fillrect *
fillwin *
fillwin3x3 *
fixed_param
float_msg
format *
game_ticks
game_time
game_time_advance
game_time_hour
game_time_in_seconds
game_ui_disable
game_ui_enable
game_ui_is_disabled
gdialog_mod_barter
gdialog_set_barter_mod
get_critter_stat
get_day
get_month
get_pc_stat
get_poison
gfade_in
gfade_out
giq_option
give_exp_points
global_var
gotoxy *
gsay_end
gsay_message
gsay_option
gsay_reply
gsay_start
has_skill
has_trait
hidemouse *
how_much
inven_cmds
inven_unwield
is_critical
is_success
item_caps_adjust
item_caps_total
jam_lock
justifycenter *
justifyleft *
justifyright *
kill_critter
kill_critter_type
load_map
loadpalettetable *
local_var
make_daytime
map_var
mark_area_known
message_str
metarule
metarule3
mouseheld *
mouseoff *
mouseon *
mousepress *
mouserelease *
mouseright *
mouseshape *
move_obj_inven_to_obj
move_to
moviecenter *
moviedirect *
movieflags *
moviescale *
moviesubtitle *
obj_art_fid
obj_being_used_with
obj_can_hear_obj
obj_can_see_obj
obj_carrying_pid_obj
obj_close
obj_is_carrying_obj_pid
obj_is_locked
obj_is_open
obj_item_subtype
obj_lock
obj_name
obj_on_screen
obj_open
obj_pid
obj_set_light_level
obj_type
obj_unlock
override_map_start
party_add
party_member_obj
party_remove
pickup_obj
play_gmovie
play_sfx
playmovie *
playmoviealpha *
playmoviealpharect *
playmovierect *
poison
print *
printrect *
proto_data
radiation_dec
radiation_inc
random
reaction_influence
refreshmouse *
reg_anim_animate
reg_anim_animate_forever
reg_anim_animate_reverse
REG_ANIM_FUNC
reg_anim_obj_move_to_obj
reg_anim_obj_move_to_tile
reg_anim_obj_run_to_obj
reg_anim_obj_run_to_tile
reg_anim_play_sfx
regiontab
resizewin *
rm_mult_objs_from_inven
rm_obj_from_inven
rm_timer_event
roll_dice
roll_vs_skill
rotation_to_tile
running_burning_guy
sayborder *
sayend *
saygetlastpos *
saygotoreply *
saymessage *
saymessagetimeout *
sayoption *
sayoptioncolor *
sayoptionflags *
sayoptionwindow *
sayquit *
sayreply *
sayreplycolor *
sayreplyflags *
sayreplytitle *
sayreplywindow *
sayrestart *
sayscrolldown *
sayscrollup *
saysetspacing *
saystart *
saystartpos *
scalewin *
scr_return
script_action
script_overrides
selectfilelist *
selectwin *
self_obj
set_critter_stat
set_exit_grids
set_global_var
set_light_level
set_local_var
set_map_music
set_map_start
set_map_var
set_obj_visibility
setfont *
setglobalmousefunc *
sethighlightcolor *
setoneoptpause *
settextcolor *
settextflags *
sfx_build_ambient_name
sfx_build_char_name
sfx_build_interface_name
sfx_build_item_name
sfx_build_open_name
sfx_build_scenery_name
sfx_build_weapon_name
showmouse *
showwin *
signalnamed *
skill_contest
sound16bit *
sound8bit *
sounddelete *
soundloop *
soundmemory *
soundmono *
soundnormal *
soundpause *
soundplay *
soundresume *
soundrewind *
soundstereo *
soundstop *
soundstreamed *
source_obj
start_gdialog
stopmovie *
target_obj
terminate_combat
textdirect *
textmonospace *
textnofill *
textshadow *
texttrunc *
textunderline *
tile_contains_obj_pid
tile_contains_pid_obj
tile_distance
tile_distance_objs
tile_in_tile_rect
tile_is_visible
tile_num
tile_num_in_direction
use_obj
use_obj_on_obj
using_skill
wield_obj_critter
wm_area_set_pos
world_map
 
Back
Top