5E Product Walkthrough Playlist
Page 2 of 6 First 1234 ... Last
  1. #11
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    For those interested I have compiled a custom dictionary for all Z tags/keywords that the 4E Parser tool by Tenian uses. It should speed up manual tagging of content.

    phantomwhale - Yes its probably best to wait for the final dictionaries and plugins from SpudmanWP but as an interim its working for me
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  2. #12
    Quote Originally Posted by phantomwhale
    But I'm a little puzzled if I've done this right, as I'm seeing a LOT of red lines (more than would make this useful to me). I'm hoping the answer is I need to wait for the lua.rws file, but I suspect I'm hoping for more than is being suggested !
    I built my FG2 keyword list from the help documentation so many of the keywords from the code samples may not be in there. I am working on a better solution and will publish a new FG2.rws file when it's ready.

    I wish there were an easy way for members of the community to add to a growing list of keywords (with the associated parameters and results).

    Thanks for your feedback.
    'Build it and they will come'
    Universal Table Rolling Get it HERE
    FG2 Help Files Get it HERE
    Getting the Most Out of Notepad++ (FG2 & Lua spellcheck & Auto-Completion) Get it HERE
    Printing the contents of a table Get it HERE

  3. #13
    I will be spending time this weekend with some of the basic rulesets imputing the names of all the functions & keywords that were not included in the first batch.

    Expect the new RWS file Mon or Tues.
    'Build it and they will come'
    Universal Table Rolling Get it HERE
    FG2 Help Files Get it HERE
    Getting the Most Out of Notepad++ (FG2 & Lua spellcheck & Auto-Completion) Get it HERE
    Printing the contents of a table Get it HERE

  4. #14
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    SpudmanWP's initiative prompted me to re-look at Scintilla, the lexical component Notepad++ is built around. I didn't realise that Notepad++'s syntax highlighting and code folding capabilities were extensible in that 3rd parties can develop new language lexers as plugins and integrate them with the inbuilt Notepad++ style framework. The result, you can add any language you like to NPP and enjoy the benefits of syntax highlighting and code folding

    So I got myself some coffee and smokes and set about digging into the open source code and libs for Notepad++ and Scintilla. Now given this is my first foray into plugin development for Notepad++ I thought I'd make it easier on myself by using an open source lexer plugin as a base template. Given FGII's script API is a subset/customised version of LUA I chose the Gmod LUA plugin. Why the Gmod plugin and not the built in LUA lexer I hear you say? Simple, the Gmod Lua lexer is more advanced and offers greater scope for highlighting in different styles e.g differentiating the highlight of a Global Package vs a Ruleset Package vs a User Package.

    Anyhow, with a bit of tweaking, hacking and reverse engineering of the Gmod Lua lexer I managed to compile a customised version which just handles FGII Lua specific syntax. The current development version of the plugin is preloaded with styles for the stock FGII global packages and methods, ruleset packages and methods (4E only at the moment), variables, operators, strings, numbers, lua instructors and constants. In addition, using NPP's inbuilt Style Configurator users can add their own keywords to a separate user packages and methods group allowing for easy visual differentiation between stock and home brew code.

    Here's a screenie of how it looks at the moment. I have included a view of the Style Configurator so you can see how much extra flexibility the custom lexer has over the standard Lua language lexer.



    Sadly, the base plugin code seems not to work with the current and beta versions of the FunctionList plugin, so my custom FGIIlua lexer consequently doesn't either. However the good news is, is that the author of FunctionList is aware of the problem and is working on a fix. The FGIIlua lexer does work with autocompletion still though, so not all bad news.

    On another note, has anyone noticed that with the SquigglySpellChecker and AutoSpellCheck on, there is considerable lag/delay between keystrokes and the screen updating when editing large Lua documents. As most of the files I work on are large-huge I've had to disable it. Is it just my system, or have any of you also noticed it.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  5. #15
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370
    I've had a couple of NPP crashes whilst working on large (13,000) XML documents since installing SquigglySpellChecker, but I think I had it disabled, plus I wasn't working on the large files much before so it might one big coincidence.

    So... where's the download for the custom LUA lexer then ?

  6. #16
    I was noticing some lag too with Squiggly. For large files I just leave it off and enable it before I finalize the file (as a check).

    DrZeuss, that ROCKS.

    Does it work in both XML and Lua files (as FG2 uses both)?
    'Build it and they will come'
    Universal Table Rolling Get it HERE
    FG2 Help Files Get it HERE
    Getting the Most Out of Notepad++ (FG2 & Lua spellcheck & Auto-Completion) Get it HERE
    Printing the contents of a table Get it HERE

  7. #17
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Howdy All,

    OK v1.0 has been uploaded to my resource site and is available for download. See my sig for the link to the site. The lexer is in the Tools section. Enjoy!


    Installation & Usage
    • Unzip the ZIP archive to the Plugins subfolder in NPP Programs Folder

      Plugins\FGIILua.dll
      Plugins\Config\FGIILua.xml
    • Open NPP and a FGII Lua script and select FGIILua from the Language menu
    • The document should now be re-colorized using the standard styles for the lexer.
    • To change/customise the styles, open the Style Configurator under the Settings menu and browse throught the left list of languages until you see FGIILua (probably near the bottom somewhere).
      The Style groups for the lexer are:

      DEFAULT - standard text
      LUA COMMENT BLOCK - text beginnning with the --[[
      LUA COMMENT LINE - text beginning with --
      XML COMMENT BLOCK - text beginning with <!-- NOTE: this group is not functional (yet)
      XML COMMENT LINE - text beginning with <!-- --- NOTE: this group is not functional (yet)
      NUMBERS - real and whole numbers
      OPERATORS - standard FGII Lua operators (e.g. + - () & # etc. etc.)
      STRINGS - standard FGII Lua strings in quotes
      CHARACTERS - reserved for special characters
      LITERAL STRINGS - literal text
      INSTRUCTION WORDS - standard FGII Lua commands including function, if, then, else, end ...
      CONSTANTS - reserved for constants (UPPERCASE)
      GLOBAL - resereved for FGII reserved words e.g. window, self, subwindow etc. etc.
      GLOBAL PAK FUNCTIONS - FGII built in global package functions (e.g. User, DB, Interface ...)
      RULESET PAK FUNCTIONS - FGII ruleset package functions (4E builtin)
      VARIABLES - reserved for variables
      USER PAK FUNCTIONS - User package functions
      METHODS - object methods e.g. getValue setValue

      Keyword customisation requirements should in theory be limited to the RULESET PAK and USER
      PAK FUNCTION
      groups as well as possibly METHODS and VARIABLES only.
    • To add a user defined keyword to a group, select the group, if the scope for adding user defined keywords exists, two lists should appear in the Style Configurator window, the first shows built-in keywords (cannot be changed) whilst the second can hold user defined keywords (seperated by whitespace).
    • Styles must be saved in order for settings to be re-applied between sessions.


    Known Issues
    • The lexer is only designed at present to operate on a single language document i.e. FGII Lua. It will not work on FGII XML scripts with embedded Lua.
    • The current builds of the FunctionList plugin for NPP is incompatible with this release of the FGI Lua Lexer plugin.
    Last edited by Zeus; January 23rd, 2011 at 10:28.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  8. #18
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370
    Wonderful - thanks for sharing. Doesn't seem to come out as vibrantly for me than on your screenshot - played with colours and fonts for a while but couldn't quite get it right for me. Which font are you using ?

    Oh, and a small bug-ette is in the Plugins menu there is an FGII Lua Lexer -> About... option which crashes NPP for me. My workaround is simple though - don't click it

    Thanks again,
    Ben

  9. #19

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    OK, Zeuss, so your lexer means we don't need the add-on that Spud originally started this post with, right? (other than the spell-checker) Just a little confused where both your and Spud's work leave us on this.

  10. #20
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Bidmaron - Not necessarily.

    The lexer plugin colours and folds the code using keywords and pattern matching, whilst SpudmanWP's SquigglySpellChecker plugin checks the spelling of the text against a dictionary of known keywords.

    Both offer visual indications of syntax correctness - one uses colours the other uses a squiggly line to denote an unknown/misspelt word. Both maintain their own lists of keywords - the lexer uses NPP's built in XML support and the Style Configurator to define the lists, SquigglySpellChecker leverages the Aspell framework and tool for compiling custom dictionaries.

    I guess it will come down to individual preference.

    One thing to bare in mind is that at present the custom lexer will not work with the FunctionList plugin SpudmanWP pointed everyone to whereas of course the SquigglySpellChecker/Lua language solution from SpudmanWP does. Automcomplete still works though (if enabled).

    If you want to use FunctionList right now, stick with SpudmanWP's Squiggly plugin and dictionaries. If on the other hand you can live without FunctionList until its fixed and prefer more colouring options for the syntax of your Lua scripts, try the lexer.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in