Visual Studio Code is a powerful open source and cross-platform text editor. Daggerfall Unity quest scripts can be created and edited with the help of an extension, which is available here. A preview of features can be seen on this gallery.
- Download the latest version (.vsix) from Releases on github (you can find the changelog here).
- Click on Extensions button, open the dropdown menu and choose Install from VSIX.
- Follow the Quick Start points to setup a folder or workspace for Daggerfall Unity.
Change settings from Open File>Preferences>Settings>Workspace Settings or User settings. Workspace settings consist of a file added to local folder which overrides user settings.
These are the main settings:
- Centered Messages
dftemplate.format.centeredMessages: Messages with <ce> tag are horizontally centered, otherwise they are aligned to the left.
Diagnostics are enabled by default but they are still quite crude so if you want you can disable them with dftemplate.diagnostics.enabled. When enabled, they can run only when a file is opened or saved, or being refreshed as you type (dftemplate.diagnostics.live). If you reduce dftemplate.diagnostics.delay they will run more often so there is also more going on in background.
There is no reason to change this settings at this time, but if a mod adds new actions to the quest engine, quest writers can import signatures for autocomplete and diagnostics adding a json file path to dftemplate.modules.
I appreciate all issue reports and feedback.
If you want to contribute to development, open cloned folder in editor and run npm install to install dependencies.
Notepad++ is a powerful but light text editor available in 32 and 64 bit versions. All the tools here work for both. Unfortunately is only available for Windows, but it works fine with Wine.
The following installation instructions refers to two paths: %AppData% and %InstallationPath%. By default the latter is \Program Files\Notepad++ for 64 bit or \Program Files (x86)\Notepad++ for 32 bit. If you use the portable version (shipped without installer) AppData is not used; instead, you'll find all the files inside the extracted folder.
All files for can be found here.
Recognizes and highlights known keywords, comments and vars with different color
- Move the file userDefineLang.xml inside %AppData%\Roaming\Notepad++\. If you had already installed a custom language in the past, you'll need to merge the content with the existing file (just put one <UserLang> after the other).
- Quests file have .txt extension so we can't make an automatic association. When you open a quest file with notepad++, you have to manually select Language > DfTemplate.
- I tested colors on Default (light theme), Obsidian and Bespin (dark themes). If you use a different theme and want to change colors, you can use the UI offered by Notepad++ at Language > Define your language. Right click on background color to set it transparent.
- Punctuation following a keyword is seen as part of the keyword itself. (ex. [...] __foo_, [...]).
This is a feature offered with highlighting which is not part of official language syntax. It allows to fold a group of code lines and focus on the parts of code you're working on without scrolling.
Code: Select all
--- @region Name --- @end
Suggest completion from a list of known words.
Move the file DfTemplate.xml inside %InstallationPath%\plugins\APIs\.
List all tasks in a quest file.
- Open %AppData%\Roaming\Notepad++\functionList.xml.
- Open dfTemplate_functionList.xml from the downloaded files.
- Copy xml code from this file to functionList.xml following instructions provided in the file itself.
- Use the Function List button to toggle tasks panel.