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-02-2008, 03:43 PM   #16
Rising_Dusk
Obscurity, the Art


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

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
perhaps I being dumb but I really can't think of a good method for doing that, 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....
Just store a list of all assistants to a kill onto the dying hero and recall it on the spot. It wouldn't be that hard to manage and would really set the system apart. I don't consider it a requirement for approval, but it's more or less the only way I'll be happy to approve it. (Rather than forced to because it's my job!)

Quote:
Originally Posted by Emjlr3
as it stands, what is holding this back form being accepted?
Well since you asked...
Collapse JASS:
    loop
        exitwhen Timers[i]==t
        
        if i>Total then
            call BJDebugMsg("AS Error: |cffff0000No reset timer found.")
            return
        endif
        set i = i + 1
    endloop
O(n) searches are not good practice and are the lowest efficiency search possible. There are other ways to do it, you should use them!

And man, you're creating too many new timers. Not only should they all be recycled rather than created/destroyed, but you don't even need to create more than 12 timers for the system... This is hideously inefficient now that I've taken the time to look at the code, you don't need to create any of those timers on the spot, just preload them and pause them when they're done. For great justice, man!

Otherwise, it's okay, it can replace Vile's when you fix those things.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-02-2008, 03:49 PM   #17
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

I did another test & went though the triggers a bit:
  • I team killed an ally and a message came up saying I have killed him & have gained gold. (no assists + no gold was gained thou).
    Do I have to edit the system? I couldn't find any Hero kill triggers anywhere outside it, as I thought you said above. I will double check this now thou.
    I'd prefer simply Player X has team killed player Y (no gold).
    Sorry for bringing this up again.
  • A quick note, don't forget to make the select unit/random unit, have NO unit sound assigned to them, as your get the 'ready to work' sounds when buying the dummy.

Quote:
Originally Posted by Rising_Dusk
Read what I type dude, it would help you a lot in shaping your posts to make sense within the scope of the discussion.

I read exactly what you said, but man you're simply overreacting, making a seen over something trivial.

Quote:
Seriously, stop polluting this thread by trying to talk down my own work on a totally different system.

Where am I talking down your work? I have done no such thing.
You just simply exploded. I was & still am a big fan of your optimized knockback system.
I did give a suggestion or two :p
__________________

Last edited by Fulla : 05-02-2008 at 04:11 PM.
Fulla is offline   Reply With Quote
Old 05-02-2008, 04:07 PM   #18
Rising_Dusk
Obscurity, the Art


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

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

Maybe your English is just such that what you think you say you don't actually say, since after rereading your posts I see them as very implicating of my mistreatment of emjlr's system even though 'mine is just an optimization' as well. That's what offends me. (Which you clearly cannot seem to fathom)
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 05-02-2008, 04:28 PM   #19
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:
you should use them!

what are them???
at worst possible case you would go through a loop of about 167 or so (if there are 12 players and your looking at player 12 killing player 11), which is not terrible IMO, but again, if there is a better method.....

Quote:
And man, you're creating too many new timers. Not only should they all be recycled rather than created/destroyed, but you don't even need to create more than 12 timers for the system... This is hideously inefficient now that I've taken the time to look at the code, you don't need to create any of those timers on the spot, just preload them and pause them when they're done. For great justice, man!

I agree that I could just pause them once they are created, and re-use the same one over and over, but I do not think using a stack would be a good idea, but how I could lower that total to 12 is beyond me(I need 1 per player pair, as it stands)
I would rather do that then use a stack, I have had problems in the past with timer stacks screwing me up in similar situations (though perhaps I wasn't nulling properly)

Quote:
Just store a list of all assistants to a kill onto the dying hero and recall it on the spot. It wouldn't be that hard to manage and would really set the system apart. I don't consider it a requirement for approval, but it's more or less the only way I'll be happy to approve it. (Rather than forced to because it's my job!)

would this not require attachments to units?

Quote:
I team killed an ally and a message came up saying I have killed him & have gained gold. (no assists + no gold was gained thou).
Do I have to edit the system? I couldn't find any Hero kill triggers anywhere outside it, as I thought you said above. I will double check this now thou.
I'd prefer simply Player X has team killed player Y (no gold).
Sorry for bringing this up again.

the assistance system does not deal with assinging gold for nor anouncing hero kills
that is internal to the map, but if you care to edit it search in function Stone_Work_Actions in the Stone_Work trigger
__________________

Last edited by emjlr3 : 05-02-2008 at 04:33 PM.
emjlr3 is offline   Reply With Quote
Old 05-02-2008, 08:35 PM   #20
Rising_Dusk
Obscurity, the Art


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

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
what are them???
at worst possible case you would go through a loop of about 167 or so (if there are 12 players and your looking at player 12 killing player 11), which is not terrible IMO, but again, if there is a better method.....
Just store the index inside of the assistance struct and you can retrieve it on the spot with no searching whatsoever. Clean, right?
Quote:
Originally Posted by emjlr3
I agree that I could just pause them once they are created, and re-use the same one over and over, but I do not think using a stack would be a good idea, but how I could lower that total to 12 is beyond me(I need 1 per player pair, as it stands)
I would rather do that then use a stack, I have had problems in the past with timer stacks screwing me up in similar situations (though perhaps I wasn't nulling properly)
A stack is always a good idea. I would approach the system in a 12 timer fashion with a stack attachment scheme that allows me to link a list to each timer. Effectively simulating your 144 timers with only 12 that get turned on/off as necessary, talk about efficiency! Maybe it's not required, I guess, but it still saddens me that it's not being done.
Quote:
Originally Posted by emjlr3
would this not require attachments to units?
So it would, guess I was forgetting that this is a submitted system and not a map-specific system. Apologies. You could still manage it with an O(n) search, but those are shitty and I'd rather it your way than that. Fair enough.
Quote:
Originally Posted by emjlr3
the assistance system does not deal with assinging gold for nor anouncing hero kills
that is internal to the map, but if you care to edit it search in function Stone_Work_Actions in the Stone_Work trigger
For sure, though, you should not have alternate systems or whatever in your test map. It's confusing to users and I'm making it a requirement that you eliminate them from the testmap before this gets approved.

Actually, I'd like to go through the system in the database and yours with a finer comb and see what exactly the differences are before going further down this path.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 05-03-2008, 05:13 PM   #21
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 was attempting to avoid the need for an external attachment system, though I suppose I could include one internally, but still....as it stands I am not even using a struct for this

I understand how you would use 12 timers now, I think, having 1/player, with a 1 s callback interval, removing/restarting stored ticks/player when they deal damage to the players hero, pausing it when there is no more current damagers....again though, would need an attachment system and a struct, or a butt load of extra global arrays

though I think that it now seems like using a CSData would be beneficial, no?

as far as extra systems in the map, the only one is my HSS, I could remove that and just have a tavern, or simply pre-placed heroes, but that is not nearly as cool, and I can't say its very "confusing" for people to be able to pick thereireroes with it, and realize its not part of the assistance system, they are in different folders

the other triggers are simply there to allow for easier demo map testing, such as hero revival, computer AI, map init things, etc.

as far as differences between this and Viles, I think I listed them pretty accurately, though your free to spend time how you so choose
__________________

Last edited by emjlr3 : 05-03-2008 at 05:31 PM.
emjlr3 is offline   Reply With Quote
Old 05-03-2008, 11:11 PM   #22
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

A little off topic, but I had a cool idea for a potential add-on.
(Could be considered something completely different).

Bounty System

An extension of the assistance system, but more designed for when non-hero units die, but with ofcourse no big game messages.

Gold I'd imagine would be distributed roughly proportional to the damage you inflicted, so for example a 40 gold unit could be something like:
- You dealt 0-25% of hp in damage, you get a 4 gold cut
- You dealt 25-50% of hp in damage, you get a 8 gold cut
- You dealt 50-75% of hp in damage, you get a 12 gold cut
- You dealt 75+% of hp in damage, you get a 16 gold cut
- Killing unit gives you 40-16 (24)

The numbers are just random examples & I'd imagine the above could all be setup with configuration options.
I guess healing spells could screw this up thou?

I just think it would be very neat in an AoS for example, along side the Assist system & thought I'd just share it with you, see what you think.

Again sorry if i'm going off-topic :P
__________________

Last edited by Fulla : 05-03-2008 at 11:12 PM.
Fulla is offline   Reply With Quote
Old 05-04-2008, 12:33 AM   #23
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

not a bad concept, perhaps, say a 400 hp unit dies, only the last 400 damage done to it counts towards the bounty, there negating the heal effect

and say a hero deals 500 damage to the unit, who only has 50 life remaining, ofcourse that only counts as 50 towards the bounty

this would, however, be entirely different and separate from this system
__________________
emjlr3 is offline   Reply With Quote
Old 05-12-2008, 03:30 PM   #24
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

updated

where not entirely at Dusks level of completeness, still better I think
__________________
emjlr3 is offline   Reply With Quote
Old 09-04-2008, 07:27 AM   #25
saif3r
User
 
Join Date: Sep 2008
Posts: 3

saif3r has little to show at this moment (0)

Send a message via MSN to saif3r
Default

can some1 tell me how exactly to register heroes? cuz i got syntax error with it.
saif3r is offline   Reply With Quote
Old 09-13-2008, 03:44 AM   #26
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

it is explained as clear as day
__________________
emjlr3 is offline   Reply With Quote
Old 09-17-2008, 01:10 AM   #27
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

Bump

whats holding this back - other then a general lack of interest?

I've come across another method - though I doubt you'll care for that one anymore
__________________

Last edited by emjlr3 : 09-17-2008 at 01:11 AM.
emjlr3 is offline   Reply With Quote
Old 09-17-2008, 01:59 AM   #28
Rising_Dusk
Obscurity, the Art


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

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
whats holding this back - other then a general lack of interest?
I still don't like the idea of bundling stuff together as an assistance system. There's far too much map dependence in how these things should be handled. Maybe an assistance library that can then be used by mapmakers to register assistances would be more approvable. That would have to work for any unit and multiple units per player, not just heroes and one per player.

Besides, I'm not going to lie, reading your code is a pain. It's just not organized in a readable fashion, so it takes a lot of additional effort to follow the logic.

Most of these points also apply to your hero selection system.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 09-17-2008, 02:36 AM   #29
TKF
User
 
TKF's Avatar
 
Join Date: Dec 2006
Posts: 384

TKF is on a distinguished road (10)

Default

But for AoS maps where you control only 1 hero, support for more than 1 hero isn't necessary, right?
__________________
Retired
TKF is offline   Reply With Quote
Old 09-17-2008, 02:54 AM   #30
Rising_Dusk
Obscurity, the Art


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

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

It's hardly a system if it only works for AoS maps.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk 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 11:13 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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