HMK
Welcome to Rush Games! Make sure to register for tips on hacking NFM 1 or 2 and guides to being a good waster or racer on NFMM!
ChatBox
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» DONT DELETE
Wed Oct 24, 2012 1:14 pm by desu senpai

» Changing flame color in NFM 2
Tue Oct 23, 2012 12:09 am by desu senpai

» NFM 2 Blue J Java Hacks!
Mon Oct 01, 2012 8:22 pm by masheenmaster

» The Ultimate JAVA NFM Hacking Tutorial/Guide
Sat Sep 29, 2012 4:52 pm by masheenmaster

» The Ultimate Non-Java NFM Hacking Tutorial/Guide
Thu Sep 27, 2012 8:22 pm by masheenmaster

» how to hack nfm 2 with blue j!
Wed Sep 26, 2012 9:41 pm by HMK

Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

Most users ever online was 23 on Sun Dec 15, 2013 9:36 pm

Changing flame color in NFM 2

View previous topic View next topic Go down

Changing flame color in NFM 2

Post by desu senpai on Tue Oct 23, 2012 12:09 am

AN IN-DEPTH ANALYSIS OF CHANGING FLAME COLOR IN NFM 2

FIRST:

Search for this in Plane.class:

k8 = (int)

There will be 2 instances of this code within a reasonably close area . . . This is what we will be modding

Let's analyze this first block of code:


k8 = (int)(255F + 255F * ((float)m.snap[0] / 400F)); Note that the 255's here is the outer color of the flame
if(k8 > 255) Also note that the other flame color (255) is repeated here
{
k8 = 255; And here
}
if(k8 < 0)
{
k8 = 0;
}


But this appears to be only two colors, a normal RGB code would be

255F + 255F + 255F * ((float)m.snap[0]


So that is what we need to do. Change the:

k8 = (int)(255F + 255F * ((float)m.snap[0] / 400F));
if(k8 > 255)
{
k8 = 255;
}
if(k8 < 0)
{
k8 = 0;
}

To:

k8 = (int)(255F + 255F + 255F * ((float)m.snap[0] / 400F));
if(k8 > 255)
{
k8 = 255;
}
if(k8 < 0)
{
k8 = 0;
}

There. Now it's in a normal RGB code. Note again that this is the outer flame color.

MOVING ON TO THE SECOND BLOCK:

i9 = (int)(207F + 207F * ((float)m.snap[1] / 300F));
if(i9 > 255)
{
i9 = 255;
}
if(i9 < 0)
{
i9 = 0;
}

We must once again convert it to RGB, as we will with all of the blocks. Then let's analyze it:

i9 = (int)(207F + 207F + 207F* ((float)m.snap[1] / 300F)); This is the second flame color; nothing has really changed here
if(i9 > 255) NOTE that this number is ALWAYS the first flame color
{
i9 = 255; This one also . . .
}
if(i9 < 0)
{
i9 = 0;
}

Ok. Are you beginning to see a pattern? It's not actually RGB code, but we can somewhat treat it as that. There are three blocks of code (think of them as R, G, and B "blocks"(actually it's the outer flame, middle flame, and inner flame but you get my drift)). Then within in them is the color code, which is always a single number like

207F + 207F + 207F

There are not actual RGB codes cause then they would be

207F + 73F + 234F

Or whatever. But if you don't get this (I think I've outlined it well) then I dunno how you expect to hack NFM.

MOVING ON TO THE THIRD BLOCK

k9 = (int)(136F + 136F + 136F * ((float)m.snap[2] / 200F)); (Changed to RGB) Nothing has changed here, this is the inner flame color
if(k9 > 255) This is the outer flame color
{
k9 = 255; This is also the out flame color . . . .
}
if(k9 < 0)
{
k9 = 0;
}
g.setColor(new Color(k8, i9, k9));
g.fillPolygon(ai12, ai13, 3);


Repeat this process with the next three blocks

If you have any questions PM me




avatar
desu senpai
Kaffe Addict / Dark Chocolate Admin
Kaffe Addict / Dark Chocolate Admin

Posts : 43
Points : 2608
Reputation : 0
Join date : 2012-09-22
Age : 18
Location : Fuck-Offity Land

Level
Level: 2
Car: Custom
Exp:
25/200  (25/200)

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum