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

Proper Name Limit?

Status
Not open for further replies.
Level 12
Joined
May 9, 2009
Messages
735
Hello, I've tried making lots of proper names for a unit. 100 proper names. However, they all "dissapeared" somewhere... as they the system got broken. They show in the unit editor but when I click them it's all empty and in-game there are no names. I wonder is there a limit or something?

New.png


New1.png
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Can you post a demonstration map for this problem? I could forward this to William to either get it fixed or to add a limit to World Editor that matches in game.

A current work around for this would be to use triggers to change the unit's proper name. Nothing stops one having a trigger assign one of thousands of names randomly.
 
Level 8
Joined
May 21, 2019
Messages
435
I forwarded this to William.

For now you will either need to reduce the number of proper hero names to something that works, or use triggers to modify the proper hero name with data selected from an array.
Semi-related question. Do proper names avoid duplicates until all proper names have been used by default, or do they not take used names into account at all?
If it doesn't work this way, doing this may generally be a good way to avoid duplicate names. I guess it could also be fun to make randomly combined first and last names, for more variety.

Store random names in a string array, generate a random number and then apply the string[random number] as a name to the unit
Do you also use a system to avoid duplicate names? Like an index or something.
 
Level 12
Joined
May 9, 2009
Messages
735
Using triggers to make it seems to be a lot of hassle. The idea I have in mind is giving individual units names in an alternative melee context. So dozens of units will all have different kinds of names depending on race/faction/gender. Using the unit editor system does avoid duplicates until all names are cycled through. Then it goes to giving same-named heroes titles (II, III, IV etc.).

I'll have to try experimenting to find the limit.

Edit: back from testing. It worked fine with 80 but the bug was witnessed at 90.
I tested again and 80 was bugged too. I now have a feeling that it has more to do with the amount of characters as opposed to values.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Do proper names avoid duplicates until all proper names have been used by default, or do they not take used names into account at all?
I think it avoids duplicates until all proper names are used.
If it doesn't work this way, doing this may generally be a good way to avoid duplicate names. I guess it could also be fun to make randomly combined first and last names, for more variety.
With triggers the sky is literally the limit to how you generate the names. Random name combinations does sound like a good approach.
Do you also use a system to avoid duplicate names? Like an index or something.
One would use a set structure and remove each name as it is picked from the set. If duplicates are allowed after names are depleted then you keep the original data intact and instead modify a copy of that data. The most common approach for a set of data is an array list where insertions are appended to the end and removals swap the removed element for the end element.
Edit: back from testing. It worked fine with 80 but the bug was witnessed at 90.
I tested again and 80 was bugged too. I now have a feeling that it has more to do with the amount of characters as opposed to values.
Most likely a character limit with the field. You can try experimenting to find the actual limit. If you find the actual limit then please report it back for reference.
 
Level 8
Joined
May 21, 2019
Messages
435
The most common approach for a set of data is an array list where insertions are appended to the end and removals swap the removed element for the end element.
That's a very efficient approach, as opposed to cycling down the entire array. Thanks for that!
 
Status
Not open for further replies.
Top