1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

A hearthstone spell

Discussion in 'The Lab' started by Cespie, Sep 23, 2019.

  1. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    344
    Resources:
    0
    Resources:
    0
    Hi folks.
    I am helping someone making a few features in his map. One of the things that he requested, was a hearthstone (Like the one in WoW). I took a quick look around the forum, but I couldn't really find anything that satisfied my criteria for it... so I made one myself.

    The hearthstone differs from a Mass Teleport based spell in a few key areas. One being that it can be interrupted when taking damage, another being that Mass Teleport needs a target to function, while Hearthstone is cast as a non-target spell that sends you to a single location (which may be changed to different locations in-game).

    Now, what I am wondering is, if I just overlooked it, or if there really isn't a Hearthstone ability ready for use on this forum. If the latter is the case, I might post mine.

    Here's what my hearthstone spell can do, thus far:
    • Starts a channel (8 seconds by default).
      • If the cast is finished, the casting unit is sent to a designated location.
      • If the caster takes damage while casting the spell, the cast is interrupted.
    • The cast has a casting bar made from scratch for this spell.
      • It does not rely on any standard variables such as Custom Unit Value, and does not require an indexer (or anything else you'd have to set up, really) to work, which means that it shouldn't have any conflicts with any other system.
      • It uses floating text for the bar.
      • Cast-bar updates are automatically disabled whenever nobody is casting hearthstone, to minimize the load. As all strings are pre-generated, this load is rather minimal in the first place.
    • The entire thing is 100% GUI, and the only JASS custom scripts are used for clearing memory leaks.
    • Should be 100% memory leak free
    • 100% MUI
    • The whole thing is ready to paste, and any changes to the hearthstone system is done in a separate trigger file, so that map creators will only have to look at the variables that they want to adjust, rather than the entire code.
    I am also considering adding:
    • An example for setting a new location for the hearthstone of a player ingame
    • An option that can be toggled on/off which makes the hearthstone grab every nearby unit owned by the player and teleport those as well.
    • A cooldown system that refreshes the cooldown if the cast isn't successfully completed.
    What are your thoughts on this? Do you want me to upload it, or is there something like this out there already?
     
    Last edited: Sep 23, 2019
  2. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,685
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    The Lab serves better than Map Development to be honest. Anyway, there's ThisPOT Teleport System or something you might want to check out as well. Not sure if he already support this or not.
     
  3. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    344
    Resources:
    0
    Resources:
    0
    Thanks, I will keep that in mind for the future.
    As for the teleport system, it seems like it could probably do it with the right settings, but it's got so many options that it honestly seems more like a library than a ready solution. If that's what's currently existing, I wouldn't have any reservations for uploading mine, seeing how there's going to be a lot of novice map makers wanting the exact behavior of a hearthstone once Reforged hits shelves.

    Thanks a lot for your input!
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,166
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Hey. \o

    I just got something in mind while reading your spell description. As floating texts are capped at 100, it's usually cool to give the user a possibility to choose weather to use them for a imported spells, or not, as some users might want to reserve the amount of floating texts for different features. Maybe with a configurable flag in the setup.

    I've personally made also good experience with using CastBarSystem v1.12, possibly in combo with Lightning Effect Pack ... but sure, it also means a bit more to import.

    Yes sure. :wink:
     
  5. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    344
    Resources:
    0
    Resources:
    0
    100? That's a ridiculously small number...
    I looked at another castbar system for reference when making my own. My main issue with it, was that it was too general and had too many features that I wasn't interested in, while also requiring a unit indexer to function. So I opted for making a case-specific "Lite" variant instead. That way, it's easier for the user to manage, as there's no unused bloat code, and it should run a bit faster too, seeing how its entire design is built around 1 specific scenario.
    What I note, is that both the version you linked, and the one I looked at, seem to be using Floating Text (texttag) as well. I get that a lightning effect can be used as substitute, but I'm not entirely sure how you actually go about using Lightning Effects to this end. Do you have a link to a guide or tutorial? Just something to get me started on the concept, as I have never used Lightning Effects before.
    Edit: Based on that demo video, would I just attach the effect to 2 invisible dummies and then move them as the cast progresses, or is there a smarter way? Can they attach to points as well?

    Either way, this spell is not likely to be cast by a whole lot of units simultaneously, but I do reckon that the floating text thing is a limitation. Realistically, a HS spell will only be cast by a handful of people on rare occassions, but I guess 24 player maps could have as many as 24 people doing it simultaneously, for example.
     
  6. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,166
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Maybe his submission demo helps, but I think I got a map somewhere using it, I will send when I'm home (in 4-5 hours). :)

    Floating text is used for the castbar description only. But you're right it seems to be always created, also when used with
    null
    . We could poke @Flux . !!! :D Flux, maybe you can add a check to not consider floating text when it's no description is needed.

    edit: pm'ed
     
    Last edited: Sep 24, 2019