Wc3jass News #1

moyack · 17429

0 Members and 1 Guest are viewing this topic.

Wc3jass News #1
on: September 02, 2012, 11:17:29 AM

News!! #1

Hello and welcome to the news about wc3jass.com the site for jass and vJASS coding. We'll be posting monthly all the news about this site.

Sections:
  • Main Information: JASS NEWGEN PACK version 1.5e
  • Latest scripts
  • Advertisements

Main Information: JASS NEWGEN PACK version 1.5e

As part of the development of Blizzardmodding.info network (wc3jass.com is part of this group) we have build a new update of Jass New Generation Pack, which includes several improvements in bugs related with jass and vJASS coding. We want to give credits to purgeandfire for its suggestions and coding help in this project.

In this new version we have implemented new stuff, more access to specific tools, help files and (hopefully) a nicer experience to the final user. If you have any comment or suggestion about how to improve this pack, just propose it here. The features included in this pack are the following:



The final result is a world editor that compiles vJass code, uses the latest PJass to check for errors, highlights jass code, has a proper testing environment, supports visual preview of colored tooltips and can use grim extension pack as well. Not to mention that jasshelper also saves backups of whatever you save so it is also safer.

Important Note: This version has removed Reinventing the Craft (RtC) plugin because it generates more complications than benefits to the final user. If you want to use this tool in your project you must use a previous version of JNGP which can be found at wc3c.net. Here we will not support this feature.

In the coding part, this pack offers the possibility to select which jasshelper version we want to use (vexorian's 0.2.A.B or cohadar's 2012-03-10 version) with this the jassers can select the most adequate tool according to their current projects. We encourage to use Cohadar's version for their faster compiling time and the addition of new keywords. Just use Vexorian version if you're one of the 0.001% of people in the world who use some old scripts in you map.

If you want to make this tool more powerful, just come here and participate on it. The idea is that we can give more features apart from the coding side. For bugs and suggestions refer to the proper topic here: http://wc3modding.info/4263/the-jass-newgen-pack-jngp-1-5e/


Latest Scripts

Many known wc3 jassers have joined in our quest to rebuild wc3jass.com and these are their latest submissions. From now on we'll promote in this section the scripts/systems of the month. If you have one script that can be useful for the WC3 community, just submit it here. Meanwhile, let's start with this big update!!

[System] ModeManager
Description
This system allows to you to create game commands and modes.
You can assign a function callback for whenever this command/mode is used.

For a player to use a certain command/mode, you must authorize him.
This also allows you to give a certain player the ability to select a game mode.

You can also lock a player rendering him unable to use anything.
This makes the system faster, because then it won't have to go
through the loop for nothing.

Each mode has a boolean 'flag'.
This boolean can be used any way you desire.
For example, you could use it to indicate an activated mode.

This system allows several mode strings to be accepted in the same string.
      
[Snippet] GetUnitRegeneration
Description
The title explains it all.
[Snippet] BufferEx
Description
I was in need of something to make messages in Warcraft III pop out Type-writer style, and that would require a Buffer. And since I had some other things that needed to use a buffer (Like a Unit order queue and an AI-Action/Behavior system), I decided that I needed to make them run off of one Buffer system. Hence, I wrote this.

The reason I called it BufferEx is because Nestharus' Save/Load system uses a library called Buffer which can be found in the Small Code Snippets thread at the Hive Workshop.
[Snippet] MessageQueue
Description
Enqueues messages to display with
one call rather than having multiple
calls.

All messages will be displayed based
on the longest duration given for any
message in one trigger function call
stack.

call MessageQueue.push("Hello", 2)
call MessageQueue.push("Okay", 4)

Both of the above messages will be
displayed for 4 seconds.
[System] ElapsedGameTime
Description
Don't be fooled by the title, this is more than just a simple Elapsed Game Time manager.
This system also allows you to register elapsed game-time events.
With the current configuration, the limit is 3.41 years in the future. I hope this isn't inconvenient.
I apologize for this limitation and I also hope it won't make this resource seem useless to you.
You can also get a formatted elapsed game-time string.
[System] SoundTools
Description
This system allows you to play a sound immediately after creating it (Which is impossible inside Warcraft III)

Basically, all what it does is start a timer and play the sound.
It also recycles these sounds to decrease the amount of RAM used up.
[Snippet] FlyHeight
Description
Warcraft III movement types are pretty bugged. It would be much better to write them from scratch. This system allows you to create flying units with changeable heights.
[Snippet] RegisterPlayerUnitEvent
Description
This system was made to replace that cumbersome GTrigger by Jesus4Lyf.
Special thanks to Bribe, azlier and BBQ. (The most awesome people I know /o/)
[Snippet] StringIndexer
Description
This system generates an index for any string below 8191.
[System] Heal
Description
This system efficiently handles healing units instantly and over time.
[Snippet] IsUnitChanneling
Description
This is a small and clear resource that detects if a unit is channeling or not.
[System] Unit Recycler & Simple Damage Detection System
Description
Introduction:

This system is the result of working with a damage detection system that actually can be safe (AKA avoid totally the DestroyTrigger() function), so one solution to this issue is to avoid as much as possible (hopefully completely) the destruction of units and therefore the EVENT_DAMAGED triggers related to them, and the only way to make it possible is by recycling the units. The current result is a system that recycle most type of units (summoned and buildings simply don't work for their harcoded properties).


Why is convenient this system?

because the game won't need to allocate memory creating units, instead, they'll be backed up for a later use, which can improve your map performance. This can be very useful in maps where the unit spawning is a very common task (like AoS, footies, etc).


What's the issue with buildings and summoned units??

Buildings have limitations in moving them (they can be moved but their basement remains in the original place, which won't allow the construction of new units in those places). About summoned units, their dead is totally harcoded by the summoning abilities and can't be stopped by detecting the damage, therefore they can't be recycled.


How it works?

This library takes into account units that are being damaged, and detects if they're going to die (if the damage dealt to a unit is enough to kill them), if that situation happens, then it will be moved to the heaven, a place that you define in your map where the units are restored, cleaned and left ready for later use. Additionally this system offer a set of replacement functions which will help to this system to recycle units more efficiently.
[Snippet] Parabolic Function
Description
This function takes as a parameters the distance that the parabolic movement should move (d) and the maximum height the projectile will flight (h).

So x is a value between 0 and d, and the function will return the height for that value.

As a side note, if x < 0 or x > d then this function will return negative values.
[Snippet] Timed Effects
Description
So... have you been needing a simple way (or function) to create an effect temporally and don't worry about destroying it? or you're needing that an effect with different animations (birth, stand, death) will show all of them?? if your answer is yes to any of those questions, then you're in the right place.

This script is used in my project Power of Corruption, as you'll see, it's simple as hell.
[Snippet] RegisterAnyUnitEvent
Description
A library to reduce the time writing the same shit. I took some code ideas from a similar resource approved here. This one supports all the possibilities in calling the trigger. If user defines the condition and action functions this function will return the respective trigger, so it can be controlled by other instance (just in case).
[Snippet] AddSpecialEffectZ
Description
Another simple snippet. It is the good ol' technique to make an effect have a Z-coordinate, allowing it to float Z units above the ground.

It works by creating an invisible platform, adding the effect, and then removing the platform.

Note: Creating too many at a time can cause short lag spikes. If this occurs, you may want to switch to use invisible dummy units instead.
[Snippet] DisableUnitMovement
Description
Disables the movement of a particular unit. This method was discovered by WaterKnight (or at least, it was first exposed to the public by WaterKnight) in this thread:
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/setunitpropwindow-disableunitmovement-206527/

I made this library to be a simple wrapper for it. Of course, this is all inlineable, but it is a useful technique for people to know.

Setting a unit movespeed to 1 will still allow it to move (ever so slowly) and will interrupt orders. Ensnares ground units and whatnot. This has no debuff, and works 100%.
[System] WordWrap
Description
http://en.wikipedia.org/wiki/Word_wrapping

This is not as featured/precise as text editor word wrapping, but it does the job pretty well.

The description is in the documentation.
[System] Track
Description
This manages trackable objects in such a way that it actually improves functionality and has an interface to make even the toughest projects very readable.

It allows you to:
- Create trackables for specific players. (without desyncs)
- Easily register a trackable click and trackable hover.
- Retrieve which player clicked the trackable.
- Retrieve trackable information - the model, x, y, z,  and facing.

Trackable2 allows for similar functionality, but this one is improved in both speed and handle efficiency. There are some cases where trackable2 has unnecessary lag/freezes, but the Track library fixes it.

This is one of the only systems I haven't completely rewritten time and time again. :)

This is the same thing as the hive version but I improved the documentation a bit for readability.
[vJass] LocalHelper
Description
This is a less verbose way to handle local code stuff than the usual one, if GetLocalPlayer() == ...
It doesn't use any handle comparing to the alternative ForceAddPlayer / IsPlayerInForce.
It's also faster, but who care ...
Anyway if you care that much about efficiency you would simply inline it and use a not array global variable.


ADVERTISEMENTS

Now let's remind some of the features we offer to you.
  • Wiki Section: Here you can generate documentation. Right now all the functions in jass / vJASS can have a basic documentation. Just test it in some jass code.
  • Media section: Here you can submit archives of all the types managed by Warcraft III and Starcraft II. Additionally you can create album according to your needs, upload files in mass or individually up to 20MB.
  • Blog Section: If you love to share your thoughts about gaming or probaly something related to jass, you can do it here. You can start it posting in the Gaming Zone board.
  • And last but not least, The Community Section: Here you'll find all the sections where to discuss your questions about jass and programming in general. Don't be shy, we don't bite :)

For suggestions about what to include in the next news or your thoughts, please post in this thread.

Thanks for reading, have a nice day.
« Last Edit: May 21, 2017, 09:25:31 PM by moyack »



Re: Wc3jass News #1
Reply #1 on: September 02, 2012, 01:18:30 PM

These news are not finished. I need to add purgeandfire and trollbrain submissions. Later the advertisements.


Re: Wc3jass News #1
Reply #2 on: September 02, 2012, 05:36:52 PM

Quote
Vexorian jasshelper is necessary if you use one of the few codes which depends on some specific compiling order and cohadar's jasshelper comes with new loop keywords and compiles faster

It's totally lame to say that, Vexorian jasshelper has a silly init order, while it makes sense with cohadar's one.
The only complain about Cohadar's one i've read so far is with some silly module abuse, which will be used by what, something like 0.01 % of vJassers ...
Now maybe there are some other bugs, since i don't really mod anymore, but at least they were never reported.

Also what about to use a different parser, or eventually edit it, can't remember what exactly, but some things which are valid are considered invalid, like use a function ... returns nothing in a boolexpr.
Yeah i know why it was used, but the desync with mac users is supposed to be fixed now, and it's not the only thing, maybe Mag or someone else could tell more about it.

vJass is already a jass preprocessor, no need to (ab)use vJass features in order to make some inferior vJass preprocessor coded "by hand".


Re: Wc3jass News #1
Reply #3 on: September 02, 2012, 11:22:44 PM

It's totally lame to say that, Vexorian jasshelper has a silly init order, while it makes sense with cohadar's one.
The only complain about Cohadar's one i've read so far is with some silly module abuse, which will be used by what, something like 0.01 % of vJassers ...
Now maybe there are some other bugs, since i don't really mod anymore, but at least they were never reported.

Also what about to use a different parser, or eventually edit it, can't remember what exactly, but some things which are valid are considered invalid, like use a function ... returns nothing in a boolexpr.
Yeah i know why it was used, but the desync with mac users is supposed to be fixed now, and it's not the only thing, maybe Mag or someone else could tell more about it.

Totally agree, that's the reason I've implemented the selection of compilers, so people can notice the difference. I dare to say that this version of JNGP covers the wc3c.net people with Vex JH and the rest of humanity who decided to evolve and get over it Vexorian way to do things. Vex did good things for jassers and we must acknowledge that but we can't keep thinking and thinking like him anymore. Cohadar version prove us that things don't necessarily have to be done in only one way.


Re: Wc3jass News #1
Reply #4 on: September 03, 2012, 03:03:33 AM

Quote
Totally agree..

So what about edit your post ? :p

Sure i respect the contributions of Vexorian, but it's time to move, we can't wait anything from him now.
For example TimerUtils is a shame ...

So what about pjass ?
If you don't want / can't edit it, give Zoxc's parser a try.
Maybe this one has even virtually no limit on lines of script which can be analysed.
Pjass has one, which can be reached if you spam many code (i've reached it with cjass and a "textmacro loop").

vJass is already a jass preprocessor, no need to (ab)use vJass features in order to make some inferior vJass preprocessor coded "by hand".


Re: Wc3jass News #1
Reply #5 on: September 04, 2012, 07:13:12 AM

So what about edit your post ? :p

Sure i respect the contributions of Vexorian, but it's time to move, we can't wait anything from him now.
For example TimerUtils is a shame ...

So what about pjass ?
If you don't want / can't edit it, give Zoxc's parser a try.
Maybe this one has even virtually no limit on lines of script which can be analysed.
Pjass has one, which can be reached if you spam many code (i've reached it with cjass and a "textmacro loop").

Hmm... I'll do some tests with that version. And the advantage is that it comes with source code.


Re: Wc3jass News #1
Reply #6 on: September 06, 2012, 10:57:54 AM

Ok, News announced, check you e-mails Ladies & Gentlemen


 

Chaos Realm - The world of Game modders and wc3 addicts     WC3JASS.com - The JASS Vault   Jetcraft - A Starcraft II mod