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

[Trigger] Trigger Item Generation based on Pre- and Suffixes

Status
Not open for further replies.
Level 4
Joined
Oct 23, 2016
Messages
85
Hello everyone! Quick question: Are the GUI triggers involving Ability manipulation broken somehow?

I'm trying to set up an Item drop system with random stats and abilities based on pre- and suffixes, and noticed some trigger editor functions are just not working - No matter how I set up the "Set Ability Integer Level Field" doesnt seem to change anything on the Abilities on my Items. This is a huge problem, since I use equasions to calculate everything from Stats to abilities and making every ability would take forever.

Can someone confirm it's busted? Or am I doing something wrong?

Changing Item Name and Icon also seems to not work :(
 
Just a guess, create a dummy unit with inventory, and when you need to change certain properties of the ability in an item (if it is dropped), equip it to your dummy, make your changes and drop it. If it is equipped, forcefully drop the item from the wielder, and do the same as before, only re-equipping the item.

IIRC, BlzSetAbilityFields are 0-indexed. That means level 1 corresponds to an index of 0, and so on.
 
Level 4
Joined
Oct 23, 2016
Messages
85
Just a guess, create a dummy unit with inventory, and when you need to change certain properties of the ability in an item (if it is dropped), equip it to your dummy, make your changes and drop it. If it is equipped, forcefully drop the item from the wielder, and do the same as before, only re-equipping the item.

IIRC, BlzSetAbilityFields are 0-indexed. That means level 1 corresponds to an index of 0, and so on.

Thanks for the reply!

I've tried this, but sadly no change. Icon, Item Name and Ability changes still missing. :(

Changing the Item Extended Tooltip seems to work flawlessly though, even without the dummy unit. Also, adding an Ability to an Item seems to work fine. Just not changing anything about the Ability.
 
Level 5
Joined
Oct 16, 2007
Messages
67
From my tests:
  • Changing Item Name: not working
  • Changing Item Icon: sets extended tooltip instead
  • Set Item extended Tooltip: works
Item abilitys can only be changed if these stats are read again by the Game. It's like passive Abilitys on a unit. You can't change the values of Attribute Bonus, unless you then change the ability level by 1 and then change it back. On Items you can't change the Level.
However Mana Cost, Damage and other things that the game checks itself can be manipulated without a Problem.
 
Level 4
Joined
Oct 23, 2016
Messages
85
From my tests:
  • Changing Item Name: not working
  • Changing Item Icon: sets extended tooltip instead
  • Set Item extended Tooltip: works
Item abilitys can only be changed if these stats are read again by the Game. It's like passive Abilitys on a unit. You can't change the values of Attribute Bonus, unless you then change the ability level by 1 and then change it back. On Items you can't change the Level.
However Mana Cost, Damage and other things that the game checks itself can be manipulated without a Problem.


So, if I understood correctly, if I add the ability to a dummy unit and change it there, before giving it to the Item, it shoud work? (Going to try this now)

EDIT: So, the problem with this is I can't add the edited ability to an Item, just a fresh one.

Guess I'll have to find some other way to work around this, or wait for Blizz to fix the trigger functions.

Maybe I can add the stats to the Unit on pickup. Is there a way to use my Extended tooltip (where the stats are displayed) to extract the numbers from it?

For example If the tooltip is "Item Lvl xY|n +5 Agility |n +3 Intelligence" to extract those 5 and 3 and add them to the unit on pickup (and remove on drop)

I'd rather not use the substring function, as it'll bug out if I have more then one digit.
 
Last edited:
Level 5
Joined
Oct 16, 2007
Messages
67
I personaly use Hashtables to save these things. You could then use either Unit/Item Handles or a custom Index to save everything.
I dont know how much you know about these things, I could try to create a Map with comments for you if that will help you.
 
Level 4
Joined
Oct 23, 2016
Messages
85
Honestly the only thing I know about Hashtables is that they're somehow needed to save data between maps. I was planning to take a look into them anyway because I need to do just that for my current map, so that map with comments you mentioned would be awesome!
 
Level 5
Joined
Oct 16, 2007
Messages
67
I don't know of saving Datas between maps using Hashtables but I will use them to save Information.

Ok, this is the first time I ever did something like this, so I hope it is helpfull.
I'm sorry for spelling mistakes, English is not my native language.

If something is unclear i would Update the map (made using current Reforged patch 1.32.4).
 

Attachments

  • Hashtable Example.w3m
    26.4 KB · Views: 23

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
So, if I understood correctly, if I add the ability to a dummy unit and change it there, before giving it to the Item, it shoud work? (Going to try this now)

EDIT: So, the problem with this is I can't add the edited ability to an Item, just a fresh one.

Guess I'll have to find some other way to work around this, or wait for Blizz to fix the trigger functions.

Maybe I can add the stats to the Unit on pickup. Is there a way to use my Extended tooltip (where the stats are displayed) to extract the numbers from it?

For example If the tooltip is "Item Lvl xY|n +5 Agility |n +3 Intelligence" to extract those 5 and 3 and add them to the unit on pickup (and remove on drop)

I'd rather not use the substring function, as it'll bug out if I have more then one digit.
Referring to your example, the 5 in +5 Agility in your tooltip must come from an Integer variable, right? And if not, surely you can create variables to store those values to the item.

Then with all of this information saved you could use something like this: New Bonus v1.6
I haven't messed around with it too much but it seems to be a great system that's easy to use.

Adding 5 Agility to a unit.
  • Custom script: call SetUnitBonusEx(GetTriggerUnit(), BONUS_AGILITY, 5)
Adding 5 Agility to an Item.
This will link the stat bonuses to the Item so it'll automatically handle removing the stats upon losing the item and adding the stats upon acquiring it.
  • Events:
  • A unit acquires an item
  • Actions:
  • Custom script: call LinkBonusToItem(GetManipulatingUnit(), BONUS_AGILITY, 5, GetManipulatedItem())
 
Last edited:
Level 4
Joined
Oct 23, 2016
Messages
85
I don't know of saving Datas between maps using Hashtables but I will use them to save Information.

Ok, this is the first time I ever did something like this, so I hope it is helpfull.
I'm sorry for spelling mistakes, English is not my native language.

If something is unclear i would Update the map (made using current Reforged patch 1.32.4).

Thanks a lot! I'll take a look right away!

EDIT 3: I've looked into it, and I think I understand your system. I think I see a way of integrating it into my map,

Such a pain Icon and Name changes aren't possible on Items. That means I will still have to create tons of dummy items for all the Individual Items and Raritys. If I get it to work though, it will still save me tons of time creating duplicates for all the different variations of stats on Items.

Does this also somehow work with other Abilities like Phoenix fire, Crit, Mana shield, etc..? If an Item has only one or two of a set of 20 possible abilities, do I have to save the 20+ values of the abilities in the hashtable aswell, or am I better off putting the abilities on the Items beforehand? (IN which case, i'm just gonna wait a bit and hope they fix the GUI functions for Item naming, Icons and Abilities :p)


Referring to your example, the 5 in +5 Agility in your tooltip must come from an Integer variable, right? And if not, surely you can create variables to store those values to the item.

Then with all of this information saved you could use something like this: New Bonus v1.6
I haven't messed around with it too much but it seems to be a great system that's easy to use.

Adding 5 Agility to a unit.
  • Custom script: call SetUnitBonusEx(GetTriggerUnit(), BONUS_AGILITY, 5)
Adding 5 Agility to an Item.
This will link the stat bonuses to the Item so it'll automatically handle removing the stats upon losing the item and adding the stats upon acquiring it.
  • Events:
  • A unit acquires an item
  • Actions:
  • Custom script: call LinkBonusToItem(GetManipulatingUnit(), BONUS_AGILITY, 5, GetManipulatedItem())


I will take a look at the system you recommended. Thanks!

EDIT: This looks like it could solve my problems, but I have no Idea on how to actually integrate it into my map. Script just looks like ancient egypcian runes to me :p

"Custom script: call LinkBonusToItem(GetManipulatingUnit(), BONUS_AGILITY, 5, GetManipulatedItem())"

If I add one of these for every Property, and replace the 5 with my equasion, is that it then? How do I even replace the 5 with a Variable?

EDIT 2: For context, here's what I'm trying to do:

When a Unit dies, it drops an Item. This Item then gets stats and an ability based on random numbers and some other factors.
(These were supposed to also be in the item name as pre- and suffixes, like "Quick Elven Blade of the Monkey", where Quick is an Attack Speed, or crit, etc. bonus based on Level and Rarity of Items (I use a rarity system similar to WoW's) and suffix would determine the stats based on level, rarity and the animal, which is a distribution of the stats (1.2 Agi, 0.4 Int, 0.4 Str for monkey, for exmple).

So Agi, for example, is determined as (RarityFactor x AnimalAgiFactor x 1.5^Level)

Rarity factor being 0.4, 0.6, 0.8, 1.0, 1.2, 1,5 for Poor, Common, Uncommon, Rare, Epic, Legendary, respectively.

And Level just the level of the Item.

But since Item renaming doesnt work i have to find another way. Maybe I should just put out a Trigger request ._. I love making maps, but am always stuck on triggers for hours and hours :con:
 
Last edited:
Level 5
Joined
Oct 16, 2007
Messages
67
It dosen't realy matter which one you use. The System New Bonus has the advantage that a lot of things are taken care of for you. I didn't build a real system just some samples.
In the end you would need to expand the system or properly use the Hashtable to fit your needs.

If you want to add Abilitys to the Items I would recommend to either use a usable Item and add the ability using Trigger or you add an ability to the unit. You can use a hidden spellbook for Passives like +5% crit chance.
Hiddenspellbook has some disadvantages, Phoenix Fire for example should be added to the item or you can't have more then 1. However you can change it values even on the Item. Items and the abilitys can only be manipulated while the Item is picked up or droped. So if you Create a dummy unit and then use Create Item for Hero you have the ability to play around with it, afterwards you can just drop the Item or move it.


For Itemnames and Icons I would wait for blizzard to fix it... I know that hurts but unless you want to create a ton of items or not use pre and suffixes I would say it is your best bet.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
@Captain Bacon
The Custom Script is code written in Jass, the language warcraft 3 uses by default.

GetManipulatingUnit() is the same exact thing as "Hero manipulating item"
GetManipulatedItem() is the same exact thing as "Item being manipulated"

If you've ever converted a trigger to Custom Text (in the trigger editor this option should be under Edit) you can see what your triggers look like when converted to Jass.

So anyway, you say your Agility stat is determined by (RarityFactor x AnimalAgiFactor x 1.5^Level). Don't you store this stat as a variable? Like, "Set Agility = (RarityFactor x AnimalAgiFactor x 1.5^Level)".

I'm simplifying this but all you'd really have to do is plug this Agility variable into the custom script. Agility would have to be saved to the item though since that information would be lost otherwise.

  • Example
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set VariableSet Agility = (Your math formula for calculating agility)
      • Custom script: call LinkBonusToItem(GetManipulatingUnit(), BONUS_AGILITY, udg_Agility, GetManipulatedItem())
////////////////////////////////////////////////////////////////////////////////

I attached a map with the New Bonus system working in conjunction with randomly generated Items. It isn't perfect but the idea is there:
  • Generate Item
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- Generate Item --------
      • Item - Create Base Item at (Position of (Triggering unit))
      • Set VariableSet IDex = (IDex + 1)
      • Set VariableSet Item[IDex] = (Last created item)
      • Item - Set the custom value of (Last created item) to IDex
      • -------- --------
      • -------- Generate Affix Types --------
      • Set VariableSet Type[1] = Agility
      • Set VariableSet Type[2] = Strength
      • Set VariableSet Type[3] = Intelligence
      • -------- --------
      • -------- Generate Affix Values --------
      • Set VariableSet Value[1] = 5.00
      • Set VariableSet Value[2] = 3.00
      • Set VariableSet Value[3] = 1.00
      • -------- --------
      • -------- Store Values to Item --------
      • Set VariableSet Item_Affix1_Type[IDex] = Type[1]
      • Set VariableSet Item_Affix2_Type[IDex] = Type[2]
      • Set VariableSet Item_Affix3_Type[IDex] = Type[3]
      • Set VariableSet Item_Affix1_Value[IDex] = Value[1]
      • Set VariableSet Item_Affix2_Value[IDex] = Value[2]
      • Set VariableSet Item_Affix3_Value[IDex] = Value[3]
      • -------- --------
      • -------- Setup Item Strings --------
      • Set VariableSet String[1] = (Adds Affix Type: + ((String(Type[1])) + ( with a value of: + ((String(Value[1])) + |n))))
      • Set VariableSet String[2] = (Adds Affix Type: + ((String(Type[2])) + ( with a value of: + ((String(Value[2])) + |n))))
      • Set VariableSet String[3] = (Adds Affix Type: + ((String(Type[3])) + ( with a value of: + ((String(Value[3])) + |n))))
      • Item - Set Name of Item[IDex] to RandomName[(Random integer number between 1 and 3)]
      • Item - Set Extended Tooltip of Item[IDex] to (String[1] + (String[2] + String[3]))
      • Item - Set Description of Item[IDex] to (String[1] + (String[2] + String[3]))
  • Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set VariableSet CV = (Custom value of (Item being manipulated))
      • -------- --------
      • -------- Get Item Affixes/Values --------
      • Set VariableSet Type[1] = Item_Affix1_Type[CV]
      • Set VariableSet Type[2] = Item_Affix2_Type[CV]
      • Set VariableSet Type[3] = Item_Affix3_Type[CV]
      • -------- --------
      • -------- R2I = Converts a Real to an Integer. The New Bonus system requires Integer values. --------
      • Set VariableSet R2I_Value[1] = (Integer(Item_Affix1_Value[CV]))
      • Set VariableSet R2I_Value[2] = (Integer(Item_Affix2_Value[CV]))
      • Set VariableSet R2I_Value[3] = (Integer(Item_Affix3_Value[CV]))
      • -------- --------
      • -------- Link Affix 1 --------
      • Custom script: call LinkBonusToItem(GetManipulatingUnit(), udg_Type[1], udg_R2I_Value[1], GetManipulatedItem())
      • -------- --------
      • -------- Link Affix 2 --------
      • Custom script: call LinkBonusToItem(GetManipulatingUnit(), udg_Type[2], udg_R2I_Value[2], GetManipulatedItem())
      • -------- --------
      • -------- Link Affix 3 --------
      • Custom script: call LinkBonusToItem(GetManipulatingUnit(), udg_Type[3], udg_R2I_Value[3], GetManipulatedItem())
  • Declare Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- The New Bonus system stores the Item Stats as Integers. Those Variables are hidden from us since they're created through vJass. --------
      • -------- What we're doing here is creating GUI versions of these "hidden" variables so we can interact with them in our triggers. --------
      • Set VariableSet Damage = 1
      • Set VariableSet Armor = 2
      • Set VariableSet Agility = 3
      • Set VariableSet Strength = 4
      • Set VariableSet Intelligence = 5
      • Set VariableSet Health = 6
      • Set VariableSet Mana = 7
      • Set VariableSet HealthRegen = 8
      • Set VariableSet ManaRegen = 9
      • Set VariableSet AttackSpeed = 10
      • Set VariableSet MovementSpeed = 11
      • -------- --------
      • -------- Random Item Names (Doesn't work because REFORGED hooray) --------
      • Set VariableSet RandomName[1] = Sword of swording
      • Set VariableSet RandomName[2] = Axe of axing
      • Set VariableSet RandomName[3] = Bow of bowing
Obviously it doesn't work entirely how you want it to work for your map but it shouldn't be too hard to adjust it. Hell, if you post triggers of your current system and provide some more information I could tweak this to work exactly how you want it to.

Some issues:
One of the main issues is that these stats require Integer values instead of Reals when you run them through the New Bonus system. The only stats that use Reals are Health Regen, Mana Regen, and Attack Speed. I posted a comment on the New Bonus system page and am waiting for an answer as to how I can input a Real.

Another issue, it's impossible (as far as I know) to add for example 1.2 Agility. I don't think this was ever possible to be honest. You can only add Integer values of a Hero attribute.
 

Attachments

  • Item Stat Example.w3m
    30.7 KB · Views: 55
Last edited:
Level 4
Joined
Oct 23, 2016
Messages
85
Thanks for the responses again! The Info and Triggers you guys have provided have been of big help.

Don't you store this stat as a variable? Like, "Set Agility = (RarityFactor x AnimalAgiFactor x 1.5^Level)".

I do^^

all you'd really have to do is plug this Agility variable into the custom script. Agility would have to be saved to the item though since that information would be lost otherwise.

Yes that's exactly the point. I don't know how to plug the Variable into the Script (is that what the "udg_" is for?) and I was tryig to save the Stats in the Extended Tooltip, but don't know how to reliably get that information since I rely on the Substring GUI function, which I can't get to work with multiple digit stats. Maybe someone knows a better way of finding a String in another, bigger string? I'd be interested.

One of the main issues is that these stats require Integer values instead of Reals when you run them through the New Bonus system. The only stats that use Reals are Health Regen, Mana Regen, and Attack Speed. I posted a comment on the New Bonus system page and am waiting for an answer as to how I can input a Real.

Another issue, it's impossible (as far as I know) to add for example 1.2 Agility. I don't think this was ever possible to be honest. You can only add Integer values of a Hero attribute.

My equasion makes all calculations in Real numbers, but then convests them to an Integer at the end. I'm assuming it just rounds the item to the closest Integer. This sometimes means an Item has no stats at all on low Item Levels (Still has an Ability).

Set VariableSet ItemAgiBonus = (Integer((Agifactor x Rarityfactor) x (Power(1.50, (Real(Item level of LootItem))))))

A Lv10 Legendary Item of the monkey has (1.2 x 1.5) x (1.5^10) = 103,7 (104) Agility.

Agifactor from the Animal. Still needs to be balanced properly. (Without making Agi explode attack speed at higher levels) But that's the core equasion.
I can Plug it in like "udg_ItemAgiBonus" then?

By the way the fact Icon- and Namechanges on Items are still broken makes me think it's best to put the Item project on hold for now and revisit it when those, and maybe the Ability manipulation on Items are fixed. I really want the Pre- and Suffixes to be a thing, and if editing an Item's ability directly was possible that would make everything extremely easy.
 
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
"is that what the "udg_" is for?"
Yes, that's how you push a global variable through the custom script. udg stands for User Declared Global.

In the map I uploaded you can see the Tooltip thing at work. It will display all 3 Affixes and their values in the item description. Then I use an Item Indexer and variables to track the stats on the item so when you acquire the item you will have access to all of it's Affixes/Values.
 
Last edited:
Level 4
Joined
Oct 23, 2016
Messages
85
"is that what the "udg_" is for?"
Yes, that's how you push a global variable through the custom script. udg stands for User Declared Global.

In the map I uploaded you can see the Tooltip thing at work. It will display all 3 Affixes and their values in the item description. Then I use an Item Indexer and variables to track the stats on the item so when you acquire the item you will have access to all of it's Affixes/Values.

When I want to try the Random variant It tells me "Map test aborted due to script errors" :zip:

EDIT: As a matter of fact, both seem to have the error now, but I somehow go it to work the first time
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
Are you getting the errors in my map or did you import the triggers over to your map. And what errors does it bring up? Does it say anything like "invalid variable name"?
 
Last edited:
Level 4
Joined
Oct 23, 2016
Messages
85
I'm getting them in your map. Nothing about variables.

I'm pretty sure NewBonus is the problem somehow. Even when I deactivate both your triggers it happens.

That version of NewBonus works fine on your end?

You wouldn't happen to be working on an older version of the Editor?
 

Attachments

  • ErrorMessage.png
    ErrorMessage.png
    657.4 KB · Views: 37
Level 4
Joined
Oct 23, 2016
Messages
85
@Captain Bacon have you enabled Jasshelper in the Trigger Editor? You might have to disable vJASS in the menu. All those errors will only appear if the vanilla compiler is enabled.

View attachment 353871

That fixed it!

And I like how the system works. I've decided to unify my Item system since this system allows me to (I used to have two seperate categories of Items for Units and Heros because putting Hero stats on Units would crash the game).

And just in case anybody is bored during the corona time and looking for a challange, I'd appreciate if someone helps me with this, since it'll take me hours, if not days, o get the trigger right (seems to be so easy for some people here). So I'll just leave these parameters here nd see if I get anything while I work on the trigger with the help of what you guys tought me ;P Thanks for all hat, btw!



I need a system that drops Items with these conditions:


About the Item:

-Level of drop always equal to level of Monster killed

-Fall into Rarity: |cff9D9D9DPoor|r, |cffFFFFFFCommon|r, |cff1EFF00Uncommon|r, |cff0070FFRare|r, |cffA335EEEpic|r |cffFF8000Legendary|r. These multiply the stats by Y, where Y is 0.4, 0.6, 0.8, 1, 1.2, 1.5.

-Fall into Categories: Weapon, Body Armor, Shield, Trinket, Boots, Gloves, Helmet, of which multiple can be equipped (1-4) depending on inv size or a custom value of the Unit, but never two of the same category. (Item classification?)

-->I think each Item should have some base stats: Basic combinations of Str/Int/Agi (Or Hp/regen, Mana/regen, *) say for example, X points distributed randomly on Agi, Int and Str, where X is dependant on the item lvl, rarity, etc.

* I'm not sure on how to translate Agility without making it over- or underowered. Maybe you can think of a way to properly translate it into AttackSpeed, Movespeed or Armor that doesnt get too unbalanced. Maybe just Damage? Idk I want to avoid supersonic speeds on both movement on attack, animations break immersion.

--> Each of these categories should have a main stat, which is always on that category of Item: Damage for Weapons, Armor for Body Armor, Health on Shields, Mana on Trinkets, MoveSpeed on boots, AttackSpeed on gloves, Armor on Helmets

--> Additionally, they should have ONE of these secondary stats:

Weapons: Either Bash, Crit, Feedback, Attack Speed, Cleave, or an Orb ability (Fire orb, Frost orb, Venom Orb, etc.)

Body Armor: Damage Reflection, Evasion, Bonus Armor, Permanent Immolation,

Helmet: Auras: Command, Brilliance, Endurance, Vampiric, Devotion, Trueshot, etc.

Shield: Divine Shield, Bonus Armor, Bash, Mana Shield, Damage Reflection

Trinket: Actives, like Rejuvenation, Cripple, Temporary Invisibility, etc.

Boots: Evasion, Bonus Armor, Temporary Speed boost.

Gloves: Bonus Armor, Temporary AttackSpeed boost.

Feel free to add anything that you think is missing or would be cool to any category.



About the Tooltip:

So Item names can't be edited, but Extended tooltips can. It should look something like this:



ITEM NAME //Color dependant on rarity - I can make some template items to drop to include all the raritys and have better quality items have appropriate Icons.

Level A - ItemSlot

+ B Main Stat

When on Hero:

+ C Agility
+ D Intelligence
+ E Strength


When on Mercenary:

+ F Health
+ G Health Regeneration
+ H Mana
+ I Mana Regeneration
+ J
*
+ K *

Passive/Active: SecondaryStat: Does L/M, dealing N damage. //The "SecondaryStat" and the damage/healing/whatever number being colorcoded like the weapon rarity.



About the Drop Rates:

All enemies on my maps come in these tiers:

Normal Enemies (|cffXXXXXXNormal Enemies|r , XXXXXX is a color code I use for different classes on enemies, and it determines the Unit stat distribution, dw about this i just include it for substring reasons.)

< Elite Enemies > (|cffffff00<|r |cffXXXXXXElite Enemies|r |cffffff00>|r)

<< Mini Bosses >> (|cffffff00<<|r |cffXXXXXXMini Bosses|r |cffffff00>>|r)

<<< Bosses >>> (|cffffff00<<<|r |cff8787edBosses|r |cffffff00>>>|r)

The important thing here is the "
<<" things. They determine how strong an enemy is and should also determine drop rates. I don't really have a defined ratio that I stuck with, but..

- Bosses should at least drop an Epic, if not a Legendary. Should always drop at least 2 items. I will probably add custom drops to these as well.

- Minibosses should also have a slight chance of a Legendary, Good chance for Epic, and else Rare. Should always drop at least 1 Item

- Elites should drop less Poor items and mostly Common, Uncommon and Rare items, while having a small chance for an Epic and mini chance for a Legendary. Should drop nothing 25%-50% of times.

- Common enemies should drop Poor and Common stuff, with good chance of Uncommon, small of Rare, and mini chance on Epic. Should drop nothing about 50%-75% of times.

Also, if possible, leave room for a variable that can modify the overall drop rate, that I could link to something like different difficulties. But this is not so important.

Lastly, some ItemCalsses should drop more often then others. 25% Weapons, 20% Body Armor, 10% Shields, 10% Trinkets, 15% Gloves, 8% Helmet, 12% Boots-



I hope didn't miss anything.


I know this is a huge amount of details and therefore work. But if I had this, I wouldn't even need the Pre- and Suffixes, and I'd be etarnally grateful! And I'll owe you one :p

With that said, I'll also post this in the Trigger request forum and get working on it myself in case, understandibly, nobody wants to go through the trouble.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
Dunno if you ended up finishing this but i could take a whack at it if you wanted. I already have a diablo 2 style item system that i created a while back so it shouldn't be too hard to tweak it or make something similar
 
Level 4
Joined
Oct 23, 2016
Messages
85
Dunno if you ended up finishing this but i could take a whack at it if you wanted. I already have a diablo 2 style item system that i created a while back so it shouldn't be too hard to tweak it or make something similar

That'd be great! Triggers make me dispair and want to abandon my maps, specially when I can't get something important to work. You'd really be helping me a lot.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
Could you give me an example of an Item using your described system.

Like say a Rare Helmet dropped, what would it's tooltip say, what are the primary stats, what are the randomly rolled stats, etc...

Also, if a Weapon has Bash and a Shield has Bash, how do they interact with one another? Do they stack? And in what way?
 
Last edited:
Level 4
Joined
Oct 23, 2016
Messages
85
--> Each of these categories should have a main stat, which is always on that category of Item: Damage for Weapons, Armor for Body Armor, Health on Shields, Mana on Trinkets, MoveSpeed on boots, AttackSpeed on gloves, Armor on Helmets

I think these should only be tied to Item level and Rarity, no randomness. This is the main stat.


A Rare Helmet would then look like this (without the stuff in the brackets):

Helmet

Level 5 - Helmet

+ 5 Armor (Main stat)

When on Hero:

+ 17 Agility
+ 8 Intelligence
+ 13 Strength

(Secondary stats. All of these randomly distributed, adding up to a Random number influenced by Item Level and Rarity)

When on Mercenary:

+ 325 Health
+ 0.65 Health Regeneration (Both of these tied to Strength)
+ 200 Mana
+ 0.40 Mana Regeneration (Both of these tied to Int)
+ 6 Armor
+ 10% Speed (Both Tied to Agi)

Passive: Aura of Endurance: Allied Units in a 900 Radius get 10% bonus Attack Speed and 20% bonus Movement speed.
(Non-RNG. Only tied to ItemLvl and Rarity, which should affect the numbers that are blue in this case)


Since Item names can't be changed I guess we'll have to stick to generic Item names like "Helmet"

It'd be cool if the irrelevant part for a Unit carrying an Item would grey out or something, for example the "When on Mercenary" part when the carrier is a Hero. But this is luxury stuff, don't worry about it.

I haven't thought about stacking at all yet. I've been trying to avoid having to stack anything. I guess the stun duration stacking would make sense, but you probably have messed around with this alredy and know which works best. I don't want stuff getting too OP or nessesary for certain OP combos.

Same for the Min and max stats of Items. You probably have a better way of balancing everything then what I have come up with.

Sword

Level 8 - Weapon

+ 56 Attack Damage

When on Hero:

+ 6 Agility
+ 24 Intelligence
+ 17 Strength


When on Mercenary:

+ 425 Health
+ 0.85 Health Regeneration
+ 360 Mana
+ 1.2 Mana Regeneration
+ 0.5 Armor
+ 4% Speed

Passive: Flaming: Attacks burn enemies for 34 magic damage.
 
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
At the moment I have the system working so each Item rolls 1 Primary (Main) Stat and 1 Secondary Stat.
The Primary stat is static, Weapons = Damage, Body Armor = Armor, etc...
The Second stat is chosen from a list of possible options for that Item Class.

I was under the impression that you only wanted 1 Secondary Stat when you said "they should have ONE of these secondary stats..." Is this still the case?

And for stacking I'm just going to let Warcraft 3's mechanics handle things for now. I'm pretty sure this means if you have two Bash abilities, it rolls the dice for both of them separately. At least it works that way with Critical Strike.
 
Level 4
Joined
Oct 23, 2016
Messages
85
I was under the impression that you only wanted 1 Secondary Stat when you said "they should have ONE of these secondary stats..." Is this still the case?

Sorry! What I mean by THOSE secondary stats is the ability at the bottom of the tooltip. I will just call that the ability now.

Of the true secondary stats, being Agi, Int and Str (Or the stuff for mercenaries, if carried by such), all of them should always be on all items, just randomly distributed.

And for stacking I'm just going to let Warcraft 3's mechanics handle things for now. I'm pretty sure this means if you have two Bash abilities, it rolls the dice for both of them separately. At least it works that way with Critical Strike.

Yeah that's fine. I tried to make it so this problem doesnt occur to often when deciding what abilities go on what classes of item. THat'S why crit is only on weapons, for example,
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
So the Secondary Stats (I was going to name them Base stats and keep my Primary/Secondary setup) are ALWAYS a random distribution of Agi, Int, and Str?

So it's like, Item level 1 has 3-6 total stats distributed among these 3 attributes.

Item level 2 has 4-8 total stats distributed among these 3 attributes, etc...

===========
Sword

Primary Stat:
+ 10 Damage

Base Stats (12 total):
+ 6 Strength
+ 4 Agility
+ 2 Intelligence

Secondary Stat:
Critical Strike: 10% chance to deal 1.5x normal damage.
===========
 
Level 4
Joined
Oct 23, 2016
Messages
85
Yes, exactly. That's what I was thinking. Might sometimes generate a ridiculous OP or crap Item, but I think it's an allright system.

EDIT: Just to avoid confusion: I think the total stats shouldn't be random So a, say, Lvl 3 Uncommon Item will always have X total stats, but always distributed differently.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
Cool, then I'm almost finished, excluding the Mercenary stuff.

Also, the Activated ability stuff was super tricky but I got it working. It was bugging out and allowing you to drop an Item to reset it's ability cooldown, so I created a trigger to disable it from being dropped while it's on cooldown. Is this okay?

Edit: Okay, that's even easier then.
 
Level 4
Joined
Oct 23, 2016
Messages
85
Cool, then I'm almost finished, excluding the Mercenary stuff.

Also, the Activated ability stuff was super tricky but I got it working. It was bugging out and allowing you to drop an Item to reset it's ability cooldown, so I created a trigger to disable it from being dropped while it's on cooldown. Is this okay?

What!? you're almost finished alredy? Damn. Take your time, though!

Yes no drop on CD that is absolutely fine.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
Is it possible for a stat to roll 0?

12 Stats Total:
Str = 10
Agi = 2
Int = 0

And if you already have a formula for this, feel free to share it. I'm terrible at math.

I was thinking something like:
Total Stats = 2*Item Level

Set Strength = Random integer from 1 to Total Stats
Set Total Stats = Total Stats - Strength

Set Agility = Random integer from 1 to Total Stats
Set Total Stats = Total Stats - Agility

Set Intelligence = Random integer from 1 to Total Stats
---
But this has some issues.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,455
It's hard to say, I don't think having 0 is necessarily a bad thing though. It'd be exciting to find a 0 int, fully emphasized str/agi item for a non-caster. But then again I have no idea how your map works.
 
Level 4
Joined
Oct 23, 2016
Messages
85
It's hard to say, I don't think having 0 is necessarily a bad thing though. It'd be exciting to find a 0 int, fully emphasized str/agi item for a non-caster. But then again I have no idea how your map works.

Yes, that's exactly what I was thinking. Let's let 0 be an option then.

As for my formula: I'd like it to somewhat exponentially go up with level, so I included a power (1.5^ItemLevel) in it That way you can't kill stuff above your level so easily. And then ofc, rarer Items have more stats.

(1.5^ItemLevel) x RarityFactor


Can't think of a way to distribute that number randomly across the Stats though.
 
Status
Not open for further replies.
Top