Improved Scripting Tools (SSL+ and Script Editor)

Discussion in 'Fallout General Modding' started by phobos2077, Feb 7, 2015.

  1. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    I had such an idea to write such a node dialogs editor ... but unfortunately I have not yet found a similar widget that would provide such a block scheme.
    Maybe someday it will appear in SfallScriptEditor. :)

    Updated SfallScriptEditor to version 4.0 will soon be put in public.
     
    Last edited: Jul 11, 2017
    • [Like] [Like] x 3
  2. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    This screenshot looks amazing! I'm glad the project is moving forward. Will definitely try it next time I'm into serious SSL scripting :)
     
  3. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Update Tools: sFall Script Editor v.4.0.5 beta - Download

    Added new function:
    • Added a functional tree panel with a description of all commonly used functions and macros.
    • Added a visual editor for message files, now it can be installed when opening associated message files.
    • Added a menu for quickly opening header files.
    • Changed the appearance of the editor for registering scripts, now it looks more correct.
    • A common panel of Procedures and Variables is divided into global and local.
    • A shortcut menu has been added to the procedure panel with the functions: Create/Rename/Delete/Move, and quickly create standard procedural handlers.
    • Added a panel for quick search of text in the open current script.
    • New syntax highlighting for the script has been added, and absent functions have been added to the backlight.
    • Added functions Comment/Uncomment the selected code fragment of the script.
    • Added the function of indentation reduction for selected lines, as well as alignment of the selected text to the left.
    • The function for formatting the script code for the selected text is added, and the option for auto-formatting the script code when opening the SSL file.
    • In the context menu, the function of highlighting the selected text of the script is added.
    • In the context menu added function of intuitive renaming for local variables/variables of the script, procedure names, and macros defined in the script itself.
    • Automatic duplication of the closing parentheses and quotation marks, also the principle of backlighting for the parentheses is changed.
    • In the settings, additional paths have been added to search for associated message files.
    • Saving the current cursor position when the script file is closed, and then proceeding to this position after opening the same script.
    • In the settings, an option has been added to override the paths of the header files connected in the script.
    • A button is added to "Goto the procedure under the cursor", in the case where the code parser caused an error, or if the parser is inactive.
    • Added navigation buttons for the script code.
    • The option of horizontal division of the script document into two parts (top/bottom) is added.
    • The option of underlining errors of script code from an external parser is added.
    • Added a vertical helper guide, the distance of which depends on the 'Tabs Size Space' setting.
    • Highlight the current line, as well as display information about the current cursor position.
    • Now the selection of the text does not overlap the syntax highlighting in the script.
    • Ability to hide the numbering of lines in the script, right or bottom panel.
    • A button for the right panel of procedures has been added, which allows you to minimize other procedures when going to the selected procedure.
    • The option to save the compiled file in the same directory as the ssl source itself is added, i.e. Not putting it in the Scripts folder.
    • Added optional use of the Watcom preprocessor before compiling the script, with the possibility of conditional compilation (RELEASE/DEBUG).
    • An optional feature is the compilation of the script via the user usercomp.bat file.
    Changed original function:
    • Changed text highlighting for message files.
    • When registering scripts in Script.lst, now it is not necessary to have the files script.h and scrname.msg.
    • When you open the .int script file and decompile it, in cases when an error occurs during its decompilation, an attempt will be made to decompile using the earlier version of the decompiler (int2ssl.exe from sfall v.3.5).
    • Changed the principle of interaction with an external code parser, now the script procedures are always displayed, regardless of whether the parser is enabled.
    • Also, tooltips to functions from opcodes.txt when you open the script for the first time are now displayed, despite the state of the external parser.
    • Click the mouse on the parser's status label to start updating the information.
    • The "Outline" function has been changed, now it opens and closes the procedural blocks intuitively correctly, and the folded blocks show the name of the procedure.
    • The 'Auto-Comlete' function window is now unlimited in the number of available opcodes or macros.
    • Added a button for the right panel of procedures, which allows to show or hide arguments accepted by the procedure.
    • The search window is now always displayed over the working window.
    • The functional of the "GOTO Line" function has been slightly improved.
    • Improved display of a pop-up window to macros and opcodes, as well as information about them.
    • Duplicating opcodes and macros are removed from the opcodes.txt file.
    • The function for patching CritterHead Frm files for sfall "32-bit Head Graphics" is cut out, now it is a separate tool.

    Screenshot:
    sse4.jpg

    In the next version it is expected:
    1. Diagram block builder from script dialog nodes.
    2. Tool for testing & preview dialog script.
     
    Last edited: Aug 3, 2017
    • [Like] [Like] x 2
  4. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Nice work! Still getting error messages, though. There was one at first start, but it didn't happen anymore on the next (I guess some temp files were missing?).
    Just opened a random script and got this one:
    Informationen über das Aufrufen von JIT-Debuggen
    anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

    ************** Ausnahmetext **************
    System.BadImageFormatException: Es wurde versucht, eine Datei mit einem falschen Format zu laden. (Ausnahme von HRESULT: 0x8007000B)
    bei ScriptEditor.CodeTranslation.Compiler.parse_main(String file, String orig, String dir)
    bei ScriptEditor.CodeTranslation.Compiler.Parse(String text, String filepath, ProgramInfo prev_pi)
    bei ScriptEditor.TextEditor.bwSyntaxParser_DoWork(Object sender, DoWorkEventArgs eventArgs)
    bei System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


    ************** Geladene Assemblys **************
    mscorlib
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.8669 (QFE.050727-8600).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    SfallScriptEditor
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.0.0.
    CodeBase: file:///D:/Projects/SVN/SD3/trunk/Fallout2/Tools/sFall%20ScriptEditor/SfallScriptEditor.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.8759 (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.
    ----------------------------------------
    mscorlib.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.8669 (QFE.050727-8600).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    ICSharpCode.TextEditor
    Assembly-Version: 3.2.1.6466.
    Win32-Version: 3.2.1.6466.
    CodeBase: file:///D:/Projects/SVN/SD3/trunk/Fallout2/Tools/sFall%20ScriptEditor/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.
    ----------------------------------------
    System.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.5420 (Win7SP1.050727-5400).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.resources/2.0.0.0_de_b77a5c561934e089/System.resources.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.

    /edit: On quick compile, the editor froze and I had to Alt+F4. This didn't happened anymore later, but if I open a script, then open a second script, it will freeze again.

    /edit2: Would be nice if this could be adressed:

    In order to sort my dialog, every dude response has one TAB in front of it (makes msg file easier to read). In your new msg window in th escript editor, every line like this has the { visible, though.
     
    Last edited: Jul 11, 2017
  5. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Here, not everything is understandably in what exactly is the reason, perhaps something in the script causes an error, or an error in the installed paths in the editor's settings.
    If possible, send me these problem scripts for verification.

    A strange decision to put a tab before the line, for this there are empty curly braces(column for lip file - i use this to tag responses for the player), where you can put a label meaning that this is the player's answer.
    I will certainly consider the option using tabs.
    But I Think that with your version of approach to msg, it's best to use notepad :)
    Because with your version of "tabulation" I do not know how to display this in this editor.

    Did not quite understand what exactly you want?
     
    Last edited: Jul 12, 2017
  6. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Made mini fix for player answers with highlighting and displaying the character of the unicode "●" (this service character will add the tab to the beginning of the line in the msg file).
    fix.jpg
    fix_.jpg

    If someone would like to correct the english description to the functions in the Functions.ini/ProcHandlers.ini and Opcodes.txt files, I will be very grateful!
    I do not understand English is a very difficult language :)
     
    Last edited: Jul 12, 2017
    • [Like] [Like] x 1
  7. trollworkout

    trollworkout It Wandered In From the Wastes

    Aug 1, 2015

    Doesn't work under Windows 10 Untitled.png
     
  8. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    ^ did you try to start the editor a second time? Because I got the editor crash at first too. After that it started.

    @Mr.Stalin the msg editor change is perfect now. Thanks!

    Here is one example script.
    Code:
    /******************************************************************************************
            Item: NCR Flag
            Location: Farm
            Description: NCR Flag only appears when NCR is in town.
    ******************************************************************************************/
    
    
    /* Include Files */
    #include "..\headers\define.h"
    #define NAME                    SCRIPT_FAFLAG
    #include "..\headers\command.h"
    //#include "..\headers\MAPVILLG.h"
    
    /* Standard Script Procedures */
    procedure start;
    procedure map_enter_p_proc;
    procedure map_update_p_proc;
    
    procedure start begin
    end
    
    procedure map_enter_p_proc begin
       reg_anim_begin();
       reg_anim_animate_forever(self_obj, ANIM_stand);
       reg_anim_end();
        
       if (game_status >= WW_PC_FOUND_NCR_HELP) then begin
          obj_visible(self_obj);
       end
       else begin
          obj_invisible(self_obj);
       end
    end
    
    procedure map_update_p_proc begin
       if (combat_is_initialized == 0) then begin
           reg_anim_begin();
           reg_anim_animate_forever(self_obj, ANIM_stand);
           reg_anim_end();
            
           if (game_status >= WW_PC_FOUND_NCR_HELP) then
               obj_visible(self_obj);
           else
               obj_invisible(self_obj);
       end
    end

    If I load it, I get the above posted error message. But the error happens if I load *any* script. Start the editor -> Load any script -> Error message.
    Maybe it is because I have no msg paths defined?

    I don't know where to point the paths. Is it data/text/english/ or data/text/english/dialog/.. etc?
     
    Last edited: Jul 12, 2017
  9. trollworkout

    trollworkout It Wandered In From the Wastes

    Aug 1, 2015
    Yep. It never runs. I can't run it under wine either.

    Edit: I have a dual boot system linux + windows 10.
     
  10. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    .net framework installed on your system? for windows 8/10 need to install MS Net Framework 3.5
    on Win10 was not tested, use old Windows 7 / Vista / XP :-)
     
    Last edited: Jul 14, 2017
  11. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    No.
    Try turning off the option 'parser', and report the result.
     
  12. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Yeah, if I disable the parser option, the error doesn't happen anymore.
     
  13. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Gut :)
    Fixed error, download link above.

    Specify directly the folders in which the msg files are located,
    for example:
    Code:
    "X:/FalloutProject/dialog/"
    "X:/Fallout2/data/text/english/dialog/" < this folder has a secondary priority
    
    But this is only necessary to open the associated msg files.

    ps: Why did you enable the "Short-Circuit evaluation" compilation function? - this is necessary in very rare cases.
     
    Last edited: Jul 12, 2017
  14. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    It was because of a script. I'm not sure anymore what exactly it was, but I think I was told to do it on the Sfall github. I would have to research that stuff again if I want to be sure.
     
  15. Magnus

    Magnus Weapons Manufacturer Modder

    Dec 6, 2007
    You should FORCE this option ON and remove it from the settings. Having people conform to the "new" SSL standard is a good thing, otherwise we get into language version hell like Python and Javascript.
     
  16. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    I don't think force enabling short-circuit evaluation in sslc is a good idea. There's a reason why it's only a switch.
     
    Last edited: Jul 13, 2017
  17. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    The option switch is certainly not a very convenient thing, so the idea came, to define it in the script itself, for example:
    Code:
    //Sfall Compilation options
    #define SFALL_SC_EVALUATION (True)
    
    Later, this can be implemented, so that the editor itself would indicate to the compiler the -s option.
    And it would be very nice if the compiler could do it himself)
     
    Last edited: Jul 13, 2017
  18. trollworkout

    trollworkout It Wandered In From the Wastes

    Aug 1, 2015
    i got .NET 3.5 and 4.7 installed still not working
     
  19. trollworkout

    trollworkout It Wandered In From the Wastes

    Aug 1, 2015
    OK guys got the program to load up by setting compatibility mode to Windows XP SP3
    It doesn't want to load with Windows 7 or 8 compat mode.
     
    • [Like] [Like] x 1
  20. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Apparently because the editor is built for x86 systems.
    If the editor is compiled for x64 then the parser will not work, its library (parser.dll) is compiled for x86, and it refuses to work with the x64 version (see @Lexx error)