test content
What is the Arc Client?
Install Arc

Costume Files: Ignoring or Loading Physical Scales Only?

rabenschwingerabenschwinge Posts: 91 Arc User
edited July 2013 in Costumes and Concepts
Is there a way to load a costume file in a way that physical scales (i.e. the "body" and "face" rulers) are not overriden? Or to do the opposite, to only apply physical scales?

I've had a look at the costume files whether I may read the data out and create a new one out of two, but the file ends with FF D9, which is normal for a JPEG. No surplus data at the end of file, unless it's a ruse. There is some additional EXIF information, but not enough for an entire costume. So... it's likely a watermark. Which is strange, since, why would the devs wanna hide it? If I knew what I am looking for I might write a script to create a costume file out of two input files...

Characters on Primus DB (and their Nemeses):
Marksmaid | Tenebris (Xalara) | Virtue | Dawnblaze (Sister Nightfall) | Rhinegold: Julie & Magdalena
Post edited by rabenschwinge on

Comments

  • flyingfinnflyingfinn Posts: 8,408 Arc User
    edited June 2013
    You can check Kaiserin's http://co-forum.perfectworld.com/showthread.php?t=229361 if it gives pointers.

    I got bunch of custom costumes made. Like Heroic, Old, Kid, Huge Robot, Villain bodysliders on them and some with default body but custom faces. Makes easier to make a costume with little fiddling on sliders needed.
    CHAMPIONS ONLINE:Join Date: Apr 2008
    And playing by myself since Aug 2009
    Godtier: Lifetime Subscriber
    tumblr_n7qtltG3Dv1rv1ckao1_500.gif
    Get the Forums Enhancement Extension!
  • rabenschwingerabenschwinge Posts: 91 Arc User
    edited June 2013
    While the article you link is indeed very helpful for making screenshots... I don't quite see how this helps modifying existing characters outside of a demo record. I can get the scales out, true, but not back. I could use the scales of one character on another in demo playback... but not in-game. The best method I know remains making a screenshot, putting it on full screen, and then task switching back and forth until I got the scales identical.

    On a positive note: I didn't know that those demorecords were so simple to use. While I still have to figure out whether there is a zoom function and whether I can somehow use modify the depth of field to get an artificial lense opening effect, the things I've seen yet enable me to make screenshots I hadn't dreamed of before.

    Characters on Primus DB (and their Nemeses):
    Marksmaid | Tenebris (Xalara) | Virtue | Dawnblaze (Sister Nightfall) | Rhinegold: Julie & Magdalena
  • rabenschwingerabenschwinge Posts: 91 Arc User
    edited July 2013
    I found it!

    I was so obsessed with the thought that the data had to be somehow hidden, that I didn't look in the most obvious place! It is not hidden at all. It's right at the beginning of the file in plain text! You can edit cd it with a text editor if you like - that won't destroy the image. (I think)

    EDIT: :confused: Well that didn't work. If you change but a single one byte in the costume file it won't work any more. Even if you change one digit to another, without changing the file size. There has got to be a checksum somewhere, and it's not the number in the file name. You can give one costume file the name of another and it still works.

    If you change anything about the content, you can still display it in an image viewer, but Champions Online won't load it anymore. Here is the script I used for testing:

    http://pastebin.com/4UAhzy2Q (set to be erased in one week, after that the link will be dead)

    Next itme I am gonna try simple things with a text editor before I write a script.

    EDIT: I have made some progress. The costume data is stored in a so-called IPTC header where all kinds of meta-data is stored, and the checksum is painfully obvious. I have failed to figure out how the checksum is computed, but if you may disable it by changing anyone of the digits right before it. Look for the first occurrence of the "7799" in the file and change it something else. After that you can do whatever you like with the costume, so long as you don't change the length of anything. To do so would require you to assemble a valid IPTC header, which is unfortunately not trivial about JFIF (the JPEG container format). I am working on it. All the code examples I've seen assume you want to store one value with each key, but the file contain arrays with several values per key. It's likely that the checksum can be removed altogether, if you know how to assemble a valid header.

    For a valid checksum, which would certainly be nice to have, I have checked the two variants of CRC32 PHP has, tried to simply sum every byte up, and tried an algorithm called adler32. But either it's none of these or I've been working on the wrong data.

    Characters on Primus DB (and their Nemeses):
    Marksmaid | Tenebris (Xalara) | Virtue | Dawnblaze (Sister Nightfall) | Rhinegold: Julie & Magdalena
  • rabenschwingerabenschwinge Posts: 91 Arc User
    edited July 2013
    Proof of concept script works. I will now start writing a serious program in Visual C++ to come up with a 32-bit executable for Windows a user interface and a costume database, aiding the user in both merging and managing costumes. I am not going to write a full offline editor, because that might enable you to do things you can't do in game and that would be a sever manipulation.


    Here is the script (set to be erased on August 4, 2013): http://pastebin.com/9e6knBN2 I'll leave it without comments, because:
    • it has no safeguards whatsoever, for example, it doesn't check whether both costumes are for characters of the same gender.
    • It uses extremely unelegant methods to deal with data, such as removing existing IPTC tag by resampling the image.
    • It has no graphical user interface, but is called from the command line and is extremely invonvenient to use.
    • It does not verify that a costume hasn't been manipulated before.
    • Unlike the orignal costumes it has no safeguards against data corruption during transfer.
    • It would require you to install PHP and set the PATH environment variable in Windows to include the directory with php.exe.
    • It doesn't really parse the data, it just replaces lines. If a line matches in the wrong part of the costume data block, it's replaced as well, leaving the data corrupted.
    • It has no error handling, it will just continue running, even if things go bad.

    So it's only meant for people who know a bit of programming to see how it works, not to be actually used.

    I merged these two original costume files:
    37ZDdK0xVexnvkJae1khMy (Marksmaid's scales, she's particularly volouptous)
    6XGZLUuEstVAneNuCoWYUj (Winternight's costume, she's relatively lean )

    Into this: Note that the image it shows still show the original costume file, but it does contain different data!
    3kB9WNHlbHfncBNdOvdvRE


    Things I need to know: How does this checksum work? I found a way to work around it, but to protect data integrity and assert manipulation I need to use it!

    Characters on Primus DB (and their Nemeses):
    Marksmaid | Tenebris (Xalara) | Virtue | Dawnblaze (Sister Nightfall) | Rhinegold: Julie & Magdalena
  • nextnametakennextnametaken Posts: 2,212 Arc User
    edited July 2013
    Why would you do this instead of using the costume editor?
    Load the file you want, make some changes, save and you are done.

    Are you just trying to match scales?
    Is that really an issue with making characters?
    Jane is an inch taller than Mary while Mary sports a pair of double D's and Jane is shy in a B cup?
    Presto Change-O Computer Programmeraton! all proportions are made the same!

    Is that kind of the road you are following?
  • rabenschwingerabenschwinge Posts: 91 Arc User
    edited July 2013
  • nextnametakennextnametaken Posts: 2,212 Arc User
    edited July 2013
    Ah ok then, I can understand that motivation.
    Devil makes work for idle hands.

    This current project is a bit obscure and unpredictable.
    Your final result will not have the image preview that matches the data
    without relying on the gameclient.exe to run the tailor, load the merge
    file and write a new file with accurate preview. You'll end up with four or more files for every merger.

    Would be great if you could automate the whole process in the background, which
    would require piping commands to an open gameclient.exe.
    If we can do that then there's so many more possibilities.


    You know what problem needs solving that you could probably solve?

    Costume exchange website that doesn't junk up the file format and names
    and makes previewing, tagging, searching, uploading and downloading super easy.

    Maybe not a whole website but the scripts needed to run on anyone's site.
    Maybe some kind of wiki or blog plug-in?
    Whats that database of RP characters, maybe something to plug in over there?

    That's something that could be compatible to people's general
    interests and they'd more readily be able to test and give feedback.

    Another problem you might be able to tackle is creating a demo_record playback
    application that produces output of a character like Team Fortress 2 wiki uses.
    Behold the 3D character rotation
    Produced by this sprite sheet

    I did some rambling about what is in the guts of a demo file
    I have a default file somewhere with a character in the powerhouse training room, the camera does a 360 orbit around them. I've tested a copy/paste replace of character data and was able to exchange characters quickly if not clumsily.

    That is the logical next step update to my Demo Record reader

    But before sifting through dozens of hundred megabyte files making hit and miss character selections, I wanted to scour all the demo files and extract the character data, producing new files for each character with the rotation data in place, then automate the 3D image production, probably spit out web pages or an index in the process.

    You seem much more capable than me to do something like that.
    I can't even remember writing the code I write.

    So much fun to have.
  • rabenschwingerabenschwinge Posts: 91 Arc User
    edited July 2013
    I am always careful with boasting with features of a programs I have not yet written, that's why I haven't said what exactly I am gonna intend it to do...

    My primary concern is the management, though. In game it can be difficult to realize which costume is which, especially if you have a lot of costumes. There is also the problem that costumes created while not logged in to any specific character do not have a character name - even if you change the filename, the game uses the one in the file.

    Regarding the image I had no intention of automating the screenshot process, but I did have in mind to use any image with any costume, with some kind of drag and drop interface. Including drag and drop out of browser windows, if that is even possible (I suppose you get an URL then). Though I might put a limitation to 150kB in or so.

    As for the management the program might, if the user allows it, to move all costume files to folder designated by the user, monitor several folders automatically, have a function to expose exactly one costume to the game client, the one that the user intends to load and add all costumes to an internal database. The user could then run the game client in windowed mode and the costume browser next to it, to easily browse through a large number of costumes made by other players without getting confused - possibly even acccesing an internet database directly.

    The user interface I have in mind right now (and therefore likely not the one it's gonna have) is kind of inspired by iTunes in the column browser mode, filter by things like creation time, creator and character name instead of genre, artist and album... or sort by primary colors, intended environment, well, I could keep on talking about the things I am considering for a while, but the truth is, the first thing I need is a solid JPEG parser, specialized in getting those tags out.

    The idea is to make it simple to manage hundreds of costumes and look into costumes, partly made by other players.

    There are also possibilities like adding comments, storing an ancestry of derived costumes, ratings, things like that.

    A pretty obvious thing is, as you said, interfacing with an existing internet costume database, which you can then browse with the exact same user interface.... well, as I said before. Before I think of a second data interface I need to get the first one running. But all these things will take time to program and I don't have anything yet...

    Don't get me wrong integrating or interfacing the demo player is a good idea. Not just for screenshots, but for show casing costumes. You could even do costume contests in the demo player. Or watch several instances of an underwater costume run an animation in Lemuria next to each other. But it's not gonna be one of my first steps. I will definitely write an output funtion that formats costumes for the demo player, before I even think of internet databases, of course.

    Characters on Primus DB (and their Nemeses):
    Marksmaid | Tenebris (Xalara) | Virtue | Dawnblaze (Sister Nightfall) | Rhinegold: Julie & Magdalena
Sign In or Register to comment.