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 > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-01-2008, 01:38 AM   #1
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default Assistance System 1.10b

Assistance System 1.20



A complete, customizable assistance system.

What is an Assistance System you ask? Well quite simply, when you have allies on your team with heroes, and more often, when the game is specifically designed to just use heroes, people can get angry when they help to get hero kills yet reap no reward for doing so. This system allows you to display who helped make kills, record how many times each player has done so, and divvy out rewards for said help.

Why did I make this? Vile had originally made and released one here a while back, but I never really cared for his method or triggering. I had need of such a system recently, so I wrote this, with a little help from Viles original system. I think this is a good git more optimized and more functional then his. If there is a better method for achieving this goal, I don't know of it, but would sure like to be enlightened.

Pros:
  • This does not use 372 timers nor have a need to loop through them everytime a unit dies, takes damage, or one of them expires in order to discern what units/timers should be used - this uses only the number required for the players in the map, and uses a simple algorithm to determine the position in the arrays for said variables
  • This does not use an idiotic method for evaluating what players should recieve assistances when a hero dies - it uses a far more optimized and clean method
  • This uses vJASS, and as such, is far simpler to import and use then Viles
  • This records the number of assists each player has, and allows users to access these values easily
  • This reports errors users may commit during usage
Cons:
  • This is not MUI, it is PUI, however Viles shares this same limit

Read Me:
Hidden information:
Assistance System 1.20
by: emjlr3

Setup is very simple. Just copy the AssistanceSystem trigger to your map. If you do not have the GetPlayerNameColored library, you must copy that over too, but if you already have that trigger you do not need to.
Save your map. if it saves, everything is ready, if not, delete it all and try again. Once it saves, go through the Config. options and set them to whatever you want.

To use the system, simply call:

AssistanceSystem_Register(unit to register)

to allow players who help kill that unit to get assists for doing so.

The system is then loaded for that unit. You can only do this once per unit, and doing so more often will result in error messages.

The system stores the number of assists a unit has in the integer array AssitanceSystem_Assists[playerid]
This system is not MUI currently, it is PUI. Only 1 unit can be registered per player.
And that is all, the system is setup, and your heroes are registered. Enjoy!


System Code:
Expand JASS:

Version History:
  • 1.20 - Minor coding updates
    More configuration options, mainly message oriented
    No longer creates and destroys timers dynamically, reuses the same ones
    Minor test map updates, and an easter egg added
  • 1.10b - Slight Read Me and minor coding updates
  • 1.10 - Users no longer need to manually input the number of players
    Fixed a minor bug in the displayed message when only 1 player got an assist
    Minor coding updates
    Assists are now recorded and can be accessed globally
    Minor updates to the test map, including a proper minimap image and a multiboard to display assists and other stats
  • 1.00 - Initial Release
Attached Images
File Type: jpg AS.jpg (237.5 KB, 284 views)
Attached Files
File Type: w3x Assistance System 1.20 - emjlr3.w3x (127.2 KB, 317 views)
__________________

Last edited by emjlr3 : 05-12-2008 at 04:30 PM.
emjlr3 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-01-2008, 02:10 AM   #2
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

Send a message via AIM to Jazradel Send a message via MSN to Jazradel
Default

Instead of doing bounty, messages, etc for us, I would prefer to be able to register a function, then access a global unit group with all the assisting units in it. Or, at least globals to customise the message.
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.
Jazradel is offline   Reply With Quote
Old 05-01-2008, 03:17 AM   #3
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

I wanted to make this too! But I was just too lazy, and these kinds of things are quite tedious to me.

+Sex
Malf is offline   Reply With Quote
Old 05-01-2008, 03:35 AM   #4
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

There's already one in the database that uses the same syntax and everything as you, you even made mention of it in the original post. I'm not able to check currently, but what makes yours any better that we should have yours in the database and not the old one? If it's just a "Different way to code it" as you said, that doesn't merit approving it. I don't consider displaying split gold as something that means anything, either.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-01-2008, 02:30 PM   #5
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

Quote:
Instead of doing bounty, messages, etc for us, I would prefer to be able to register a function, then access a global unit group with all the assisting units in it. Or, at least globals to customise the message.

that can be aranged

as far as customizing the message, since its pretty dynamic, realistically, the only parts that could be changed would probably be:
"With assistance from" and "+xx gold!"
though I consider those pretty staple to the system, if you have better ideas let me know

Quote:
There's already one in the database that uses the same syntax and everything as you, you even made mention of it in the original post. I'm not able to check currently, but what makes yours any better that we should have yours in the database and not the old one? If it's just a "Different way to code it" as you said, that doesn't merit approving it. I don't consider displaying split gold as something that means anything, either.

i don't know what you are refering to by syntax, but, other then a few local variable names(which I use simply because I liked the naming scheme), everything else should be completely different, atlest what matters

optimization is the major reasons this is better, though there are a few other reasons:
  • Viles uses 372 timers, which he loops through everytime a unit is damaged, dies, or a timer expires, to figure out which one it was - I use only the number of timers required for the number of players in the game, and I use a simple algorithm that gives me the correct array number for a given timer, without having to loop
  • my method for retrieving the players who should get credit for assistances is much cleaner and more optimzed then Viles, which was just plain stupid
  • this uses vJASS, and as such, is far easier to import and use, IMO
  • this records the number of assists each player has, and allows users to retrieve this data easily, Viles does not
  • this reports errors the user may commit through use
thats all I got off the top of my head w/o looking back over his

not sure what you are talking about with the "Split gold is stupid" comment, Viles has the option
and I completely agree that a new system should not be warranted simply because its coded differently, but that is hardly what this is, else I would not have released this

I am surprised you thought otherwise, and I really suggest you read through my code again if you mis-took this for Viles written slightly differently
__________________

Last edited by emjlr3 : 05-01-2008 at 03:14 PM.
emjlr3 is offline   Reply With Quote
Old 05-01-2008, 03:05 PM   #6
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by emjlr3
I use only the number of timers required for the number of players in the game, and I use a simply equation that gives me the correct array number for a given timer, without having to loop
So what if I have multiple heroes I want to monitor owned by the same player?
Quote:
Originally Posted by emjlr3
and I completely agree that a new system should not be warranted simply because its coded differently, but that is hardly what this is, else I would not have released this

I am surprised you thought otherwise
The thing is that you don't list pros/cons to your system in the first post and I don't have access to WC3 virtually anywhere I have the ability to review stuff. In that light, all I can look at is the code and that is typically a poor judge strictly in terms of esoteric value. All of these things you mentioned different between yours and his in your last post were things I couldn't have known without you telling me. :p

Quote:
Originally Posted by emjlr3
i don't know what you ar refering to by syntax, but, other then a few local variable names(which I use simply because I liked the naming scheme), everything else is completely different
Your method of using AssistanceSystem_Register(MyUnit) is identical to Vile's, hence identical syntax.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-01-2008, 03:22 PM   #7
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

Quote:
So what if I have multiple heroes I want to monitor owned by the same player?

that would be a problem, as it would with Viles I believe
it would also require attaching to units, I think, unless you can somehow design arrays to be specific for a pair of units, that is out of my league quite frankly

Quote:
The thing is that you don't list pros/cons to your system in the first post and I don't have access to WC3 virtually anywhere I have the ability to review stuff. In that light, all I can look at is the code and that is typically a poor judge strictly in terms of esoteric value. All of these things you mentioned different between yours and his in your last post were things I couldn't have known without you telling me. :p

I can honestly say it never crossed my mind, though now I can see how simply obvious it should have been (especially when there is a previously accepted system already on the board), will do

Quote:
Your method of using AssistanceSystem_Register(MyUnit) is identical to Vile's, hence identical syntax.

don't know what to say, seemed like a good idea at the time
__________________
emjlr3 is offline   Reply With Quote
Old 05-01-2008, 05:06 PM   #8
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Just to let you know, requiring vJass makes it harder to import than Vile's system, since you have to use JNGP to use this system. Sure, we all agree that everyone should use JNGP, but not everyone does. Just thought I'd mention that.

I really think that being able to distinguish heroes for assists would seriously merit approving this, otherwise it's really just an optimization. I guess that's not bad, though, so let me go through it and we'll see.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-01-2008, 06:50 PM   #9
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

I think it makes it less globally accepted, however, its still far easier to import if you fall in the catagory of JNGP Users, which, as you said, everyone serious about mapping, or using pre-made system should
It is impossible to import if you're not a JNGP user, I think would be more accurate, w/o serious editing

Quote:
I really think that being able to distinguish heroes for assists would seriously merit approving this

can't say I understand what you mean by this.....

Quote:
otherwise it's really just an optimization

agreed, Viles had all the options I could think to add, and other then tracking assists, its still just an configurable assistance system, far more optimized, using vJASS syntax
__________________

Last edited by emjlr3 : 05-01-2008 at 06:52 PM.
emjlr3 is offline   Reply With Quote
Old 05-01-2008, 07:04 PM   #10
Fulla
Evil Overlord
 
Fulla's Avatar
 
Join Date: Jan 2006
Posts: 1,416

Submissions (3)

Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)

Default

On another note, wasn't your Knockback System, just an optimized version of what vile already had?
So an optimized Assist System, surely would full into the same category?

EDIT:

Could you update this please, so it takes into account team killing/denying & suiciding?
In the test map I killed an ally and got 250 gold!!
__________________

Last edited by Fulla : 05-01-2008 at 07:21 PM.
Fulla is offline   Reply With Quote
Old 05-01-2008, 08:09 PM   #11
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Fulla
On another note, wasn't your Knockback System, just an optimized version of what vile already had?
Ad hominem logical fallacy. It's nice that you decided to misquote me and take what I said out of context, if you had taken the time to read what I typed you might have noticed me saying that being strictly an optimization is not a bad thing. Since you decided to so belligerently attack my integrity, though, might as well say that optimizing the concept of a knockback system was simply a byproduct of making it not fail. And for your information, I coded my system from scratch without looking at his.

Quote:
Originally Posted by emjlr3
can't say I understand what you mean by this.....
Like, if a player has 2 heroes, being able to track assists on a per hero basis rather than a per player one would really set this system apart from all of those before it. It's just an idea, one that would really make the system awesome, not a requirement.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-02-2008, 08:39 AM   #12
Fulla
Evil Overlord
 
Fulla's Avatar
 
Join Date: Jan 2006
Posts: 1,416

Submissions (3)

Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)

Default

Quote:
Originally Posted by Rising_Dusk
Ad hominem logical fallacy. It's nice that you decided to misquote me and take what I said out of context, if you had taken the time to read what I typed you might have noticed me saying that being strictly an optimization is not a bad thing. Since you decided to so belligerently attack my integrity, though, might as well say that optimizing the concept of a knockback system was simply a byproduct of making it not fail. And for your information, I coded my system from scratch without looking at his.

It was not in anyway intended to be a hostile attack or neither intended to insult your integrity, I was just making a 'blunt' observation.

- You seemed very anti vile's knockback system, advising ppl not to use it & went through the trouble of posting an optimization.
- Emjlr3's comes along & seems to pretty much do the same thing, I thought you'd only be happy with that.

(Correct me if I'm wrong but, I didn't see any new features in your knockback system, mainly seemed like an overall optimization).

===

Emjlr3, just incase didnt see above reply (as I edited it later), please add in consideration for teamkilling/suiciding.
__________________

Last edited by Fulla : 05-02-2008 at 09:03 AM.
Fulla is offline   Reply With Quote
Old 05-02-2008, 01:37 PM   #13
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

the test map does not differentiate between ally killing and the lot, nor does it stop ally attacking

however, the assistance system will not give assistance for doing so, it can distinguish the difference

and, the hero kill message in the demo map has nothing to do with the assistance system
__________________
emjlr3 is offline   Reply With Quote
Old 05-02-2008, 03:28 PM   #14
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Fulla
You seemed very anti vile's knockback system, advising ppl not to use it & went through the trouble of posting an optimization.
Obviously because it was absolutely abominable. In the case of optimizations, his Assistance system is not too terrible since it's mostly devoured from ToB's. This is obviously still better, but I think there are features it could have to make it even better. Read what I type dude, it would help you a lot in shaping your posts to make sense within the scope of the discussion.
Quote:
Originally Posted by Fulla
(Correct me if I'm wrong but, I didn't see any new features in your knockback system, mainly seemed like an overall optimization).
What's more to add to a knockback system? It's not a physics or collision system, dude, there's nothing else to be added to it. If you can think of something, suggest it in its own topic and chill out over here. Seriously, stop polluting this thread by trying to talk down my own work on a totally different system.
Quote:
Originally Posted by Rising_Dusk
Like, if a player has 2 heroes, being able to track assists on a per hero basis rather than a per player one would really set this system apart from all of those before it. It's just an idea, one that would really make the system awesome, not a requirement.
See above, Emjlr.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-02-2008, 04:29 PM   #15
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

perhaps I being dumb but I really can't think of a good method for doing that (though I can't say I have really thought about it too indepth), if I can think of one, or you can suggest one, I would be happy to implement it (would prolly end up being a huge overall to the system, as my storage algorithm would change dramatically), but until then....

as it stands, what is holding this back form being accepted?
__________________

Last edited by emjlr3 : 05-02-2008 at 04:31 PM.
emjlr3 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 12:34 PM.


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

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