Hex Editing: Court Colors

Patchmaking tutorials for NBA 2K12.

Hex Editing: Court Colors

Postby JaoSming on Tue Oct 18, 2011 10:35 am

The process looks to be identical to last year's. If you run into any issues with this procedure, please let me know.


I am going to walk you through how to change the Celtics green out of bounds and lane colors to their Saint Patty's Day gold. So first we need to get the RGB (Red, Green, Blue) values of that gold.

Image

Alright, so open the Celtics court up (f005.iff) in the hex editor of your choice. I use Hex Workshop, but as long as your editor has a Base Converter and basic Find, Find/Replace tools you should be OK.

Image

Alrighty, so the first thing we want to do is run a search for the following Hex, press CTRL + F to search.
Code: Select all
FFFFFFFF000000000000000000000000FFFFFFFF

Image

Now we want to find the 2nd instance of that in the file. Then we want to look "up" in the file for the "0000 803F" in the first two columns. The part circled in red is the Celtics green we want to change.

Image

For those that know a bit more about hex, you want to look 8c bytes before the first instance of the code we searched for.

Image

Alright, so this is where it gets tricky. This area circled in red above contains the RGB for that Celtics green. What we need to do is convert the hex shown to Float (32 bit) values so we can get those into RGB numbers. We need to start looking at the hex like this.

Code: Select all
|  Red   |  Green  |   Blue  |
DDBC 173E 4260 B13E 76AE 463E 0000803F


Hex Workshop automatically converts your selection into various things, like (un)signed bytes, (un)signed short/long, and what we need, Float values. Here are the 3 Float values that correlate to the RGB in that hex.

Image
Image
Image

Now we need to convert those decimals into RGB values. White is what you get when you max out the RGB scale, which is 255, 255, 255. Black is 0, 0, 0. These decimals we just obtained from that hex are actually relate to that 255 scale. To get the RBG values we need to multiply those decimals by 255.

Image

If we plug the RGB of 43, 101, 48 into GIMP or Pain, or whatever you use, that green looks familiar.

Image

So, if we multiply by 255 to go from decimal to RGB, we need to divide our custom RGB by 255 to get our Float decimals.

Image

Now that we have our Float values, we need to convert those to hex. I'm sure there is a website that will do this online, but Hex Workshop comes with a Base Converter which allows us to do the conversion in the program.

Image

You need to make sure that you choose "Intel" for the Byte Order and "float (32)" as the Data Type. You then want to input your decimal in the Decimal box and then copy out your generated Hex. Copy these out into notepad.

Image
Image
Image

So we should have this

Image

Now string them all together Red first, then Green, then Blue, and add the 0000803F at the end. You want to do a find/replace (CTRL + H in hex workshop), finding the original Celtics green hex, and replacing it with your new color.

Image

You want to make sure that you replace exactly the same amount as you find or else you will corrupt the file by changing the file size. The number of occurrences differs from court to court and depends if the court has multiple paint colors.

Image

Now that will replace all the green with the gold on the Celtics court, that means the out of bounds and both lane colors will be gold now. Courts with multiple colors on it, like the Lakers with the Purple lanes and Yellow out of bounds, will require you to look at the other instances of this code,
Code: Select all
FFFFFFFF000000000000000000000000FFFFFFFF

and manually try to locate those colors. Unfortunately again, these color locations differ from court to court so we cannot simply have a list of offsets that cover them all.
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby tatlopuyo on Fri Nov 18, 2011 9:48 pm

sir jao can u make a tutorial of hex editing using hxd or is it the same as this?
User avatar
tatlopuyo
 
Posts: 723
Joined: Thu May 19, 2011 6:20 pm

Re: Hex Editing: Court Colors

Postby Andrew on Fri Nov 18, 2011 9:56 pm

The process would be the same using any hex editor. Some of the windows/commands would be a little different (from memory, Replace is Ctrl + R in HxD) but apart from that the steps are the same. As noted:

JaoSming wrote:Alright, so open the Celtics court up (f005.iff) in the hex editor of your choice. I use Hex Workshop, but as long as your editor has a Base Converter and basic Find, Find/Replace tools you should be OK.
Release Threads: NBA Live 08 | NBA Live 07 | NBA Live 06 | NBA Live 2005
Story Threads: NBA 2K13 | NBA Live 06 (Part 2) | NBA Live 06 (HOF) | NBA Live 2004 (HOF)
NLSC: Podcast | Facebook | Twitter | YouTube Channel


Image
Thanks to TheDee for the signature!
User avatar
Andrew
Old School Rose
Administrator
 
Posts: 87597
Joined: Thu Aug 22, 2002 8:51 pm
Location: Australia

Re: Hex Editing: Court Colors

Postby tatlopuyo on Fri Nov 18, 2011 10:10 pm

thank you sir andrew.
User avatar
tatlopuyo
 
Posts: 723
Joined: Thu May 19, 2011 6:20 pm

Re: Hex Editing: Court Colors

Postby lavergapuerca on Thu Nov 24, 2011 9:04 am

and to change the color of the lines, color in the paint and inside the three point line? Is it possible? as
Thanks from now
-
Image
User avatar
lavergapuerca
 
Posts: 42
Joined: Thu Dec 03, 2009 5:24 am

Re: Hex Editing: Court Colors

Postby JaoSming on Thu Nov 24, 2011 9:33 am

same process, just a matter of finding them
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Sixers85 on Tue Nov 29, 2011 8:31 pm

can someone help me? :? ...please

I have problem to understand a couple of things. I read the tutor by jaosming, and it's simple to understand, but in practice I have problem with HEX codes:
for example: this is f001.iff ( milwauky) by mithbuster that I use for understand colors values

now, RGB values are between 255 and 0..right??..and I see the float values to understand decimal values to traslate in RGB values like in tutorial example....

Image

in this section ( the 2° of FFF000....) thre is this hex codes..should be the GREEN color but I have this decimal values
- 0 x 255= 0 ( R)
- 0,1843 x 255 = 47 ( G)
- 5, 0900 x 255 = 1297 ( :?: )...what values is it?
where is the green and red colors.. :( ..if someone help me I am very gratefull
if you want to support my graphic arts :
Image


My Case Modding
User avatar
Sixers85
Contributor
Contributor
 
Posts: 1511
Joined: Tue Oct 26, 2010 5:19 pm
Location: Italia, Sardinia

Re: Hex Editing: Court Colors

Postby JaoSming on Wed Nov 30, 2011 12:05 am

sorry man your wrong because of the "e"

http://en.wikipedia.org/wiki/Floating_p ... nt_numbers

replace the "e" with "x10^"

so instead of 5.0900001e-002, look at it as 5.0900001 x 10^-2 which equals 0.050900001

0.050900001 x 255 = 12.98 or 13

also remember that you are using an English program so your . and , will be switched, so 1.001 is 1,001 in the US, and 0,1843 looks like 0.1843 for me
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Sixers85 on Wed Nov 30, 2011 2:55 am

JaoSming wrote:sorry man your wrong because of the "e"

http://en.wikipedia.org/wiki/Floating_p ... nt_numbers

replace the "e" with "x10^"

so instead of 5.0900001e-002, look at it as 5.0900001 x 10^-2 which equals 0.050900001

0.050900001 x 255 = 12.98 or 13

also remember that you are using an English program so your . and , will be switched, so 1.001 is 1,001 in the US, and 0,1843 looks like 0.1843 for me


:shock: ..ohh,thanks, I did not know about this " e"...now I've found the right colors.
another question . if the float value is 1.0703125 ( for example),is a wrong hex line? for example, in the same f001.iff there is a couple of line
00008A3F 0000893F 00009A3F 0000803F: the float are
-1.078125
-1.0703125
-1.203125
if the RGB value exceeds the 255 is not a good line for edit colors? right?
if you want to support my graphic arts :
Image


My Case Modding
User avatar
Sixers85
Contributor
Contributor
 
Posts: 1511
Joined: Tue Oct 26, 2010 5:19 pm
Location: Italia, Sardinia

Re: Hex Editing: Court Colors

Postby JaoSming on Wed Nov 30, 2011 2:58 am

correct, there shouldnt be any float values over 1 for the colors
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Sixers85 on Wed Nov 30, 2011 3:05 am

ah ok, thanks much for the " revelation of the "e".. :D
if you want to support my graphic arts :
Image


My Case Modding
User avatar
Sixers85
Contributor
Contributor
 
Posts: 1511
Joined: Tue Oct 26, 2010 5:19 pm
Location: Italia, Sardinia

Re: Hex Editing: Court Colors

Postby JaoSming on Wed Nov 30, 2011 3:08 am

glad to help, can't wait to see what you are making (Y) (Y)
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby john26 on Mon Dec 12, 2011 7:04 pm

Hmm can you guide me what to search to find the paint colour? Do I find an instance of 0000 803f as well? Or is it different?
john26
 
Posts: 1019
Joined: Sun Sep 14, 2008 2:09 pm

Re: Hex Editing: Court Colors

Postby JaoSming on Mon Dec 12, 2011 10:43 pm

read the last part of the tutorial again
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby john26 on Tue Dec 13, 2011 5:46 am

Ok, there is something wrong with my hex workshop. I'm trying to search 0000 803f from f005.iff but its saying no instances found?

I also searched 'FFFFFFFF000000000000000000000000FFFFFFFF' but nothing found as well.
john26
 
Posts: 1019
Joined: Sun Sep 14, 2008 2:09 pm

Re: Hex Editing: Court Colors

Postby JaoSming on Tue Dec 13, 2011 10:32 am

make sure you are searching "hex values" look at my screenshot to make sure you are doing it right
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby john26 on Tue Dec 13, 2011 11:45 am

Yes I am searching hex values. From your screenshot, the only difference to mine is that yours says 'light' as Text, mine has dots instead like '...................'

I tried it on EditPad Pro and it cannot find it as well.

I was able to find instances of 803f but when I tested for RGB colours, the float values were too big like 2.2x10+18, etc.
john26
 
Posts: 1019
Joined: Sun Sep 14, 2008 2:09 pm

Re: Hex Editing: Court Colors

Postby JaoSming on Tue Dec 13, 2011 1:10 pm

ignore that "light" part, it was from the previous search and wasn't refreshed

did you decompress the file? open it in the mod tool before editing or the moddingway decompressor
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby john26 on Wed Dec 14, 2011 7:10 am

JaoSming, thanks bro. I was able to find what I needed to change. Sorry I had no idea that these were compressed. :D
john26
 
Posts: 1019
Joined: Sun Sep 14, 2008 2:09 pm

Re: Hex Editing: Court Colors

Postby JaoSming on Wed Dec 14, 2011 7:13 am

phew, glad it was something easy, ill be sure to add that to the tutorial
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Franci27nba on Sun Jan 22, 2012 11:22 pm

I've a little problem,
I'm trying to do a court on Idaho Stampede's base.
There's a part of the court colors that is white, and i can't find the way to change it, because there's too much Hex Values that are the White colours (Example for lightining and lines...). So how i can find the white part of painted area in Hex ?
"Talent wins games, but teamwork and intelligence wins championships." - Michael Jordan
User avatar
Franci27nba
 
Posts: 319
Joined: Sun Jan 09, 2011 8:37 pm
Location: Italia

Re: Hex Editing: Court Colors

Postby JaoSming on Mon Jan 23, 2012 7:02 am

trial and error
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Franci27nba on Thu Jan 26, 2012 10:08 pm

Sorry, but i have another question.
How could i get trasparence on the floor?
I mean that in some zones there's no painted colour.
And it's possible to paint Three point inner area?
"Talent wins games, but teamwork and intelligence wins championships." - Michael Jordan
User avatar
Franci27nba
 
Posts: 319
Joined: Sun Jan 09, 2011 8:37 pm
Location: Italia

Re: Hex Editing: Court Colors

Postby JaoSming on Fri Jan 27, 2012 1:17 am

since we cannot move things around you will have to find a court that has the lanes and shading you want already, then edit off that
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby daninoz on Sat Mar 03, 2012 7:11 am

About the 8 digits after the colors. I think that is the transparency. I'm gonna make some test to see what happens with that numbers.
Image
User avatar
daninoz
 
Posts: 775
Joined: Tue Feb 06, 2007 6:32 am
Location: Tucuman, Argentina

Re: Hex Editing: Court Colors

Postby Ballyoop on Sat Mar 03, 2012 9:59 am

thanks jao! (Y)
Image
Fate Loves the Fearless
User avatar
Ballyoop
Be Bold, Be True
 
Posts: 1188
Joined: Fri Aug 15, 2008 2:41 pm
Location: Filipinas

Re: Hex Editing: Court Colors

Postby jerikokai on Wed Mar 07, 2012 9:50 am

Solovoy mentioned transparencies however he hast checked back in with his findings.

My question is, what do I need to do to get the lane to be the same color as the skirt around the court when it's not a solid color?

When I put the same code (whether it's the main court color or the skirt court color [wood] it always comes out as white. What do I need to do?

I have pulled some "transparent" codes but haven't tested them yet. Figured I'd ask first before butchering my court. I'd hate to have to start over.... Again! LMAO!!

Thanks jao!!!
jerikokai
 
Posts: 63
Joined: Thu Feb 17, 2011 3:15 pm

Re: Hex Editing: Court Colors

Postby Jhiane on Sun Mar 25, 2012 4:10 pm

where can i get a Hex Workshop you used?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby Andrew on Sun Mar 25, 2012 6:21 pm

Google HxD. It's a capable and free hex editor.
Release Threads: NBA Live 08 | NBA Live 07 | NBA Live 06 | NBA Live 2005
Story Threads: NBA 2K13 | NBA Live 06 (Part 2) | NBA Live 06 (HOF) | NBA Live 2004 (HOF)
NLSC: Podcast | Facebook | Twitter | YouTube Channel


Image
Thanks to TheDee for the signature!
User avatar
Andrew
Old School Rose
Administrator
 
Posts: 87597
Joined: Thu Aug 22, 2002 8:51 pm
Location: Australia

Re: Hex Editing: Court Colors

Postby Jhiane on Sun Mar 25, 2012 7:58 pm

i have hex workshop, and the interface is a bit different from Jao's
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Sun Mar 25, 2012 8:07 pm

that's because this tutorial was copy pasted over from 2k10
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Sun Mar 25, 2012 8:12 pm

what version of hex workshop is that?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Mon Mar 26, 2012 6:31 am

an old one that I don't use anymore? I dont know, sorry.
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Wed Mar 28, 2012 10:37 am

how can i figure out the code to search for the part of the court i will change the color?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Wed Mar 28, 2012 11:28 am

I have no idea, its a crapshoot
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Wed Mar 28, 2012 11:33 am

how did the court patchers made it? can anyone tell me?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Wed Mar 28, 2012 11:39 am

its a trial and error kind of thing, and the colors change for each court

you gotta look for multiple instances of the
Code: Select all
FFFFFFFF000000000000000000000000FFFFFFFF

and try to figure out what changes what
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Fri Mar 30, 2012 11:18 am

how about a court with a red in 3 point line and out of bounds lane and blue in the inside paint? does the color blue paint has one hex values in all?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Fri Mar 30, 2012 12:54 pm

yep
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Fri Mar 30, 2012 1:01 pm

i will still search the code FFFFFFFF000000000000000000000000FFFFFFFF ?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Fri Mar 30, 2012 2:18 pm

I believe so, I don't do a lot of this, I stick to courts with the color schemes I already have. You might want to PM mythbuster or other courtmakers for better tips than what I can provide. I just converted a confusing tutorial into something a bit more step by step.
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Sat Apr 14, 2012 8:12 pm

I pm'ed Myth and posted on Sixers' thread and still no response :| anyone can tell me?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby nenot on Sun Apr 29, 2012 5:45 pm

how to change the 3seconds area color?
User avatar
nenot
 
Posts: 92
Joined: Wed Feb 01, 2012 10:10 pm
Location: Pilipinas

Re: Hex Editing: Court Colors

Postby Behindshadows on Thu May 10, 2012 7:07 pm

I have a problem finding the values of the court paint area...mines is pink and I want it to be blue to match the outlined area...
Live Life Don't Let Life Live You!
User avatar
Behindshadows
 
Posts: 2279
Joined: Fri Jul 16, 2010 7:30 pm

Re: Hex Editing: Court Colors

Postby Mr.Xcitement96 on Sat May 26, 2012 12:38 pm

Is there any tutorial on how to change the color of the lines (3pt line, freethrow line, outside line etc...) on the court? :?
User avatar
Mr.Xcitement96
 
Posts: 806
Joined: Wed Apr 08, 2009 3:05 pm

Re: Hex Editing: Court Colors

Postby Jhiane on Sat May 26, 2012 12:56 pm

no one shares about that
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Re: Hex Editing: Court Colors

Postby JaoSming on Sat May 26, 2012 1:25 pm

i know it changes from court to court, and they can be found the same way the lanes are found but later in the file, but I've honestly never done it
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Mr.Xcitement96 on Sun May 27, 2012 7:09 pm

Jhiane wrote:no one shares about that


@Jhiane, I am the no one... :mrgreen: And I will share to you and to everyone... see pics below...(Y)
Image
By mrxcitement96 at 2012-05-27

one thing more, just play with the mixture of colors... try different color and see what will be the outcome... i hope it helps(Y)
User avatar
Mr.Xcitement96
 
Posts: 806
Joined: Wed Apr 08, 2009 3:05 pm

Re: Hex Editing: Court Colors

Postby JaoSming on Sun May 27, 2012 7:48 pm

yes, that texture is particularly helpful if you want to make an all white lined court a color, or make any court's lines black, but proper shading is a pain
User avatar
JaoSming
Guru
Administrator
 
Posts: 29009
Joined: Tue Sep 13, 2005 12:45 am
Location: Vermont

Re: Hex Editing: Court Colors

Postby Jhiane on Wed May 30, 2012 10:33 am

should i use mod tool? not hex editor?
User avatar
Jhiane
Spot Up Shooter
Contributor
 
Posts: 4802
Joined: Thu Jun 17, 2010 4:50 pm
Location: Inside my dress

Next

Return to NBA 2K12 Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest