vJass - I: Uncomplicating the Complicated

MagnaGuard

Active Member
Reaction score
49
Yes I think libraries put the code to the top, so it can be referenced. Think of it just like a library and can be used (taking books from the shelves). Scopes are to make each function have a different name? ;) I think.
 

Romek

Super Moderator
Reaction score
964
> So when are we gonna be hearing about the next vJass - II?
I've started writing it. Well.. the introduction. :)

> why you explained scopes but didn't say a word about libraries?
Because they weren't needed.

> when do I use scopes and when do I use libraries?
Scopes, unless you need your code to be referenced from anywhere. (Systems, mainly. Not spells).

> but I'm looking forward to tutorial about timers and structs, I'm currently stuck there xd
:)

> Scopes are to make each function have a different name? I think.
Both scopes and libraries serve the same purpose - encapsulation.
Though libraries also allow more code to the top, and execute the initializer instead of calling it. :)
 

GooS

Azrael
Reaction score
154
It looks great for a basic "I'm going into JASS" tutorial, explaining some do's and dont's, which is basically all I know about JASS/vJASS.

Anyways, here's something that seemed wrong:
set r = 1./2. // becomes 0.5. Notice the decimal point after the numbers. This -->makes<-- means there is nothing after the decimal point.

And as for an Off-topic JASS question that could easily be answered by you pro's; If I scope a spell will it still lag at first use as non-scoped ones, or will it work smooth because it's already been "initialized". I think I've read about it somewhere, but now I can't find it, and I couldn't see it in this tutorial, though it might be there.
 

Flare

Stops copies me!
Reaction score
662
And as for an Off-topic JASS question that could easily be answered by you pro's; If I scope a spell will it still lag at first use as non-scoped ones, or will it work smooth because it's already been "initialized". I think I've read about it somewhere, but now I can't find it, and I couldn't see it in this tutorial, though it might be there.
A script that isn't enclosed in a scope will function exactly the same as one that isn't enclosed in a scope, so nothing's going to change first-cast lag. Non-vJASS-enhanced scripts must be initialized also (via InitTrig_TriggerName)

However, if you Preload the stuff (which can be done with/without vJASS) using the Preload function(s) or simply creating the unit/adding the ability/creating the special effect during your initialization, first-cast lag is usually non-existant since all the Object Editor stuff, and models, have already been loaded while the map was still loading
 

SerraAvenger

Cuz I can
Reaction score
234
: )

reals can be converted to strings by using R2S.
Though it is more convenient to use R2SW( string, width, precision ) as R2S will print all the floating point digits (wich looks quite ugly), I love efficiency and shortness. I thus recommend using R2S exclusively.

; )
 

Romek

Super Moderator
Reaction score
964
> Great Job.
Thanks.

> Though it is more convenient to use R2SW...
Indeed, it is. :)
 

jig7c

Stop reading me...-statement
Reaction score
123
i'll never learn JASS, i give up... read so many tutorials, they all explain the same stuff.... takes nothing returns bulls**t

no offense to the JASS community, just disappointed in me...
keep up the good work Romek
 

Romek

Super Moderator
Reaction score
964
> they all explain the same stuff.... takes nothing returns bulls**t
What do you expect, that they'll all explain different stuff?
vJass is the same wherever you go.

> keep up the good work Romek
Thanks.

If you don't understand something, just ask.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
i'll never learn JASS, i give up...

that's the same thing I said myself at first when I started learning Jass
if you learned GUI you will definitely learn Jass too

I think that "Convert GUI to Jass" learning method is bad because it makes a very ugly and messy code with many unnecessary stuff

I suggest learning vJass instead

Romek posted a great tutorial from which you can learn a lot

if you get stuck somewhere just ask :thup:
 

Romek

Super Moderator
Reaction score
964
These are only the basics.
Though with practice, you'd probably get it all. :)
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I reckon you should remove the vJASS part (libraries, scopes) and add it to your next series - 95% of this tutorial is actually about JASS basics.

It would be logical to start series 2 with encapsulation and carry on from there.


The formatting of tutorial is really nice, though, if you could seperate paragraphs with empty lines it would be even better.
For example, the native and bj part is a great wall of text.

In addition, you should bind simple sentences together.

e.g

"Natives and BJs are just like functions you declare. So they can take and return values. Natives include functions such as R2I, KillUnit and GetTriggerUnit."

Natives, such as R2I or KillUnit, and BJs are just like functions you declare - they can take and return values.


As for the content itself, the way you bring examples and explain is excellent, so nothing bad to say at all.
 

wraithseeker

Tired.
Reaction score
122
Also it would be nice to include some external links for learning and such.

Should be good if you link stuffs like Textmacros, Objectmerger and such in part 2 of this.

Sadly, I have learned vJASS already and you didn't make it back in 2006-2007... bah :eek:
 

Romek

Super Moderator
Reaction score
964
> I reckon you should remove the vJASS part (libraries, scopes) and add it to your next series - 95% of this tutorial is actually about JASS basics.
I think it's fine as it is.
Scopes are Jass basics. And I'm sure most people who learn Jass would want to get right into Jassing.
Initializers cause code to actually run, so they can experiment themselves. :)

> the native and bj part is a great wall of text.
Fixed. Walls of text are indeed ugly. :p

> "Natives, such as R2I, KillUnit, and BJs are just like functions you declare - they can take and return values."
I liked the structure of the old sentence. You're right about it not flowing well though, so I fixed that.

> As for the content itself, the way you bring examples and explain is excellent, so nothing bad to say at all.
Thanks =)

> Also it would be nice to include some external links for learning and such.
I don't think they're needed here.

> Should be good if you link stuffs like Textmacros, Objectmerger and such in part 2 of this.
No, they won't be in Part 2.

> Sadly, I have learned vJASS already and you didn't make it back in 2006-2007... bah
Oh noes. :(
Hopefully I'll get a tutorial up for the Sc2 syntax nice and early. :p
 

simonake

New Member
Reaction score
72
Great Tutorial :thup: +rep

Just a few comments.

--
  • I finally decided to start vJass :) and I must say that this tutorial is great. The only default, is that once finished to read, I can't figure out how to put all this stuff in a trigger to create a spell :(

    ...Maybe it's me.

  • I tought you didn't talked enought about the Events, I would have like to have examples.

Otherwise Good tutorial and I'm waiting the next one!!
 

Romek

Super Moderator
Reaction score
964
The 2 points you mentioned will be covered in the next tutorial.
No spells are meant to be made from this. :)

Glad you liked it. ;)
 

simonake

New Member
Reaction score
72
Well I just started vJass tonight and I always knew that when I would start vJass I would need to read a good tutorial. :)

May you take a look at my problem? Mass Entangling Root It's probally simple for you but, for me, it's the end of the world...
 

HellCraft

Member
Reaction score
19
very nice tutorial, i actually didnt know what a native is until i read this tutorial.
when will you make then second part? or is it made already? i want to learn about structs and methods, getting desperate.
EDIT: your bump actually made me learn jass :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top