wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > - Submit a resource -
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-27-2009, 09:02 PM   #1
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default jAssyst

Background:
I was in need of an Assistance System which could handle multiple Heros/Units per player.
Since i havent found any good system which achieves that, i made this.

Requirements:
Details:
  • This System can handle multiple heros/units per player
  • Highly customizable
  • Uses one Timer per Hero/Unit supervised by this System
  • This does not handle any bounty stuff, but that can easily be achieved with the provided functions.
  • Easy to import, since it uses vJass


ChangeLog

v1.0 - System submitted for critique and suggestions
v1.0 - TestMap and Screenshot added
v1.1 - uses UnitIndexingUtils now, however can be easily changed to use some other Indexing/Attachment-System
v1.2 - added AssistUnit.UnRegister method, and fixed a possibly critical bug.
v1.25 - restructured some code, renamed library to "jAssyst" (shorter), now uses one death event for all units (damn forgot to change this in v1.1)
v1.3 - added a version which uses a DamageDetectionSystem (LLDD), exchanged ARGB with GetPlayerColored, some minor code optimizations
v1.31 - added a "SpellBonus Module", for registering assists for spells which dont deal damage aswell.
v1.32 - added functionality to automatically unregister registered units upon death (for non hero units only, new requirement: TimerUtils)
v1.40 - added support for IDDS and ADamage, users can now choose which DDS they want to use.
v1.41 - moved the DamageDetection Support to an extra optional Module.
v1.42 - changed implementation to 1 timer per AssistUnit and fixed a minor bug, and fixed some constants of the configuration, which were set to really bad values.
v1.50 - improved performance (by using a much higher timer timout, without _any_ loss of accuracy), made the automatic unregister function less error prone.
v2.0 - adjusted for wc3 1.29, modularized message/text stuff: there are now generic callbacks in which the user can do whatever he wants. A example with the previous text output is supplied

Expand jAssyst 2.0:
Expand jAssyst SpellBonus Module:
Expand jAssystModule DamageDetect for LLDD:
Expand jAssystModule DamageDetect for IDDS:
Expand jAssystModule DamageDetect for ADamage:
Expand jAssyst Info Messages:
Attached Images
File Type: png vjAssistSYS..png (215.7 KB, 391 views)
Attached Files
File Type: w3x jAssyst_v2.0.w3x (105.8 KB, 0 views)

Last edited by akolyt0r : 07-24-2018 at 11:16 PM. Reason: updated to v2.0
akolyt0r is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-01-2009, 11:34 PM   #2
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Updated (v1.1)
Quote:
v1.1 - uses UnitIndexingUtils now, however can be easily changed to use some other Indexing/Attachment-System

will update Testmap later..

EDIT: Do you think i should add a UnRegister method ? ..i cant think of a map which would need it ...
__________________

Last edited by akolyt0r : 03-01-2009 at 11:43 PM.
akolyt0r is offline   Reply With Quote
Old 03-03-2009, 05:02 AM   #3
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

ofc you MUST unregister gone units...
DioD is offline   Reply With Quote
Old 03-03-2009, 09:09 AM   #4
Tyrande_ma3x
User
 
Tyrande_ma3x's Avatar
 
Join Date: Feb 2009
Posts: 185

Submissions (1)

Tyrande_ma3x is on a distinguished road (12)

Default

Wouldn't this count assists from dummy units as well?
Tyrande_ma3x is offline   Reply With Quote
Old 03-03-2009, 10:29 AM   #5
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Tyrande_ma3x
Wouldn't this count assists from dummy units as well?

when you register them with call AssistUnit.Register(youdDummy) ...of course ...but why would you do that ...

Quote:
Originally Posted by DioD
ofc you MUST unregister gone units...

Hmm maybe you are right ...even though you would only need that functionality when you use this system for normal units aswell ...and not just heroes ...and that would be the most common application for this.
Well ..i will add a UnRegister method .... since i use UnitIndexingUtils now ..i dont even need a O(n) operation ...Good Thing.
__________________
akolyt0r is offline   Reply With Quote
Old 03-03-2009, 12:43 PM   #6
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

OK added the call AssistUnit.UnRegister(youdDummy)-method ...

Currently still leaks the 2 triggerevents (death/damaged)...is it safe to remove them ?!
__________________
akolyt0r is offline   Reply With Quote
Old 03-03-2009, 12:48 PM   #7
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

You should use a damage detection system and a generic unit dies event. In fact, players should be able to define themselves what counts as an assist, it shouldn't be hardcoded to only count damage. What constitutes an assist should be up to the users to decide and as such, damage detection shouldn't even be required, it should be an optional module like any other assist condition (although it likely will be used the most).
__________________
Anitarf is offline   Reply With Quote
Old 03-03-2009, 01:25 PM   #8
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

yeah generic death event is no problem ... in a earlier version (not released) ..it was a problem though ( would have needed a O(n) operation)...

Hmm you mean i just create a "RegisterAssist(assistingplayer, unit)" method... and then the user can call it whenever he wants to ?...
+ a additional module which does that automatically for damage events ?!

As a matter of fact i dont want to use a damage detection engine ...(i dont need register damage for all units ..only for the ones monitored by this system) ..
What i could do however is to make it easy to make the registerdamage-module use a damage-detection engine ...

EDIT: Damn ..if i dont want ugly code, AND a external registerdamage-module ...i HAVE to use a damage detection engine ..

EDIT2: v1.25 now uses generic death event. I dont think i will do change the damage stuff ... since nearly everybody who wants to use such an Assistance System wants register damage as Assist ....
Maybe i will add a basic spell-assist-module ..to register spells which deal no damge (e.g. hex ...) as assists aswell..
BTW: added 2 functions:
Expand JASS:
__________________

Last edited by akolyt0r : 03-03-2009 at 03:03 PM.
akolyt0r is offline   Reply With Quote
Old 03-16-2009, 09:03 PM   #9
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

What happens if I register a unit, then unregister it and after some time register it again? Specifically, what happens with the damage detection?

It's because of shit like this that I'm saying you should use a damage detection system.
__________________
Anitarf is offline   Reply With Quote
Old 03-16-2009, 09:07 PM   #10
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Anitarf
What happens if I register a unit, then unregister it and after some time register it again? Specifically, what happens with the damage detection?

It's because of shit like this that I'm saying you should use a damage detection system.

Ok i will make another version using a DDS ...
But for most uses uses (heroes) this should already be sufficient

Also i would need a simple color library (something like GetPlayerColorString(player) ..blabla).... ARGB is really overkill for this, but i havent found any fitting thing in the ressource section ..

EDIT: Damn ..just found http://www.wc3c.net/showthread.php?t=101692
__________________

Last edited by akolyt0r : 03-16-2009 at 09:13 PM.
akolyt0r is offline   Reply With Quote
Old 03-16-2009, 09:32 PM   #11
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by akolyt0r
Ok i will make another version using a DDS ...
But for most uses uses (heroes) this should already be sufficient
Sufficient or not it is too error-prone for our resource section.

Quote:
Also i would need a simple color library (something like GetPlayerColorString(player) ..blabla).... ARGB is really overkill for this, but i havent found any fitting thing in the ressource section ..
I think the system could benefit from more modularization. The user interface code that handles game messages and bounties could easily be a separate library from the assistance tracking code.
__________________
Anitarf is offline   Reply With Quote
Old 03-16-2009, 10:11 PM   #12
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Updated...i use a DDS now ... i chose LLDD, since it minimalism suits my needs perfectly...

Quote:
Originally Posted by Anitarf
I think the system could benefit from more modularization. The user interface code that handles game messages and bounties could easily be a separate library from the assistance tracking code.

i dont like to do anything like this without a "friend" keyword ....would get pretty ugly.

EDIT: btw could you change the thread title please... i changed the name of this system a while ago to "jAssyst" ..(yeah ...even shorter ...assist is a fun word to play around with ;)
__________________

Last edited by akolyt0r : 03-16-2009 at 10:22 PM.
akolyt0r is offline   Reply With Quote
Old 03-16-2009, 11:01 PM   #13
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by akolyt0r
i dont like to do anything like this without a "friend" keyword ....would get pretty ugly.
What are you talking about?
__________________
Anitarf is offline   Reply With Quote
Old 03-17-2009, 07:00 AM   #14
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Anitarf
What are you talking about?
well since you cant use private functions of other libraries without a friend keyword... or something like that.
Well whatever i actually think that an additional library for the messages would not improve this system ...
__________________
akolyt0r is offline   Reply With Quote
Old 03-29-2009, 05:20 PM   #15
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by CHANGELOG
v1.31 - added a "SpellBonus Module", for registering assists for spells which dont deal damage aswell.
v1.32 - added functionality to automatically unregister registered units upon death (for non hero units only, new requirement: TimerUtils)
updated, see first post.
__________________

Last edited by akolyt0r : 03-29-2009 at 05:21 PM.
akolyt0r is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:31 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services