Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I'm just getting into jass, and wanted to know if there is still a consensus around the JESP template for jass things, or if that is outdated and no longer relevant.
I'd say forget Jass and learn Lua, or another language that compiles to Lua.
You're going to be using the same API that you'd use in Jass anyway -> CreateUnit(), KillUnit(), etc. but with a lot more tools/options at your disposal to go beyond the limitations of Jass.
I'm personally using c# compiled to Lua (WCSharp). I was originally using pure Lua but the lack of organization was a pain in the ass. Perhaps Typescript would be even better than c# but I imagine that comes down to preference.
Here's a tutorial video for getting started with WCSharp:
JESP is very outdated and was intended for pure JASS spells. It predates vJass and many of the guidelines don't make sense in the context of vJass, which is included in the editor by default now. There is hardly any reason to use plain JASS anymore.
It's actually easier to learn something like TypeScript or C# than it is to learn vJass since the code editors you would be using are vastly superior to TESH or any vJass plugins you can find. You get full linting support which essentially means that the editor can statically analyze your code for potential errors before you even run your map. You also have access to intellisense, meaning you get code hints, autocompletion, and other important information.
The only downside is you cannot convert GUI triggers to Lua in the editor like you can with JASS. However, that only helps you in learning plain JASS, not with using the features of vJass.
If you have experience with Python and are comfortable with it, it's an okay choice. I would certainly prefer it over Lua. I'm not sure how Python works within the context of WC3 (since Lua is dynamically typed), but generally type checking is done during runtime. I think there are some static type checkers for Python but I am unsure of how good they actually are.
C# is a decent choice as well, however it has some cons which in my opinion make it inferior to TypeScript in the context of WC3 modding.
C# requires Visual Studio which has a pretty hefty install size (something like 10GB) and includes a ton of things you would never need for modding. With TypeScript, you can use VS Code which is only a few MBs and it is cross-platform so you get the same editor on each OS, unlike with Visual Studio.
The .NET library in CSharp2Lua is ~25k lines of code whereas TypeScript has a much smaller bundle size.
C# overall feels like a much heavier language with many features and tools that are not applicable to WC3 modding.
TypeScript is also becoming one of the most loved languages and adoption and support for it is rapidly growing. I would say more modders use TypeScript for their maps than C# and the standard library for TypeScript is growing nicely. It comes with wrappers for most handles and includes system like FileIO and the ability to synchronize data out of the box.
JavaScript:
const unit = new Unit(Players[0], FourCC("hfoo"), 0, 0, 270);
unit.name = "TypeScript";
new Timer().start(1.00, true, () => {
unit.color = Players[math.random(0, bj_MAX_PLAYERS)].color;
});
C# is a decent choice as well, however it has some cons which in my opinion make it inferior to TypeScript in the context of WC3 modding.
C# requires Visual Studio which has a pretty hefty install size (something like 10GB) and includes a ton of things you would never need for modding. With TypeScript, you can use VS Code which is only a few MBs and it is cross-platform so you get the same editor on each OS, unlike with Visual Studio.
The .NET library in CSharp2Lua is ~25k lines of code whereas TypeScript has a much smaller bundle size.
C# overall feels like a much heavier language with many features and tools that are not applicable to WC3 modding.
I'd personally recommend visual studio 2019 if you're going to use C#, but since you brought up some points about VSCode that I cannot refute, I did a bit of research into using C# with VSCode, and it seems to be possible:
Install the C# extension from the marketplace;
VSCode should automatically generate a build task when you open the solution's folder;
When running the launcher, the working directory is different than in visual studio (it's in the solution folder instead of bin/blabla), though this is easily fixed by putting '
Environment.CurrentDirectory = Path.Combine(Environment.CurrentDirectory, @"src\War3Map.Template.Launcher\bin\Debug\netcoreapp3.1");' at the start of the Main method;
You can run the launcher using 'dotnet run --project src/War3Map.Template.Launcher'.
I also checked visual studio 2019's system reqs, it says a typical installation is 20 to 50 GB, though it shouldn't be more than 5GB if you only install the C#/.NET Core workloads that you need for warcraft III maps.
About the CoreSystem library, I think it's more like 18k lines (for comparison, Blizzard.j is 11k). In addition to implementing the C# basics in lua (namespaces and classes), it also implements some of the System classes that 99.99% of C# applications use, like arrays/lists/dictionaries, enums, exceptions, and it also supports reflection. It's possible to only include parts of the library, but since I don't know of an easy way to detect which System classes are used/required, by default the entire thing is included.
Meanwhile ASP.NET Core and .NET Core are the most loved in their categories, so I'd say C# is definitely a worthwhile language to learn, especially if you use it for other things than just wc3 maps.
If I want to alter the .ai file to create a custom AI, can that also be done through lua/other compiled languages, or only jass and with other languages you need to code from scratch?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.