-=-
Menu
Tournaments
Profile
Poll
Latest videos
Latest comments
2017-10-21: "No Urbs, no win..." -MasterSven
2017-10-21: "Haha good job M..." -Slaz
2017-10-21: "haha, well play..." -[GpW]Urbs
2017-10-20: "CDF was on the ..." -Slaz
2017-10-18: "Good game! It w..." -Jelly Jam
2017-10-18: "https://s1.post..." -MasterSven
2017-10-17: "Well played boy..." -[GpW]Urbs
2017-10-06: "@MS ..." -Ragnarok
2017-10-05: "https://www.you..." -MasterSven
2017-10-05: "Wow, came back ..." -Icarax
Latest matches
flag [CDF] [10:04] [GpW]flag
flag [GpW] [07:05] [CDF]flag
flag CX [09:02] -t3>flag
flag CC [13:06] [GpW]flag
flag [GpW] [06:03] [CDF]flag
flag CX [18:00] [GpW]flag
flag -t3> [07:06] [GpW]flag
flag -t3> [03:02] CXflag
flag CX [08:00] -t3>flag
flag -t3> [11:04] [GpW]flag
Latest forum posts
By: Jelly Jam, in: Funniest moments! « Forum games2017-10-15 00:35
[00:34:30] Jety: it's better than to play with old...
By: Jelly Jam, in: Funniest moments! « Forum games2017-10-14 00:08
To add to it, it was Smoke's server.
By: cooba, in: Funniest moments! « Forum games2017-10-12 22:39
[22:21:51] Fabian[NC]: NC CLAN IS DEAD [22:21:54]...
By: Jelly Jam, in: Funniest moments! « Forum games2017-10-11 22:13
[22:12:36] Jety: so, Smoke, feel free to fk off an...

JJnet's forum

«Latest posts» «Latest threads» «Search» «User CP»

     [prog] Colorpatch - fix jj2+ changing your colors in ctf | [q]2012-07-05 19:21
wKtKavatar
Webmaster
Posts: 707
121
Ohai everyone, wKtK here proudly presenting you:
Colorpatch version 1.0.0

Download here!

You know how JJ2+ changes the color of your gun and feet to your CTF-team's color? Well, this little tool undoes that. It works Only local, so others still see team-based colors on you.

All colors are supported though some may look a little bit different than usual. Ill explain why later in this text. If ppl really need it, I can fix it but it'll require loads of work with almost no gain...

Currently, this program supports only 1.24.
EDIT: Works with non-plus, but unexpected results may occur (nothing dangerous, just garbage colors)

1.23 support on the way...

How to use it:

2 buttons, 1 about thingy.
-First button: red if no jj2 found, green if jj2 found. click to look for jj2 again.
-Second button: red if disabled, freen green if enabled. click to toggle.

-About thingy: Blue if aEs will lose the season. Click to show this window.

Ok, the technical stuff. Copied from my delphi JJ2 library:

------------------------------------------------------
About extended coloring:

JJ+ has 8 internal 4-byte values, which it uses to re-color rabbits in real-time. Each of the 4 normal colors you can change ingame is represented by 8 bytes, 4 for the inside of the bodypart, and 4 for the outside. these bytes normally take care of the shading on your character, but can be set to anything you like.

When jj+ handles it, the rightmost byte of each 4-byte gets set to the color you want (or color+4 on outlines) and from right to left, 1 is added for each of the remaining 3 bytes.

A short example:
Say, you set your gun to dark blue. That is color 0x20.
The 4 byte value of the inner side of the gun would then be:
0x23,0x22,0x21,0x20

In ctf, plus sets the color of your gun and shoes, (both inner and outer) automatically to match your team. I'll list the base values here, which are the right-most bytes (LSB) of each 4-byte value.

BLUE:
gun inner: 0x20
gun outer: 0x24 (remember, outline = inner + 4)
shoes inner: 0x20
shoes outer: 0x24

RED:
gun inner: 0x18
gun outer: 0x1C (0x18 + 4)
shoes inner: 0x18
gun outer: 0x1C
------------------------------------------------------

I will add the adresses I found, as well as info on how to use them to J2O wiki (ERE), as soon as someone fixes the broken wiki edit mode there and notifies me about it.

hf jazzing,

~wKtK

PS: Jazz25 is coming along fine, it will just take some time. I hope I can show you something cool before the year is over...



Nostalgia warning, well, at least if you're one of those ppl...
(This post has been helpful to 2 of the forumers.)
Replies
cooba
[si]
avatar
JJnet user
Posts: 311
50
#1 | [q]2012-07-05 19:38
Quote:
this is a plus-only issue
Good work and all but this is wrong


Jazz 2 Online
(This post has been helpful to 1 of the forumers.)
wKtK
avatar

Webmaster
Posts: 707
121
#2 | [q]2012-07-05 19:41
Normal jj2 does this as well? hmm, I'll look into it...

EDIT: Yeah, you're right... I'll try to update it today, shouldn't be too hard if plus isn't messing with Jazz' insides...


Nostalgia warning, well, at least if you're one of those ppl...
GLaDOS
aEs
avatar
JJnet user
Posts: 122
28
#3 | [q]2012-07-05 19:46
Hehehe, I actually made this exact change ~1.5 years ago in form of what I called a 'Patchy the pirate' (plus.dll bytecode patch) when I found out that the color changing is done client-side. I also made one of these to prevent the "fake carrot bump" that sometimes pushes you into walls, while leaving fake C detection intact.
The actual implementation was probably a bit different from yours, as I changed the part of the code that modifies the 4-byte color code (the one that goes gun-fur-socks-fur2 for Spaz); this "inner-outer" color thing you wrote about sounds new to me.

Here is the change I made from a reduced excerpt of my program (in crappy VB, yay):

Code:
    Dim iFile As Integer
    Dim bytData(0 To 2) As Byte
    iFile = FreeFile
    Open App.Path & "\plus.dll" For Binary As iFile    Get iFile, &H3F6C9, bytData
    If bytData(0) = &H90 Then
    ' patched
        bytData(0) = &H83
        bytData(1) = &H3A
        bytData(2) = &H5
    Else
    ' unpatched
        Dim i
        For i = 0 To 2
            bytData(i) = &H90
        Next i
    End If
    Put iFile, &H3F6C9, bytData
    Close iFile


(that code tag looks neat [edit: or at least in the preview window it does], but please fix it to allow for indents/tabs [edit: it actually does but does not look like it in the preview])

NINJA EDIT:
While it is true that JJ2 originally does the same thing, it works differently for plus and nonplus:
The Jazz2 server normally sent clients the "teamified" colors of players and forget their original colors, so there's nothing you can do about it client-side.
JJ2+ servers send the clients the original colors of every other player on the server, leaving it up to the client to display players with team fur colors, so it is possible to make said client-side fix.

This should clear things up a bit.
wKtK
avatar

Webmaster
Posts: 707
121
#4 | [q]2012-07-05 20:08
Yes, maybe it is wiser to drop support for non-plus.

Like Sean said, the ones that don't use plus nowadays don't care much about their colors anyway...

I'll still add 1.23 support.


Nostalgia warning, well, at least if you're one of those ppl...
Kyro
CC
avatar
JJnet admin
Posts: 246
25
#5 | [q]2012-07-05 20:52
thank you ;>
wKtK
avatar

Webmaster
Posts: 707
121
#6 | [q]2012-07-05 22:09
Np.

1.23 support will come, but not this week.
In other news, i hate pointers that change on cycling.


Nostalgia warning, well, at least if you're one of those ppl...
GLaDOS
aEs
avatar
JJnet user
Posts: 122
28
#7 | [q]2012-07-09 22:02
Some people seemed to express interest in the plus.dll patch, so here's a link to the compiled version. <PlusPatchTeamFur.exe>
Use at your own risk, this is almost 2 year old VB code you're dealing with here. Should work with the latest version of JJ2+.
King
CX
avatar
JJnet user
Posts: 208
34
#8 | [q]2012-07-10 15:03
1.5 years ago i seemd to have been the only one interested in this, kyro seemd to have noticed that i was able to see others complete fur so i guess he wanted sucha patch too. Though this was released long time ago and that it was known. Oh well


Player: Air!
Air: ?
[GpW]Urbs
[GpW]
avatar
JJnet user
Posts: 373
54
#9 | [q]2012-07-10 15:28
king SO cool!!! emo
King
CX
avatar
JJnet user
Posts: 208
34
#10 | [q]2012-07-10 18:43
Quote:
-Second button: red if disabled, freen if enabled. click to toggle.


Havent even noticed this untill now. Freen is sucha beautiful color


Player: Air!
Air: ?
wKtK
avatar

Webmaster
Posts: 707
121
#11 | [q]2012-07-10 19:03
Typo fixed emo


Nostalgia warning, well, at least if you're one of those ppl...