F2LC problem

Discussion in 'Fallout General Modding' started by Lich, Mar 9, 2005.

  1. Andy-Spacetrain

    Andy-Spacetrain First time out of the vault

    Aug 11, 2004
    Done, download the loader from the same place. :D
     
  2. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Using that loader, the game starts on April 5, 0002. Maybe I can meet a messiah in the wasteland? :lol: Did you set that date in FO2LC or did the 13 year patch screw with the start date?
     
  3. Andy-Spacetrain

    Andy-Spacetrain First time out of the vault

    Aug 11, 2004
    lol, no, thats my loader. Long story about why thats there, can you still use it anyway?
     
  4. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Well I could ... but I now have to advance a hell of a lot, like a millenium before I start advancing 13 years ... and I'm limited by how much I can advance at a time, so no, I don't think I can use it this way.
     
  5. Andy-Spacetrain

    Andy-Spacetrain First time out of the vault

    Aug 11, 2004
    Ah I didn't realise that, updated the loader again. The year should be back to normal now. Thanks for helping :)
     
  6. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Yep the 13 year patch works. When it gets to 2254 it reverts back to June 13 2241. If you need to test time advance, you can drop this acklint.int script into \data\scripts or \patch000.dat\scripts, and every time you talk to klint (on the first map), time will advance 3 months.

    procedure talk_p_proc begin
    display_msg("Time Warp");
    game_time_advance(3 * ONE_GAME_MONTH);
    end

    I'm sure you can advance more than that, but I had problems before advancing a lot at a time, so I did it this way. So approx 50 clicks on klint will advance to the 13 year limit.

    Nice work Andy. Your loader is ideal for my mod distribution. I don't even use the Fallout2 directory. You make a directory with the mod name \FO2XP ... the patch is FO2XP.DAT and config is FO2XP.cfg. Right now all you do is click on 4 self-extracting rar files, change the FO2XP.cfg to point to the FO2 master.dat, critter.dat, and music files, click a batch file and you're running. NOTHING gets touched in the Fallout directory (thanks to your loader).
     
  7. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Yeah I was just testing out FSE on Win2k and it crashed really hard. If there are specific things you need tested on NT based windows, let me know.

    For now what I am doing is this: The TextPad editor has ability to set up custom document classes, and also to run external program (for example compiling), and show the results of that external process inside the TextPad results window. The net effect is almost like FSE. To compile I just select run, the compile messages show in the editor, and also I have syntax highlighting, because I was able to create a new syntax file with the FO keywords.

    The way I automated the compile process... there is my custom fo2comp.bat:

    echo off

    @if not exist %2.ssl goto NOSOURCE > NUL
    @copy %2.ssl %1\temp.c > NUL
    @echo.
    @echo Compiling %2.SSL
    @echo.
    @%1\bin\wcc386 %1\temp.c /pc /fo=%1\temp.i /w4
    @copy %1\temp.i %1\temp.ssl > NUL

    @cd %1
    @.\bin\dos4gw .\bin\compile temp.ssl

    @if %errorlevel% neq 0 goto ERROR

    @copy temp.int %3\scripts\%2.int > NUL
    @copy temp.int %4\scripts\%2.int > NUL
    @echo.
    @dir /b %3\scripts\%2.int
    @dir /b %4\scripts\%2.int

    @del temp.c
    @del temp.i
    @del temp.ssl
    @del temp.int
    @goto DONE

    :ERROR
    @del temp.int
    @echo ERROR: %_CWDS%%2.ssl >> \%1err.log
    @C:\TextPad\TextPad.exe temp.ssl
    @goto DONE

    :NOSOURCE
    @echo.
    @echo Error: Source file %2.ssl not found
    @echo.

    :DONE
    @echo.

    This batch file has 4 input parameters:

    %1 is location of compiler
    %2 is name of script to compile
    %3 is location of source tree (where patch source files are)
    %4 is location of binary tree (where game engine is)

    I have 2 locations that are equivalent of "Fallout 2" directory in FSE because ultimately I need two directory trees: one that the mapper can read (source tree) and one that the FO2 game engine can read (binary tree). I want these separate because the game engine behaves differently than mapper (deletes protos and all of that). So the compile script copies the compiled .INT file to both locations %3 (for mapper) and %4 (for FO2 engine).

    I have another set of scripts that will build a distribution from my source tree and put it all into self-extracting rar files. This was finally possible when DAT2 became available for batch building of DAT files. I have settled on a distribution model where:

    New critter art is put into a custom DAT file (critter_patches). The data, text, and script files are kept outside of DAT file because they don't need to be in DAT (the game engine won't delete these) and by having them outside changes can be made easily at any time. In the compile script, the INT goes to both the source (mapper) and binary (game engine) tree, so I can test with either.

    I have these scripts to build the game from the source tree:

    1) Build-Config.bat - Makes a self-extracting RAR file with the data, text, and script files

    @echo off
    SET FO2XPVER=Alpha7-2

    @ECHO.
    @ECHO Building FO2XP CONFIG Archive
    @ECHO Version %FO2XPVER%
    @ECHO.

    @IF EXIST FO2XP-CONFIG*EXE @ERASE FO2XP-CONFIG*EXE
    @IF EXIST TEMP @RMDIR .\Temp /S /Q
    @MKDIR .\Temp
    @MKDIR .\Temp\Data

    @ECHO Copying Source Files
    @XCOPY \FO2XP\Source\Data .\Temp\Data /S /E /V /R /Y /I /EXCLUDE:.\Source\FO2XP-CONFIG-EXCLUDE.TXT > NUL

    @ECHO Building RAR Archive
    @RAR32 a -ep1 -r -m5 -sfx FO2XP-CONFIG-%FO2XPVER% .\Temp\* > NUL
    @RMDIR .\Temp /S /Q

    @ECHO.
    @ECHO Created CONFIG Archive
    @DIR /B FO2XP-CONFIG*EXE
    @ECHO.
    pause

    The "exclude" file (FO2XP-CONFIG-EXCLUDE) contains the folllowing
    \FO2XP\Source\Data\art
    \FO2XP\Source\Data\maps
    \FO2XP\Source\Data\proto
    \FO2XP\Source\Data\sound
    \FO2XP\Source\Data\worldmap.dat


    2) Build-Critter.bat - Makes a critter art dat file and puts it in a self-extracting rar file

    @echo off
    SET FO2XPVER=Alpha7-2

    @ECHO.
    @ECHO Building FO2XP CRITTER Archive
    @ECHO Version %FO2XPVER%
    @ECHO.

    @IF EXIST FO2XP-C.DAT @ERASE FO2XP-C.DAT
    @IF EXIST FO2XP-CRITTER*EXE @ERASE FO2XP-CRITTER*EXE
    @IF EXIST TEMP @RMDIR .\Temp /S /Q
    @MKDIR .\Temp

    @ECHO Copying Source Files
    @XCOPY \FO2XP\Source\Data .\Temp /S /E /V /R /Y /I /EXCLUDE:.\Source\FO2XP-CRITTER-EXCLUDE.TXT > NUL

    @ECHO Building Critter DAT
    @CD Temp
    @DAT2 a -r \FO2XP\Source\Build\FO2XP-C.DAT *.* > NUL
    @CD ..

    @ECHO Building RAR Archive
    @RAR32 a -ep1 -m5 -sfx FO2XP-CRITTER-%FO2XPVER%.rar FO2XP-C.DAT > NUL
    @RMDIR .\Temp /S /Q
    @ERASE FO2XP-C.DAT

    @ECHO.
    @ECHO Created CRITTER Archive
    @DIR /B FO2XP-CRITTER*EXE
    @ECHO.
    pause

    The "exclude" file (FO2XP-CRITTER-EXCLUDE) contains the folllowing
    \FO2XP\Source\Data\art\intrface
    \FO2XP\Source\Data\art\inven
    \FO2XP\Source\Data\art\items
    \FO2XP\Source\Data\art\misc
    \FO2XP\Source\Data\art\scenery
    \FO2XP\Source\Data\data
    \FO2XP\Source\Data\maps
    \FO2XP\Source\Data\proto
    \FO2XP\Source\Data\scripts
    \FO2XP\Source\Data\sound
    \FO2XP\Source\Data\text
    \FO2XP\Source\Data\worldmap.dat


    3) Build-Master.bat - Makes a master dat (patch) file with everything but the data, text, and scripts, which are archived by the Build-Config.bat file

    @echo off
    SET FO2XPVER=Alpha7-2

    @ECHO.
    @ECHO Building FO2XP MASTER Archive
    @ECHO Version %FO2XPVER%
    @ECHO.

    @IF EXIST FO2XP-M.DAT @ERASE FO2XP-M.DAT
    @IF EXIST FO2XP-MASTER*EXE @ERASE FO2XP-MASTER*EXE
    @IF EXIST TEMP @RMDIR .\Temp /S /Q
    @MKDIR .\Temp

    @ECHO Copying Source Files
    @XCOPY \FO2XP\Source\Data .\Temp /S /E /V /R /Y /I /EXCLUDE:.\Source\FO2XP-MASTER-EXCLUDE.TXT > NUL
    @MKDIR .\Temp\art\critters
    @COPY \FO2XP\Source\Data\art\critters\critters.lst .\Temp\art\critters > NUL

    @ECHO Building Master DAT
    @CD Temp
    @DAT2 a -r \FO2XP\Source\Build\FO2XP-M.DAT *.* > NUL
    @CD ..

    @ECHO Building RAR Archive
    @RAR32 a -ep1 -m5 -sfx FO2XP-MASTER-%FO2XPVER%.rar FO2XP-M.DAT > NUL
    @RMDIR .\Temp /S /Q
    @ERASE FO2XP-M.DAT

    @ECHO.
    @ECHO Created MASTER Archive
    @DIR /B FO2XP-MASTER*EXE
    @ECHO.
    pause

    The "exclude" file (FO2XP-MASTER-EXCLUDE) contains the folllowing
    \FO2XP\Source\Data\art\critters
    \FO2XP\Source\Data\data
    \FO2XP\Source\Data\text
    \FO2XP\Source\Data\scripts


    4) Build-System.bat - Make a self-extracting rar file that includes patched Fallout2 executables that enable debugging, change resolution etc, along with an FO2LC loader and batch file for starting the game in different modes.

    @echo off
    SET FO2XPVER=Alpha7-2-1

    @ECHO.
    @ECHO Building FO2XP SYSTEM Archive
    @ECHO Version %FO2XPVER%
    @ECHO.

    @IF EXIST FO2XP-SYSTEM*EXE @ERASE FO2XP-SYSTEM*EXE
    @IF EXIST TEMP @RMDIR .\Temp /S /Q
    @MKDIR .\Temp

    @ECHO Copying Source Files
    @XCOPY \FO2XP\Source\System .\Temp /S /E /V /R /Y > NUL

    @ECHO Building RAR Archive
    @RAR32 a -ep1 -r -m5 -sfx FO2XP-SYSTEM-%FO2XPVER% .\Temp\* > NUL
    @RMDIR .\Temp /S /Q

    @ECHO.
    @ECHO Created SYSTEM Archive
    @DIR /B FO2XP-SYSTEM*EXE
    @ECHO.
    pause


    I also have a Build-All.bat file which calls the above 4 build scripts, building everything. The end result is this: 4 self-extracting RAR files. Make a directory for new game, copy those rar files in and click on them, edit the custom fo2xp.cfg, and run the game. Nothing goes in Fallout2 directory, and none of the original Fallout2 files get modified in any way.


    So maybe this is a potential idea for FSE, the main concepts being:

    1) Allow for both a source tree (can be used by mapper) and a binary tree (can be used by game engine) ... in the compiler configuration ... my script copies compiled script to both locations so I can test in both mapper and game.

    2) A build system that generates all of the distribution files for a game mod.

    My mod is a bit complex (having 4 RAR files) because it is so large, the new critter art is some 50MB alone, this is why I split the distribution up. There are other reasons for doing a split this way: critter art rarely changes, protos eventually get stabilized, but the data, text, and script stuff tends to change all the time, hence the splitting into separate RAR files. As of last build this mod is about 50 MB download total (4 maximum compression RAR files).


    EDIT: Jargo, one thing that bugs me about fallout compiling in general: the error message from compile.exe is the line number in the temp.ssl with all of the includes. In my script I have TextPad open that file if there is an error, but every time I have to look at the line in temp.ssl then go to the source file and find that same code to fix it, at bit cumbersome.

    I am thinking about writing a lua script that reads temp.ssl post compile, and figures out the line number in the real source file where the error is. In an ideal editor/compiler environment, the system would position the cursor where the error is in the source file. With FO it might be tricky because sometimes the error is in a header file, but it should be possible to determine the line number of error in those too.

    If FSE can be fixed to work on NT-style windows (Win2K/XP) I'd prefer to use it rather than my cobbled together environment. Anything I can do to help?
     
  8. Myk-El

    Myk-El First time out of the vault

    Feb 23, 2005
    Hello all!

    I thought I would point out that I have FSE running on my
    Windows XP system at home, and it works perfectly fine
    for me.

    I don't the version information for either, at the moment, as
    I am at work.
     
  9. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Hmmm I thought Jargo said it had problems on 2K or XP, which it seems to have for me on 2K. I will try again and see if maybe I had some config problem. The FSE says it compiled the script fine, but I cannot find the compiled .INT, and I end up getting a bunch of nasty errors after the compile. It seems like it might just be having trouble moving the compiled file to the right place.
     
  10. jargo

    jargo Where'd That 6th Toe Come From?

    May 25, 2003
    Ok this is easy to implement(i personally don't use game for testing almost only mapper so i use only one dir tree)

    This my be a great idea, i was thinking about something similar but then there was no DAT2 at that time(very handy tool).


    Uhm this is a hard thing to do, i have already some methods for this but just can't get a 100% working system(as you said macros are the problem).
    But i try to implement something that will work.

    I am not sure if it works or not on NT since i cannot test it.
    Try to compile a simple script (check that you have fallout2/data/scripts dir), there is a bug in public version and FSE does not really checks that it has all needed files.

    Some info that i need:

    1) Do you see precompilation info (error etc)? try to create precompilation error setting wrong dir in #include.

    2) Do you see error info from compiler in window when there is compilation error.(this compiler uses dos4gw extender and this makes hard getting his output correctly)

    3)After compilation is done check if you have some new idle process in memory(normal visible in ctrl-alt-del window in Win98).
     
  11. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    There have been times when I've spent many hours in the mapper, then try it on the game, and something is seriously wrong. I don't spend too much time in the mapper before testing in game. In theory they are supposed to be the same but there are things that are not.

    And if one does want to switch between mapper and engine, they either have to keep changing permissions on proto directories or make a new DAT file for testing on game engine. With the scripts I have now it is a few clicks to completely rebuild my dist from my source, and run it on the game, exactly how it will be for the people download it to play .....

    There is another simple solution though: rather having FSE copy the files, you could execute a generic batch file that does it. Then if I want to I can edit this post-compile script and customize what it does with the output of the compiler. If I wanted the INT copied to two places, I just have 2 copy commands.

    This was the problem. I never use the Fallout2 directory anymore. I have a different source and dist tree for development. When I changed FSE config to \Fallout2 it compiled the script fine. I suggest though that the build tools should allow me to have my code anywhere. Rather than Fallout2 I'd consider it the "patch" or "source" directory, wherever all the new source is. The other tree is the dist tree, it doesn't include script source and a bunch of stuff.
     
  12. jargo

    jargo Where'd That 6th Toe Come From?

    May 25, 2003
    Ok that is solved, now FSE uses Fallout2 folder only to read info from fallout2.cfg and it copy files to master_patches.

    Also after the compilation is done, PostCompile.bat file is run so you can do something with output file (script name is passed as parameter).
     
  13. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Excellent, thanks. One thing though: Andy's FO2LC allows specifying an alternate cfg file name. On my mod I have FO2LC loading my custom FO2XP-M.DAT master dat (instead of patch000.dat) and using fo2xp.cfg instead of fallout2.cfg. Would it be possible to allow browsing to select the config file in FSE settings screen (rather than the folder location of fallout2.cfg)? Or what about an FSE.cfg file where I could configure these things?

    Perfect, that allows me to do anything I want with the output.
    Thanks for making these changes.

    One other thing I'm wondering about, regarding the precompiler, there are different versions of watcom for NT type systems. Looks like they have a common name of wcc.exe and wcc386.exe. Which program does FSE look for exactly for precompiler?

    I find that I only need the 4 files in this archive to precompile
    http://downloads.openwatcom.org/ftp/11.0c/zips/c_binnt.zip

    There is another one for non-NT windows
    http://downloads.openwatcom.org/ftp/11.0c/zips/c_binw.zip

    I used to have the whole watcom installed but thats a waste of a lot of disk space since only the above 4 files are needed to do the falllout precompiling.
     
  14. jargo

    jargo Where'd That 6th Toe Come From?

    May 25, 2003
    Thats not a problem, since fallout2 folder is used only for cfg file location i make that config will let you select any *.cfg file.

    BTW i did this to precompiler folder, now you can select location of wcc.exe or wcc386.exe. Old version uses wcc386.exe.

    Well i always used only precompiler files, in win98 there is no difference between NT and no-NT version both of them work ok(i always used NT version).
    NT version will also be added to new FSE (and compiler too) so no need to install watcom etc(it seams that for many peoples that was a problem)


    Ah and i solved the problem with showing errors in temp.i, now it shows in script (line number is calculated from procedure position).
    It is not bulletproof but it works in 99%(need to be tested some more).
     
  15. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    Hi Jargo ... are these recent changes in the FSE download at your site? They don't appear to be.

    This is what is happening right now. I have my game directory set to F:\FO2XP (this is the equivalent of Fallout2 directory). If I configure FSE to use that as Fallout2 directory, scripts compile fine and int is copied to \FO2XP\data scripts.

    I have a source tree at F:\FO2XP\Source. I had to change my dir structure slightly, but as long as there is \FO2XP\Source\Data\Scripts directory, then I can compile with FSE there too (scripts are copied to the source tree \data\scripts rather than the game dir \data\scripts).

    So this is not so bad as is, at least I can toggle the FSE config to compile to either location. But I'm wondering why there is no post-compile.bat, you didn't release that version yet?

    Regarding the cfg file it seems that FSE works when told fallout2 is located at \FO2XP\Source even though there is no cfg file there. Seems that FSE is taking that directory name (whatever is specified as fallout2) and appending \data\scripts to know where to copy the compiled int file (is that right?). Why does FSE even need to read any cfg file?
     
  16. Perceptron

    Perceptron First time out of the vault

    Jul 12, 2004
    Where i can download Fallout Script Editor?
    Jargo, update your link, please.
     
  17. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
  18. jargo

    jargo Where'd That 6th Toe Come From?

    May 25, 2003
    sorry dude it looks like i have a little problem with my FTP pass (i forgot it) so new version is not uploaded yet.
    adittional i need to test if installation works ok, but i try to solve all that today.

    Yup old version works just as you said, but new ver has built in dat unpacker and reads master.dat dir from cfg.
     
  19. dude_obj

    dude_obj Vault Senior Citizen
    Moderator

    Oct 19, 2004
    No problem ... since I figured out how to arrange my directory tree to make FSE happy, I can easily point it anywhere I want now. Tonight I compiled 58 random encounter scripts with FSE, and I have to say, I love it.

    Hmmm okay ... curiosity though .. what does it need from there? You configure the dialog msg directory, location of source headers and compiler, so what else does it need? And I guess this is the more important question: if I do something like "add global variable" from the menu, is it modifying FO config files? Do you have a list of exactly what files it can or will update?

    A few minor things ... perhaps for future version ...

    Is there a way to turn off that margin line and have it stay off globally? If I turn it off it goes back on when I open a new script.

    It would be nice if the over-write warnings could be turned off too, since two windows pop up for each compile.

    Also a bit odd that FSE asks me if I want to overwrite (the INT file), but doesn't show the directory name until after I say yes or no, then it tells me where the file was written.

    None of this is a big deal though, I'm already more productive in FSE, and I love how I can have multiple source files open with those folder style tags. That works very well for copying stuff among source files.
     
  20. jargo

    jargo Where'd That 6th Toe Come From?

    May 25, 2003
    Upss this was a bug, thanks fixed.

    Ok you're right - done.

    Yup as always right - done. :)

    Uhm FSE can really speed up writing script process if uses by experienced user. Dialog creator os not very easy in use but you can create dialogs faster than you can write msg file ;).

    Here is the new version of FSE it is 1.5a beta since heavy code changes have been made(GUI is almost the same).
    Included Undat, decompiler, new converter, Fixed dialog creator, better msg editor, text to msg importer etc.

    ah and there is also the option to convert multiple files from Noids to Iply format.

    If you could test it a little before i post it on site that would be great.
    (like the error showing in source script not in temp.i feature etc.)
    Thats goes also to other kind souls out there :D.

    PostCompile.bat is placed in binary subfolder of FSE main dir(where compile.exe and watcom is).

    Best uninstall old version and then install new one but if you don't want to lose your setup new version can be installed on the old but remember to check setup dirs after that.

    Here is direct link on FMC server: http://bug.ii.uj.edu.pl/fallout/tools/FSE 1.5a Setup.exe