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

Is there a way to change object order in object editor? If not, is it possible to have different object names in-game than in object editor?

Status
Not open for further replies.
Level 3
Joined
Sep 5, 2019
Messages
33
I have a couple hundred custom units, and right now I have them organized by putting a few identifying letters in front of the name, and then sorting alphabetically. However, these letters also show up in the names in game, which is a problem.

Is there a way to re-order objects without using 'sort objects by name' (so I can remove the identifying prefix from each unit, and still have them organized.)
If not, is there a way to have a different unit name in-game than the one displayed in object editor?
And I guess thirdly, if there's no way to do that either, can I rename a unit with triggers (take off the first 3 letters) once the game has started?

Thank you for the help!!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
When a unit enters the map use the Set unit name function on them.
  • Events:
  • A unit enters playable map area
  • Actions:
  • Unit - Set unit name to "whatever"

You'd want to use Substrings to shave off the first few identifying letters of their name so all that remains is their "correct" name. For this to work properly you'd want each unit-type to use the same number of identifying letters in the Object Editor.
 
Level 7
Joined
Sep 4, 2016
Messages
116
There is a data field called "Editor Suffix" that is used sometimes already, and I use it a lot personally.

Re-reading your post, though, I suppose this doesn't help so much. I personally organize my custom units (my current map has approaching 400 I think) is by race and melee/campaign. If that in combination with the Editor Suffix for organizing, it seems what @Uncle has said may be a good option.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Thanks for the help you guys. Does anyone happen to know which version 'Unit - Set unit name to "whatever"' was added to editor?
This is the actual function:
  • Unit - Set Name of (Triggering unit) to <Empty String>

I wrote that last one from memory and "whatever" is just an example value. I believe it was added in 1.29.
 
Last edited:
Level 3
Joined
Sep 25, 2021
Messages
30
I have a couple hundred custom units, and right now I have them organized by putting a few identifying letters in front of the name, and then sorting alphabetically. However, these letters also show up in the names in game, which is a problem.

Is there a way to re-order objects without using 'sort objects by name' (so I can remove the identifying prefix from each unit, and still have them organized.)
If not, is there a way to have a different unit name in-game than the one displayed in object editor?
And I guess thirdly, if there's no way to do that either, can I rename a unit with triggers (take off the first 3 letters) once the game has started?

Thank you for the help!!
This is an example of a default unit name on the editor:
|cffffcc00S|oldier
If you pay attention, the things that are written inside || generally are modifiers to make the letter or text of a marked up color.

Something that i remember is that if you put something wrong or not comprehended by the machine inside ||, such as asdasdsddsasd, it displays a space in game.

A test to do is to name your list of units to look like this:
|Type A3| Carrot dweller
|Type A3| Orange implyer
|Type R6| Antidesestablecimientarismatical extensive forcepolley doom pendule machine of the end

And in-game they may be named idently, without |Type|.

You may know a few differences, as well:

Name - shown on editor or when selecting unit in game
Editor suffix - shown only on editor, but in the end of the name
Description - shown in game but not noticeable, probably there if the unit is sold instead of trained
Basic - shown as the title if you want to train him
Amplified - shown as the description if you want to train him
 
Level 3
Joined
Sep 25, 2021
Messages
30
This is an example of a default unit name on the editor:
|cffffcc00S|oldier
If you pay attention, the things that are written inside || generally are modifiers to make the letter or text of a marked up color.

Something that i remember is that if you put something wrong or not comprehended by the machine inside ||, such as asdasdsddsasd, it displays a space in game.

A test to do is to name your list of units to look like this:
|Type A3| Carrot dweller
|Type A3| Orange implyer
|Type R6| Antidesestablecimientarismatical extensive forcepolley doom pendule machine of the end

And in-game they may be named idently, without |Type|.

You may know a few differences, as well:

Name - shown on editor or when selecting unit in game
Editor suffix - shown only on editor, but in the end of the name
Description - shown in game but not noticeable, probably there if the unit is sold instead of trained
Basic - shown as the title if you want to train him
Amplified - shown as the description if you want to train him
It does not work.
 
Level 18
Joined
Mar 16, 2008
Messages
721
"Text - Name - Editor Suffix" is the Object Editor setting you are looking for. The trigger options are not necessary and a lot of work.
1632731012261.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
"Text - Name - Editor Suffix" is the Object Editor setting you are looking for. The trigger options are not necessary and a lot of work.
View attachment 387611
The problem is you can't sort by Suffix. It sorts by the first characters. The trigger option isn't a lot of work it's like 3 Actions long.
 
Status
Not open for further replies.
Top