ScriptEd 1.50 is back from the dead!

Discussion in 'Modding and Scripting Support' started by Dj_Unique, Apr 16, 2018.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    So this is another long break of not posting here, almost 10 years has passed since I started my ScriptEd resurrection project, after a little while development got halted and only now I found inspiration to continue development. So here's Build 4 of 1.50-beta: https://www.dropbox.com/s/nca0e9pawwewnya/ScriptEd_1_50-beta-build4-setup.exe?dl=0

    A major code change was done to the script parser, it should now compile all possible lines properly, thanks to Anthony Bailey for doing the fixes for me (he reached me via e-mail) From this build onward I will try to refine the dialogue editor, particularly the player option editor to allow easier editing of conditions and actions via a specialized menu system that contains human readable descriptions of each command. Also going through the suggestions that 'team a' gave me in the previous thread and possibly implementing some of them.

    If you install the program to C:\Program Files (x86) (if on 64-bit system), you'll need to run it as administrator. Otherwise there will be file access denied errors. If you install to any other folder, it should be fine without running as administrator.

    changelog:

    - Added script creation date and modification date columns to the module script loader

    - fixed MES editor entry deletion: deleting the last entry would cause an access violation (only related to updating the listview)

    - added a fancy splash screen on startup

    - Ported code to work with Delphi 10 Seattle

    - Fancy VCL style now applied to the editor

    - Fixes made to the script compiler code incorporated. Thanks to Anthony Bailey for the fixes. Some lines would not compile, for example such as this one: "stat 4 of Triggerer: adjust by PC Variable 1001 of Triggerer"

    - Added plugin for creating speech files using the Windows SAPI5 Text to Speech Engine. Requires lame.exe in system path

    - MRU menu was not working properly in the new Delphi 10 Seattle build, functionality restored.

    + other fixes I don't remember doing, it's been a while since I touched the code.
     
    Dark Elf likes this.
  2. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
    Thanks for the update! I've used your compiler for quite some time and was wondering if this one had some command line funtionality. It would be great for when you have multiples scripts working together and have to recompile them often. Anyways great tool!
     
  3. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    A commandline compiler is coming up in the next build, I'm currently optimizing it for smaller executable file size, I'm also going to add a mass compile function to it.
     
  4. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
    Maybe you already know this but you can pack your final delphi 2010 executables with UPX, there is not much space to save when you don't build with runtime packets.
    Thanks again!
     
  5. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    I managed to compress it to just 300kb using upx, here it is ahead of the next installer build: https://www.dropbox.com/s/2ecqh4s4kxpb83a/scriptcompiler.zip?dl=0

    F-secure was giving me trouble but I excluded my ScriptEd folder from scanning so it wouldn't delete the upx packed executables

    if you wish to compile all txt files in a folder, just run the commandline ScriptCompiler.exe -bc
    for decompiling all scr files use the commandlnie ScriptCompiler.exe -a

    (make sure it is in the scripted folder because it tries to access scripted.ini for configuration information. add it to the system path also in environment variables)
     
    Dark Elf likes this.
  6. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
  7. t-roll

    t-roll New Member

    Messages:
    20
    Likes Received:
    6
    Joined:
    Apr 30, 2017
    Neither the old one nor the new one know how to compile this action

    transform (obj) to basic prototype (num)

    While it recognizes the action it does not know the opcode.


    Also thank you for this, is very handy .
     
    FilthyJack likes this.
  8. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    I'm working on fixing this issue. It happens because the command string contains the keyword Attachee so the parser gets confused and thinks it's an (obj) parameter. A few code changes should do the trick. This fix will be in the next build that I will try to get out as soon as possible.
     
    FilthyJack likes this.
  9. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    Here is the new build that I compiled today: https://www.dropbox.com/s/eenl4v8tdntd68z/ScriptEd_1_50-beta-build5-setup.exe?dl=0

    Changelog:

    - Fixed a critical bug in the script parser that caused the 'transform Attachee into basic prototype (num)' line fail to compile. Now it should work just fine.

    - Plugins should now deinitialize properly, there was an access violation occurring in PLG_CheckRefs.dll on exiting ScriptEd, traced back to JCL Unit Versioning, which I disabled.

    - Plugins now use the same VCL skin as the main program

    - Option to use Troika's original DbMaker.exe for building module databases, instead of the internal routines.

    - Added a commandline tool: ScriptCompiler.exe for mass decompiling scripts to txt and back to scr, also able to decompile all main game scripts

    - Added button to dialogue editor for automatic voiceover numbering, makes voicing characters easier, especially when using the SAPI5 plugin.

    - ArcanumSCRLib installation folder read from registry should now work properly.

    - Speech playback implemented for dialogues with voiceover
     
    FilthyJack and t-roll like this.
  10. t-roll

    t-roll New Member

    Messages:
    20
    Likes Received:
    6
    Joined:
    Apr 30, 2017
    WOW that was fast. thank you.

    Is action implemented in this version? I am still using the old one because is easier to pull action references but ill use this one to compile the missing opcode in the older one. :D
     
  11. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
    Oh my... I've been waiting for this... Thank you so much!

    You fixed the very few bugs it had and even included a cmdline compiler, good job sir!
    I just realised what a huge update it is, so many changes including comments, hell yeah!

    I have to try the dialogue editor with voiceover options, sounds cool.

    Btw the only thing not working is the first time you start it, if like me you have manipulated Arcanum's install path several times, then the program will assume the registry entry is valid and fail at loading several components.

    Also nice Timo Pics in the source code ;)

    Edit: I've encountered a bug when using comments, saving will cause the comments to disappear and leave an empty but numbered line, this is acompanied by a plugin crash from dataviewer. Another crash if you compile, then decompile. I realise comments may not work atm.
     
    Last edited: Jan 19, 2020
  12. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    I'll look into these issues. I recently reinstalled Windows and nowadays I'm using Delphi 10.3 Rio for my development needs. I've been working on other non Arcanum related projects lately.
     
  13. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
    Thank you sir! Any update to this tool is like a christmas present!
    I'm using Tokyo edition, this is really enjoyable although I come from a linux bg and I've tried every Delphi release since D6 I think.
    Btw I like how clean and commented your code is, I usually never comment unless the code isn't clear. I tend to name variables/components/functions explicitly so that it makes sense just looking at it but I realiise this is nice to read a well commented code.

    Good luck for your other projects :)
     
  14. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    I was unable to reproduce the comments failing to save issue, my test script saved the comments just fine, so steps to reproduce this is needed, otherwise I can't fix the bug. Also ScriptEd is programmed to not read the arcanum path from registry if the path defined in the configuration file is non-empty.
     
  15. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
    Simple source:

    description ""
    MAX_LINES_ALLOCATED 10

    //my comment

    1. do nothing

    2. return and SKIP default

    Doesn't compile "unknown opcode my comment" and after saving:

    description ""
    MAX_LINES_ALLOCATED 10

    0.
    1. do nothing

    2. return and SKIP default

    The first time launch isn't really an issue but I don't seem to be able to make comments work :p
     
  16. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    Add a whitespace after // and the script should compile fine.
    like this:

    // my comment

    1. do nothing

    2. return and SKIP default
     
  17. FilthyJack

    FilthyJack Member Supporter

    Messages:
    110
    Likes Received:
    14
    Joined:
    Jan 27, 2011
    Yes! Thanks!

    This is really life changing to be bale to comment, I gave up on some cool mods because of script clarity!
     
  18. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    Next I will finetune the dialogue editor to allow easier editing of those conditions and actions in player options, also node actions will receive similar editor enhancement.
     
  19. Dj_Unique

    Dj_Unique Member

    Messages:
    79
    Likes Received:
    5
    Joined:
    Nov 14, 2001
    Bumping this thread again to announce a new build of ScriptEd 1.50. I have been working on it for a few months to fix bugs and add more features. Here's the changelog for Build 6:

    Code:
    - Script compiler now supports comments that have no space between // and a comment, they will be automatically formatted as // <comment>
    
    - Added option to automatically insert new VO number for each new node, great for voiced dialogues. If the dialogue has no voiceover, this
      option will not increment the voiceover number
    
    - Added search options to script loader windows (both load official script and module script loader) Main campaign voiced dialogues can now also be filtered. The search function is currently case sensitive.
    
    - Fixed dialogue not being reset after loading a script with no dialogue, and a dialogue file was previously loaded.
    
    - Added a field for voiceovers in module script loader. This can help you find dialogues that have voiceover.
    
    - Fixed script name not being updated properly (it updated without the script id)
    
    - Editor code completion enhancements: Now certain opcodes will invoke a specific selector window, for example "set global flag (num) to true"  invokes the global
      flag selector.
    
    - Added code to add line 1 to a newly created dialogue if there are no dialog entry points in the script. Previously this would result in a .dlg parse error since there were
      no dialog lines to read.
    
    - Added MES file header editor
    
    - Added condition and action command wizards like in the old ScriptEd (finally) Also a command wizard for a complete IF..THEN..ELSE statement is available.
    
    - Build number displayed in the main form caption
    
    I recently got backl into working on Arcanum mods. I did a fully voiced version of The Killer Inside using AI voices from various sources and I am also working on another one currently. So that prompted me to start tweaking ScriptEd again.
    Be sure to report any bugs you encounter so I can fix them.

    Link: https://drive.google.com/file/d/16WkcCuNton3ps7QK1oqEC-FWKbirjDUb/view?usp=sharing
     
  20. Barabbah

    Barabbah Member

    Messages:
    313
    Likes Received:
    8
    Joined:
    Dec 1, 2019
Our Host!