• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Maximum amoutn of item types (or unit's for the matter)

Status
Not open for further replies.
Level 7
Joined
Jun 14, 2009
Messages
235
Maximum amount of item types (or unit's for the matter)

Sorry if the title is a little misleading, but I have a legitimate question this time. I'm wondering if there is a hard limit or a recommended limit on the number of item types (Eg. Iron Sword, Iron Sword 2). I'm not talking about in game items, I mean in terms of variety. Although not really needed, also if anyone knows about unit types would be helpful as well.

To provide context, I'm trying a system where you "socket" or place items inside other items, and I'm discovering that this ends up creating a huge amount of item types.

I did a quick internet search, and didn't find anything so I thought I'd ask. Thank you.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Well, since every object has a unique ID which is 4 characters long and can be anything from 0-9, a-z and A-Z, that means we have 62^4 ( = 14 776 336 ) possible combinations.

From this list of combinations, about 3000 ID's have already been assigned by default (this cannot be changed).
This means you can create up to 14 776 400 new objects without having a single confliction error.
Whether these are items, units, upgrades or any other object does not matter. (You can have up to 7 million units and 7 million items for example).

I wouldn't do that if I were you though :) Might take a while to save/load.

Edit: Excuse me, it seems like symbols also work for the Raw ID (just checked this with JNGP).
There are still a few things I don't know.
1) I don't know if (some of) these symbols overwrite each other.
2) I don't know how many ALT-codes work and actually provide a unique symbol (Alt + 7 seems to work).
3) I don't know whether symbols from other languages work.
4) I don't know if Warcraft will automatically resort to these symbols once ZZZZ has been used (I believe it won't, but I cannot say for sure).

Either way, it is safe to say that you can create plenty of item types (anything between 14 million and maybe even 500 million).
 
Last edited:
Level 7
Joined
Jun 14, 2009
Messages
235

Hmm that kinda changes things.

One concept that seemed interesting was to have an item with a aesthetic concept of Key of the Three Moons, that can have 3 items socketed in it, but this would obviously require a huge amount of item types to accomplish. I know in Tides of Blood, where they had a gem socketing system, one could hold 4 gems, and I believe there were 12 different gems, so obviously a large number of items are possible. I figured out the math for having 2 sockets, and how many items you need to represent each possibility, including empty sockets) "1+(((n(n+1))/2)", but I don't know what you would do for 3 slots, so it's hard to estimate how many socketable items I can make.

Unless there was a way to change item tooltips in game (I'm 99% sure you can't).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
That is interesting, although some of these limits can be avoided by using JNGP (I do not know whether this also counts for the amount of custom objects).

You cannot change tooltips in-game.

I honestly don't know where you got the "1+(((n(n+1))/2)"-part, it doesn't seem right at all.
Then again, I don't exactly know what you mean with "A player can hold 4 gems". If there are 12 different gems, then the game has to account for all possibilities of socketing all 12 gems, right?

The formula for the amount of items you need to create goes like this:
You have G different gems.
You have n amount of sockets.
The amount of items you need to create is then just G^n (so if you have 11 gems + 1 'empty gem' ( = 12 gems) with 2 sockets, that results in 12^2, or 144 items).
I'll refer to socket as "Sx" from now on, where x is the socket number.

Say the amount of gems you could socket into an item is 'G'.
'n' is the amount of sockets you have.
S1S2 ... Sn
GGGG
For every socket, you have a possibility between G gems. The amount of gems you can socket does not decrease (multiple gem-types are allowed), so the possibility stays 'G'.
Since you have to socket S1 and S2 and (...), this means you have to multiply those G's together.
You multiply 'G' an 'n' amount of times (thus you get G^n).


Most people use a triggered item system for sockets. This allows you to only create 1 item type while having a wide arrange of possible changes on that item.
How you do this is up to you. Some people like full-screen inventories, others like multiboards. Maybe you can find something else?
If you want only 2-4 different gems, then creating the items might be easier, but in all other cases I do not recommend it.
 
Level 7
Joined
Jun 14, 2009
Messages
235
That is interesting, although some of these limits can be avoided by using JNGP (I do not know whether this also counts for the amount of custom objects).

You cannot change tooltips in-game.

I honestly don't know where you got the "1+(((n(n+1))/2)"-part, it doesn't seem right at all.
Then again, I don't exactly know what you mean with "A player can hold 4 gems". If there are 12 different gems, then the game has to account for all possibilities of socketing all 12 gems, right?

The formula for the amount of items you need to create goes like this:
You have G different gems.
You have n amount of sockets.
The amount of items you need to create is then just G^n (so if you have 11 gems + 1 'empty gem' ( = 12 gems) with 2 sockets, that results in 12^2, or 144 items).
I'll refer to socket as "Sx" from now on, where x is the socket number.

Say the amount of gems you could socket into an item is 'G'.
'n' is the amount of sockets you have.
S1S2 ... Sn
GGGG
For every socket, you have a possibility between G gems. The amount of gems you can socket does not decrease (multiple gem-types are allowed), so the possibility stays 'G'.
Since you have to socket S1 and S2 and (...), this means you have to multiply those G's together.
You multiply 'G' an 'n' amount of times (thus you get G^n).


Most people use a triggered item system for sockets. This allows you to only create 1 item type while having a wide arrange of possible changes on that item.
How you do this is up to you. Some people like full-screen inventories, others like multiboards. Maybe you can find something else?
If you want only 2-4 different gems, then creating the items might be easier, but in all other cases I do not recommend it.

If there are 3 gems, and 2 slots. The possible options are:

Gem 1, None
Gem 2, None
Gem 3, None
Gem 1, Gem 2
Gem 2, Gem 3
Gem 3, Gem 1
Plus 1 for no sockets (the base)

7 total possibilities

(n(n-1))/2 where n is 3, is 3, but "none" counts as another "option" so (n+1(n+1-1)/2. Actually, it's ((n^2)+n)/2. (If n is 3, then 9+3=12, 12/2= 6, 6+1 = 7 which is correct for 4 possibilities). This is consistent with 4,5,6 (checked).

But that aside thanks for the help, not sure exactly what to do though. The game mode was intended to be AoS, so I may have to resort to creating a stupid amount of items, or resort to restricting the possibilities. Thanks a lot

Edit: Oh I figured out what i left out. In this system, gems can't be paired with them selves. That kinda matters a lot haha. Sorry, my fault but I think that I may now be able to get a formula for 3 slots, no duplicates. Thanks.

Edit 2: Figured out the formula for 3 sockets with no dups
 

Attachments

  • math thing.png
    math thing.png
    18.1 KB · Views: 110
Last edited:
Status
Not open for further replies.
Top