Fallout2.exe Patcher

jdoe407 said:
Are the fallout2.exe's located in the patches fallout2_v102d_uk.exe, f2patch-fr.exe, and f2patch-gr.exe the executables other people use?

I don't know the answer but I was about to post a related question: are the master.dat and critter.dat the same for all of these localized versions? My 102d US version has these file sizes:

master.dat 333,148,322
critter.dat 166,951,131

If the master and critter files are the same that would be very good news. A mod can use a single executable but include the patch files. This is what I am doing with my mod, the base of the mod is US 102d patch. On top of that I add my own stuff. If the master and critter files are the same all over, I can include a patched exe in the mod and it will work anywhere. For localation to french or other languages, the localized patch content can simply be placed in the \fallout2\data patch directory.

BTW andy-spacetrain decided on including the 102d US exe in his patcher, to guarantee avoiding incompatibility issues. His util creates a small loader exe that loads the included 102d US exe and patches it in RAM. It might be easier to do something similar rather than trying to patch all of the various localized exes. If the master.dat and critter.dat are the same all over (I hope they are), then one exe along with the various localization patches should work together I think.

jdoe... any more thoughts on the dialog background problem? This seems to be the only obstacle to making the high res modes totally usable. I am playing at 800x600 already, and plan to play through the whole game, for testing my mod, but I will use your patched exe to see how stable the 800x600 mode is.
 
Excuse me,I from china,and I have tested that the patch cannot
used for chinese (Traditional) edition.So can you make a new patch
for chinese (Traditional) edition? Thank you
 
I have no idea how they create exe's on the run like that (maybe it already has a default exe stored in the main executable just edits that and outputs it?) either way its quite nice. The same goes with editing the memory before the game is executed, but I don't think i can accomplish those sorts of things right now

It would be great if the us version of the executable worked perfectly with the other versions without causing any problems (eg. english text ). Edit: nevermind, looks like it can't be done then - from the post above this one

I'm still a bit burnt out from last week, but hopefully by this weekend the dialog's will be fixed. Being able to center everything would also be quite nice because moving the map around on the worldmap is annoying because you can't just move the mouse to the right or down to move it. It will take me a while make the higher resolutions work (somewhat)better
 
mao_cn said:
Excuse me,I from china,and I have tested that the patch cannot
used for chinese (Traditional) edition.So can you make a new patch
for chinese (Traditional) edition? Thank you

I think once he has the US version wokring 100% it should be easy enough to get it to work on the other versions :)

You might be able to download the US 1.02 patch file from NMA and then extract the Fallout2.exe out and place it in your FO2 folder.

You should be able to run the high res patcher from there :)
 
jdoe407 said:
It would be great if the us version of the executable worked perfectly with the other versions without causing any problems (eg. english text ). Edit: nevermind, looks like it can't be done then - from the post above this one

I think traditional chinese probably requires a special executable to handle multi-byte character sets. However, that shouldn't be the case for UK and other locales that don't need characters outside of ascii and extended ascii characters. So my thought was: instead of using the exe that is shipped with UK version (for example) use the patched US exe, and extract the UK patch DAT to \Fallout2\Data (or use the US 102d patch if desired since UK is still english). For a non-english locale not requiring special characters (like french or german), same idea: use the patched US exe, but extract the localized patch.dat into \Fallout2\data. If the master.dat and critter.dat are the same, and the US exe supports the character set, I don't see any reason why this wouldn't work, although we should test one locale and see. If I'm right on this then you would not need many different EXEs. You probably will for traditional chinese though, because the odds of the US exe supporting that character set are less than slim and none. I'll try testing a latin based non-english locale in the next while to see if this works. I'm interested too, so my FO2 mod can work in non-english locales.
 
If the exe could be patched in memory, then would it be possible to switch the resolution on the fly, as well as toggle fullscreen and windowed modes? Last but surely the most pie-in-the-sky idea, would it be possible to have this patcher menu somehow integrated into the Fallout 2 interface?

Who needs Fallout 3 when Fallout 2 is still getting such great improvements like this exe patcher and the New Vision addon? Sure they don't equal a whole new game, but they all add up. Maybe game companies will learn to listen to their fans... eh... probably not.
 
to dude_obj

Here at Russia, FO was never officialy released. But we have two different version of FO2 by pirates. They differ from original. One them even plays wav instead of acm and all sfx/speech are in wav format. AFAIK situation in China nearly the same - FO was never officially released there and nobody knows in which way exe was modified by local pirates (their prefer call themself localizators :-).

>>I'll try testing a latin based non-english locale in the next while to see if this works. I'm interested too, so my FO2 mod can work in non-english locales.

I`m sure that main difference are not in exe but in fonts, both .aaf (dialogs, floaters) and .fon (worldmap, interface).
 
jdoe407 said:
I have no idea how they create exe's on the run like that (maybe it already has a default exe stored in the main executable just edits that and outputs it?) either way its quite nice. The same goes with editing the memory before the game is executed

I'm not sure exactly how Andy's loader creator works, but I'm using that every day. I run the loader creator program and select my patch options, it makes a little 21k executable. Clicking that tiny exe loads the Fallout2.exe into RAM, patches in RAM and runs it. I include the 21k exe with my dat, and name it with my mod name, so I have FO2XP.DAT and FO2XP.EXE. Very nice way of doing things. In a recent revision he includes the US EXE, I think it works the same way, it just forces compatibility. Andy's loader creator is here: http://www.spacetrain.com/FO2LC.zip Inside the zip you'll see a file fo2lc.flc, this is the FO2 US 102D executable, and a small DAT file, I believe that contains the patch details.

This is kind of amusing but its working, this is what I'm doing now:

1) Patch the original Fallout2.exe with noid's debugging patch.exe to enable debugging (I need this for development and testing). http://members.fortunecity.com/noid84/patch.html

2) Take the noid patched exe and patch that with your Fallout2Patcher

3) Take the jdoe patched exe and run the same 21k FO2LC loader that I've been using all along.

And I have all three working: debugging, 800x600 resolution, and the options I have selected in making the loader (for this mod its just use my FO2XP.DAT instead of PATCH000.DAT).

jdoe ... if you're not using noid's patch to enable debugging you're living the hard way. It usually writes error information to a log file that is very helpful when the engine crashes .... There are a bunch of harcoded debugging messages in the exe I think, and scripts add a bunch more. I add those to my scripts too to aid in debugging.
 
dude_obj said:
jdoe407 said:
Are the fallout2.exe's located in the patches fallout2_v102d_uk.exe, f2patch-fr.exe, and f2patch-gr.exe the executables other people use?

I don't know the answer but I was about to post a related question: are the master.dat and critter.dat the same for all of these localized versions? My 102d US version has these file sizes:

master.dat 333,148,322
critter.dat 166,951,131
No they're not the same! But you can find a patch here:
http://ianout.nma-fallout.com/newhp/english/bible/artikel.php?id=2

It directly patches the critter.dat to make it a US one. Only works with Fallout 2 german!
 
Raven_2 said:
I`m sure that main difference are not in exe but in fonts, both .aaf (dialogs, floaters) and .fon (worldmap, interface).

That makes sense, however most of the latin-based languages have characters that are in the ascii set, which means they don't need special font files I think. Someone was translating to turkish recently and there was only two characters that didn't work ş and ğ . So for french, italian, german, etc maybe the US exe will work. Russian and Traditional Chinese of course need different font set because none of those characters are in ascii (or extended ascii), and there's probably too many characters to fit in such a small (7 or 8 bit) character set. I'd be surprised if french for example needed different fonts, since the accents are available in ascii character set. This was the post relevant to turkish:

http://www.nma-fallout.com/forum/viewtopic.php?t=11259

Unicode seems to be the modern way to localize but no such thing in the fallout universe.
 
>>Russian and Traditional Chinese of course need different font set because none of those characters are in ascii (or extended ascii), and there's probably too many characters to fit in such a small (7 or 8 bit) character set.

:-) Russian alphabet contain only 33 symbol so 8 bit would be more then enough. There are some progs for edit .aaf and .fon files and a doc from Anchorite on fon files. Also we have universal set of .fon files, that works well with english and both of russian versions of FO2. So if you want a multilang version of mod, all you need is a set of fonts and, of course, msg files.

Check this if you work with aaf:
http://www.teamx.ru/utils/FFCon.rar
 
Creating a loader(memory patch) is not a hard thing to do. You just need to use windows API since win do not allow direct access to memory.

Use CreateProcess with CREATE_SUSPENDED flag to load exe file to memory, after load this process will stop and give you time to make changes in memory.
ReadProcessMemory and WriteProcessMemory are used to read and write data from prog(by byte).
After that you call ResumeThread.

Ah and you can try using FVP (Fallout Virtual Patcher) it read patch data from ini file, so you don't need to write patcher just know the offsets you want to change, and remember that in FVP you use virtual address (this from disassembler) not file address.
 
mvBarracuda said:
No they're not the same! But you can find a patch here:
http://ianout.nma-fallout.com/newhp/english/bible/artikel.php?id=2

It directly patches the critter.dat to make it a US one. Only works with Fallout 2 german!

This wouldnt be too hard to make a patch for each of the other versions, all as you would need is to use some patching software to generate an exe file that contains the differences between them, I've done this before with other large files it's very easy with the rigth software.

On the downside in order to do it you would need a copy of each different version of the critter.dat :(

It would be easier to use the new command line dat packer/unpacker to do this via a batch file.

1) Check file size.
2) If US version of critter.dat unpack and add new critters
3) If other version of criiter.dat unpack and add children (and any other missing FRM) and add new critters
4) repack DAT file into new critter.dat

you could effectively use this method to patch all the different critter.dat files up to the same version and at the same time include any new critters that a mod would need. It would go a long way towards making a single click installation of a mod
 
Heres some basic Delphi code to create a loader that will enable the Pipboy from the start

(Note: I just made this code up, it may not compile, but all the syntax should be correct, plus conversion to C++ should be pretty simple)

Code:
Var
  StartInfo  : TStartupInfo;
  ProcInfo   : TProcessInformation;
  CreateOK   : Boolean;
  Offset: Integer;
  ProgramName: String;
Begin
  
  ProgramName := 'Fallout2.exe';

  FillChar(StartInfo,SizeOf(TStartupInfo),#0);
  FillChar(ProcInfo,SizeOf(TProcessInformation),#0);
  StartInfo.cb := SizeOf(TStartupInfo);

  CreateOK := CreateProcess(nil, PChar(ProgramName), nil, nil,False,
              CREATE_NEW_PROCESS_GROUP+NORMAL_PRIORITY_CLASS,
              nil, nil, StartInfo, ProcInfo);

  Offset := $4971C1; // Offset Address

  WriteProcessMemory(ProcInfo.hProcess, ptr(Offset), PChar(chr(235)), Length(chr(235)) , R);
End;

This doesn't use CREATE_SUSPENDED, but works fine anyway. Also note that chr(235) is the byte information we want to change the offset to
 
jargo said:
Use CreateProcess with CREATE_SUSPENDED flag to load exe file to memory, after load this process will stop and give you time to make changes in memory.
ReadProcessMemory and WriteProcessMemory are used to read and write data from prog(by byte).
After that you call ResumeThread.

Andy-Spacetrain said:
Heres some basic Delphi code to create a loader that will enable the Pipboy from the start

(Note: I just made this code up, it may not compile, but all the syntax should be correct, plus conversion to C++ should be pretty simple)

Code:
...

This doesn't use CREATE_SUSPENDED, but works fine anyway. Also note that chr(235) is the byte information we want to change the offset to

Thanks, I've never tried any of that before with createprocess... I'll have to play around with both of the examples now : - )

mvBarracuda said:
No they're not the same! But you can find a patch here:
http://ianout.nma-fallout.com/newhp/english/bible/artikel.php?id=2

It directly patches the critter.dat to make it a US one. Only works with Fallout 2 german!

what about the executables found in the patch's, are they different from the real executables that people use with the german/uk/french versions? these are the only fallout2.exe's that I can find right now other then us 1.02d
 
When running in 800x600, when there is talking heads, its appears that part of the talking head image is showing through where the text should be like this:

dialog3.jpg


Wierd. Aside from dialog the 800x600 mode seems to be working great :) I have a build that allows selecting 640x480 or 800x600 by clicking on different batch files, which copy in different patched executables and run them. The batch files swap in or out the resized dialog and barter FRMs. The same could be done for maps but it would be a lot of work to adjust all of the maps for different resolutions. I personally think that 800x600 is optimal. Any higher resolution and it would be hard to see small items on the ground.
 
Thats odd :?
I think to get around the problem with the talking head you could try and edit its FRM so that it is smaller. You could try and resize the FRM so that the images stop at the bottom of the top window rather than under the text section.

Though that will only work if the image is positioned from the top rather than the bottom, but if it is positioned from its bottom edge then it may be possible to edit the fallout2.exe to draw it higher (to compensate for the reduced size).

Hope that makes sense ;)

It could be the same problem with the other dialogs, as there is probably a grey filler image that is inserted when there is no talking head. If you resized this it may fix the other dialogs :)

I think it might be something to do with the places where multiple images are drawn over each other at different depths. If we resize the images so that there is no over lap it might be fine.
 
Resizing images doesn't work for most of the dialog, because what gets displayed is from the map image ... whoever you chose to talk to on the map ... you see them in their building or whatever.
 
New version of Fallout2Patcher is out ( see first page ). It's still unplayable and does not support other versions other then 1.02d US just yet.

Code:
Version 3:
 The game is still unplayable, but some things have been fixed while other have been destroyed

  New:
    * New style of patching the executable added - the patcher reads from the patchData.txt file
    * Sections for future compatibility with other versions added (still only works with US 1.02d)
    * Some interface additions/fixes for the patcher itself

  Fixes:
    * Most of the graphics work on the dialogs now, but not the main picture that shows who you are talking to unless it's a talking head
    * You can now move the mouse to any corner/side of the screen to move the world map around istead of the default 640x480 edges
    
  Bugs:
    * Picture of who you are talking to is messed up in non-talking head dialogs
    * Accessing custom settings on your party members crashes
 
Back
Top