Un-randomizing the dye selector!

Results 1 to 7 of 7
  1. #1
    Account Upgraded | Title Enabled! Tetraspore is offline
    MemberRank
    Apr 2016 Join Date
    269Posts

    Un-randomizing the dye selector!

    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.


  2. #2
    Member Delteros is offline
    MemberRank
    Mar 2009 Join Date
    302Posts

    Re: Un-randomizing the dye selector!

    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.

  3. #3
    Account Upgraded | Title Enabled! Tetraspore is offline
    MemberRank
    Apr 2016 Join Date
    269Posts

    Re: Un-randomizing the dye selector!

    Quote Originally Posted by Delteros View Post
    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:




    Changing the colortable to this:



    Yields this:



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



    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.

  4. #4
    Member Delteros is offline
    MemberRank
    Mar 2009 Join Date
    302Posts

    Re: Un-randomizing the dye selector!

    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

  5. #5
    Account Upgraded | Title Enabled! Tetraspore is offline
    MemberRank
    Apr 2016 Join Date
    269Posts

    Re: Un-randomizing the dye selector!

    Quote Originally Posted by Delteros View Post
    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?

  6. #6
    Member Delteros is offline
    MemberRank
    Mar 2009 Join Date
    302Posts

    Re: Un-randomizing the dye selector!

    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

  7. #7
    Account Upgraded | Title Enabled! Tetraspore is offline
    MemberRank
    Apr 2016 Join Date
    269Posts

    Re: Un-randomizing the dye selector!

    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



    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!
    Last edited by Tetraspore; 24-01-18 at 07:33 AM.



Advertisement