• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Tech - Visual Studio Code - Regions

Im moving from a code editor to Visual Studio Code. I have regions placed in my code (for folding code) that I would like to get working in VSC. Are there any VSC guru's out there that can show me how to get this to work? Also, would like the code to be folded when I open the file.

Thanks

Code:
|'#region -----=====[ COMMON ]=====-----
sub DoCoolStuff



/return
|'#endregion
 
Below is specific to Lua, but probably could do same with macro if that's what you're looking for, but the vscode-mq2 extension might already cover that for macros as well.

From MQ Discord:

https://github.com/trixnz/vscode-lua/issues/25#issuecomment-635286784
Code:
    "maptz.regionfolder": {
        "[lua]": {
            "foldEnd": "--endregion",
            "foldEndRegex": "[\\s]*--endregion",
            "foldStart": "--region [NaME]",
            "foldStartRegex": "[\\s]*--region[\\s]*(.*)"
        }
    }

But also, as noted there, there is still regular function / control structure based code folding even without that
 
As @knave23 and @aquietone mention, the #region folding for VS Code extension will allow definition of custom region handling. The github link above points to a feature request for VSCode Lua which was implemented Dec 2018 (i.e., no extension required). I use --#region <region name text>/--#endregion in my code without it.

If you want to use the extension with MQ macros, I believe you'll need to define the language selector as [mq2macro] (assuming you have the vscodemq2 extension installed). Experimentation may be required.

Personal Opinion: I'd be inclined to define the MQ macro regions as |#region/|#endregion but that's mainly from a consistency with other languages perspective.
 
Last edited:
Tech - Visual Studio Code - Regions

Users who are viewing this thread

Back
Top
Cart