Skip to content

EverMCServer/vscode-BetonQuest

Repository files navigation

BetonQuest IntelliSense and GUI Editor

VS Marketplace VS Marketplace License

IntelliSense and GUI editor for BetonQuest scripting.

conversation editor

How to use

Local installation

It is the recommended setup for daily developments.

  1. Download and install VSCode.
  2. Install this extension from Marketplace.
  3. Open the whole BetonQuest folder with VSCode.

Web editing

For a quick trial. It works on your tablet and even a cellphone!

  1. Goto https://vscode.dev.
  2. Click on the Extensions tab on the left.
  3. Search EverMC.betonquest and install it
  4. Open the whole BetonQuest folder with VSCode.

IntelliSense Showcase

(See the screenshot above)

GUI Editor Showcase

Edit Conversations with drag-and-drop:

demo

Build Events on click of a button:

demo

Locate Conditions has never been so easy:

demo

Theme:

demo

Feature Roadmap

  • ✅ Web extension support! Just go to https://vscode.dev and install it through the Extensions tab.
  • IntelliSense
    • ✅ Right click and Go To Definitions / References of Pointers, Events, Conditions, Objectives.
    • ✅ Code semantic highlight.
    • ⬜ Hint / errors translation.
    • ⬜ (WIP) Semantic highlight and references for instructions.
    • ⬜ (WIP) Code completion.
  • GUI editor
  • ✅ Click and jump between the code / flowchart / editor.
  • ✅ i18n support.
    • English
    • Simplified Chinese 简体中文
    • Japanese 日本語 (contributed by shanaOP @dusty01534)

Limitations

  • Code semantic highlight colors is subject to be changed anytime during development.
  • Conversations GUI editor does not support cross-conversation pointers at this moment.
  • Global Variables conflicted with this extension. Please consider convert your scripts before using this extension. Support for Global Variables may be added in the far future.

Extension Settings

  • Translation Selection - The translation selected for conversation flowchart. Default to 'en'.

Known Issues

Please report your issues on https://github.com/EverMCServer/vscode-BetonQuest/issues

  • Zoom-in and out is limited to certain degrees.
  • (2.0 related) Conversation's tabs are not properly switched when clicked on the YAML file.
  • (2.0 related) Conversation's tabs are switched to the first one when the YAML edited.
  • notify Event is not fully supported at this moment.

About Translations

Currently only English and Simplified Chinese are available. If you want to contribute your translation, here are the instructions:

  1. Fork this project and clone it down.

  2. Search and install a VSCode's Language Pack extension from the marketplace of which you want to translate. Then reload your VSCode.

  3. There are only 3 files you need to change:

    • Copy utils/src/i18n/data/en.json to utils/src/i18n/data/[locale_code].json then translate it.

      The [locale_code] part is referer to the list here. If the locale contains a dash -, please convert it to an underscore _.

    • Copy package.nls.json to package.nls.[locale-code].json then translate it.

      This time you should not convert any dash to underscore.

    • Add new imports on utils/src/i18n/i18n.ts:

      import en from './data/en.json';
      import zh_cn from './data/zh_cn.json';
      // ...
      import locale_code_with_underscore from './data/[locale_code_with_underscore].json'; // New
      
      // Translation table
      const translations: Map<string, TTranslation> = new Map([
          ["en", en as TTranslation],
          ["zh-cn", zh_cn as TTranslation],
          // ...
          ["[locale-code-with-dash]", locale_code_with_underscore as TTranslation], // New
      ]);
      
      // ...
  4. If you want to test run the project. You need to install Node.js and do npm install. After that just reload your VSCode then hit F5.

  5. Push your codes

  6. Submit a Pull Request onto the main branch. Once everything checked your work will be merged.

Helps on translating this extension are welcomed. Please consider submitting your Pull Request onto the repository. 🥺

Release Notes

0.5.x pre-release

  • Add Language Server for BetonQuest v1 and v2 scripts
  • Add Definitions and References searching
  • Add Semantic Highlight
  • Add Code Completions (wip)
  • Add Citizens integrations
  • Add some missing translation
  • Fit modal and radio styles
  • Set default new conversation multilingual mode to false
  • Fix various bugs

0.4.1

  • Fully supports Japanese 日本語に完全対応 (contributed by shanaOP @dusty01534)

0.4.0

  • Add "goto" support, now you can jump between the code and the editor when clicking on an Events / Objectives / Conditions
  • Adjust flowchart style to better suite VSCode's color theme
  • Fix missing translation

(For more detailes, please check CHANGELOG.md)