• 🏆 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!

Index Recycling System (GUI) v.13

This system helps GUI users make their spells MUI by doing the indexing work for them, sort of. It uses only one hashtable for all abilities. The test map includes 4 example spells.


  • getIndexes
    • Events
    • Conditions
    • Actions
      • -------- F I N D A N I N D E X N U M B E R F O R E A C H A B I L I T Y --------
      • Set IRS_getSpellIndex = 0
      • For each (Integer IRSs_Indexes[0]) from 1 to IRSs_Indexes[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IRSs_Ability[IRSs_Indexes[0]] Equal to IRS_setAbility
            • Then - Actions
              • -------- (the ability was previously recognized by the system so it already has an index number) --------
              • Set IRS_getSpellIndex = IRSs_Indexes[0]
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IRS_getSpellIndex Equal to 0
        • Then - Actions
          • -------- (this is the first time the ability was recognized by the system, so create a new index number) --------
          • Set IRSs_Indexes[1] = (IRSs_Indexes[1] + 1)
          • Set IRS_getSpellIndex = IRSs_Indexes[1]
          • Set IRSs_Ability[IRS_getSpellIndex] = IRS_setAbility
        • Else - Actions
      • -------- F I N D A N I N D E X N U M B E R F O R E A C H I N S T A N C E O F T H E A B I L I T Y --------
      • Set IRS_getNextIndex = 0
      • Set IRS_getMaxIndex = 0
      • For each (Integer IRSs_Indexes[0]) from 1 to IRS_max[IRS_getSpellIndex], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load IRSs_Indexes[0] of IRS_getSpellIndex from IRSs_hash) Equal to True
            • Then - Actions
              • -------- (finding the index of the cast with the highest index number; eg: max) --------
              • Set IRS_getMaxIndex = IRSs_Indexes[0]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IRS_getNextIndex Equal to 0
                • Then - Actions
                  • -------- (finding the first inactive slot) --------
                  • Set IRS_getNextIndex = IRSs_Indexes[0]
                • Else - Actions
      • -------- (if the max active index number is 0, that means there are no active slots) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IRS_getMaxIndex Equal to 0
        • Then - Actions
          • Set IRS_getOffable = True
        • Else - Actions
          • Set IRS_getOffable = False
      • -------- (as an assurance, we set the maximum active index as the first inactive slot found if the inactive was found beyond the max's range) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IRS_getNextIndex Greater than IRS_getMaxIndex
        • Then - Actions
          • Set IRS_getMaxIndex = IRS_getNextIndex
        • Else - Actions
      • -------- (if no inactive slot was found, the next available slot must be beyond the maximum) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IRS_getNextIndex Equal to 0
        • Then - Actions
          • Set IRS_getMaxIndex = (IRS_max[IRS_getSpellIndex] + 1)
          • Set IRS_getNextIndex = IRS_getMaxIndex
        • Else - Actions
      • -------- (save the found maximum) --------
      • Set IRS_max[IRS_getSpellIndex] = IRS_getMaxIndex

I don't necessarily know if this is efficient, but can save time. (The example spells would have taken much more time if I didn't use this system)


v.09 to v.11:
- documentation & mini tutorial?
v.11 to v.13:
- removed saving max index of an ability to the hashtable, now stored in a variable
- condensed Shockwave example ability


Keywords:
Beast(TrOg), MUI, GUI, index, system
Contents

Index Recycling System (Map)

Reviews
19:27, 17th Jun 2010 The_Reborn_Devil: Personally I think people should use this, but I guess this could be nice for those who don't want too complicated index recycling. Status: Approved Rating: Useful

Moderator

M

Moderator

19:27, 17th Jun 2010
The_Reborn_Devil:

Personally I think people should use this, but I guess this could be nice for those who don't want too complicated index recycling.


Status: Approved
Rating: Useful
 
Level 7
Joined
Nov 6, 2009
Messages
279
Yes. It indexes the abilities as you go into the hashtable and lets you use that given index to make your abilities MUI.

I think ive seen this before

EDIT: After searching for a little time on the hive i found no system that FOCUSED on helping GUI users make their spells MUI by doing the indexing work for them so im sorry.:grin:
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
EDIT: After searching for a little time on the hive i found no system that FOCUSED on helping GUI users make their spells MUI by doing the indexing work for them so im sorry.:grin:

Was this what you saw?

Well dunno if you have documentation added but as I see in the trigger in your post, you don't, explain why and because your system makes it MUI also maybe make the system without the hashtable and with? Faster with only indexing ...
 
Level 7
Joined
Nov 4, 2006
Messages
153
Was this what you saw?

Well dunno if you have documentation added but as I see in the trigger in your post, you don't, explain why and because your system makes it MUI also maybe make the system without the hashtable and with? Faster with only indexing ...

Initially, I wanted to make this w/o any hashtables, but then found it would be impossible as far as I know (unless each spell was individually indexed themselves using different variables). This is the best way I can think of so far.
- Documentation coming up...
 
Last edited:
Level 25
Joined
Jun 5, 2008
Messages
2,572
I still think people should manualy use indexing or hashtables and not be limited to using systems that do that for them.

I think you will be getting a lot of questions about how this works or how to implement this by a lot of people simply because people will start using this without the basic knowledge :p
 
Level 7
Joined
Nov 4, 2006
Messages
153
I made this system for the people who do know how to index, but are tired of doing it for every single spell. Not for people who want a free ride. To use it, people need to know at least the basics of how to make a MUI spell, so if they don't, I don't expect or suggest they use this. I made a system, not a tutorial.
 
Level 10
Joined
Feb 20, 2008
Messages
448
i know how to index i already saw a system like this made by Hanke its was 10 time way better ,more documented & useful than this system!!

I know your tentative is good but it wont never be usefull to some1 that know already how to make his own!!

you should document it and makle big tutorial to explain how to implent it & how to make it work for noob poeple.

im agree with Kingz 100%
 
Level 7
Joined
Nov 4, 2006
Messages
153
i know how to index i already saw a system like this made by Hanke its was 10 time way better ,more documented & useful than this system!!

I know your tentative is good but it wont never be usefull to some1 that know already how to make his own!!

you should document it and makle big tutorial to explain how to implent it & how to make it work for noob poeple.

im agree with Kingz 100%

I never said my system was better than Hanky's, but I have my personal theories on the pros and cons for both Hanky's and my method of approach. The thing is, any indexing system can be documented as much as possible (without confusing users) and still be useless as far as I see. Why? Because people wanting to learn indexing will be overloaded with new things, and people who already know how don't think they need it (although it can help a ton). Even Hanky's system can be confusing to use. This is because if we don't do the indexing, it is hard to keep track of our indexing variables.

Your second point: It may or may not be useful to someone who already knows how to index, but the point is to ease indexing for people. However, Hanky was trying to get people to use indexing while I am trying to reduce the amount of time people work on indexing so they can work on the actual code. Sounds useful to me.

Third point: I don't see what else I need to document. It is not meant for noobs to learn, they can refer to Hanky's for that. I don't know who's system is more efficient (possibly Hanky's) but since neither of ours seem to be being used much, I guess both are useless especially when people should just learn vJass.
 
Top