1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. 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
  3. 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
  4. 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
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. 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.

Unit Indexer v5.3.0.1

Submitted by Nestharus
This bundle is marked as approved. It works and satisfies the submission rules.
Unit Indexer
v5.3.0.1
by Nestharus​

__


Unit Indexer is a next gen unit indexing system that uses a variety of modern JASS techniques to improve performance and enable
cool new features. It is unlike any other unit indexing system out there.

The system includes three different types of modules with varying levels of support, ranging from the simplest classic
style module to the newest and most complex module. All modules are adaptive and will only include features when those
features are used.

The classic Unit Indexer system is also included.
____________________________________________________________________________________________________


Features


    • Global events
    • Local events
    • Phases
    • Struct events
    • Correct execution order of events
    • Specialized recycling so that locks are no longer needed
    • Instant unit destruction detection
    ____________________________________________________________________________________________________


  • There are 8 tutorials and 15 labs that cover all of the features of Unit Indexer. There is also a quick installation tutorial and all required
    resources are included in the map. Furthermore, the installation tutorial shows two ways of installing the system into a map.
    ____________________________________________________________________________________________________
Additional Information


    • Complete revamp of the entire Unit Indexer system.
      ____________________________________________________________________________________________________

    • ____________________________________________________________________________________________________

  • Known Issues
    • Module code needs to be cleaned up a bit to reduce code generation by a little bit more
    • A dependency, Trigger, needs to be changed to be bit faster (use a different data structure)
    ____________________________________________________________________________________________________
.


Keywords:
unit indexer
Contents

Just another Warcraft III map (Map)

Reviews
Moderator
14:59, 10th Mar 2015 IcemanBo: A very large scale UnitIndexer with many dependencies. The system is very powerful and is written highly efficient. It works just nice. Approved.
  1. 14:59, 10th Mar 2015
    IcemanBo:

    A very large scale UnitIndexer with many dependencies.
    The system is very powerful and is written highly efficient. It works just nice.

    Approved.
     
  2. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Uploaded by request :), plus it was late and I needed something to do : P


    Prefer this to stay unrated ^)^


    Enjoy the fastest and most powerful unit indexing system on the net ; P
     
  3. An upload by Nestharus? o.o

    Can ye upload the code here?
     
  4. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    I could, but I don't think it would benefit anyone : ). Went for clean and compact yo.

    Need stuff in the map to install it into another map and you need the tutorial to understand how to use it.


    The map has all
     
  5. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,852
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    I dont want to sound like plain hater, but if you need to provide 15 labs to show how to use something as simple as Unit Indexer, there is something wrong
     
  6. JC Helas

    JC Helas

    Joined:
    Oct 19, 2014
    Messages:
    155
    Resources:
    2
    Spells:
    2
    Resources:
    2
    this system is very useful,, like :D
     
  7. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    There are many new features that aren't in the classic Unit Indexer. To go over all of them, it indeed takes quite a bit. However, classic Unit Indexer features are covered in I think the first 1-2 labs (some of the labs are very short, so I may have spread it over 2).


    Before you judge, go through the labs and stuff. They're actually pretty quick : ).


    The simplest use is still just installing it and then using
    GetUnitUserData
    hehehe, but I'd cry if that's all anyone ever did : (

    Thanks
     
  8. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    Im really not a fan of ALL UnitIndexers, and never will but for those people who do not understand what UI is, it's a simple mechanic;
    - Preplaced Units (if not all) will be automatically indexed up to 8190
    - Units entering map will also be indexed
    - When unit dies (or maybe some certain situations), it will be deindexed

    Simple ey and a simple UI will do...
     
  9. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Unit indexers are indeed that simple. They get more complicated when you want index and deindex events ^_^.

    Look at the screenshot : ). You might notice something interesting about the order of execution there. A simple unit indexer can't achieve that ';.;'.

    It's just like in c++. On creation, you run in order from the first to the last. On destruction, you run in reverse order. Unit Indexer handles things like scope of an event, allowing you to define multiple stages of creation/destruction. It also differentiates between events that are unique to a single unit (local) and events that are applied to all units (global).


    There have been several evolutions of unit indexers

    1. PUI - user tells the system what to index and when to do it. Nothing automatic.
    2. AutoIndex - automatic indexing/deindexing.
    3. AIDS - locks
    4. First Unit Indexer - access to unit handle on deindex + smart modules
    5. 4th Unit Indexer - drop locks and use a queue instead of a stack for recycling
    6. 5th Unit Indexer - supports intricate event setups


    Events have also undergone changes over the years, starting from simple global events to prioritized events to weird mixes between sorta local and global events (does not mix well) to finally true local events (mixes well).



    Certainly, you can go for the simplest thing possible like PUI. You might take it a small step forward and go for automatic indexing/deindexing, and maybe one step further for simple global events, or event a step further for locks. This is just the latest evolution =).


    Who really needs all of this stuff though?! O_O

    Well, actually, almost everyone does. Whenever you see an if-statement in a global deindex event so that it will only apply to "correct" units, that should really be a local deindex event. From a performance standpoint, you are running the event way more often than you need to. From an execution order standpoint, the events aren't necessarily run in the correct order. Some things may be destroyed that other things depend on. There are just a whole slew of issues that can crop up. All of these issues have to be accounted for, which complicates the user code =). Wouldn't it be nice if all you had to do was write 3 lines and all of it was taken care of? The data structure that events are built out of automatically run things in the correct order + support local events.


    Users can work with plain old JASS if they want to. vJASS makes things easier, just like a nice Unit Indexer makes things easier.
     
    Last edited: Dec 28, 2014
  10. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Shall i replace your old UI with this?
     
  11. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    You don't want to use the old one. I mean you can use the old one if you really want to, but you should use this.


    Right now I'm in the process of updating BooleanExpression/Trigger to make this even better. I cut down the code of BooleanExpression from 1300 lines to 500 lines, improved operation, and improved execution performance. APIs will not change, so Unit Indexer won't change, but the stuff included in this pack will change (version updates).
     
  12. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Oh okay.
     
  13. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    btw, I updated BooleanExpression : ), hehehe
     
  14. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    AAAANNNNDDD GOnna update
     
  15. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,251
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    Nest, are you familiar with C or C++? Can you help me to improve TH's mouse & keyboard natives? Damn, you should activate your profile.
     
  16. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    He is a C++ programmer
     
  17. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,181
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    You could think of updating in map's AllocQ and AllocT.

    Approved.
     
  18. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    I'm going to eventually. I've been doing the Trigger update slowly with the new Alloc stuff and optional reqs as well as a couple of new features, but right now I'm focusing on the compiler.
     
  19. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    424
    Resources:
    0
    Resources:
    0
    I have always liked your UnitIndexer system, but this time I feel an obligation to ask: Why the excessive use of resources? :ogre_icwydt: