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



Reply
 
Thread Tools Search this Thread
Old 05-25-2008, 11:25 PM   #31
Here-b-Trollz
Corkscrew Chainsaw!!!
 
Join Date: Jun 2006
Posts: 711

Here-b-Trollz has a spectacular aura about (149)

Hero Contest #2 - 2nd Place

Default

The issue with that method being that it kills copy/paste-ability. What... you want me to add the code for a damage type AND declare it in your system header? Lame :p

Also, I wonder if this is force of habit, but the nulling of your trigger is not necessary.
Collapse JASS:
library OnExtraText requires DamageSystem

//...

public function InitTrig takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerAddAction(trg, function Actions)
    call TriggerAddCondition(trg, Condition(function Conditions))
    call TriggerRegisterDamageEvent(trg)
    set trg = null
endfunction
endlibrary

But you are probably right about just declaring damage types in your system. It's useful for certain reasons, and detrimental for fewer.
__________________
By reading this signature, you agree that I cannot be held accountable for anything that I might say or do.
Here-b-Trollz is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-25-2008, 11:33 PM   #32
Rising_Dusk
Obscurity, the Art


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

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

You could actually declare them externally if you made some public variable that counts the number of damage types. The reason I didn't add such a variable is because it wouldn't be useful at all internally to the system, though I might add it for kicks. Then you could always get the "next index" without any trouble or conflicts, increment it, and declare your damage type variables anywhere you want to.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-25-2008, 11:43 PM   #33
Here-b-Trollz
Corkscrew Chainsaw!!!
 
Join Date: Jun 2006
Posts: 711

Here-b-Trollz has a spectacular aura about (149)

Hero Contest #2 - 2nd Place

Default

It would function essentially the same way as H2I on a new location, but I suppose it would be cleaner to use a public function (since all these 'add-ons' would be made specifically for this system anyway).
__________________
By reading this signature, you agree that I cannot be held accountable for anything that I might say or do.
Here-b-Trollz is offline   Reply With Quote
Old 05-26-2008, 01:09 AM   #34
Rising_Dusk
Obscurity, the Art


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

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

Of course not, but then again the system doesn't even require either of those spells being triggered since it adjusts for the Blizzard ones anyways.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-26-2008, 01:50 AM   #35
Rising_Dusk
Obscurity, the Art


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

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 Litany
You can do crits with the animation (calculate whether the unit will crit in advance, add the animation tag, and then remove it after damage is dealt unless the next attack will also crit), but I don't remember if it works for evasion.
The problem with that is if you stop the attacks before they hit, the 'next attack' will always result in a crit, so it becomes predictable. I guess you could register the attack event and then recalculate the crit chance if that fires, but at this point it sounds like a system in and of itself just to trigger critical strike and like a serious pain in the ass to deal with. Sounds doable, however, which is valuable in itself.

It probably wouldn't work for evasion at all, though, unless you had a system to trigger projectiles and attacks in general. I find both of those to be quite outside of the scope of this system, but still all valid points to consider for the future.

Might be worth it to invest in a "Triggered Critical Strike System" some day. Hrm.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-26-2008, 07:29 AM   #36
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Quote:
Originally Posted by Litany
Evasion has a similar hurdle in the sound of the attack hitting.

You can remove the attack sounds from every unit in the map, then trigger them when hits are successful.

I don't think a "Triggered Critical Strike System" is a good idea, proper handling of critical strike and evasion seem like two important areas for the damage detection system itself to tackle, or at least enable the user to handle.
grim001 is offline   Reply With Quote
Old 05-26-2008, 07:46 AM   #37
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Systems that require that you do all thing custom to adjust to them can hardly be called systems.

ORBEngine is better because it does all the things mentioned here and you don't have to make all spells custom, just the ones that you want to treat specially.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 05-26-2008, 04:41 PM   #38
Rising_Dusk
Obscurity, the Art


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

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 Litany
I forget when exactly it's determined whether or not an attack is evaded, but I seem to remember it being early on.
It's right when the attack is started, since projectiles swerve to the evading unit's feet at that point if it's going to be a miss.
Quote:
Originally Posted by cohadar
ORBEngine is better because it does all the things mentioned here and you don't have to make all spells custom, just the ones that you want to treat specially.
But you have to use orbs, which interfere with basic WC3 abilities like 'Lightning Attack', so my units can't shoot lightning bolts for projectiles if I use an orb system. In addition, some people may find a use for being able to use standard orb abilities, since using an orb engine they would have to make them themselves. Plus, many maps have to trigger all spells anyways for some internal reason, so in their cases there is zero reason to ever use the orb systems.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-26-2008, 05:22 PM   #39
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Quote:
Originally Posted by Rising_Dusk
But you have to use orbs, which interfere with basic WC3 abilities like 'Lightning Attack', so my units can't shoot lightning bolts for projectiles if I use an orb system. In addition, some people may find a use for being able to use standard orb abilities, since using an orb engine they would have to make them themselves. Plus, many maps have to trigger all spells anyways for some internal reason, so in their cases there is zero reason to ever use the orb systems.

No you don't have to use orb's.
Only unit that has orb-like attack needs to use orb, all other can use what ever they like.

You seem to be under the wrong impression that ORBEngine automatically gives orb attack to all units on map like some older dd systems..

And it does not stand to reason that you can be bothered to use all custom spells but be too lazy to make your own custom orb attacks....

This really is not a system but a personal approach to mapping.
One of biggest quality measures for systems is self sufficiency aka encapsulation.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 05-26-2008, 05:29 PM   #40
Rising_Dusk
Obscurity, the Art


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

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 cohadar
You seem to be under the wrong impression that ORBEngine automatically gives orb attack to all units on map like some older dd systems..
Then it doesn't detect the attack damage of all units on the map -- This system does detect the attack damage of all units on the map without any orbs at all. That in itself is a huge merit, surely you can see that.
Quote:
Originally Posted by cohadar
This really is not a system but a personal approach to mapping.
One of biggest quality measures for systems is self sufficiency aka encapsulation.
Just like storage systems require users to store references to objects using a specific function call, this system requires users to deal damage to units using a specific function call. All that has changed is the application of said call, and as such your comments make little logical sense to me.
Quote:
Originally Posted by cohadar
And it does not stand to reason that you can be bothered to use all custom spells but be too lazy to make your own custom orb attacks....
That is too particular-to-a-specific-map of a claim to be subjective relative to this discussion. I can think of several applications where it would be very much easier to code all of the custom spells in a map than to code all orb abilities for a map. (Tower Defenses come to mind)
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-26-2008, 07:18 PM   #41
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Orb method: Trigger all your orbs.
This method: Trigger all your abilities.

They sort of look the same to me.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 05-26-2008, 07:27 PM   #42
Rising_Dusk
Obscurity, the Art


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

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

Like I said, depends on the map, for some it might be less work to code abilities, for another it might be less work to code orbs. It's just in some cases maps may be using fully triggered spells anyways, whereas I can't think of an actual use for triggered orb abilities except to adjust for orb damage detect methods. That point, although valid, really doesn't have any value relative to the discussion at hand, though.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-26-2008, 08:21 PM   #43
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

You need to trigger orbs to make them stack correctly which was about the first actual use for attack detection I had.I really think both solutions are quite demanding, hence I think I might remake the original attackdetect engine which was merely an approximation... Regarding the system itself, its implementation is not bad, but I'd like to see UnregisterDamageEvent to either become O(1) or get out of there, before I approve it. Perhaps log(n) is good enough.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 05-26-2008, 08:32 PM   #44
Rising_Dusk
Obscurity, the Art


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

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

I need to find the index of a trigger in an array knowing nothing but the trigger itself. I can't think of any other way to do it while still taking the trigger as the only argument. I mean, I could make the RegisterDamageEvent return the index integer and then force the user to use that returned integer upon Unregistering. That kind of ebbs away from the simple syntax I was aiming for though, do you have any other ideas?
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-26-2008, 08:38 PM   #45
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

returning an index is not going to work, you would need to return a reference pointer, and probably use a linked list instead of an array.

Anyway, if the user is doing something that requires to remove the trigger, his code is already quite complicated, saving the node would be as complicated for him as saving the trigger.


You could also get rid of that function...

There should be a way to invent syntax to allow the definition of damage types in compile time without having to modify your library. A compile-time allocator for structs should help.

Collapse JASS:
struct a
endstruct

globals
    constant a A_TYPE_MYDAMAGE1 = a.create()
    constant a A_TYPE_MYDAMAGE2 = a.create()
endglobals

Collapse JASS:
globals
    constant integer A_TYPE_MYDAMAGE1 = 1
    constant integer A_TYPE_MYDAMAGE2 = 2
endglobals

edit: perhaps with something like enums, but being able to declare new values outside the library holding the enum is necessary, hmnn
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian 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 01:30 PM.


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