• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[GUI] Dynamic Indexing Template

This bundle is marked as director's cut. It exceeds all expectations and excels in every regard.
This template contains five different index possibilities:
- Dynamic Indexing
- Dynamic Indexing 2
- Handle Indexing (Can be used as Unit Indexer for example.)
- Handle Indexing 2 (Can be used as Unit Indexer for example.)
- Fusion of both System for channeling spell

This is a demo map for a dynamic indexing system and some other indexing systems. The systems are pretty simple and I don't need to take credits if you use it. I just made this example map since Im sick to see all those spell demo maps using ineffective indexing systems.

In the demo map should be enough documentation to understand this really simple system. But If you have still questions about the system then you are free to ask me.

Changelog:
Version 1 = Release
Version 2 = Fix / ++ Documentation
Version 3 = Added Hashtable Indexing / ++ Documentation
Version 4 = Added channeling spell example / ++ Documentation
Version 5 = Added new indexing method / ++ Documentation / ++ Optimation
Version 6 = Added handle/unit indexer method / ++ Documentation / ++ Optimation / ++ Ingame Screenshot
Version 7 (Final) = Handle Indexer Fix / changed Documentation


Hint: The examples can be used as template.

Keywords:
index, demo, dynamic, indexing, recycle, recycling, unit indexing, zZz
Contents

DynamicIndex (Map)

Reviews
7 Dec 2011 Bribe: Promoted to Director's Cut. We are recommending this template to users all the time and have many approved resources using it. 18:32, 6th Oct 2009 The_Reborn_Devil: This is really nice for GUI'ers, but can also be good for...
Level 14
Joined
Jan 15, 2007
Messages
349
this more like a template (just like the name) or better is written as "Tutorial".. People can't use it (I mean import it) to their map, they can only learn from it, which is pretty hard to learn from a trigger and it's a inefficient way to give example, better this is written into Tutotrial just like PurgeandFire's dynamic indexing tutorial..

I think everyone got his own way to learn new things. It's maybe your opinion that tutorials are better but I guess there are guys out there who like templates more than tutorials. Also you are wrong about the importing. Well you can import these templates to your map but you have to replace some stuff.

Also a side note: This template contain more than just dynamic indexing but well it seems that nobody can read the description properly...

I don't get why this kind of submission is decent bla bla bla

You mad bro? Thanks for advertising completly different things and comparing this to systems and spells which have nothing to do with this template. You should get a medal!
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
oh come on guys

this template is even older than Purge's tutorial (i think his tutorial firstly invented by Mag? i don't really know history)
this method of indexing is the most decent among the others before Purge's method came up

and i think Hanky's purpose from the start is to make a template for everyone to use/import not to teach them but they can also learn from it
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
Even as a template I would never use a 2009 resource (updated in 2012) in 2022. I'm sure everything in this resource works fine, it's just probably not up to quality standards in many places which is why the variables have awful names.

This tutorial on Dynamic Indexing has aged very well and I would recommend it. In general, you will benefit yourself by learning the general principles and then building your own loops for a given application. I say this for two reasons:
  • The way you format your code/loops, how you group things, variable naming conventions, etc. are all choices on your behalf. You may have a particular way of organizing DI loops that makes sense to you but isn't the way other people format them. Make enough of these sorts of things and you'll discover your own fallback practices and habits that you should just stick to rather than trying to interpret/use someone else's code formatting paradigm.

  • There are a variety of different ways these loops may be used and how you may loop 'over' the data depending on what you're trying to do, what objects are involved, and other factors that may constrain the appropriate solution. Instead of being glued to a particular template version of such loops, you'll learn more and write better code by building a few from scratch for different applications. You'll remember doing it a particular way before when you do a similar one again. The specific method used is dependent on the application so you should learn to build a solution for a particular application; the experience only comes from doing it multiple times!
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
I've recently designed some Lua systems that eliminate almost all complexity from GUI triggers. Instead of using fancy templates and timer shenanigans, you would just do:

  • My Trig
    • Events
    • Conditions
    • Actions
      • Set ObiWan[WaitIndex] = "Hello there"
      • Set Grievous[WaitIndex] = "General Kenobi!"
      • Wait - 5.00 seconds
      • Game - Display to (All players) the text ObiWan
      • Game - Display to (All players) the text Grievous
The "Wait" is exactly 5 seconds (not random like normal waits). The "WaitIndex" is local per trigger and per trigger instance. This is a complete game-changer.

 
Even as a template I would never use a 2009 resource (updated in 2012) in 2022. I'm sure everything in this resource works fine, it's just probably not up to quality standards in many places which is why the variables have awful names.

This tutorial on Dynamic Indexing has aged very well and I would recommend it. In general, you will benefit yourself by learning the general principles and then building your own loops for a given application. I say this for two reasons:
  • The way you format your code/loops, how you group things, variable naming conventions, etc. are all choices on your behalf. You may have a particular way of organizing DI loops that makes sense to you but isn't the way other people format them. Make enough of these sorts of things and you'll discover your own fallback practices and habits that you should just stick to rather than trying to interpret/use someone else's code formatting paradigm.

  • There are a variety of different ways these loops may be used and how you may loop 'over' the data depending on what you're trying to do, what objects are involved, and other factors that may constrain the appropriate solution. Instead of being glued to a particular template version of such loops, you'll learn more and write better code by building a few from scratch for different applications. You'll remember doing it a particular way before when you do a similar one again. The specific method used is dependent on the application so you should learn to build a solution for a particular application; the experience only comes from doing it multiple times!
I found linked lists as the best and fastest a little while ago, however I was always using dynamic indexing until then.
Only asked because I saw this resource had a directors rating and should include the best indexing method.
 
Top