(1.6.0) Significant refactoring of internal logic
- Improved processing expressions, as in an area of completion, as in information provided in a hover.
- Added support of
<something>constructions in expressions, with providing the appropriate completions, when possible. - Both type of expressions are supported - started by keyword or by variable name.
- Refined and improved support of definition references for all type of items, including elements names, it's attributes, keywords and types, it's properties.
- Mostly from all possible items of xml or script language you can open it's definition by F12 or context menu.
- Added support of "external" definitions for
<include_interrupt_actions>and<handler>. - Added support next pairs in Mission Directors scripts:
<library>and<run_actions>;<library>and<include_actions>;<cue>and various elements which has attributes ofcuenametype.
Older changelog entries can be found near to the bottom of this file.
-
You can simple take this extension from the Visual Studio Marketplace
-
Or download the .vsix file from the GitHub releases page and then install it like any other program. (Or from "Extensions" in Visual Studio Code)
It's highly recommended to use this in conjunction with these instructions by ledhead900, but it's not technically a requirement.
- Script code completion for Visual Studio Code supporting both AI Scripts and Mission Director Scripts
- XML code completion and validation based on Egosoft xsd files
- Autocompletion from scriptproperties.xml with intelligent context-aware suggestions
- Hover documentation for script properties and XSD elements
- Variables support support with completion and hover information and tracking
- Referenced items support with completion and hover information and tracking
- Go to Definition support for script properties
- T-file text display with hover tooltips for language references
- Support for multiple formats:
{pageId,textId},readtext.{pageId}.{textId}, andpage="pageId" line="textId" - Multi-language support with configurable preferred language
- Language filtering options for cleaner output
- Intelligent variable completion with
$trigger for both AI Scripts and Mission Director Scripts - Variables tracking across the entire document with usage statistics
- Go to Definition, Find All References, and Symbol Rename (F2) for variables
- Hover information showing variable usage count and type
- Support for both regular variables and table key/remote variables
- Automatic variable detection in XML attributes and parameter definitions
- Label completion for AI Script elements (
<resume>,<run_interrupt_script>,<abort_called_scripts>) - Action completion for AI Script action references (
<include_interrupt_actions>) - Label and Action tracking with Go to Definition and Find All References
- Hover tooltips for labels and actions showing usage statistics and references
- Error diagnostics for undefined labels and actions with quick fix suggestions
- Code actions to create missing labels/actions or replace with similar existing ones
- Cue completion for Mission Director Script elements (for any element in attribute with
cuenametype) - Library completion for Mission Director Script action references (
<include_actions>or<run_actions>) - Cue and Library tracking with Go to Definition and Find All References
- Hover tooltips for cues and libraries showing usage statistics and references
- Error diagnostics for undefined cues and libraries
- Context-aware completion that automatically detects when you're typing variables, expressions or other elements
- Smart completion triggering that prevents conflicts between different completion types
- Automatic suggestion display when typing in specialized contexts
- Real-time validation of xml elements, labels, actions, handlers, cues and libraries
- Quick fix suggestions for undefined references with similarity-based recommendations
- Code actions to automatically create missing definitions
- Diagnostic highlighting of undefined references
| Setting | Description | Default |
|---|---|---|
x4CodeComplete.exceedinglyVerbose |
Verbose logging for debugging purposes. | false |
x4CodeComplete.extensionsFolder |
Path to extensions "library" folder | none (required) |
x4CodeComplete.languageNumber |
Preferred language number (e.g., '44' for English) | "44" |
x4CodeComplete.limitLanguageOutput |
Show only preferred language in hover text | false |
x4CodeComplete.reloadLanguageData |
Reload language files (resets to false after reload) | false |
x4CodeComplete.unpackedFileLocation |
Path to folder with vanilla extracted files | none (required) |
The extensionsFolder is expected to contain mods, data from which is can be used for the development of new ones in current workspace.
extensions
├── extension_one
│ ├── aiscripts
│ │ ├── aiscript_one_first.xml
│ │ └── ...
│ ├── libraries
│ │ └── ...
│ ├── md
│ │ ├── mdscript_one_first.xml
│ │ └── ...
│ ├── t
│ │ ├── 0001.xml
│ │ └── ...
... ...
| └── ...
...
Should contain the full extraction of base game files from 08 and 09 .cat/.dat files, i.e. aiscripts, md and t subfolders.
And in addition it is recommended to have an unpacked files from Egosoft DLC's if you have somehow to refer on the data from them.
├── aiscripts
├── aiscript_one_first.xml
│ └── ...
├──extensions
│ ├── ego_dlc_one
│ │ ├── aiscripts
│ │ │ ├── aiscript_ego_dlc_one_first.xml
│ │ │ └── ...
│ │ ├── libraries
│ │ │ └── ...
│ │ ├── md
│ │ │ ├── mdscript_ego_dlc_one_first.xml
│ │ │ └── ...
│ │ └── ...
│ └── ...
│
├── md
│ ├── mdscript_one_first.xml
│ └── ...
└── t
│ ├── 0001.xml
│ └── ...
You can have as only one mod subfolder structure, i.e. aiscripts. md, t, libraries, etc. on a first level, without "header" folder, as the any count of mods subfolders, which will contains respectively all these subfolders ...
- AI Scripts (
.xmlfiles with<aiscript>root element) - Mission Director Scripts (
.xmlfiles with<mdscript>root element)
-
All features up to version 1.4.1
-
Features added in version 1.5.1
-
Features added and fixed in version 1.5.4
<set_value name="$myVariable" />
<!-- Type $ to see all available variables -->
<!-- Hover over $myVariable to see usage statistics --><label name="start" />
<!-- ... -->
<resume label="start" /> <!-- Completion available after typing " --><library>
<actions name="myAction">
<!-- action content -->
</actions>
</library>
<!-- ... -->
<include_interrupt_actions ref="myAction" /> <!-- Completion available --><!-- Hover over any of these to see translated text -->
<set_value name="$text" exact="{1001,100}" />
<debug_text text="readtext.{1001}.{100}" />
<speak actor="$ship" page="1001" line="100" />- Variable scope: Currently limited to file scope (no namespace support)
- Cross-file references: Labels and actions are tracked per-file only
- Complex expressions: Advanced variable expressions in table lookups may not be fully parsed
(1.5.4) Restore properties completion and implement basic variable definitions detection
- Implemented basic variable definitions detection in AIScripts
- Restored properties completion with some improvements
- Correct variable position calculation in variable tracking logic
(1.5.3) First release on the Visual Studio Marketplace
- Added a logo and updated README to reflect the Marketplace usage
(1.5.2) Bug fixes
- Recovered accidentally deleted registration of the
referenceandrenameproviders
(1.5.1) Partial completion for labels and actions
- Intelligent context-aware completion that prevents conflicts between completion types
- Refactored completion system with specialized completion detection
(1.5.0) Error diagnostics for labels and actions
- Real-time error diagnostics for undefined labels and actions
- Automatic creation of missing action definitions
- Quick fix code actions with similarity-based suggestions for undefined references
(1.4.1) Bug fixes
(1.4.0) AI Script Enhanced Support
- Added label completion and tracking for AI Scripts (
<resume>,<run_interrupt_script>,<abort_called_scripts>) - Added action completion and tracking for AI Scripts (
<include_interrupt_actions>) - Go to Definition, Find All References, and Symbol Rename for labels and actions
- Hover tooltips showing usage statistics for labels and actions
(1.3.3) Added completion for variables
- Intelligent variable completion with
$trigger character - Automatic suggestion display when typing variables in context
- Support for partial variable name matching and filtering
(1.3.2) Bug fixes
- Improved variable detection accuracy
- Fixed completion conflicts between different providers
- Enhanced error handling for malformed XML
(1.3.1) Internal code structure changes
- Refactored completion provider architecture
- Improved document tracking and caching
- Better separation of concerns between different completion types
(1.3.0) Variables support
- Go to Definition, Find All References, and Symbol Rename (F2) for variables
- Variable tracking across entire document with usage statistics
- Support for both regular variables and table key/remote variables
- Hover information showing variable type and usage count
- Notice: Doesn't support namespaces yet. Scope of variable now the whole file.
(1.2.2) Additional bug fixes and diff add handling
- Improved file change detection and processing
- Better handling of document modifications
- Enhanced language file parsing reliability
(1.2.1) Added preferred language display option and bug fix
- Configurable preferred language for t-file display
- Language filtering options for cleaner hover text output
- Fixed language file loading issues
(1.2.0) T-file text integration
- Hover tooltips for language file references
- Support for multiple t-file reference formats:
{pageId,textId},readtext.{pageId}.{textId},page="pageId" line="textId" - Multi-language support with automatic language detection
- Integration with both vanilla and extension language files
(1.1.3) Bug fixes
- Improved completion accuracy and performance
- Fixed memory leaks in language file processing
- Better error handling for corrupted files
(1.1.2) Added sorting and grouping
- Alphabetical sorting of completion items
- Grouping of similar properties and methods
- Improved completion item organization and display
(1.1.1) TypeScript types and bug fixes
- Enhanced type safety in internal code
- Fixed completion provider registration issues
- Improved error logging and debugging
(1.1.0) Added documentation tooltips and bug fixes
- Hover documentation for script properties and XSD elements
- Enhanced keyword and datatype information display
- Improved scriptproperties.xml parsing and processing
- Whitespace handling improvements
Initial release. Supports scriptproperties.xml autocomplete
Major improvements; now has configuration & generates the entries at startup from scriptproperties.xml, removing the need for rerunning a python script when scriptproperties.xml updates.
Hopefully, no more duplicate suggestions. Also, Peek/Go to definition for script properties!