Idea for Item Combine Trigger?

Level 22
Joined
Mar 16, 2008
Messages
1,013
I have a trigger that combines Robes of Intellect +6 into +12, and two +12 into +24, and so on . . . Does anyone have any idea to optimize this trigger because it can be annoying to start at +6 for inventory management. One option is calculate total stats and assign stats via trigger but that seems too fluid. I want something more structured only up to +200 stats or so but not sure what to do.
 
Theoretically, you could use some bitwise reading to categorize items using item's point value and check if their main ability (+INT, +AGi, etc) is in a doublable number, if it is, you fuse them.
 
You can use a Hashtable + Arrays to define data + A simple Register trigger for saving said data into the Hashtable + A trigger that detects when these items are "Acquired" and loading the appropriate Hashtable data to manage any combination.

For example:
A unit Acquires an item -> Load item-type id from the Hashtable -> If it's saved in there, proceed to load all of the other saved info (different item-types, max combinations, etc) -> Use loaded data to handle any combinations (if any).

Note that this design would require you to manually create an Array of Item-Types, Integers, etc. But it would require only 2-3 triggers and allow you to manage an infinite number of different item combinations. So once you have the system in place it's only a matter of following a consistent "Register new Item-Type" pattern.
 
Last edited:
Thanks for reply.

Do you have a suggestion for what integers we use? Right now it is 6, 12, 24, 48, 96, 200. What if a hero gets a 6 and a 12? should we make a 18? or round that up to 24? or a 24 and 6 would make a 30. Worried that will make too many combinations. Any thoughts on this? EDIT: I suppose you are suggesting every integer 1 to 200 for example.
 
Last edited:
Thanks for reply.

Do you have a suggestion for what integers we use? Right now it is 6, 12, 24, 48, 96, 200. What if a hero gets a 6 and a 12? should we make a 18? or round that up to 24? or a 24 and 6 would make a 30. Worried that will make too many combinations. Any thoughts on this? EDIT: I suppose you are suggesting every integer 1 to 200 for example.
I was under the impression that you were combining same types, like 6 + 6 or 12 + 12.

If you're doubling it each time and enforcing only same type combinations then something like this would make sense to me:
  • Actions
    • Set Variable ItemType[1] = Robe +6
    • Set Variable ItemType[2] = Robe +12
    • Set Variable ItemType[3] = Robe +24
    • Set Variable ItemType[4] = Robe +48
    • Set Variable ItemType[5] = Robe +96
    • Set Variable ItemType[6] = Robe +192
    • Set Variable ItemTypes = 6
    • Trigger - Run Register Item Combination (ignoring conditions)
Make a hard rule that [6] cannot combine with itself.

If you can combine different types, say a +180 with a +186, then you'll run into issues. In that case you could detect when a combination would go above +192 and simply prevent it from happening. A new Integer array could track the actual bonuses which would make the math easy to handle when combining:
  • Actions
    • Set Variable ItemSize[1] = 6
    • Set Variable ItemSize[2] = 12
    • Set Variable ItemSize[3] = 18
    • Set Variable ItemSize[4] = 24
    • Set Variable ItemSize[5] = 30
    • Set Variable ItemSize[6] = 36
    • ...
I dunno though, it's all up to how you want it to work exactly.
 
Last edited:
I was under the impression that you were combining same types, like 6 + 6 or 12 + 12.
Yes that is the current situation. Sorry if I was not being clear. My main goal is trying to minimize how many inventory slots it takes up. Because only combining likes and starting at 6 can end up taking a lot of inventory space to complete. It just becomes annoying to manage that in the inventory. I'm trying to imagine a system where it will not take up a lot of inventory slots.
 
Back
Top