• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] is JESP still a thing?

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
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.

A lot of non-Jass suggestions can be found here:
Medieval Style ORPG

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:
 
Last edited:
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.

I probably need to get familiar with vjass first in order to know how to use the natives and stuff, no? sounds like a big jump from GUI...

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 I would try to do this, I would probably use this: [python] WC3 Mapmaking in Python bc I know more python than c# currently. any opinion on this?

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;
});
The rest of it just comes down to preference.

Here is the TypeScript template if you want to get started: cipherxof/wc3-ts-template
 
Level 18
Joined
Jan 1, 2018
Messages
728
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'.
More information here: C# programming with Visual Studio Code

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.

TypeScript is also becoming one of the most loved languages
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.
 
Status
Not open for further replies.
Top