Jass pros and hackers, tell me what you make of this.....

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass pros and hackers, tell me what you make of this.....

Post by HINDYhat »

Oh... to Aero, I see that you're talking about vJass (structs and libraries). Can you tell me what that is? I have no clue what are the advantages of it or how to use it (I know, I only use JNGP for Grimoire and JassHelper..)

Also, is it possible to have a Jass syntax highlighter implemented in the World Editor, because I'm sort of getting tired of JassCraft - WE - JassCraft - WE...
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Jass pros and hackers, tell me what you make of this.....

Post by Aero »

HINDYhat wrote:Also, is it possible to have a Jass syntax highlighter implemented in the World Editor, because I'm sort of getting tired of JassCraft - WE - JassCraft - WE...
I wish there was a jass syntax highlighter in WE. Maybe in the next release? =3

Anyways, a struct lets you simlulate a custom type but has a strict syntax. I'll explain using a location. A location is a point (a handle) that contains an x-coordinate and a y-coordinate. So, it would look like this as a struct.
struct point
real x (The name of a real variable in the struct)
real y (The name of a real variable in the struct)
endstruct
(You can store as many and whatever types of variables you want)

To use it, I would use the following format.
function structtest takes nothing returns nothing
local real r=5
local point p=point.create() (This is the same idea as CreateGroup() )
set p.x=5 (Sets the variable x of "p" to 5)
set p.y=10 (Sets the variable y of "p" to 10)
call DisplayTextToPlayer(GetLocalPlayer(),0,0,R2S(p.x + p.y + r)) (This would display "20")
call point.destroy()
endfunction
Basically, what I can do is create a "table" and store data in it. Up until quite recently, almost everyone used "handle vars" and stored local variables in gamecache and "attached" them to a timer or a trigger. Unfortunately, for every variable you stored you have to store/retrieve it using GetStored, Store...ect. Gamecache is slow to run as is doing this. You can probably imagine the lag having to store/retrieve data using I2S(H2I(handle)) and retrieval processes every 0.03 seconds. Anyways, if I use a struct, I can just pass the "table" to the timer or trigger and use the <structname>.variable name syntax to pull the data from it. This method is significantly faster and can allow for like 4x more instances of the spell with less lag than 1x with gamecache. There's also less cleanup and set vars=null, however, locations and effects still need to be destroyed, but not nulled (call DestroyEffect(structname.effectvariable) ).

Libraries and other stuff are just small goodies. There's a long readme in the jassnewgen folder that explains all these things.
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass pros and hackers, tell me what you make of this.....

Post by HINDYhat »

Oh I had no idea about the readme. I'll check it up. Sounds very useful!

Tables come from Vexorian's CSCache though... right? Anyway, I'll read up.

Also, I found something that might be a WE syntax highlighter, just now.
http://www.thehelper.net/forums/showthr ... ght=syntax

I tried it out and it didn't work. Can you try it? If it works, tell me EXACTLY what you did.

EDIT: I just read a bunch of the readme... <3 TEXTMACROS AND LIBRARIES <3
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Jass pros and hackers, tell me what you make of this.....

Post by Xantan »

This thread is great for learning =]
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Jass pros and hackers, tell me what you make of this.....

Post by Aero »

Vex's CS cache is called "GetTableUnit" but it really is GetStored...ect.

I think he just called the custom functions that to simplify/clarify things and to prevent duplicate function names with KaTTaNa's Handle Vars system.

I'm also hearing word of improvments for the struct system coming out soon =3

This will enable for much smoother maps, specifically concerning hero arenas.
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass pros and hackers, tell me what you make of this.....

Post by HINDYhat »

Wow... I guess there's still alot of Jass to learn for me :D

OFF-TOPIC even more than vJass: This forum needs a tutorial section.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Jass pros and hackers, tell me what you make of this.....

Post by Aero »

I know.

I don't do map cheating requests for people anymore nor do I support it. However, I do support the site because you can power learn map editing for the first while.

I need in with the people who are better at JASS than me and know more. I don't think I can learn that much more on these forums seeing I'm probably the best at JASS here.
HINDYhat
Senior Member
Posts: 101
Joined: June 1st, 2007, 9:05 pm

Re: Jass pros and hackers, tell me what you make of this.....

Post by HINDYhat »

I have a feeling that you are too. That's why http://www.wc3jass.com exists... I'm addicted to that site.

You're an administrator though... can't you make a tutorials section, or at least a poll to see if people would like one?
User avatar
Vegas
Shopping Maul USA Creator
Posts: 1792
Joined: January 18th, 2007, 11:07 am
Title: No Comment
Location: Calgary Canada
Has thanked: 78 times
Been thanked: 8 times

Re: Jass pros and hackers, tell me what you make of this.....

Post by Vegas »

Well, my post just got a little too advanced for me. I´ll be over at mickey-mouse-club.com if anyone needs me.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Jass pros and hackers, tell me what you make of this.....

Post by Aero »

That might be good. I'll pm Dekar.