| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Script Linker is a helper program for Superfighters Deluxe (SFD) to help ease the process of scripting.
Currently, to script in SFD, you have to code in a built-in text editor that is basically a text area with a compile button which make scripting so much of a pain that only masochists will use said editor.
If you want to write anything more than a couple of classes, you should use Visual Studio/Vscode instead as it supports syntax highlighting, autocomplete, shortcuts like jump into file, see references...
Script Linker tries to smooth the process of using both tools: An IDE (for coding) and the SFD text editor (for compiling). Remove the unnecessary metal load to help scripters write more quality scripts
Demo.mp4Find and select the SFD.GameScriptInterface.dll file. It's in where the game is installed > Click OK to confirm.
Go to the Map Editor and make sure the Script tab is opened so the code can be pasted from the IDE.
You're pretty much done here. Now you can develop your script in Visual Studio and enjoy all of the IDE features like syntax highlighting, intellisense, codelen... You can also create multiple files and directories to orgnaize your code however you want, Note that cross project import is not supported.
Once you edit your code, hit F8 to compile. This shortcut can be changed in the settings (Tools > Option). You can see a short demo here.
Tip: When you reference the IGame instance outside of the GameScriptInterface subclass, the IDE will complain that the Game property does not exist. To work around it, create a helper class with the same property name and type:
using SFDGameScriptInterface;
namespace YourProjectName
{
public static class GameScriptUtil
{
public static readonly IGame Game;
}
}Then import the class in your file to make the member Game available in the scope:
using static YourProjectName.GameScriptUtil;
namespace YourProjectName.MyLib
{
public static class Library
{
public static IEnumerable<IPlayer> GetAlivePlayers()
{
// Game is available here
return Game.GetPlayers().Where(p => !p.IsDead);
}
}
}Download here (ScriptLinker.zip)
For anyone wondering why I dont have any Notification calls inside the properties from the ViewModel like this:
private string copyToClipboardHotkeyName;
public string CopyToClipboardHotkeyName
{
get { return copyToClipboardHotkeyName; }
set { SetPropertyAndNotify(ref copyToClipboardHotkeyName, value); }
}but just the shorthand auto property
public string CopyToClipboardHotkeyName { get; set; }That's because I'm using this awesome Fody plugin PropertyChanged which help you cut down the verbose part when declaring binding property in WPF
| Back | FazBrowse Home | New Git URL |