Login

russian armor

Visual Studio Code SCAR Extension

26 Mar 2016, 11:26 AM
#1
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 10

For a long time I've been looking into ways of making SCAR scripting easier with an IDE (Integrated Development Environment) that actually understands SCAR.

My most recent mods (for example CCM II) is written with my own SCAR Editor. It's coded in C# and uses Scintilla as the code editing component.
Screenshot of that:


That kind of a program quickly gets fairly complicated. Recently, I've been using Visual Studio Code for my web related projects, like my personal website.

Visual Studio Code has a wide range of user-created extensions. I decided to see if I could create such plugin for SCAR that would:
  • Highlight with a custom color:
    • SCARDOC Functions
    • SCARDOC Enums
    • SCARDOC Blueprints
    • Lua functions
    • Future, if possible: User-defiend functions

  • Autocomplete:
    • SCARDOC Functions
    • SCARDOC Enums
    • SCARDOC Blueprints
    • User-defined functions cross-workspace

  • Intellisense: Auto-complete function parameters for all SCARDOC functions, user-defined functions, and default Lua functions
  • Mouse-over help messages: Display relevant help/documentation


The beginning was extremely difficult and frustrating. Since the tool itself is kinda new, all you really have as the support for the development is the documentation and a few samples.

Here's some demos:

Intellisense: Auto-complete and parameter hint

Click to play the .webm video


Mouse-over a SCARDOC function:

Click to view full size

Mouse-over a User-defined function:

Click to view full size

Full screenshot of the editor

Click to view full size

If you are interested to test the extension, feel free to post in this thread.
Requirements:
  • Visual Studio Code installed
26 Mar 2016, 12:39 PM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

26 Mar 2016, 22:21 PM
#3
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 10

Everything seems to be in order, the extension worked on eliw00d's system as expected.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • Oberkommando West flag Oziligath
  • The British Forces flag T.R. Sidewinder
uploaded by Oziligath

Board Info

97 users are online: 97 guests
37 posts in the last 24h
236 posts in the last week
776 posts in the last month
Registered members: 35113
Welcome our newest member, Butterfield11623
Most online: 1221 users on 25 Feb 2020, 12:03 PM