Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 3      1   2   3   Next
mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #1 
Hello everyone,

I've been hard at work recently developing an extension for Visual Studio Code for MAST, the scripting language for Artemis: Cosmos. I'm very hopeful that this tool will facilitate developing missions using MAST. 

I just released version 0.2.0, which includes many useful features:
  • Basic formatting and coloring, based on Python
  • Error checking
    • Checks if labels are defined, and defined properly
    • Checks for proper route label usage
  • Autocompletion for functions within the sbs and sbs_utils packages
  • Function signature information (i.e. notes on argument types)
There's lots of things on my to-do list, but I think that these features are more or less the bare minimum for a public beta release.

Planned features include:
  • Additional error checking
  • Variable type checking in functions
  • Autocompletion for variables etc in current file
  • Autocompletion based on files in the same folder
  • Autocompletion based on modules (e.g. Legendary Missions)

The extension can be found here, or it can be added via the extensions tab in Visual Studio Code directly. 

Feedback and issues are appreciated!
Issues can be posted here, or on GitHub.
 

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #2 

Version 0.3.0 has been published!

Changelog:

- Added parsing of zipped files specified in story.json
- Added parsing of all .mast and .py files in working directory
- Added autocompletion entries for labels for all .mast files in the working directory
- Tons of formatting changes:
    * Allow for more possible variations for strings, including f-strings
    * More accurate formatting for the various label types
    * Formatting for button and comms message syntax
    * Probably a lot more that I don't recall right now

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

I_talk_in_pictures

Registered:
Posts: 37
Reply with quote  #3 
This is a great update. It even supports some the future syntax for the card based system I'm adding for map creation and other things.
Fixes everything from the previous version so much red is gone!

The label handling is really nice.

I always wanted a VSCode extension for MAST. This goes beyond what I imagined.

Thanks for the effort in doing this.
mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #4 
Version 0.4.0 has been published! Changelog:
-
Blob string options added to autocomplete when you type `.set(` or `.get(`, followed by double or single quotes.
- Fix some edge-case formatting issues
- Update mast file icon with two new icons, one each for light and dark mode
- Fix format definitions and await inline labels showing up as label errors
- Add idle as a valid yield result
- Fix for issue where multiple instances of inline labels with different parent labels caused false errors
- Add check for label warning message if it's not defined in the current folder , instead of just checking the current file.
- Add lots of error handling to prevent crashes, and error messages with what caused the error.
- Fix for button names not formatted properly if variables used in them (i.e. "Button {name}" )

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #5 
Version 0.5.0 has been published!

Changelog:

- Add variable names to autocomplete
- Add variables from files in scope to autocomplete
- Add labels from files in scope to autocomplete (e.g. with jump command)
- Add scatter and faces modules to autocomplete
- Add check for proper fstring formatting
- Fixes for string and comment checks
- Add checks for `story.json` contents
    - Checks if files referenced in `story.json` exist
    - Checks for more recent versions of the files referenced in `story.json`
    - Popup that allows you to update to the latest version, or manually update the file
    - When manually changing `story.json`, autocompletion options include all files in the `\missions\__lib__\` folder.
- Add check for artemis root directory with a warning if the root directory is not found
- Add sending language server logs to the client for viewing/debugging
- Minor formatting fixes

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

EricF

Registered:
Posts: 239
Reply with quote  #6 

Matt this is great! Can I ask: is MAST and its Python environment now usable as a way to talk directly from the game engine to external hardware, like a custom bridge built with Arduinos sending data over serial?

I'm about to start into building some new panels and wondering if I should still be sending emulated keyboard keystrokes, or if we're at the point of talking directly to the game through its Python interface. Is there documentation or a basic example that shows how an instantaneous action like "Fire Tube 1" could be sent to the game programmatically, in response to a command it's waiting for over serial, or TCP/IP, or elsewhere.

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #7 
Quote:
Originally Posted by EricF

Matt this is great! Can I ask: is MAST and its Python environment now usable as a way to talk directly from the game engine to external hardware, like a custom bridge built with Arduinos sending data over serial?

I'm about to start into building some new panels and wondering if I should still be sending emulated keyboard keystrokes, or if we're at the point of talking directly to the game through its Python interface. Is there documentation or a basic example that shows how an instantaneous action like "Fire Tube 1" could be sent to the game programmatically, in response to a command it's waiting for over serial, or TCP/IP, or elsewhere.



To the best of my knowledge (and I'm not the best person to ask - Doug or Mike might know), there is not a built-in way for MAST to talk to external hardware.

I also don't think there is a command that can be sent that tells the server to fire a weapon, and this is the case for most inputs. That code is part of the hard-coded widgets, like the weapon_control widget, which controls the loading, unloading, and firing of torpedoes.
Hot keys would be able to do this of course.

That said - while I don't know enough about arduino or similar interfaces to say for sure - since python can use 3rd party packages, it might be possible to do a lot of things I'm not aware of.

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #8 
Version 0.5.1 published!

Changelog:

- Hotfix for error message showing up in strings and comments
- Add style string information to method signatures for applicable functions based on widget_stylestring_documentation.txt

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #9 

Version 0.6.0 published!

Changelog:

* Fix for crash that could occur if opening a folder without an `__init__.mast` file or if opening a workspace
* Fix sbs, scatter, and faces functions showing up without the applicable global name prepended
* Fixes for autocompletion and error checking of route labels and route label variables
* Add check for use of routes that require them to be enabled first
* Add WARN, WARNING, ERR, and ERROR as codetags
* Fix error for checking if last line is empty (it should be empty)
* Fix for labels being misidentified as routes in some cases
* Add check for `__init__.mast` file. If it's not there, it will prompt the user to create one
* Fixes for metadata ranges
* Removed hover functionality (which is still incomplete) for non-mast files
* Added capability for autocompletion and signatures in metadata value strings

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,990
Reply with quote  #10 
Thank you for keeping at this, Matt!
__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #11 
Quote:
Originally Posted by Mike Substelny
Thank you for keeping at this, Matt!


Thanks Mike, I'm glad there's a few of you finding it useful!

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #12 
Version 0.7.0 published!

Changelog:

* Fix keyword autocompletion
* Fix on change formatting
* Add autocompletion for roles within scope
* Get roles based on shipData.json, accounting for possible invalid json
* Add autocompletion to `__init__.mast`, giving all files not already listed in the file.

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #13 
Version 0.8.0 published!

Changelog:

* Add function information on hover
* Add blob entry information on hover
* Add simulation class functions when using the sim global variable
* Add functions that should have the module name prepended to them (e.g. functions in names.py are used in a format like `names_random_arvonian_name()`)
* Add autocompletion for shipData.json entries
    * Add images as part of autocompletion for art_id parameters for functions
* Add EVENT as a route label variable
* Add event class properties to autocompletion for EVENT
* Add vec.py for the Vec3 class
* Add source reference for sbs, sbs_utils, and LegendaryMission functions in the hover information. Link takes you to the appropriate github page.
* Fix for file name checking of python files
* Fix for variable detection
* Fix for duplicate label check
* Change to use markdown instead of just text for function information - easier to read

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #14 

Version 0.9.0 has been published!

Changelog:

* Note that the loading time for the extension has increased a bit due to more operations being done on startup - I'll work on this for later updates
* Add error if a variable name overrides a label name
* Add label information on hover
* Add Go To Definition for modules
    * If the module exists as a regular mission, directs to the mission folder
* Fix bugs related to string and comment parsing when switching between files
* Fix for variables with keywords like default or shared
* Add default, assigned, client, and temp as keywords for autocompletion
* Updated hovers such that there's less wasted space when there's no documentation
* Fix for error in metadata, it thought lists were malformed labels
* Added check for if a label is a prefab (TODO: Check if it's an objective, brain, etc)
* Fix for workspaces

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #15 

Version 0.9.1 has been published!

Changelog:

* Fix for loading tims from version 0.9.0, which also fixed an error when using multiple workspaces
* Add loading indicator while the extension is loading information related to a given mission
* Fixed reference for the sbs module, so now it will properly show the current sbs functions
* Error messages for story.json now include the name of the mission, in case there are multiple story.json files that might need updated

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.