New Location Mods

Turns out all the scripts fopr hte various mods are now out of order :?

So I have to go through the maps for B21 and Den resisdentail and point htem to the correct scripts again :)

oh well, fun things to do on a monday nigth after work
 
Wild_qwerty said:
Turns out all the scripts fopr hte various mods are now out of order :?


Unfortunately, as far as the engine and mapper are concerned, the script "name" is actually an integer, not a name. This is why the scripts.h header is needed, to translate the script names to numbers.

The scripting commands that refer to scripts as parametes expect integer values, like for example create_object_sid has these arguments: pid (int), tile (int), elev (int), sid (int). That last one is the script ID, but its an integer not a name. So what they do in scripts is something like this (this is fred changing appearance in the den):

#define NAME SCRIPT_DCFRED

temp_fred := create_object_sid(PID_UP_CLASS_MALE_CITIZEN, 0, 0, NAME);

At compile time the NAME in the command create_object_sid is defined above as SCRIPT_DCFRED, and SCRIPT_DCFRED will be found in SCRIPTS.H and thus becomes integer 916:

#define SCRIPT_DCFRED (916) // dcFred.int ; Fred in the Den

So this is why scripts are out of order, they are only integers, so each mod added at the end, using the same integer numbers.

It seems that the whole game works like this. For example if you try adding an FRM in the middle of items.lst you'll see that all items after that will be off by one (wrong image).
 
okay, I am trying to get the sources for the scripts from lich at the moment, which is delaying things.

The problem is that the scripts are loading the wrong dialog files and crashing FO2

Is it possible to hex edit the scritps to point to the right dialog?
 
Is it possible to hex edit the scritps to point to the right dialog?
Yes it is, but its a hard way, better thing is to decompile script back to *.ssl make changes and compile it to *.int.
 
Wild_qwerty said:
okay, I am trying to get the sources for the scripts from lich at the moment, which is delaying things.

This is the "proper" solution, the scripts need to be compiled.

Wild_qwerty said:
The problem is that the scripts are loading the wrong dialog files and crashing FO2

Yes when each scipt is compiled, its script name is translated into a number from scripts.h, and this is written inside the binary INT file. Then when the script tries to access \test\english\game\dialog, it ends up pointing to the wrong text file, because the number is wrong (since you actually moved the scripts from its original location in the numbered list of scripts).

Wild_qwerty said:
Is it possible to hex edit the scritps to point to the right dialog?

I just proved that its possible, but as a software developer I cringe at this kind of change.

I made two scripts that only do a display_message (printing text from \text\english\game\dialog\scriptname). I made the display message print the script name, so I could see what happens when I move the script. Then, to prove why your dialog doesn't work, if I switch the two scripts around (their order in scripts.lst) they do refer to the wrong file in \text\english\game\dialog. So that proves that you can't just move scripts around without having dialog problems (because the scriptname is needed to determine the file in dialog to use, and its a hardcoded number at compile time).

Now what I did was search inside the int (with a hex editor) for the hex equivalent of the decimal number of the script (as its shown in scripts.h). The first new one after the FO2 original scripts is script number 1303 decimal, which is hex 0517. So when I search for that hex number I do find it ... at hex offset 85CH.

Now getting back to my test, I had the two scripts that were switched around in scripts.lst. If I edit the hex value at 85CH and make it the number of its new location, the dialog is fixed. Now the scripts have been moved in scripts.lst but they once again refer to the right file in \text\english\dialog.

So it looks like you can fix the dialog this way, but it will not be very much fun, and it doesn't guarantee that everything will work. This fixed the dialog but who knows what else might be hardcoded in the INT files (related to script IDs). But if you want to try it, copy the script names in the exact order they are in scripts.lst (the new ones) to the end of scripts.h and change the numbers there, to use as a reference. Then for each script, look at the number in scripts.h, convert to hex, go to hex offset 85CH in the INT file, and change the hex value to the new value.

EDIT ... correction ... you can't just go to hex location 85CH ... what you need to do is convert the ORIGINAL decimal number of the script to hex and search for that occurance of the hex number in the int file. Then at that location replace that number with the new value in hex. This really isn't worth doing unless you're absolutely certain you can't get the script source and really want to fix it.

A MUCH better plan is to get the script source code if you can.
Send them to me if you want and I can recompile them for you.
 
But there is other option.
As mentioned abowe there is a working decompiler (Noid's) he can decompile int files to ssl format.
Syntax is little different but in FSE there is a converter from Noid to Inteply format. Then you can change script number (by hand) and recompile it using original compiler.
If you don't get sources from Lich i can doit for you(I have new version of FSE that can decompile,convert and compile int files in an simply way ;) )
 
Thanks guys, I will get together the scripts file and the Script.lst and script.h files in the right order and then send through for one of you guys to fix it for me :)
 
jargo said:
I have new version of FSE that can decompile,convert and compile int files in an simply way

Oh my ... is this available for download now? I'm very curious to see how this works and what the decompiled source looks like. It uses Noid's and then converts? Sounds great!

I really wish we had the FO1 script headers, so we'd have some names for all those numbers, it's really difficult to trace what is going on with FO1 scripts.

EDIT: I tried the the Noid-to-Interplay converter feature of FSE last night, very nice! It would also be nice to have a command line tool that does just this, because many of us have the whole set of FO1 decompiled source sitting in a directory. It would be nice to be able to run one command and convert all of them to Interplay format, something like this:

noid2iply *.ssl
 
Oh my ... is this available for download now
Not yet, it is in heavy testing now :), but if you want, i can send you current beta for tests.

It would also be nice to have a command line tool that does just this, because many of us have the whole set of FO1 decompiled source sitting in a directory. It would be nice to be able to run one command and convert all of them to Interplay format, something like this:
Ok i will add something like this in current version. :wink: [/code]
 
jargo said:
Oh my ... is this available for download now
Not yet, it is in heavy testing now :), but if you want, i can send you current beta for tests.

Hmm I'm a bit confused ... I upgraded to the latest FSE last night and found the conversion function (Noid->Iplay Converter F10). So what's different in this unreleased version? It makes it easier?

BTW your FSE software looks very professional. Totally impressed, nice work Jargo. Even the uninstall works properly, which I can't say about half the windows software in the world.
 
Hmm I'm a bit confused ... I upgraded to the latest FSE last night and found the conversion function (Noid->Iplay Converter F10). So what's different in this unreleased version? It makes it easier?
Well conversion is almost the same (small bug fixed) but in new version you have build in dat unpacker and int decompiler (Noid decompiler in binary version), so you can open dat file and just click on a *.int file and FSE will unpack and decompile it for you. :wink:
There will be some other changes too.

BTW What windows do you use? Is script compiling in FSE working for you?

BTW your FSE software looks very professional. Totally impressed, nice work Jargo. Even the uninstall works properly, which I can't say about half the windows software in the world
Thx :D its nice to see it works for someone
 
Wild, did you try out the New Vision MOd? Combine the reduxed Klamath and the other spots with this and you'll have one kick ass Fallout Expansion pack!
 
Back
Top