Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Un-randomizing the dye selector!

Experienced Elementalist
Joined
Apr 29, 2016
Messages
269
Reaction score
4
I'm working on un-randomizing the dye selector. I'm fairly certain the script exists within DyeAmpleDialog.gfx. I've converted the .gfx file into a .swf file, and found the script that I think it's in. I believe the game uses the time and date, down to hours, minutes, and seconds to determine how to randomize the dye selector colors. Has anyone dealt with this in the past? I'm pretty sure I'm on the right path here. I need to modify it to not base the randomization on the time, and instead organize them by hue/saturation/luminosity like a normal color picker you'd see in any photo editor.

If anyone has any insight on this, it would be greatly appreciated-- I feel like I'm either on the vastly right path, or a terribly wrong one.
 
Experienced Elementalist
Joined
Mar 26, 2009
Messages
246
Reaction score
63
I mainly use a program called ffdec (JPEXS Free Flash Decompiler) to edit those .gfx files - however after editing the script, it is possible that the UI component breaks and does not work as intended so its usually good for minor edits. The color table is in scaleform/colortable (.RAW so you could use photoshop to view - it looks like a mess).

My preferred solution is to just have a dye system available via the web which can write to the database. You don't need dye ampoules, you can choose how the color picker should look like, and you would be able to dye certain things that the game does not allow you to dye.
 
Upvote 0
Experienced Elementalist
Joined
Apr 29, 2016
Messages
269
Reaction score
4
I mainly use a program called ffdec (JPEXS Free Flash Decompiler) to edit those .gfx files - however after editing the script, it is possible that the UI component breaks and does not work as intended so its usually good for minor edits. The color table is in scaleform/colortable (.RAW so you could use photoshop to view - it looks like a mess).

My preferred solution is to just have a dye system available via the web which can write to the database. You don't need dye ampoules, you can choose how the color picker should look like, and you would be able to dye certain things that the game does not allow you to dye.
Well, looking into the colortable.raw, it seems to use that .raw image as a base image, and it them warps the image further based on some math that I'm pretty sure uses time and date to determine the warp pattern. Anyway, changing the colortable.raw image to all green yields this result as expected:

1z3OdEf - Un-randomizing the dye selector! - RaGEZONE Forums



Changing the colortable to this:

8UO7lBV - Un-randomizing the dye selector! - RaGEZONE Forums


Yields this:

ZNksrJz - Un-randomizing the dye selector! - RaGEZONE Forums


So the dye table that I think should contain the most complete dye colors should look something like this:

ld0PQw0 - Un-randomizing the dye selector! - RaGEZONE Forums


But it's a matter of disabling the warping script.

I tried using JPEXS to edit the file, but it came to my attention that JPEXS will break the file even when saving an unedited file-- so I'm trying to find a way to get it to save correctly.
 

Attachments

You must be registered for see attachments list
Upvote 0
Experienced Elementalist
Joined
Mar 26, 2009
Messages
246
Reaction score
63
What kind of edits did you make with JPEXS? Try to make small ones at first, its worked fine for me on other UI files
 
Upvote 0
Experienced Elementalist
Joined
Apr 29, 2016
Messages
269
Reaction score
4
What kind of edits did you make with JPEXS? Try to make small ones at first, its worked fine for me on other UI files
Thats the thing, I tried not editing it at all and simply saving the file again and it still corrupts the file. Did you need to prep the files in any special way before you edit them? Did you have to save them with special parameters?
 
Upvote 0
Experienced Elementalist
Joined
Mar 26, 2009
Messages
246
Reaction score
63
No prep was needed, so it might be having trouble with a certain portion of the code in that specific file. Hex-editing might be a better option then
 
Upvote 0
Experienced Elementalist
Joined
Apr 29, 2016
Messages
269
Reaction score
4
So I found that the dye.displace file is what does the randomizing. Replacing every hex value with 00 results in a dye screen that matches your colortable.raw

q5COFrv - Un-randomizing the dye selector! - RaGEZONE Forums


Interesting. While it visually unwarps the image, it doesn't seem to actually unwarp it by the server's standards. The resulting dye is not the one selected, nor is it consistent (for example, moving the cursor to the top left every time does not result in the same color every time)

EDIT: Replacing the colortable.raw files in the server data/material folder as well as the dye.displace file in that same folder with my edited ones solved it! This works!
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Back
Top