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 09-12-2009, 07:50 AM   #1
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 Intuitive Buff System

Zoom (requires log in)
Intuitive Buff System
v1.05

Background:
So, here's a bit of history about this library. The original version was developed for use with my map, Desert of Exile. Eventually, I was asked by Cassiel to work on some things for Tides of Blood. It was for that map that I developed round two of the system, which is the predecessor to the version posted here. Eventually, I was removed from the team for Tides of Blood due to my inability to actually do enough work in a reasonable time frame. Since then, I've had this sitting on my hard drive and just recently managed to motivate myself to clean it up, update it to modern day coding standards, add some new functionality, and write the documentation. The interface for the system is about as intuitive as possible, and I am extremely proud to present it to you, the community, at last. I hope you all find it as useful as I have over the years!

Requirements:Notes:
  • This system only supports up to 8192 buff types and 8192 buffs at a given time. This limit should be reasonable for all intents and purposes.
System Code:
Expand Library:

Attached is a demo map that shows many of the facets of the system being used. There are also sufficiently many examples inside the test map to show anyone how to use it. Enjoy!
Attached Images
File Type: jpg IntuitiveBuffSystem.jpg (220.9 KB, 1843 views)
Attached Files
File Type: w3x IBSTestMap_105.w3x (84.1 KB, 535 views)
__________________

Last edited by Rising_Dusk : 11-12-2009 at 04:59 AM. Reason: Updated
Rising_Dusk is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-12-2009, 10:22 AM   #2
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

Seems quite small... I was doing something like this but Anitarf told me it was a bad idea because his system would be better with more features. Ani's system seems more complete I admit, but I wish you good luck on this.
__________________
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 09-12-2009, 11:50 AM   #3
Tot
6
 
Tot's Avatar
 
Join Date: Oct 2008
Posts: 841

Tot will become famous soon enough (53)Tot will become famous soon enough (53)

Default

yipeee....the first buff-system i understand....

sry, Anitarf...
__________________
Current Projects:
  • Masters Of WarCraft: Some mixture of AoS and RPG
    Terrain: 100%, Coding: 75%, Heroes: 0%, Items: 0%, Creeps: 0%, Upgrades: 0%
  • hunting emos
____________________________________
scheiss kack dreck sausacksau bundeswehr
Tot is offline   Reply With Quote
Old 09-12-2009, 12:42 PM   #4
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

Quote:
Intuitive Buff System
iBS xDDD 10101010101
iDusk ^_^

the interface is kind a weird...
yes i don't see any sense what buffs are separate structures... cause you have only periodical action and on end action =) there should be also on begin action... (callback)
otherwise spell stealing will be not possible (for example)

but idk do what you want O_o this db is full of shit anyway xD
__________________
Toadcop is offline   Reply With Quote
Old 09-12-2009, 12:49 PM   #5
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

Anitarf's system is quite complex but once you understand it you won't need anything else.
__________________
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 09-12-2009, 12:58 PM   #6
Tot
6
 
Tot's Avatar
 
Join Date: Oct 2008
Posts: 841

Tot will become famous soon enough (53)Tot will become famous soon enough (53)

Default

Quote:
Originally Posted by Flame_Phoenix
Anitarf's system is quite complex but once you understand it you won't need anything else.

do you see my prob?
__________________
Current Projects:
  • Masters Of WarCraft: Some mixture of AoS and RPG
    Terrain: 100%, Coding: 75%, Heroes: 0%, Items: 0%, Creeps: 0%, Upgrades: 0%
  • hunting emos
____________________________________
scheiss kack dreck sausacksau bundeswehr

Last edited by Tot : 09-12-2009 at 12:59 PM.
Tot is offline   Reply With Quote
Old 09-12-2009, 01:16 PM   #7
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

Quote:
Once you understand it
Anitarf is usually busy and he is not the perfect example of patience either. If you need help understanding how to use his system I can give you a short introduction.
__________________
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 09-12-2009, 02:50 PM   #8
Viikuna-
User
 
Viikuna-'s Avatar
 
Join Date: Feb 2009
Posts: 203

Viikuna- will become famous soon enough (44)Viikuna- will become famous soon enough (44)

Default

It works fine and all, but I got one double free of type: dbuff when spamming those spells to those abos.
__________________
No Marlo, no game.

Last edited by Viikuna- : 09-12-2009 at 02:50 PM.
Viikuna- is offline   Reply With Quote
Old 09-12-2009, 02:52 PM   #9
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 Flame_Phoenix
Seems quite small... I was doing something like this but Anitarf told me it was a bad idea because his system would be better with more features. Ani's system seems more complete I admit, but I wish you good luck on this.
Just like there are 3 different approved Damage Detection Systems in the database, there is nothing wrong with different approaches to buff systems. Ani likely suggested to you to not make yours because he didn't want to have to review your code. :p
Quote:
Originally Posted by Toadcop
yes i don't see any sense what buffs are separate structures... cause you have only periodical action and on end action =) there should be also on begin action... (callback)
I thought about begin, but I mean, you have to call "UnitAddBuff" so you already know when the buff begins. I didn't think the added argument would really be all that useful. Maybe I should add it for completeness?
Quote:
Originally Posted by Viikuna-
It works fine and all, but I got one double free of type: dbuff when spamming those spells to those abos.
What exactly were you doing in the testmap? I saved it in debug mode in case someone found something like that, but I need to know more about what you were doing.
__________________

Last edited by Rising_Dusk : 09-12-2009 at 02:59 PM.
Rising_Dusk is offline   Reply With Quote
Old 09-12-2009, 03:15 PM   #10
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

Quote:
Originally Posted by Rising_Dusk
I thought about begin, but I mean, you have to call "UnitAddBuff" so you already know when the buff begins. I didn't think the added argument would really be all that useful. Maybe I should add it for completeness?

There are cases in which you don't actually know what buff you are getting, such as buff steal or buff push spells, in which case Anitarf has the upper hand on you, because his system has support for 'abstract' onAdd and onRemove.

Provided you aren't doing stuff that involves indefinite buffs, this is the way to go; Intuitive Buff System is indeed intuitive.
__________________
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 09-12-2009, 03:16 PM   #11
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

Quote:
Just like there are 3 different approved Damage Detection Systems in the database, there is nothing wrong with different approaches to buff systems. Ani likely suggested to you to not make yours because he didn't want to have to review your code. :p
The truth is so painful sometimes ...
__________________
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 09-12-2009, 03:28 PM   #12
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 Here-b-Trollz
There are cases in which you don't actually know what buff you are getting, such as buff steal or buff push spells, in which case Anitarf has the upper hand on you, because his system has support for 'abstract' onAdd and onRemove.

Provided you aren't doing stuff that involves indefinite buffs, this is the way to go; Intuitive Buff System is indeed intuitive.
Hrm, yes, a GetRandomBuff might be valuable, or a GetTopBuff for purposes of hooking and stealing buffs. The system actually supports it happily, it just doesn't give you a way of finding that buff. I mean, I already use Table, a second table call for finding top/random buff wouldn't be a problem.
__________________
Rising_Dusk is offline   Reply With Quote
Old 09-12-2009, 06:18 PM   #13
Viikuna-
User
 
Viikuna-'s Avatar
 
Join Date: Feb 2009
Posts: 203

Viikuna- will become famous soon enough (44)Viikuna- will become famous soon enough (44)

Default

Quote:
What exactly were you doing in the testmap? I saved it in debug mode in case someone found something like that, but I need to know more about what you were doing.

I can upload my last replay tomorrow, since I havent played anything after that. You can check what happened by yourself.
__________________
No Marlo, no game.
Viikuna- is offline   Reply With Quote
Old 09-12-2009, 06:41 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

Uh, I guess. My WC3 doesn't run single player or replays that great, so it'd be way easier if you could just explain the circumstances leading up to the doublefree, but whatever.
__________________
Rising_Dusk is offline   Reply With Quote
Old 09-12-2009, 07:06 PM   #15
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

Quote:
Originally Posted by Rising_Dusk
Hrm, yes, a GetRandomBuff might be valuable, or a GetTopBuff for purposes of hooking and stealing buffs. The system actually supports it happily, it just doesn't give you a way of finding that buff. I mean, I already use Table, a second table call for finding top/random buff wouldn't be a problem.

Sorry, what I meant by that was that onAdd and onRemove and onPeriodic should be defined for a bufftype, not in UnitAddBuff or whatever.
__________________
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
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 06:46 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