Fallout 2 mod FO2 Engine Tweaks (Sfall)

Timeslip said:
Nirran said:
playmoviealpharect decompiles into playmoviealpha(one of the broken ones) i dont think the problem is in the decompiler,i double check the text and positioning of the op_codes,seems right(possible im wrong)

edit : pretty sure it is in the compiler,it shows 807d for playmoviealpha,and both int2ssl and ruby show that as playmovieapharect

Nirran
The compiler was wrong, but the decompilers have both been infected by the wrongness. 807d is playmoviealpha, (a 2 argument function,) 807e is playmoviealpharect. (A 6 argument function.) The compiler had a bug which caused it to compile playmoviealpharect as playmoviealpha, and to not compile playmoviealpha at all. The bug isn't in the opcodes; it was in the bit that converted the string "playmoviealpharect" into an opcode, so the opcodes you see in oplib.h are correct.

ok thank you timeslip,i will update int2ssl and ruby after next modders_pack release

question : what do i need to do to change file version in visual solutions(in the windows properties tab)?

edit : nevermind on the version question,i found it

Nirran
 
Nirran said:
ok thank you timeslip,i will update int2ssl and ruby after next modders_pack release
I'm not planning to add any new functions between now and 2.8, so there's nothing stopping me from making a new modders pack release now. Let me finish up the foreach loop syntax I was working on, (maybe another hour or two,) and I'll upload it.

Nirran said:
question : what do i need to do to change file version in visual solutions(in the windows properties tab)?
Depends how the project is set up. In sfall it's in a version.h header, but it may be in a .rc file, or it may not have a file version at all, and just spit out a version in a printf somewhere in the main function or something.
 
Timeslip said:
Nirran said:
ok thank you timeslip,i will update int2ssl and ruby after next modders_pack release
I'm not planning to add any new functions between now and 2.8, so there's nothing stopping me from making a new modders pack release now. Let me finish up the foreach loop syntax I was working on, (maybe another hour or two,) and I'll upload it.

thanks

Nirran
 
Finished. The 2.8 version of sslc is up here. (It's just sslc and the documentation, rather than a full modders pack, and it's at users.sourceforge rather than the sfall project page because obviously any scripts using the new sslc 2.8 features will crash and burn without sfall 2.8, so I don't want people downloading it without reading this post. :P)

Edit: You may need to right click that link and click save; The temp directory seems to have lost its .7z mime type entry again. :roll:

The readme describes what's new since 2.7, but as an overview there's more concise variable decelerations, automatic array variables, inc/dec operators, for loops, foreach loops, the bug fixes mentioned a few posts ago, and a bug fix for the 2.7 array syntax that broke assignments if you used +=, -= etc instead of just a straight forward :=. (As well of course as the set of new opcodes, which is presumably what you were after.)

You shouldn't need to worry about the new syntax too much for the decompiler. For the most part you'll end up with something that looks a bit messy, but which will still make sense and be recompilable.
 
Timeslip said:
Finished. The 2.8 version of sslc is up here. (It's just sslc and the documentation, rather than a full modders pack, and it's at users.sourceforge rather than the sfall project page because obviously any scripts using the new sslc 2.8 features will crash and burn without sfall 2.8, so I don't want people downloading it without reading this post. :P)

Edit: You may need to right click that link and click save; The temp directory seems to have lost its .7z mime type entry again. :roll:

The readme describes what's new since 2.7, but as an overview there's more concise variable decelerations, automatic array variables, inc/dec operators, for loops, foreach loops, the bug fixes mentioned a few posts ago, and a bug fix for the 2.7 array syntax that broke assignments if you used +=, -= etc instead of just a straight forward :=. (As well of course as the set of new opcodes, which is presumably what you were after.)

You shouldn't need to worry about the new syntax too much for the decompiler. For the most part you'll end up with something that looks a bit messy, but which will still make sense and be recompilable.

thanks

what does the compiler add to addRegion?ive tried several ways of decompiling,it always fails to decompile,i am assuming it is a specific function,should it be an expression?thats the only way i could get it to compile,expression 0 arg

Nirran
 
Nirran said:
what does the compiler add to addRegion?ive tried several ways of decompiling,it always fails to decompile,i am assuming it is a specific function,should it be an expression?thats the only way i could get it to compile,expression 0 arg
I've already told you that AddRegion isn't a simple procedure, and given you the syntax. Don't ask me what opcodes it gets compiled into, because I have no idea.
 
Timeslip said:
Nirran said:
what does the compiler add to addRegion?ive tried several ways of decompiling,it always fails to decompile,i am assuming it is a specific function,should it be an expression?thats the only way i could get it to compile,expression 0 arg
I've already told you that AddRegion isn't a simple procedure, and given you the syntax. Don't ask me what opcodes it gets compiled into, because I have no idea.

sorry i forgot about that post(didnt sleep much night before last)

thank you for all the hours you have spent working on things i have asked for,cant tell you how much i appreciate it

Nirran
 
Sorry to interupt, Timeslip and Nirran, but i have a question/request for sfall:

Is it possible to add a script function that can bring up the 'poisoned' or 'radiated' bar with new text?

I ask as several modders here have wanted to reimplement the food and water system that never made it into the game. Crucial to this is being able to have the game display 'hungry', 'starving' etc.

Is this possible?
 
compiler "Error! Expected ; at the end of variable declaration" with a script i know the sythax is right,the error was with a procedure arg(procedure had one arg)

Nirran
 
Can the next addition of Sfall have feature that allows the player to highlight the dead critters under the scenery, similar to item highlight - (this must sound weird considering what I discussed a page or two back), but it will allow players to search critters more easily when they are bunched up, or hidden under objects. A different color would also be nice, such as red.
 
Nirran said:
compiler "Error! Expected ; at the end of variable declaration" with a script i know the sythax is right,the error was with a procedure arg(procedure had one arg)
Can you post the relevant snippet of script please? (Just the erroring line and the line each side will suffice.)
 
Timeslip said:
Nirran said:
compiler "Error! Expected ; at the end of variable declaration" with a script i know the sythax is right,the error was with a procedure arg(procedure had one arg)
Can you post the relevant snippet of script please? (Just the erroring line and the line each side will suffice.)

Code:
procedure Delete_Removed_Items(variable item);

happened in every script i tried to compile(only tried a few),when the procedure declaration had arg's

edit : the whole script is in my Megamod Custom Books mod(source),if you have problems reproducing the error

Nirran
 
Nirran said:
Code:
procedure Delete_Removed_Items(variable item);
Ouch, yes, that error is obvious thinking about it. The semicolon check I added is missing a V_LOCAL guard, so it's triggering where it shouldn't.

Thanks, will get that fixed. In the meantime, the -b command line switch will remove that check for you, but I suspect that procedures with more than one argument will still have a problem because my comma-separated-variables addition is missing the same check.

Edit: Fixed and reuploaded.
 
Timeslip said:
Nirran said:
Code:
procedure Delete_Removed_Items(variable item);
Ouch, yes, that error is obvious thinking about it. The semicolon check I added is missing a V_LOCAL guard, so it's triggering where it shouldn't.

Thanks, will get that fixed. In the meantime, the -b command line switch will remove that check for you, but I suspect that procedures with more than one argument will still have a problem because my comma-separated-variables addition is missing the same check.

Edit: Fixed and reuploaded.

thanks,the prvious link for the fix?

Nirran
 
Timeslip said:
Nirran said:
thanks,the prvious link for the fix?
yup

awesome

edit : when having massive amounts of globals var,would array's be less resource intensive?

edit : when the source has
Code:
if()end else if()end
it decompiles into
Code:
if()end else begin if()end end
is that the compiler?or the decompiler?id like to get rid of it

Nirran
 
I tried use mouse_on and mouse_off from extra.H header. It seems that those functions dont work.
The same problem is with call_helpscreen (I didnt check other).
Against call_helpscreen I tried to use
call_offset(4472692) and call_offset_v0(4472692) but it didnt work too.
 
Timeslip, got a question for you. I've hacked the Fallout 2 executable and edited 4 constant integers, specifically the AP costs for the special unarmed attacks.

Obviously this produces a bad checksum, so I'm wondering, how do I go about making a new version of sfall with a CRC for my version of Fallout 2? I can't seem to find the source code for the ddraw.dll anywhere in the 7z archives on SourceForge, which leads me to believe you don't want people mucking about with it :)

Alternatively, is it possible to script the AP costs for the unarmed attacks instead? I'm all thumbs when it comes to Fallout scripting, but if this is possible I'll try to make it work with scripts.
 
Nirran said:
edit : when having massive amounts of globals var,would array's be less resource intensive?
I doubt there will be any difference, unless you're doing something really weird with them. Of course, if you ever want to do any operations in a loop, arrays will be far more efficient in terms of the amount of code you'll have to write.

Nirran said:
edit : when the source has
Code:
if()end else if()end
it decompiles into
Code:
if()end else begin if()end end
is that the compiler?or the decompiler?id like to get rid of it
It's probably a bit of both. The compiled script doesn't have all the information that was in the source code, so any decompiler will have to make guesses about what the original looked like.

Cubik2k said:
I tried use mouse_on and mouse_off from extra.H header. It seems that those functions dont work.
The same problem is with call_helpscreen (I didnt check other).
Against call_helpscreen I tried to use
call_offset(4472692) and call_offset_v0(4472692) but it didnt work too.
What extra.h header? There's no file in the modders pack by that name.

In any case, my WAG is that you're missing the AllowUnsafeScripting setting.

Magnus said:
Obviously this produces a bad checksum, so I'm wondering, how do I go about making a new version of sfall with a CRC for my version of Fallout 2?
You don't. You use the ExtraCRC setting for testing, and either a script or sfall patch for a release.

Magnus said:
I can't seem to find the source code for the ddraw.dll anywhere in the 7z archives on SourceForge, which leads me to believe you don't want people mucking about with it :)
You aren't looking very hard then. :P

http://sfall.svn.sourceforge.net/viewvc/sfall/

And a look at the bottom of the readme or the credits page in game should be a good indication of how many people have 'mucked about' with sfall already.

Magnus said:
Alternatively, is it possible to script the AP costs for the unarmed attacks instead?
Look at the hook scripts readme. You want hs_calcapcost.int.
 
2.8 is up. This is a little ealier than I was planning; there's some critical hit table stuff coming for the next RP that isn't quite done, so there'll probably be a 2.8b release shortly. This one is mainly to save Haenlomal from having to wait around for me to finish everything else.

Code:
v2.8a
>New script functions: len_array, resize_array, temp_array, fix_array, string_split, list_as_array
>New hook scripts: hs_removeinvenobj, hs_barterprice
>Added an option to adjust the rotation rate of the critter frm in the inventory/new char screens. (From Mash)
>the list_xxx functions can now list over scenery, walls and misc objects.
>A new ammo mod (From Haenlomal)
>Fixed a crash bug in get_uptime

The modders pack has been updated too, and includes the new compiler. Check the readme for the new syntax available, and remember that the -b command exists for any old scripts that depend on any old behaviour. (There should be very few instances of that, hopefully.)

As a caveat, I've started having a bit of a cleanup of sfall. Options intended for use only while developing mods or trying to fix problems rather than by normal end users are being shifted into the debugging section of ddraw.ini, (ExtraCRC, AllowUnsafeScripting, SkipCompatModeCheck,) and options that should always be on either because turning them off has bitrotted (ScriptExtender,) or because having them on has no downsides (most of the engine bug fixes) are being removed from ddraw.ini entirely.
 
Back
Top