1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome to the new Hive! Be advised that we're still working on the site. There are still many rough edges, so please bear with us.
    Dismiss Notice
  3. The 14th Icon Contest is still in progress (and may be extended). You can still make it in time.
    Dismiss Notice
  4. The 25th Texturing Contest has started! Contestants are to create a skin representing a dark elf person/being or any construct related to it using the vanilla models or the custom ones found on the site.
    Dismiss Notice
  5. Buy it, use it, break it, fix it, trash it, change it, mail - upgrade it. Join (Optionally) Paired Techtree Contest #11 - Techno Magic now!
    Dismiss Notice
  6. Voting squad, line up! Cast your vote on the poll for Modeling Contest #29 - Squads!
    Dismiss Notice
  7. Hero Contest #8 is up and running! This time it's a joint contest between artists and coders. Go here for team matchmaking.
    Dismiss Notice
  8. The poll for the theme of our StarCraft II Terraining Contest is up. Cast your note now!
    Dismiss Notice
  9. The ninth Concept Art Contest has launched. Enter now!
    Dismiss Notice
  10. The member Kam is making HIVE coasters. Take a look. For every coaster you buy, Hive gets $1.
    Dismiss Notice

Spell Engine v0.3.2

Submitted by aznricepuff

Spell Engine



v0.3.2

Spell Engine is an object-oriented event-driven system for handling spell-cast detection and spell manipulation. This system does not replace xecast or any other caster system; its primary purpose is event-handling, not dummy casting or caster recycling.

This system is meant to provide flexibility for creating custom spells that go beyond the rather simple dynamics offered by wc3's ability system.

Features
  • Object-oriented spell event handling.
  • Provides functionality for defining what happens when a spell:
    • is about to be cast
    • begins casting
    • is currently casting
    • ends casting
    • begins effect
    • begins channeling
    • is currently channeling
    • ends channeling
    • is interrupted
    • ends
  • Grants the ability to create spells with dynamic cast and channel times.
  • Grants the ability to create custom interrupts that don't rely on a stunning ability.

Requires
  • jasshelper (0.9.Z.0+), by Vexorian
  • Object Merger, by grimoire
  • Table, by Vexorian
  • TreeSet

For the changelog see the demo map.

Keywords:
spell engine, spell event, spell detection, spell, event, cast, channel, interrupt
Contents

Spell Engine v0.3.2 (Map)

  1. 17:44, 19th Oct 2009
    The_Reborn_Devil:

    The coding looks very good and I would say this is a very useful system.
    It's well documented too.
    Status: Approved.
    Rating: Highly Recommended.
     
  2. Deuterium

    Deuterium
    Joined:
    Mar 17, 2009
    Messages:
    1,325
    IMPRESSIVE! =)

    Coding is a bit too advanced for me, and I've been lazy to learn new stuff lately. Anyways, nothing that matter, but as a nice treat try avoiding
    TriggerRegisterAnyUnitEventBJ
    leaks. Well the ones I found sum up to 16x5 = 80 leaks :p but as I said, they're not much of a big deal =)

    Keep it up! :)
     
  3. eleljrk

    eleljrk
    Joined:
    Aug 27, 2009
    Messages:
    461
    Awsome, and yes.. Very advance..

    +rep, hope i see you agein.. ^^
     
  4. Anachron

    Anachron
    Joined:
    Sep 9, 2007
    Messages:
    6,122
    I like this, but I don't know if its that good in wc3 to make that? :S
     
  5. aznricepuff

    aznricepuff
    Joined:
    Feb 22, 2006
    Messages:
    749
    Well, it's mostly meant to help in creating spells for rpgs and hero arenas and stuff, where you only have like up to 12 heroes casting these kind of spells. Obviously if you have 100 units on the map all casting spells handled by this system like in some kind of modified rts or something, it will probably lag (I haven't stress tested this yet so that's just a guess).
     
  6. Kricz

    Kricz
    Joined:
    Aug 2, 2008
    Messages:
    183
    Looks pretty awesome.
    Will have a look a this, + rep
     
  7. aznricepuff

    aznricepuff
    Joined:
    Feb 22, 2006
    Messages:
    749
    Demo map now includes a non (or less) buggy TreeSet, so there shouldn't be any problems with adding too many SpellListeners anymore.

    Also some minor .evaluate() optimization.
     
  8. Anachron

    Anachron
    Joined:
    Sep 9, 2007
    Messages:
    6,122
    Very good system. One thing though:
    Is it possible to use my own CustomBar system for the bars?

    Really thanks for making this! +Rep
     
  9. aznricepuff

    aznricepuff
    Joined:
    Feb 22, 2006
    Messages:
    749
    Yea, the PrettySpell stuff isn't technically part of the system. It's just in the demo map to show wut the system can do (otherwise it's just a bunch of stuff going on in the background without any obvious visible effects...not very dramatic or useful from a demonstration standpoint). You can adapt PrettySpell to use w/e bar system you want.
     
  10. Anachron

    Anachron
    Joined:
    Sep 9, 2007
    Messages:
    6,122
    I see. Its really good, but I have to add all units to the system, in order to use them, or?
     
  11. aznricepuff

    aznricepuff
    Joined:
    Feb 22, 2006
    Messages:
    749
    You just need to add abilities. So if you want ability 'A000' (presumably some dummy ability) to trigger spell engine every time it is cast, just create a new Spell and pass 'A000' into the constructor and then register it. Once an ability is registered, it will trigger spell engine's events no matter what unit casts it.
     
  12. Anachron

    Anachron
    Joined:
    Sep 9, 2007
    Messages:
    6,122
    I have read the whole thing, and as far as I understood, you save the unitdata for every unittype specific, so I don't have any data if the unit I attack with is not declared in the system?
     
  13. aznricepuff

    aznricepuff
    Joined:
    Feb 22, 2006
    Messages:
    749
    I'm not really sure if I understand your question correctly. But spell engine doesn't make distinctions amongst different unit types. If you register an ability with the system, when the ability is cast the spell engine events are triggered no matter what type of unit casts the spell or what type of unit is targeted by the spell (if the ability targets a unit).
     
  14. Anachron

    Anachron
    Joined:
    Sep 9, 2007
    Messages:
    6,122
    Oh, sorry, I was wrong.

    You had that in the Damage Engine, not in the spell one.
    Sorry dude, commented on wrong Engine.
     
  15. Magnum666

    Magnum666
    Joined:
    Jul 8, 2008
    Messages:
    24
    OverHead Casting Bar

    im thinking why you dont Take the Blizzard OverHead Casting Bar (Bomb Commander.w3x) and make it just like this i think it will be more usefull because Blizzard OH-CB (OH - CB = OverHead Casting Bar :goblin_boom: ) and Transfer it into usefull Example like this map here. I think it will be more cool , Yes its gonna be Stealing but the Graphic of the OH-CB is better :vw_unimpressed: :goblin_yeah: and im Mostly Impressed by there work :) so if someone Understanding Jass could help me "Steal" the OH-CB from the map (*Blizza®d* Bomb Commander.w3x ) i will be Verry Greatfull :goblin_good_job: :goblin_yeah: if you gonna REALLY ( i mean it ) Really Help me ( Not Fake Help like "yaah man i will help you" and Year after that "Hey remmember me ? what happend with the Map" Answear: "im bussy man but i will do it soon" and Nothing after that ) just Send me Private Message if someone already Told me and Helped me with that Task i will send you message again that the Work is Done :) to not Spend your Time in Bull****s :grin: Thanks again :)
     
  16. Rexp

    Rexp
    Joined:
    Aug 21, 2009
    Messages:
    71
    This is really cool and I want it badly in my map but it doesn't work to get it. I don't get how to use the tools etc. way to advanced.