• 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.

Editor Suffix or any not-shown string

Status
Not open for further replies.
Level 3
Joined
Feb 13, 2008
Messages
65
Editor suffixes are just that: "Editor" (World Editor) Suffixes. They are there purely for the editor.

I'm not quite sure what you need because editor suffixes are just a suffix at the end of the name, which you can add into the actual name, IE:
Unit name:
Tiaan (Is cool)
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
In addition of what Tiaan said: The suffixes are only seen in the World Editor, not in the game itself. They are made to make an easy to spot difference to 2 units with the same name, but a different unit.

For example:
You got a unit called Blademaster. But you also have a unit that's the Blademaster's ghost. To prevent people to see the name of Blademaster is Blademaster (Ghost), you add (Ghost) as a Editor suffix. That way people read the name Blademaster in-game, but use the unit mentioned in the World Editor as Blademaster (Ghost).

It makes the picking of the right Blademaster a lot easier. You don't want to make a trigger that activates the living Blademaster if you need it to activate on the ghost of it.
 
Level 10
Joined
Oct 2, 2005
Messages
398
I know what you mean, I'm pretty sure what the Editor Suffix is, but I'll explain you better whats my problem.

I'm doing a Card Game Map. You can save your card trunk and load it. These cards are string, each character is assigned to a card. Like, ''A'' means Fire Dragon, ''a'' means Holy Relic. Then if you have 3 Fire Dragon and 2 Holy Relic the code will possibly be: ''AaAAa''

But if I put this string value assigned to the unit type on the actual name, the players will see by the own name of the cards (units) what is its code, and cheat putting the best cards on the code.

But I know there are some special tags to type on the name, so it will have colors and values shown on it. Are those codes available on the unit's name under triggers?
Or maybe tags on the text to make what's between them not visible in the actual name?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
I'm not familiar with such tags. What you however can do is make If/Then/Else triggers

  • Actions
    • If - Conditions
      • Unit is equal to Fire Dragon Card
    • Then - Actions
      • Set Card1[1] = A
    • Else - Actions
Card1[1] means Card 1 of Player 1. You can show it to specific players you want by making text strings including Card1[1].
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
It's a back-up plan, but you can use

  • Add custom value
    • Actions
      • Pick every unit of UNIT-TYPE and do
        • Unit - Add custom value 0101
  • Save loading code
    • Actions
      • If - Conditions
        • Custom value of unit is equal to 0101
      • Then - Actions
        • Game - Show text message (Your loading code is (A))
  • Load loading code
    • Events
      • Player enters a chat string containing A as an exact match
    • Conditions
    • Actions
      • Create Fire Dragon Card for Triggering player.
These are made from scratch and I'm not sure if it's possible to check custom values in a condition. If not, you should use Integer Variables.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
You are(were) going in a very wrong direction.
You do not need the unit to contain a specific character in its name.
If cards are different unit types, than that is all that is needed.
Make two arrays: one containing unit types and one containing corresponding characters(better be integer value though).
So to save unit A:
Unit type array is UT and Character array is CA
Unit type of unit A is 'hfoo'; check UT to find the type, ie 'hfoo' is stored on index 7, then check what the value is in CA[7], ie 54.
So the save value of the unit is 54(or you can go with 7 as the index, which would ease the process a bit).
Loading goes the other way around, first checking CA for the value and then creating the corresponding unit from UT.
Note: Method for checking the "UT" array is up to you(Hash tables; Unit types are integers( 'U001' - 'U000'=1))
From there there are a lot of possibilities: just make the combo from the characters the save code or use
an encryption like system(like code maker and etc(all the save systems)) to bind the code to the user name and/or
decrease the length of the code.
P.s. The two(or single) arrays should be created and assigned with values by code which is run at map initialization.
 
why not name the unit:

Code:
Blademaster|n|c00000000A|r
I don't know if |n works or if the first two 00's work (opacity) but if they don't the black should mask it anyway.

You just need to make sure you have no triggers showing the unit's name in a way they can read it.


But this seems like a long and drawn out way to do it...
 
Level 10
Joined
Oct 2, 2005
Messages
398
You are(were) going in a very wrong direction.
You do not need the unit to contain a specific character in its name.
If cards are different unit types, than that is all that is needed.
Make two arrays: one containing unit types and one containing corresponding characters(better be integer value though).
So to save unit A:
Unit type array is UT and Character array is CA
Unit type of unit A is 'hfoo'; check UT to find the type, ie 'hfoo' is stored on index 7, then check what the value is in CA[7], ie 54.
So the save value of the unit is 54(or you can go with 7 as the index, which would ease the process a bit).
Loading goes the other way around, first checking CA for the value and then creating the corresponding unit from UT.
Note: Method for checking the "UT" array is up to you(Hash tables; Unit types are integers( 'U001' - 'U000'=1))
From there there are a lot of possibilities: just make the combo from the characters the save code or use
an encryption like system(like code maker and etc(all the save systems)) to bind the code to the user name and/or
decrease the length of the code.
P.s. The two(or single) arrays should be created and assigned with values by code which is run at map initialization.

It sounds fine, then I should make a loop to read the unit-type and translate it to a character. If I can't hide a character at an unit's name, I'll do it this way.
The only object data related strings that you can retrieve via Jass to my knowledge are the art fields on Abilities.

Via GUI I can retrieve one Ability's name (What was supposed to be Editor-Only), but there is no such function as: ''Random Ability Learned by Unit''.

why not name the unit:

Code:
Blademaster|n|c00000000A|r
I don't know if |n works or if the first two 00's work (opacity) but if they don't the black should mask it anyway.

You just need to make sure you have no triggers showing the unit's name in a way they can read it.


But this seems like a long and drawn out way to do it...

This is perfect! I will put this string at the beginning of one unit's name and test it...

In HTML codes, you have codes that can only be seen in the raw HTML code, but not in the results. Would it be possible in JASS to make such a same string in the name that doesn't show in-game, but is detectable by triggers?

I hope so! I'm willing for someone to answer you...
 
Status
Not open for further replies.
Top