Fallout 2 mod FO2 Engine Tweaks (Sfall)

Discussion in 'Fallout General Modding' started by Dude101, Jul 30, 2007.

  1. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    True. Kinda shit, but oh well. It's not like I'm working on anything that needs it, so whatever.
     
  2. Muttie

    Muttie It Wandered In From the Wastes

    186
    Oct 9, 2017
    Not sure if this is already fixed. (I used sfall 4.0.1 that came with LH).
    And there I noticed an error when combining awareness (examine) with crippled limbs effect.
    Normally, the lines in proto.msg work as intended (500-504 (adds space on its own) + 530) & (535/536 + 545 OR 544 + 530).
    But with a weapon it becomes (535/536 + 546/547 + 530). Which looks like:
    “He has %d/%d hps and is wielding a %s.and has crippled limbs.”
    Shouldn't that change to (535/536 + 546/547 + 545 OR 544 + 530).
    And then all one has to do is to remove the full stop from the end of 546/547?
    Otherwise the only quick fix is to add a space to 546/547 to have it look like:
    “He has %d/%d hps and is wielding a %s. and has crippled limbs.”

    Am I missing something (i.e. has this already been fixed by sfall? Or is there a better way? etc. etc.)?
     
  3. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    279
    Oct 29, 2015
    Text errors are fixes in MSG files, not in sfall. in sfal was no such fix.
     
  4. burn

    burn Mildly Dipped
    Modder

    506
    Apr 22, 2012
  5. Muttie

    Muttie It Wandered In From the Wastes

    186
    Oct 9, 2017
    This can't be really fixed in msg.
    The best I can do is to add a space:
    “He has %d/%d hps and is wielding a %s. and has crippled limbs.”

    An actual fix would need to remove the full stop when "and has crippled limbs.” is added to the line.

    Normally the game does this (i.e. adds a full stop or not depending if something is added to the line or not). (see my first post describing the combination of lines in proto.msg, which includes a "comma" (544) and "full stop" (545).)
    In this case (awareness + crippled) it fails to do that.

    Anyway, it's not a big deal. Just mentioning really.
     
  6. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    I have updated to the latest modderspack, but I can't compile gl_highlighting anymore. It throws the following error:

    Code:
    Informationen über das Aufrufen von JIT-Debuggen
    anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.
    
    ************** Ausnahmetext **************
    System.FormatException: Die Eingabezeichenfolge hat das falsche Format.
       bei System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       bei System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       bei ScriptEditor.CodeTranslation.Compiler.Compile(String infile, String& output, List`1 errors, Boolean preprocessOnly)
       bei ScriptEditor.TextEditor.Compile(TabInfo tab, String& msg, Boolean showMessages, Boolean preprocess)
       bei ScriptEditor.TextEditor.compileToolStripMenuItem1_Click(Object sender, EventArgs e)
       bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       bei System.Windows.Forms.Control.WndProc(Message& m)
       bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
       bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Geladene Assemblys **************
    mscorlib
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.8762 (QFE.050727-8700).
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    ScriptEditor
        Assembly-Version: 3.5.4.5.
        Win32-Version: 3.5.4.5.
        CodeBase: file:///F:/SVN/SD3/trunk/Fallout2/Modding%20Files/sfall/modderspack_4.1.9.7/ScriptEditor/ScriptEditor.exe.
    ----------------------------------------
    System.Windows.Forms
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
    ----------------------------------------
    System
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.8770 (QFE.050727-8700).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
    ----------------------------------------
    System.Drawing
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
    ----------------------------------------
    System.Xml
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.5494 (Win7SP1GDR.050727-5400).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
    ----------------------------------------
    ICSharpCode.TextEditor
        Assembly-Version: 3.2.1.6466.
        Win32-Version: 3.2.1.6466.
        CodeBase: file:///F:/SVN/SD3/trunk/Fallout2/Modding%20Files/sfall/modderspack_4.1.9.7/ScriptEditor/ICSharpCode.TextEditor.DLL.
    ----------------------------------------
    System.Windows.Forms.resources
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.5420 (Win7SP1.050727-5400).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
    ----------------------------------------
    System.Configuration
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
    ----------------------------------------
    mscorlib.resources
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.8762 (QFE.050727-8700).
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    
    ************** JIT-Debuggen **************
    Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
    Konfigurationsdatei der Anwendung oder des Computers
    (machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
    Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
    
    Zum Beispiel:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
    Ausnahmen an den JIT-Debugger gesendet, der auf dem
    Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
    

    I am suspecting it is related to the parser, because the old version throws an error at HOOK_GAMEMODECHANGE?

    Also I've noticed that my hs_keypress script doesn't work anymore. :/

    /Edit: The hookscript itself works, but the dik code check doesn't anymore. Did something change here? " if key_pressed(DIK_F) then begin" etc...
     
    Last edited: Jul 14, 2019
  7. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    I use the "basic" script editor included in the modderspack to compile gl_highlighting, and it compiles without any error.
    Personally I don't use the script editor so I'm not sure about the problem you got.
     
  8. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    I've used that one too, with the above mentioned effect. Other scripts compile correctly, just this one and gl_partycontrol don't work.

    The errors I'm getting in the other script editor:

    gl_partycontrol -> Undefined symbol get_object_data in factor
    gl_highlighting ->Undefined symbol HOOK_GAMEMODECHANGE in factor

    Guess I am missing some updated files?
     
  9. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    I think you might need to update your sfall.h.
     
  10. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    Yes, that's it exactly! Totally forgot this thing exists.

    Compiling works now. Only issue remaining is the not working key_pressed check.
     
  11. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Are you sure you include dik.h?
    I can compile pelicano's party order script (which uses key_pressed check) with no problem.
     
  12. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    Yes, it's included and compiling the script is no problem. Just ingame it doesn't work (the hookscript itself works, my debug messages are showing. Checking the key pressed fails).

    It worked with the last 4.x sfall version that I was using. The update to the latest makes problems.
     
  13. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    You use key_press() to check keys in KEYPRESS hook? Why don't you use get_sfall_arg to get the key code?
    EDIT: hmm, with 3.8.x I can call key_pressed in KEYPRESS hook. Guess there might be a problem since 4.1.2.
     
    Last edited: Jul 14, 2019
  14. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    I wrote the script years ago and lots of stuff has changed since. At this point I wouldn't even know how to do this.
     
  15. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Here's a sample script:
    Code:
    #include ".\headers\sfall.h"
    #include ".\headers\dik.h"
    
    procedure start;
    procedure KeyPressHandler;
    
    procedure start begin
       if game_loaded then begin
         register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
       end
    end
    
    procedure KeyPressHandler begin
       variable
         event := get_sfall_arg,
         keyDX := get_sfall_arg,
         tmp;
    
       if ((keyDX == DIK_V) and event) then begin // I guess you use "if key_pressed(DIK_V) then begin" here?
         display_msg("V key pressed.");
       end
    end
    
    BTW, the key_pressed in keypress hook is fixed and will be in the next version.
    Honestly I never thought of using key_pressed() in the hook before, since it's much easier to get the key code from hook args.
     
    Last edited: Jul 15, 2019
  16. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    Thanks for the example! One thing to note: I had to include main.h and not sfall.h, otherwise it wouldn't compile. Both of these files are the latest version.

    Other than that, I had to change it from a hs_ script to gl_ to make it work.
    Now it's running perfect again.
     
  17. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    My example didn't use anything from main.h. I guess you're talking about your keypress script?
     
  18. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    Huh weird. You're right, it works now - I guess there was still some old stuff in the script before I cleaned it up, which made a conflict. In any case, it's working now. I'm happy.
     
  19. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    sfall 4.1.9.1 and 3.8.19.1 are released on SourceForge, along with the modders pack for 4.1.9.1. They are maintenance/hotfix releases for the previous version.
    Now by default sfall-mods.ini, Awareness and Gecko Skinning perks are inherited from the player.
     
    • [Rad] [Rad] x 3
  20. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    Blast from the past.
    I got it to work, but now I have a slightly different problem. Right now I am creating a new window over a newly created window - but the second window does not stay on top of the one I created first. As soon as I click on the first window, it will move to the top and the second window - which should remain always on top of the first - moves to the background.

    Is there something else I can do about this? Am I missing something?
     
    Last edited: Jul 20, 2019