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

Ace Hart's Save load System Letter Colors

Status
Not open for further replies.
Level 7
Joined
Mar 5, 2009
Messages
254
Hello,ive found ace hart uses a jass code in the map script in his save/load system to make colored numbers,i dont know jass that well to make the small letters or the caps letters in color too i dont know jass... can anyone help me to make the CAPS letters or the small letters colored ? +rep./
 
Level 7
Joined
Mar 5, 2009
Messages
254
i didnt meant that,the thing i need to do is display colored letters from the code,when u type -save the system gives u a code,and that thing is written in jass in the map script and i dont know how to edit it,its not about just to put something like this ''|cff32cd32Text|r''.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I've done exactly this 4 years ago, I can't find the script that I altered. Would you be so kind posting the Jass script over here so that I can take a look again?
I also changed it so that it works locally for each player, meaning that it is possible to show a save/load code to a player locally at the end of a game.

If I can take a look, I'm sure I'll be abled to alter it again.

(I can't download the map, seriously I have like 0 kb's left on my HD, I need to wait untill my lil bro buys his new HD since I gave him my old one...
I'm working on 1 SSD at this moment and it's a real pain in the @ss to only have 60 gb...)
 
Level 12
Joined
Dec 20, 2011
Messages
885
If you're using GUI then look at the triggers of Acehart's save/load system, find the part where you can see color codes in the triggers, which contain UPPERCASE, LOWERCASE, and NUMBERS, I think. There, you could set the colors of the uppercase/lowercase/numbers of the code you'll get after inputting '-save'
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
If you're using GUI then look at the triggers of Acehart's save/load system, find the part where you can see color codes in the triggers, which contain UPPERCASE, LOWERCASE, and NUMBERS, I think. There, you could set the colors of the uppercase/lowercase/numbers of the code you'll get after inputting '-save'

If I remember correctly this was physically created within the script. Not within the GUI configuration. Unless Acehart has changed his system by then...
But it might also be my memory failing ^.^ It's been 4 years for me you know...
 
Level 12
Joined
Dec 20, 2011
Messages
885
If I remember correctly this was physically created within the script. Not within the GUI configuration. Unless Acehart has changed his system by then...

It depends on the version of his save/load system. There's a GUI one, where you could just edit the colors of the codes in their triggers, and there's also a JASS version, which I didn't try, since I didn't have a clue of what to do back then.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
It depends on the version of his save/load system. There's a GUI one, where you could just edit the colors of the codes in their triggers, and there's also a JASS version, which I didn't try, since I didn't have a clue of what to do back then.

Well I guess it shouldn't be that hard for the OP then.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
@Lifee_72

Could you please either post the script that you are using or Acehart's example map so that I can take a look for you?
 
Level 7
Joined
Mar 5, 2009
Messages
254
Yes offcourse , sry for the delay it was night time for me,well i know only 1 version of ace hart's save system and here is it,he is using both gui and jass for the save/load system but he did the coloring for numbers with jass in the map script,i use the Save load all GUI triggers but that doesnt matter,also i cant find option in the gui triggers to make colored letters.And i just need the cap letters colored or the lowercase letters, not both,just to be easier for people to make difference between small L and big i.
 

Attachments

  • SaveLoad_Demo_AceHartZ.w3x
    38.1 KB · Views: 53
Level 12
Joined
Dec 20, 2011
Messages
885
Yes offcourse , sry for the delay it was night time for me,well i know only 1 version of ace hart's save system and here is it,he is using both gui and jass for the save/load system but he did the coloring for numbers with jass in the map script,i use the Save load all GUI triggers but that doesnt matter,also i cant find option in the gui triggers to make colored letters.And i just need the cap letters colored or the lowercase letters, not both,just to be easier for people to make difference between small L and big i.

I think you used the not-most-recent version of AceHart's system, which is why the color of the codes can't be edited in GUI. Either you download the last version which contains GUI-triggered color codes, or figure out a way to edit those out, in Jass.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
JASS:
function SaveLoad_Color takes string s returns string
    local integer i = StringLength(s)
    local string c
    local string r = ""

    loop
        set i = i - 1
        set c = SubString(s,i,i + 1)
        if c == "0" or c == "1" or c == "2" or c == "3" or c == "4" or c == "5" or c == "6" or c == "7" or c == "8" or c == "9" then
            set r = "|cffffcc00" + c + "|r" + r
        elseif c == "-" then
            set r = "|cffdddddd-|r" + r
        else
            set r = c + r
        endif
        exitwhen i <= 0
    endloop
    return r
endfunction

This is the code that you would need to alter in order to get customized colors.

It's inside the header of the map.
As you can see it checks if the character is 0-9 if it is, the color is set to |cffffcc00 + c + |r

else if the character is a - then the color is set to |cffdddddd - |r
if it is any other character there will be no color. You can change this to whatever you like...

You can even check if the characters are upper cased or not and give that a different color alternatively.

If you need an example then ask me...
But it might be a nice chance for you to get in touch with Jass. This should be pretty straight forward.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I haven't done a single trigger in jass,im a GUI fan,i don't think ill be able to make this in jass.Could u please make the loop for colored letters lowercase or CAPS for me?

It is already looped, all you need to do is create 1 extra elseif..

Here is an example:

JASS:
function SaveLoad_Color takes string s returns string
    local integer i = StringLength(s)
    local string c
    local string r = ""

    loop
        set i = i - 1
        set c = SubString(s,i,i + 1)
        if c == "0" or c == "1" or c == "2" or c == "3" or c == "4" or c == "5" or c == "6" or c == "7" or c == "8" or c == "9" then
            //Set the color code for numbers
            set r = "|cffffcc00" + c + "|r" + r
        elseif c == "-" then
            //Set the color code for -
            set r = "|cffdddddd-|r" + r
        elseif c == "A" or c == "B" or c == "C" or c == "D" or c == "E" or c == "F" or c == "G" or c == "H" or c == "I" or c == "J" or c == "K" or c == "L" or c == "M" or c == "N" or c == "O" or c == "P" or c == "Q" or c == "R" or c == "S" or c == "T" or c == "U" or c == "V" or c == "W" or c == "X" or c == "Y" or c == "Z" then
           //Set the color code for upper case characters
           set r = "|cff32cd32" + c + "|r" + r
        else
            //Set the color code for all other characters
            set r = "|cff32cd32" + c + "|r" + r
        endif
        exitwhen i <= 0
    endloop
    return r
endfunction

Now simply change the color codes to whatever you like. This should be really simple now...
 
Status
Not open for further replies.
Top