[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > Warcraft Editing Tools


Warcraft Editing Tools Discuss third party tools. Explore tool usage; get help using a tool, or search for a needed one.

Reply
 
Thread Tools
Old 12-19-2011, 02:17 PM   #1 (permalink)
Registered User cohadar
User
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 234
cohadar will become famous soon enough (94)cohadar will become famous soon enough (94)cohadar will become famous soon enough (94)
Jasshelper 2012-03-10

Latest version of jasshelper: 2012-03-10
Previous version was: 2012-02-10

Jass:
// while unit has some buff do some healing
while GetUnitAbilityLevel(whichUnit, 'Bhea') > 0
    call SetWidgetLife(whichUnit, GetWidgetLife(whichUnit) + 10.)
    call TriggerSleepAction(0.1)
endwhile

// print out numbers from 1 to 10 with for loop
for i = 1 to 10
    call BJDebugMsg(I2S(i))
endfor

// print only 1 2 3
for i = 1 to 10
    call BJDebugMsg(I2S(i))
    if i == 3 then
        break
    endif
endfor

// print out numbers from 10 downto 1
for i = 10 downto 1
    call BJDebugMsg(I2S(i))
endfor

// kill all units in a group
for enumUnit in someGroup
    call KillUnit(enumUnit)
endfor
// WARNING: groups are empty after for loop

Changelog:
Quote:
//=====================================
// 2012-03-10
//=====================================
* Fixed a bug with //! external directive
* Fixed a bug with debug keyword

//=====================================
// 2012-02-10
//=====================================
* Fixed a small bug with //! import
* Changed program icon to make it clearly distinct from Vexorian's version

//=====================================
// 2012-02-09
//=====================================
* Fixed a problem with map not working when you have zero structs

//=====================================
// 2012-02-07
//=====================================
* Fixed library, scope, struct and module initialization orders.
* Fixed initialization order for structs not inside scope or library.
* InitTrig functions are no longer valid inside scopes and libraries.

//=====================================
// 2012-01-14
//=====================================
* fixed a bug that prevented new loops to be used with function interfaces

//=====================================
// 2012-01-07
//=====================================
* removed WEWarlock support (outdated)
* more speed improvements
* added full display of external tool calls (ObjectMerger)

//=====================================
// 2012-01-06
//=====================================
* removed FILEPP preprocessor (not enough public support for it)
* done some optimizations, jasshelper is now about 3x faster
* progress bar now shows global progres

//=====================================
// 2011-12-25
//=====================================
* included #bigdef and #foreach modules with FILEPP

//=====================================
// 2011-12-24
//=====================================
* added FILEPP preprocessor (executes before everything else in the map script)
* optimized for group loop as suggested by Troll-Brain.

//=====================================
// 2011-12-19
//=====================================
* added 3 for loops
* added while loop
* added break
Check out this section in jasshelpermanual:
Better looping: for, while, break

//=====================================
// 2011-12-17
//=====================================
* jasshelper now displays full textual progress when used from WE.
* jasshelper will now warn you to reopen your map if you used //! external command
Attached Thumbnails
jhprogress.png  
Attached Files
File Type: 7z jasshelper 2012-03-10.7z (1.31 MB, 518 views)
__________________
Cohadar spoke.

Last edited by cohadar; 03-10-2012 at 08:33 AM.
cohadar is offline   Reply With Quote
Old 12-19-2011, 02:38 PM   #2 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1209)Bribe has much of which to be proud (1209)
PayPal Donor: This user has donated to The Hive. 
I agree with all above changes. One of the biggest improvements which can be made to the parser is to avoid annoying module-initializer blocks, basically something like this:

Jass:
initblock
    //Do stuff
endinitblock

//which compiles to:

private module initblockmod<random number>
    private static method onInit takes nothing returns nothing
        //Do stuff
    endmethod
endmodule
private struct initblock<random number> extends array
    implement initblockmod<random number>
endstruct
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 12-19-2011, 08:02 PM   #3 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,911
Nestharus has disabled reputation
also, vexorian said for the longest time that he'd update modules to take arguments like macros.
Nestharus is online now   Reply With Quote
Old 12-19-2011, 10:51 PM   #4 (permalink)
Forum Moderator Magtheridon96
JESUS MAN
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,700
Magtheridon96 has a brilliant future (1810)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Cool.

It's going to be hard to get everyone to update to this though ;/
__________________
Magtheridon96 is offline   Reply With Quote
Old 12-20-2011, 12:13 AM   #5 (permalink)
Registered User mckill2009
SSJ99999 Pinoy!
 
mckill2009's Avatar
 
Join Date: Mar 2009
Posts: 4,385
mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)
why te hell is endwhile,endfor,to not bold? XD...

EDIT:
I wish the parser is faster this time...
__________________
My Resources:
My Maps
My Systems/Spells

Your ideas tend to result in unnecessary violence so shut the F*** up!
mckill2009 is offline   Reply With Quote
Old 12-20-2011, 02:34 AM   #6 (permalink)
Forum Moderator PurgeandFire
ʕ•͡ᴥ•ʔ
 
PurgeandFire's Avatar
Resource & Tutorial Moderator
 
Join Date: Nov 2006
Posts: 3,550
PurgeandFire has much of which to be proud (1104)PurgeandFire has much of which to be proud (1104)PurgeandFire has much of which to be proud (1104)PurgeandFire has much of which to be proud (1104)PurgeandFire has much of which to be proud (1104)
@mckill:It is because they are not native to the normal jasshelper. Those are features that cohadar added so ofc they won't be bolded yet neither by the jass tags nor by the editor. ;)

Also, as far as I know, cohadar isn't working on optimization (yet) so the parser will probably be about the same speed.

@Mag: If someone repackages jass newgen as a new version, then everyone will update. (the new update would have the rtc bug removed, the updated jass helper, and it would have the latest grimext hotfix)

Last edited by PurgeandFire; 12-20-2011 at 06:00 AM.
PurgeandFire is online now   Reply With Quote
Old 12-20-2011, 03:38 AM   #7 (permalink)
Forum Moderator Magtheridon96
JESUS MAN
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,700
Magtheridon96 has a brilliant future (1810)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Can we also get a fix on that parsing bug that changes this:

private constant integer UNITS_UNIT_EVENT = 'n!!!'
to this:

constant integer UnitEvent___UNITS_UNIT_EVENT = 'UnitEvent___n!!!'

>_>
__________________
Magtheridon96 is offline   Reply With Quote
Old 12-20-2011, 07:22 AM   #8 (permalink)
Registered User Troll-Brain
cool != useful
 
Troll-Brain's Avatar
 
Join Date: Apr 2008
Posts: 1,937
Troll-Brain is just really nice (371)Troll-Brain is just really nice (371)Troll-Brain is just really nice (371)Troll-Brain is just really nice (371)
I'm not even sure that 'UnitEvent___n!!!' is a valid integer.
Last time i check it has to be one or 4 characters.
And special characters counts to one, such as the line break :'/n'

Anyway it's a pjass bug, in the token.l file :

UNITTYPEINT (['][\x01-\x26\x29-\x5B\x5D-\x7F]([\x01-\x26\x29-\x5B\x5D-\x7F][\x01-\x26\x29-\x5B\x5D-\x7F][\x01-\x26\x29-\x5B\x5D-\x7F])?['])

It's not a jasshelper one.

No to mention that it won't be the same expected value and probably would overflow even if it's a valid syntax.
Now a valid fix would be to convert such integers in decimal value, but really pJass should be fixed, not add some new stuff for jasshelper preprocessor.

EDIT : Oh wait, i got it, meh i won't delete my post, if there is someone which is willing to update pJass, because this is allowed in jass, but not for pJass :

local integer i = '/n'
__________________
- There are bugs with wc3, but most of time, the bug is between the keyboard and the chair.
- Never believe some warcraft "fact" without a proof, even from an "experienced" user, that's how myths & legends born.

You spam "...", "lol", and smilies such as "; p", "^)^",">.>"? You think you're the best and all other ones are stupids or at least less clever than you ? You think your errors are funny, while the other ones are incredibly lame ?
Maybe you've too much ego,or worse, you're a douchebag
Troll-Brain is offline   Reply With Quote
Old 12-20-2011, 07:30 AM   #9 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1209)Bribe has much of which to be proud (1209)
PayPal Donor: This user has donated to The Hive. 
Well the bug Mag mentioned is definitely vJass because of the way it gets privatized there.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 12-20-2011, 07:33 AM   #10 (permalink)
Registered User Troll-Brain
cool != useful
 
Troll-Brain's Avatar
 
Join Date: Apr 2008
Posts: 1,937
Troll-Brain is just really nice (371)Troll-Brain is just really nice (371)Troll-Brain is just really nice (371)Troll-Brain is just really nice (371)
Yeah i've realized that, see my edit.
__________________
- There are bugs with wc3, but most of time, the bug is between the keyboard and the chair.
- Never believe some warcraft "fact" without a proof, even from an "experienced" user, that's how myths & legends born.

You spam "...", "lol", and smilies such as "; p", "^)^",">.>"? You think you're the best and all other ones are stupids or at least less clever than you ? You think your errors are funny, while the other ones are incredibly lame ?
Maybe you've too much ego,or worse, you're a douchebag
Troll-Brain is offline   Reply With Quote
Old 12-20-2011, 07:53 AM   #11 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1209)Bribe has much of which to be proud (1209)
PayPal Donor: This user has donated to The Hive. 
Well it's pretty much anything with a "\" character is not allowed with pJass inside those rawcodes. I don't think '\\\\\\\\' compiles with it last I checked.

@Cohadar, I think it's not useful to have a "break" keyword when "exitwhen true" works just fine. Sometimes having less keywords is a better option.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 12-20-2011, 04:27 PM   #12 (permalink)
Registered User cohadar
User
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 234
cohadar will become famous soon enough (94)cohadar will become famous soon enough (94)cohadar will become famous soon enough (94)
Quote:
Originally Posted by Magtheridon96 View Post
Can we also get a fix on that parsing bug that changes this:

private constant integer UNITS_UNIT_EVENT = 'n!!!'
to this:

constant integer UnitEvent___UNITS_UNIT_EVENT = 'UnitEvent___n!!!'

>_>
That is already fixed.

@Bribe
break is simply better than exitwhen true.
Besides I added it to be consistent,
every programming language that has for and while loops also has a break.

When I get someone to update TESH so new keywords are bolded properly there will be a new JNGP release, until than please download and test this.
__________________
Cohadar spoke.
cohadar is offline   Reply With Quote
Old 12-21-2011, 09:56 AM   #13 (permalink)
Registered User mckill2009
SSJ99999 Pinoy!
 
mckill2009's Avatar
 
Join Date: Mar 2009
Posts: 4,385
mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)mckill2009 is a splendid one to behold (847)
I really like this improvement, but can I do this?...
Jass:
for enumUnit in someGroup
    //dooooooooo...
    call GroupAddUnit(someGroup, enumUnit)
endfor

coz I really dont like this >>> // WARNING: groups are empty after for loop...
__________________
My Resources:
My Maps
My Systems/Spells

Your ideas tend to result in unnecessary violence so shut the F*** up!
mckill2009 is offline   Reply With Quote
Old 12-21-2011, 10:10 AM   #14 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1209)Bribe has much of which to be proud (1209)
PayPal Donor: This user has donated to The Hive. 
I'm pretty sure that is going to be a wrapper for a FirstOfGroup loop, so no you can't, that will cause an infinite loop divide by 0!

Though anonymous functions would be cool. People have supported that in the past but it could lead to some serious spaghetti.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 12-21-2011, 02:54 PM   #15 (permalink)
Registered User cohadar
User
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 234
cohadar will become famous soon enough (94)cohadar will become famous soon enough (94)cohadar will become famous soon enough (94)
Bribe is right, so if you need to do something with a group after loop you will simply have to use ForGroup native and enum function.
__________________
Cohadar spoke.
cohadar is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 01:22 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle