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 08-12-2007, 07:20 PM   #31
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

Bump: System updated to version 1.2. New additions include an aura subsystem.
__________________
Anitarf is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-13-2007, 09:33 AM   #32
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

ownz =) but i organize aura a bit i other kind... i more performance orintainted. but in whole cool 8-)

// too unimpressive example... create some ultra nuke spell etc.
Toadcop is offline   Reply With Quote
Old 11-01-2007, 11:38 AM   #33
Belphegor666
User
 
Belphegor666's Avatar
 
Join Date: Jul 2004
Posts: 787

Submissions (1)

Belphegor666 is on a distinguished road (16)

Default

Hmm sounds like fun. Maybe just the thing I was looking for.
Belphegor666 is offline   Reply With Quote
Old 01-19-2008, 03:57 PM   #34
MoCo
User
 
MoCo's Avatar
 
Join Date: Feb 2006
Posts: 85

MoCo is on a distinguished road (14)

Send a message via ICQ to MoCo
Default

I'm wodering how to set up a buff correctly to increase an attribute of a hero by a percentage value.. (of course using the green +X visualization, so the original hero value shouldn't be touched).

Any help is much appreciated!
__________________
MoCo is offline   Reply With Quote
Old 01-19-2008, 11:22 PM   #35
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 MoCo
I'm wodering how to set up a buff correctly to increase an attribute of a hero by a percentage value.. (of course using the green +X visualization, so the original hero value shouldn't be touched).
To get an arbitrary hero stat bonus you would need some sort of bonus mod, which is outside the scope of this system. After you have it, you simply add the stat through the bonus mod when the buff is applied and reduce it by the same amount when the buff is cleaned up; the amount added can be stored in the buff's data field so you know how much to take away when cleaning up the buff.
__________________
Anitarf is offline   Reply With Quote
Old 01-30-2008, 12:12 AM   #36
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

What am I doing wrong? I downloaded and opened the map but the second I try to save with anything altered from the system, all the triggers become "Disabled due to errors". Example: I changed the HeroDruation on GolemSlow from 10.0 to 20.0

Sorry if this is really obvious but I am clueless as to what I am doing wrong.
Fledermaus is offline   Reply With Quote
Old 01-30-2008, 12:23 AM   #37
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

Quote:
Originally Posted by Antiquities
What am I doing wrong? I downloaded and opened the map but the second I try to save with anything altered from the system, all the triggers become "Disabled due to errors". Example: I changed the HeroDruation on GolemSlow from 10.0 to 20.0

Sorry if this is really obvious but I am clueless as to what I am doing wrong.

This system, like most systems here, require vJass (or more formally known as JassNewGen) search for the JassNewGen Pack in the rouserces section to download it.
__________________
Ammorth is offline   Reply With Quote
Old 01-30-2008, 12:42 AM   #38
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

Ah right, sadly I cannot do that as it doesn't run on ME. Oh well. Thanks anyway.
Fledermaus is offline   Reply With Quote
Old 02-25-2008, 11:14 AM   #39
Belphegor666
User
 
Belphegor666's Avatar
 
Join Date: Jul 2004
Posts: 787

Submissions (1)

Belphegor666 is on a distinguished road (16)

Default

Questions:
1.Hm when you define a Buff Type, it is possible to count only buff of the given type, but it needs a new Enum function, right? So how do you implement your Enum interface?

EDIT (further questions):
2. Also is it possible to place ABuffs in a stack allowing you to remove only a number of latest ABuffs (like remove one negative ABuff from stack)?
3. Is there any way to display the buffs in order of which they entered the stack in the Buff viewer (the thing that displays buffs below the units stats)?

Last edited by Belphegor666 : 02-25-2008 at 11:49 AM.
Belphegor666 is offline   Reply With Quote
Old 02-25-2008, 01:36 PM   #40
de[hydra]te
User
 
Join Date: Feb 2008
Posts: 10

de[hydra]te has little to show at this moment (0)

Default

ok, this is an impressive system, i gt to agree on that, but it seems that Blizzard has fixed the H2I bug in v1.21, or at least the bug u tried to exploit in ur game cache system. Using this system in test map will cause a crash, and in fact, most of my other spells/ systems that used the H2I have crashed suddenly, that's why i decided to test it on your test map again and reallied it is the H2I bug after several testings of my own code and this one
de[hydra]te is offline   Reply With Quote
Old 02-25-2008, 09:32 PM   #41
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

1.) I'm not sure I understand. You want to do something for all instances of a specific buff type on the map? In that case, the enumeration interface is what you need; it is described in more detail in the documentation.

2.) If you enumerate buffs on a unit, it will loop through the buffs from newest to oldest. Note that the buffs are sorted based on when they were created, refreshing them does not change their place in the list.

3.) I'm not sure how the buff display works; either way, it is a hardcoded part of wc3 and as such outside the scope of this system.
__________________
Anitarf is offline   Reply With Quote
Old 02-26-2008, 11:54 AM   #42
de[hydra]te
User
 
Join Date: Feb 2008
Posts: 10

de[hydra]te has little to show at this moment (0)

Default

Found out the reason why, it's a vjass problem with test map. Try opening up this map and play aroudn with the buffs in test map, i got fatal errors, but when i used WC3 to do it, i was clear.
de[hydra]te is offline   Reply With Quote
Old 02-26-2008, 12:41 PM   #43
Belphegor666
User
 
Belphegor666's Avatar
 
Join Date: Jul 2004
Posts: 787

Submissions (1)

Belphegor666 is on a distinguished road (16)

Default

Ok thanks for those answers. Here is the deal.
1. I want to classify my buffs into different groups (for example Fire, Blaze and Burning Spirit are a all ABuffs of Destruction type) enumerate them and do something (like a Destruction Spell that deals damage for Each destruction ABuff).
2. It is possible to transfer (some or all) ABuffs from one unit to another, right? I know that there are functions to destroy ABuffs, but how would you copy them?

Last edited by Belphegor666 : 02-26-2008 at 12:46 PM.
Belphegor666 is offline   Reply With Quote
Old 02-27-2008, 01:04 PM   #44
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

1. To implement buff classifications, you would need to use the abufftype data field:
Quote:
Originally Posted by abuff documentation
The data integer parameter can be used to attach any user-data to the buff type. This integer does not affect how the engine handles buffs of this type, but users can use it to differentiate between buffs of various elements or schools of magic or any other generic characteristic that they want their buffs to have. Since it's an integer, an index of a struct can also be stored here, thus allowing any amount of data to be attached to a buff type.
To enumerate all buffs of a certain classification on a unit, you would have to enumerate all buffs on a unit and only do things for those that have a matching classification.

2. As long as the buffs are self-sufficient, it's possible. Self-sufficient means that calling the apply function applies all of the buff's effects and none of them are applied externaly. You can copy all buffs from one unit to another by enumerating them with something like this:
Collapse JASS:
scope CloneBuffs
    public struct unitData
        unit u
    endstruct

    function CloneBuffsEnum takes aBuff enumBuff, integer data returns nothing
        call ABuffApply(enumBuff.id, unitData(data).u, enumBuff.caster, GetABuffTimeRemaining(enumBuff), enumBuff.level, enumBuff.data)
    endfunction
endscope

...
local CloneBuffs_unitData x = CloneBuffs_unitData.create()
set x.u = targetUnit
call ABuffEnumerateUnit( ABuffEnum.CloneBuffsEnum, sourceUnit, x)
call x.destroy()
...
Copying the data field like that is not wise, though, in case you store structs there for any of your buffs. You would need an if-then-else check for bufftypes that store structs in the buff's data and clone those structs there; if you made all buff structs extend a single interface and give that interface a clone method that would make things easier. Here's how the clone function would look like then (note that you could only use the data field for structs then, not regular integers):
Collapse JASS:
    function CloneBuffsEnum takes aBuff enumBuff, integer data returns nothing
    local integer i=0
    local buffDataInterface d = buffDataInterface(enumBuff.data)
    if enumBuff.data != 0 then
        set d = d.Clone()
        set i = integer(d)
    endif
        call ABuffApply(enumBuff.id, unitData(data).u, enumBuff.caster, GetABuffTimeRemaining(enumBuff), enumBuff.level, i)
    endfunction
__________________
Anitarf is offline   Reply With Quote
Old 02-27-2008, 02:38 PM   #45
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

This system is misnamed.
It is much more than buff system, like Vexorian's caster system is no caster system at all.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar 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 08:36 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