generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Finally found out how name colors are generated

Previous Thread :: Next Thread 
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
26 Feb 2017 09:47 PM

local function GetNameValue( pName )
local value = 0
for index = 1, #pName do
local cValue = string.byte( string.sub( pName, index, index ) )
local reverseIndex = #pName - index + 1
if #pName % 2 == 1 then
reverseIndex = reverseIndex - 1
end
if reverseIndex % 4 >= 2 then
cValue = - cValue
end
value = value + cValue
end
return value
end

function Util.ComputeChatColor( pName )
return CHAT_COLORS[ ( GetNameValue( pName ) % #CHAT_COLORS ) + 1]
end
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
26 Feb 2017 10:29 PM
How nice of you to post a huge chunk of code without any insight at all on how it works to answer something a quick google search would have revealed.
Report Abuse
Solid_Oblivion is not online. Solid_Oblivion
Joined: 28 Mar 2013
Total Posts: 1505
26 Feb 2017 10:31 PM
^


Certain people aren't meant for certain jobs.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Feb 2017 10:55 PM
Literally as easy as looking in the core scripts but ok
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
26 Feb 2017 11:02 PM
well this has already been discovered


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/ausbtintheslayer Want to see me code in action? Follow me on twitch: twitch.tv/austinrblx
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
26 Feb 2017 11:30 PM
i heard a lot of people trying to find this before so i thought i would add more publicity
basically cvalue is the character byte at that point in the string

so during the for loop with my name

byte of W
byte of u
byte of n
...

reverse index would just be how far that character is down the string + 1
so
12
11
10
...

if the amount of characters is not divisible by 2 then lower that by 1

if it mod 2 is greater than or equal to 2 then make the byte negative
then add that changed cvalue to value

and then it just picks a color, making sure that it stays within the amount of colors if it goes over

looks like just random math tbh to me
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
26 Feb 2017 11:40 PM
if you guys would like the colors

local CHAT_COLORS =
{
Color3.new(253/255, 41/255, 67/255), -- BrickColor.new("Bright red").Color,
Color3.new(1/255, 162/255, 255/255), -- BrickColor.new("Bright blue").Color,
Color3.new(2/255, 184/255, 87/255), -- BrickColor.new("Earth green").Color,
BrickColor.new("Bright violet").Color,
BrickColor.new("Bright orange").Color,
BrickColor.new("Bright yellow").Color,
BrickColor.new("Light reddish violet").Color,
BrickColor.new("Brick yellow").Color,
}

all i did was pick apart a module inside my folders
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
26 Feb 2017 11:41 PM
Also btw idk if this is some secret but Interns and Admins at ROBLOX get their own chat colors.

this.Settings =
{
...
AdminTextColor = Color3.new(1, 215/255, 0);
InternTextColor = Color3.new(175/255, 221/255, 1);
...
}

and

if PlayerPermissionsModule.IsPlayerAdminAsync( this.SendingPlayer ) then
chatMessage.TextColor3 = this.Settings.AdminTextColor
elseif PlayerPermissionsModule.IsPlayerInternAsync( this.SendingPlayer ) then
chatMessage.TextColor3 = this.Settings.InternTextColor
end
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Feb 2017 11:53 PM
"Literally as easy as looking in the core scripts but ok"
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
26 Feb 2017 11:55 PM
ik :(
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
26 Feb 2017 11:57 PM
whats up with these avatar editor and lobby3d places inside my files though, they are in a folder called places inside content, i found them pretty strange and the editor wont fit on my screen correctly
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image