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 02-27-2008, 03:52 PM   #46
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

Yeah, try a better, more accurate name, like ABC.
__________________
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
Sponsored Links - Login to hide this ad!
Old 02-27-2008, 09:07 PM   #47
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

ABS ^^
__________________
Toadcop is offline   Reply With Quote
Old 02-27-2008, 11:06 PM   #48
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 cohadar
This system is misnamed.
It is much more than buff system
Oh? How so?
__________________
Anitarf is offline   Reply With Quote
Old 02-28-2008, 01:13 PM   #49
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

It has damage detection, I mean really....
(@Vex good one )
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.

Last edited by cohadar : 02-28-2008 at 01:14 PM.
cohadar is offline   Reply With Quote
Old 02-28-2008, 02:11 PM   #50
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

Damage detection hardly counts as a system. It's just a few functions that are needed to get around the fact that we don't have a generic unit takes damage event.
__________________
Anitarf is offline   Reply With Quote
Old 02-28-2008, 05:34 PM   #51
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

It counts to me.
I cannot use abuff because I have damage detection system of my own.
And 2 damage detections don't mix well as you know.

If you made it pluggable (separated it into multiple libraries) it would be much better.

This way you simply have a monolythic system that someone either has to use for everything from the start of making his map or not use it at all.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 02-28-2008, 06:29 PM   #52
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

Damage detections don't mix? That's like saying you can't have more than one trigger with the "a unit starts the effect of an ability" event. Saying that you can't use ABuff because you have your own damage detection is pure nonsense.
__________________
Anitarf is offline   Reply With Quote
Old 02-28-2008, 09:38 PM   #53
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Quote:
Originally Posted by Anitarf
Damage detections don't mix? That's like saying you can't have more than one trigger with the "a unit starts the effect of an ability" event. Saying that you can't use ABuff because you have your own damage detection is pure nonsense.

Actually it is not because you cannot have 2 onDamage triggers on the same unit (try it and see.)
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 02-28-2008, 11:52 PM   #54
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 cohadar
Actually it is not because you cannot have 2 onDamage triggers on the same unit (try it and see.)
I just tested this and there were no issues - multiple damage detection triggers per unit would all trigger whenever the unit took damage, resulting in multiple debug messages. Multiple damage detection triggers per unit do not seem to be an issue.

Even if they really were, it's really a no-brainer to turn off aBuff damage detection and have your own damage detection call the appropriate abuff functions instead.

Unless you have other points to make, I'm going to consider this system to be properly named.
__________________
Anitarf is offline   Reply With Quote
Old 02-29-2008, 10:42 AM   #55
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Yes you are right, 2 odDamage triggers do work. (tested it myself)

I was very surprised because I distinctly remember the damage system failing when I tried to make a shield spell that registered a damage trigger of it's own...

I wasn't trying to make you change the name of your sys lol.
But I do think you did a lousy job in naming your libraries and functions,
I mean you didn't even use public keyword.
(This could be from the fact that public did not exist at the time )

If you ask me this system needs a new version/redesign.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.

Last edited by cohadar : 02-29-2008 at 10:43 AM.
cohadar is offline   Reply With Quote
Old 03-20-2008, 04:21 PM   #56
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

I have released an updated version of the system, 1.3. It features a couple of minor changes; a larger update is planned for the next version.

Regarding that, I'm wondering what's the best course of action. I intend to add new parameters to the damage event (to determine if the damage was done by an attack or a spell) and I'm not sure in what way to implement them: break backwards compatibility by altering the damage event response function interface to take more parameters, make a new damage event response function interface with more parameters and call both the new and the old, or keep a single function interface and simply pass the new parameters through globals?
__________________
Anitarf is offline   Reply With Quote
Old 04-09-2008, 01:55 PM   #57
Flame_Phoenix
retired coder | real ilfe
 
Flame_Phoenix's Avatar
 
Join Date: Mar 2007
Posts: 2,208

Submissions (10)

Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)

Send a message via MSN to Flame_Phoenix
Default

HI, this system looks good, but the spells are nothing from the other world.
I didn0t had a chance to full evaluate it yet, still I have a question:
- Can I have multiple buffs stacking with this system ?? let's say, like 2 inner fires on the same unit or two bloodlusts ?? Will your system allow such cases ?
__________________
Check out my tutorials at:
1-Creating a Hero Tavern
2-Complete Icon Tutorial - ALL about Icons
3-Making a spell in vJass - Practice Session 1
Check out all my current spells at here
Finally, check my project:
Castle vs Castle Flame Edition
Flame_Phoenix is offline   Reply With Quote
Old 04-12-2008, 11:30 AM   #58
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

The system does not directly support this, it treats ABuffs like the wc3 engine treats regular buffs, when a buff is applied on a unit that already has a buff of that type, the existing buff's duration is reset instead (provided the new buff's duration is longer than the remaining duration of the existing buff).

You can, however, still make stackable buff effects. You can use the spell's level or a seperate data field attached to the buff to store how many times that buff has been stacked, and increase that number by one in the buff's refresh function (which runs every time the buff is applied on a unit that already has a buff of that type). This way, however, the buffs will remain stacked until the timer of the last one runs out, which may not be what you want.

To get around that, you could simply make multiple copies of your buff type and before applying the buff on the unit, first find out which of the buff types the unit already has and then apply one that it doesn't have yet. Something like this:

Collapse JASS:
scope StackableBuffSpell
    globals
        public aBuffType array id
    endglobals

    function OnCast takes nothing returns nothing
        local unit u = GetSpellTargetUnit()
        local real duration = 60.0
        local integer level = GetUnitAbilityLevel(GetTriggerUnit(), GetSpellAbilityId())
        local integer i = 0
        loop
            if integer(id[i])==0 then //ABuff not defined yet
                set id[i]=aBuffType.create()
                set id[i].eventCreate=...//define the buff here
            endif
            exitwhen UnitHasABuff(u, id[i])==false //loop until you find a copy of the buff type that the unit doesn't have yet
            set i = i +1
        endloop
        call ABuffApply(id[i], u, GetTriggerUnit(), duration, level, 0)
    endfunction

    function InitTrig_... //initialize the spell cast trigger here
       ...
    endfunction
endscope
__________________
Anitarf is offline   Reply With Quote
Old 04-12-2008, 05:38 PM   #59
Belphegor666
User
 
Belphegor666's Avatar
 
Join Date: Jul 2004
Posts: 787

Submissions (1)

Belphegor666 is on a distinguished road (16)

Default

Quote:
Originally Posted by Anitarf
Regarding that, I'm wondering what's the best course of action. I intend to add new parameters to the damage event (to determine if the damage was done by an attack or a spell) and I'm not sure in what way to implement them: break backwards compatibility by altering the damage event response function interface to take more parameters, make a new damage event response function interface with more parameters and call both the new and the old, or keep a single function interface and simply pass the new parameters through globals?
Generally I suggest going for backwards compatibility. However seeing the number of maps using this system is close to zero I say do what Java did keep old and new (just change the name of the new ones to be slightly different than the old ones). It seems to be the best solution in your case IMHO.
Belphegor666 is offline   Reply With Quote
Old 04-26-2008, 12:10 PM   #60
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

Just a suggestion..

I think you should add in a sort of plug-in which can register events like whenever a unit receives a buff or whenever it applies a buff without needing to declare a bufftype. I wanted to make a passive ability that doesn't give the hero a buff, like evasion. Whenever the hero receives a buff, it has a chance to negate it or reflect it back to the source. I don't know if there is an option to reflect buffs or the likes, if there isn't you should add those too ;)
Malf 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:32 AM.


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