Author Topic: Costume File Formats  (Read 28471 times)

Phaetan

  • Elite Boss
  • *****
  • Posts: 250
Re: Costume File Formats
« Reply #20 on: June 19, 2013, 02:02:14 AM »
I'll be wishing you purple insps with your work, Xenos.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Costume File Formats
« Reply #21 on: June 19, 2013, 02:17:02 PM »
We may wish to investigate the scales, they've been on my mind.

That is, matching the scales from a Sentinel XML into proper costume file form.

Might be the last thing we need to crack.
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #22 on: June 19, 2013, 06:13:30 PM »
We may wish to investigate the scales, they've been on my mind.

I think scales are pretty straight forward...unless I am wrong, of course. But here is how I handle it, and it seems to work.

The scales section in the Sentinel file has 30 values:
Code: [Select]
<scales>-33.000000 -0.955311 0.000000 -0.309524 -0.304029 -0.344066 -0.977656 -0.100000 0.000000 1.000000 1.000000 1.000000 1.000000 0.970000 -0.060000 0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 0.040000 0.480000 0.790000 0.360000 0.140000 0.210000 0.260000 0.000000 0.000000</scales>
There are basically 2 type of scale values. Body scales (height, chest, etc.) that have one value each. Head scales (nose, cranium, etc.) which have 3 values each.

There are nine single scale values. If any of the single scale values are 0, they are omitted in the .costume file.

The single values (in order) are:
1. Scale -33.000000
2. BoneScale -0.955311
3. "ArmScale"...we have access to this one in Icon (which gave us a lot of funny pix), but it was not available in the game. It should always be 0.00000 in the Sentinel files.
4. ShoulderScale -0.309524
5. ChestScale -0.304029
6. WaistScale -0.344066
7. HipScale -0.977656
8. LegScale -0.100000
9. "I have no idea"...but it's not needed, so just ignore the 9th value, which seems to be always 0.00000.

The seven triple values (also in order) are:
1. HeadScales  1.000000, 1.000000, 1.000000
2. BrowScales  1.000000, 0.970000, -0.060000
3. CheekScales  0.000000, 0.000000, 0.000000
4. ChinScales  1.000000, 1.000000, 1.000000
5. CraniumScales  0.040000, 0.480000, 0.790000
6. JawScales  0.360000, 0.140000, 0.210000
7. NoseScales  0.260000, 0.000000, 0.000000

Put all together, the above scale section from the Sentinel file, translates in the following scale section in the .costume file (note that you will have to add commas between the triple values):
Code: [Select]
Scale -33.000000
BoneScale -0.955311
ShoulderScale -0.309524
ChestScale -0.304029
WaistScale -0.344066
HipScale -0.977656
LegScale -0.100000
HeadScales  1.000000, 1.000000, 1.000000
BrowScales  1.000000, 0.970000, -0.060000
CheekScales  0.000000, 0.000000, 0.000000
ChinScales  1.000000, 1.000000, 1.000000
CraniumScales  0.040000, 0.480000, 0.790000
JawScales  0.360000, 0.140000, 0.210000
NoseScales  0.260000, 0.000000, 0.000000

It's a lot of copy/paste, but again, I am just trying to map this out, so that eventually we can figure out a way to automate the process.

Pengy

  • Badge Badger
  • Elite Boss
  • *****
  • Posts: 1,132
Re: Costume File Formats
« Reply #23 on: June 19, 2013, 06:36:17 PM »
I think scales are pretty straight forward...unless I am wrong, of course. But here is how I handle it, and it seems to work.
Yeah, that's what I was seeing when I examined the characters I'd extracted with Sentinel. I didn't know what the ArmScale value was, just thought it was a number that should be ignored.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Costume File Formats
« Reply #24 on: June 19, 2013, 07:43:32 PM »
That's very informative, Xenos.

Nice work.

:D
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #25 on: June 22, 2013, 09:16:06 PM »
Ok, still working on trying to infer the information not included in the Sentinel files (DisplayName, RegionName and BodySetName). BodySetName is not being very cooperative, but I figured I'd share what I figured out about RegionName in the meantime.

There are 28 regions that can have costume part information. Not all of them always have values. If a CostumePart has no costume piece, the DisplayName, RegionName and BodySetName are usually omitted.

The RegionName seems fairly consistent for each CostumePart, eg. the 9th CostumePart always has the RegionName Head. The only exceptions I have found so far are Epic Archetypes (Arachnos Widows, etc.), which use "Epic Archetype", and the 25th CostumePart, which can either be Shields or Weapons, depending on whether you have a weapon or a shield (of course).

Here's my list of each CostumePart with it's associated RegionName(s). I have also indicated which part in the costume creator each CostumePart represents:

1. Lower Body:   "Lower Body" / "Epic Archetype"
2. Upper Body:   "Upper Body" / "Epic Archetype"
3. Head:   Head / "Epic Archetype"
4. Gloves:   "Upper Body" / "Epic Archetype"
5. Boots:   "Lower Body" / "Epic Archetype"
6. Belt:   "Upper Body" / "Epic Archetype"
7. Top of Head (Helmet, Hair, Hat, Detail 1, etc.)*:   Head
8. ???:   ??? (yep, still a mystery)
9. Eye region (Detail 2, Detail 1)*:   Head
10. Chest Detail:   "Upper Body" / "Epic Archetype"
11. Shoulders:   "Upper Body" / "Epic Archetype"
12. Backpacks:   Capes
13. Right Weapon:   Weapons
14. Lower Head region (Detail 3, Detail 2)*:   Head
15. Upper Arms (robotic arms):   "Upper Body"
16. Mantle / Collar:   Capes
17. Brooch: Capes
18. Cape / Wings:   Capes
19. Auras:    Special
20. Skirts / Shorts:   "Lower Body"
21. Jackets:   "Upper Body"
22. Sleeves:   "Upper Body"
23. Ears:   Head
24. 2-handed Weapons (Staffs, etc.):   Weapons
25. Left Weapon / Shield:   Weapons / Shields
26. Shield Emblem:   Shields
27. ???:   Weapons
28. Tails:   "Lower Body"

* On the Head a lot of your options change depending on whether you have a helmet, hair, a full mask, etc. Hence one and the same CostumePart can represent different options (eg. CostumePart 9 can either be Detail 1 or Detail 2). For the RegionName though it does not matter...it's always Head.

I am sure we'll eventually fill in the blanks (???), and we might come across some additional variations. In that case I will update this list here.
« Last Edit: June 22, 2013, 09:29:24 PM by Xenos »

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Costume File Formats
« Reply #26 on: June 22, 2013, 09:25:45 PM »
Your list of RegionNames appears highly similar to the one I edited into the OP recently, at the top.

Hmm.. unknown #8 is Face in the list I have, #27 is Two Handed Right Weapon.
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #27 on: June 22, 2013, 09:39:28 PM »
Your list of RegionNames appears highly similar to the one I edited into the OP recently, at the top.

Hmm.. unknown #8 is Face in the list I have, #27 is Two Handed Right Weapon.

The names of each part should be fairly similar, but the main point of my list is the RegionName for each CostumePart section, which is not in your list, and which is needed for the .costume file.

I have not been able to find any costume parts that create a value for #8. If you can let me know one, that would be great, because that would also give me the RegionName. Likewise I have tried a number of weapons...none of which have created a value in #27. Again, if you have a specific part, it would be appreciated.

Thanks.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Costume File Formats
« Reply #28 on: June 22, 2013, 09:56:47 PM »
Sorry, I don't know anything then to fill #8 and #27 at the moment.

All I noticed is the similarities between lists, is all.

I have 319 costume files, it'd take a long time to go through them all...

If I get some time/a chance to look in a few, I'll see what I can find.

:)
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #29 on: June 23, 2013, 06:31:42 PM »
Considering the time I have spend trying to create .costume files from Sentinel files, I probably could have recreated all my costume files from scratch - but I think I am finally getting somewhere. I don't have the time to write down my (convoluted) method at this point, but I will in the next few days (and just to manage expectations, it's not an easy, quick fix...but maybe someone smarter than me can figure out a way to automate this).

Below are 2 of my characters I did not have .costume files for. All I had was their Sentinel files. Nonetheless I was able to create valid .costume files (that loaded fine in the costume creator) with a text editor.

Here's the original Avenging Aardvark:


And here's the recreated Avenging Aardvark:


And here's the original Wasserman:


And here's the recreated Wasserman:


So, it's possible...and I am excited.  :D

Phaetan

  • Elite Boss
  • *****
  • Posts: 250
Re: Costume File Formats
« Reply #30 on: June 23, 2013, 07:02:20 PM »
Thank you for working on this.   Someone managing to automate it would be great, but even whatever your method is should help quite a few people out.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Costume File Formats
« Reply #31 on: June 23, 2013, 07:46:02 PM »
Fantastic job, Xenos!

Wasserman looks brilliant, I look forward to seeing your method whenever you get around to posting it.

To automate it, someone would need to create a program which does all the steps for you.

Definitely not me, as I have no programming/high skill level tech ability.
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #32 on: June 25, 2013, 05:20:15 AM »
The following is a very early stage (think pre-alpha) description of a method to manually convert the costume information in a Sentinel file into a valid .costume file. This has only been tested on a handful of costumes and may not work in every case. Ultimately I am hoping that someone smarter than me will look at this and turn it into an app of some sorts, but for now the information below should help you recover your costume information.

How to cook up a .costume file from a Sentinel file (using lots of elbow grease).

Ingredients and Utensils:
1 Sentinel .xml file
     (of the character, whose costume you want to convert)
1 costume.txt file (which contains the costume.bin data)
     (kindly created for us by Codewalker, shared by Arachnion and available here: https://www.sugarsync.com/pf/D0133125_936_48375484)
1 plain.costume file (optional)
     (I've created a basic template to use as a basis for my costume files, but you can really use any costume file you have lying around. But this file will help save you some work. You can download it from here: https://www.dropbox.com/s/nt4kypldn71c6lr/plain.costume )
1 good text editor
     (It's up to you what you use, but I recommend that in the least it's able to display line numbers, and that it has a good search function. I am using BBedit, but TextWrangler is a decent free option for the Mac (yep, I am on a Mac). Just don't use MS Word.)
1 Hexdecimal to RGB converter
     (I am using the first search result from Google (http://www.javascripter.net/faq/hextorgb.htm), but there are many other options)
A lot of time and patience.
     (Seriously, I am not kidding.)

Prep:
Open the Sentinel .xml file in your text editor. DO NOT SAVE ANY CHANGES TO THIS FILE. All you want to do is find the costume section. There may be more than one (you just had to have 5 costumes for each of your characters). Each costume section starts with <costume> and ends with </costume>. Copy the costume section for the costume you want to recreate and past it into a new blank text document and save that with whatever name you like. Next, close the .xml file (without saving any changes to it).
Open the plain.costume file (or your own file) in another window of your text editor and save it with a new name (presumably the name of the character whose .costume file you are attempting to create).
And lastly, open the costume.txt (it's a big file).
At this point you have 3 windows open in your text editor and you are ready to start cooking.

For today's demonstration I will use a costume for Maid Mariam (seen in this screenshot from better days).


Here's the code from the Sentinel file I'll be using:
Code: [Select]
<costume>
<bodytype>1</bodytype>
<skincolor>ff537bbf</skincolor>
<scales>13.575571 -1.000000 0.000000 -0.224286 -1.000000 -0.820286 -1.000000 0.014233 0.000000 -0.090000 0.720000 0.120000 0.250000 -0.250000 0.000000 0.000000 0.000000 0.000000 0.660000 0.000000 0.000000 -0.310000 -0.110000 0.000000 0.090000 -0.420000 -0.380000 0.260000 0.000000 0.000000</scales>
<parts count="28">
<part>shorts skin_tights miniskirt_1 00006600 00001a26</part>
<part>Tight tights none 00006600 00001a26</part>
<part>V_fem_Head.GEO/GEO_Head_V_Asym_Standard !v_sf_face_skin_head_02 !V_Face_Small_Mask_2 00006600 00001a26</part>
<part>Smooth skin_wrapped_01a skin_wrapped_01b 00001133 00006600</part>
<part>Folded smooth_01 Blend 00001133 00000000</part>
<part>Tech_01 Tech_01a Tech_01b 00001133 00008cd4</part>
<part>Ponytail Long_01a Long_01b 00003855 00001a26</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00006600 00001a26</part>
<part>Tight base Bullseye 00001133 00008cd4</part>
<part>none none none 00006600 00001a26</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00006600 00001a26</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>ShortSkirt_02 Plain none 00006600 00001a26</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00001133 0000547f 00ffffff 00ffffff WEAPONS/Custom_Bow/Fem_Bow_Longbow01.fx</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
<part>none none none 00000000 00000000</part>
</parts>
</costume>
      
Most of the conversion is actually pretty easy. The tricky part is that the .costume file requires 3 datasets for each used CostumePart section that simply are not included in the Sentinel file. The missing information is DisplayName, RegionName and BodySetName. Recreating this information is where it'll get tricky.

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #33 on: June 25, 2013, 05:21:08 AM »

Part 1 (the easy part):
Look at the plain.costume file. Any information before the first CostumePart section is easily updated.

Scales: In the .xml file look for the <scales>...</scales> section. You'll find 30 numerical values there. Just cut and paste them to the plain.costume file as follows:

1. Scale
2. BoneScale
3. Not used...it should be 0.000000...simply skip it.
4. ShoulderScale
5. ChestScale
6. WaistScale
7. HipScale
8. LegScale
9. Also not used...0.000000...skip it as well.
From here on we are dealing with 3 values per scale setting:
10-12. HeadScales 
13-15 BrowScales 
16-18. CheekScales 
19-21 ChinScales 
22-24. CraniumScales
25-27. JawScales 
28-30. NoseScales

SkinColor: This is where you'll use your Hex to RGB converter for the first time. In your .xml file, look for <skincolor>...</skincolor>. Copy the last 6 digits (skip the first 2, which should be "ff"), and paste that into your converter. This should give you a value for R(Red) G(Green) and B(Blue). IMPORTANT: in the .costume file ALL color information is stored "backwards", ie. it's B-G-R. So, for Maid Mariam, the Hex value (537bbf) converts to R(83), G(123) and B(191), and you need to put (SkinColor  191,  123,  83) into the .costume file.

NumParts. This is your <parts count="..."> and you should not have to touch it. BAM!, that was easy!

BodyType. Just look for the number between <bodytype>...</bodytype> in your .xml file. 3 choices...0 (Male), 1 (Female), 4 (Huge). Don't even think about giving your character a quick sex change at this point...it'll mess everything up.

And that's all there is to Part 1. For Maid Mariam the head section of the .costume file looks like this:

{
Scale 13.575571
BoneScale -1.000000
ShoulderScale -0.224286
ChestScale -1.000000
WaistScale -0.820286
HipScale -1.000000
LegScale 0.014233
HeadScales  -0.090000,  0.720000,  0.120000
BrowScales  0.250000,  -0.250000,  0
CheekScales  0,  0,  0
ChinScales  0.660000,  0,  0
CraniumScales  -0.310000,  -0.110000,  0
JawScales  0.090000,  -0.420000,  -0.380000
NoseScales  0.260000,  0,  0
SkinColor  191,  123,  83
NumParts 28
BodyType 1

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #34 on: June 25, 2013, 05:21:43 AM »
Part 2 (now we're really cooking):

First a quick overview. There are 28 CostumePart sections in the .costume file that matter (there are 2 more sections at the very end that we might consider to the equivalent of our appendix - non-functional), and there are 28 <part>...</part> sections in the .xml file. They match, but each <part>...</part> section is missing some vital information that the CostumePart sections need. Let's just look at Mariam's first CostumePart:

Fx*
Geometry. That's the first value: shorts
Texture1. That's the second value: skin_tights
Texture2. Third value: skin_tights miniskirt_1
DisplayName. Not in the .xml file
RegionName. Also not in the .xml file
BodySetName. And again, not in the .xml file
Color1.  That's a hex value, which we'll have to convert: 00006600
Color2.  Another hex value to convert: 00001a26
Color3  Usually not in the .xml file.
Color4  Usually not in the .xml file.

*Occasionally you'll find a path to an .fx file as the last value in a <part>...</part> section (eg. WEAPONS/Custom_Bow/Fem_Bow_Longbow01.fx). That will be the first value in the corresponding CostumePart section (eg. Fx WEAPONS/Custom_Bow/Fem_Bow_Longbow01.fx).

Let's look at the missing info:

DisplayName. Good news is, as long as there's something there, it will work. You can just leave the value I put into the plain.costume file (P000000000). And we'll actually fix this "automatically" in the end.

RegionName. Luckily the region names seem to be very consistent for each CostumePart. Here's the complete list, with what specific part they usually represent added in parenthesis:

1. "Lower Body" / "Epic Archetype" (Lower Body)
2. "Upper Body" / "Epic Archetype" (Upper Body)
3. Head / "Epic Archetype" (Head)
4. "Upper Body" / "Epic Archetype" (Gloves)
5. "Lower Body" / "Epic Archetype" (Boots)
6. "Upper Body" / "Epic Archetype" (Belt)
7. Head (Top of Head, ie. Helmet, Hair, Hat, Detail 1, etc.)
8. ??:   ?? (yep, still a mystery, but I've also not seen it used so far)
9. Head (Eye region, ie. Detail 2, Detail 1)
10. "Upper Body" / "Epic Archetype" (Chest Detail)
11. "Upper Body" / "Epic Archetype" (Shoulders)
12. Capes (Backpacks)
13. Weapons (Right Weapon)
14. Head (Lower Head region, ie. Detail 3, Detail 2)
15. "Upper Body" (Upper Arms, ie. robotic arms)
16. Capes (Mantle / Collar)
17. Capes (Brooch)
18. Capes (Cape / Wings)
19. Special (Auras)
20. "Lower Body" (Skirts / Shorts)
21. "Upper Body" (Jackets)
22. "Upper Body" (Sleeves)
23. Head (Ears)
24. Weapons (2-handed Weapons)
25. Weapons / Shields (Left Weapon or 2-handed Weapons / Shield) 
26. Weapons / Shields (Left Weapon / Shield Emblem)
27. Weapons (??)
28. "Lower Body" (Tails)

One variable I found are the special Arachnos Epic Archetype costumes, which use "Epic Archetype" for most CostumeParts. And we have another variable in CostumePart #25, which can either be a Weapon or a Shield. The rest you can just copy from this list, if it's not already in the plain.costume file.

BodySetName. This is the one that will give you a headache, and I will get back to it later. For now, let me give you the good news. All the CostumeParts that share the same RegionName, will also share the same BodySetName! That significantly cuts back on how many BodySetNames you have to figure out. This is a lifesaver.

Color3. Color4. Unless there is a value for those in the .xml file, they don't matter and you can leave the values at 0.

First pass (where we ignore the color fields).
Now we need to figure out the BodySetName values. I usually start with the "Lower Body" RegionName (which is what the first CostumePart is). For this, we turn to the costume.txt file and yet another aside:

There is a basic structure to all the information in the costume.txt file. For each body type, you have different regions that are numbered (eg. Region 0). Within each Region, you have different BoneSets that are also numbered (eg. BoneSet 0). Within each BoneSet, you have GeoSets (eg. GeoSet 0). And finally within each GeoSet, you have Info sections and sometimes Mask sections (eg. Info 0).

So the structure looks basically like this:

-------- Region 0 --------
   -------- BoneSet 0 --------
      -------- GeoSet 0 --------
         -------- Info 0 --------
         -------- Info 1 --------
         -------- Info 2 --------
      -------- GeoSet 1 --------
         -------- Info 0 --------
         -------- Info 1 --------
         -------- Info 2 --------
   -------- BoneSet 1 --------
      -------- GeoSet 0 --------
         -------- Info 0 --------
         -------- Info 1 --------
         -------- Info 2 --------
      -------- GeoSet 1 --------
         -------- Info 0 --------
         -------- Info 1 --------
         -------- Info 2 --------

In each Info section, there's a fairly unique combination of details for each part. What matters to us are these lines:
                    Geo = xxxxx
                    Tex1 = xxxxx
                    Tex2 = xxxxx
                   
These correspond to Geometry, Texture1 and Texture2 in our .costume file and the first 3 values in each <part> section in the .xml file. This correlation is not always perfect, but it's good enough that we can start figuring out within which BoneSet section our costume pieces reside. Once we find a match, we just need to follow up the tree (and this could be a long way up...), until we find the BoneSet section that it's part of. The Name, which is the first line below the BoneSet, gives us the BodySetName we are looking for.

I hope you got this...if not, pour yourself a drink and read it again. ;)

Let's try this with the "Lower Body" for Maid Miriam. Open up your search box for the costume.txt document and copy these 3 lines into it:
                    Geo = xxxxx
                    Tex1 = xxxxx
                    Tex2 = xxxxx
The empty spaces matter (at least with BBedit), so don't mess with them.

Copy and paste the values from the first <part> section over the "xxxxx". Your search query should look like this:
                    Geo = shorts
                    Tex1 = skin_tights
                    Tex2 = miniskirt_1
Now hit Find All, and in this case you'll get 2 results. When you scroll up (I suggest using the "page up" button for fast, controlled scrolling) to the corresponding BoneSet Name, you'll find "NewSkirts" for one of the results, and "Tights/skin" for the other result. Sometimes there will be more than one option, though I more often than not have been lucky on the first try.

So we look for another <part> section that we know relates to the "Lower Body". How about #20, which we know is specific to skirts. In this case our search query will look like this:
                    Geo = ShortSkirt_02
                    Tex1 = Plain
                    Tex2 = mask
(*I've found that when a value for Tex2 is none in the .xml file, it usually can be replaced by mask. If that gets you no results, just omit the Tex2 line)
And we only have 1 result which belongs to the NewSkirts BoneSet. Now we know that for all CostumeParts that have the "Lower Body" RegionName, the BodySetName value will be NewSkirts.

Ok, onto the "Upper Body". Let's search for:
                    Geo = Tight
                    Tex1 = tights
                    Tex2 = mask
Shoot, 8 results. If we look closely though, we see that most of them are of the Tight BoneSet. The only other option is the Bolero BoneSet, which would probably have a corresponding value that gives more details of the Bolero in another <part> section, so we can  deduce that the BodySetName value is be Tight. That again goes for all CostumeParts with the "Upper Body" RegionName.

And onto the Head. I've found that using the third <part> section for your search usually returns too many options for the head. So I  start with another <part> section that relates to the head, in this case section #7:
                    Geo = Ponytail
                    Tex1 = Long_01a
                    Tex2 = Long_01b
9 results...I sure picked the perfect costume for this demonstration. :roll: But when we look closer, we see that once we eliminate all the options that relate to Male, Huge or Arachnos bodies, we are left with 2 options: Standard or PointyEars. I see no other reference to pointy ears anywhere, so I am assuming that the BodySetName for all CostumeParts with the Head RegionName is Standard.

Ok, that was the hardest part. What other regions are left? I see a Weapons, so lets figure that out. In this case we just search for the .fx file:
WEAPONS/Custom_Bow/Fem_Bow_Longbow01.fx
We get 6 results, all with the BoneSet Name Weapons. So the BodySetName is Weapons.

You may also have Shields, Capes of Special section values, and you can figure them out with the same methods.

At this point you should be able to convert all the information that does not relate to color.

In the Second Pass we deal with colors.
Unless you decided to use every color in the rainbow for your costume, there will be a limited amount of colors to convert. Use the same method as described for the SkinColor (Remember B-G-R). If you do them all in one go, it'll be easy to copy and paste. You only need to transfer color information that you find in the .xml file. Leave anything has no value or a 00000000 value alone. For Maid Miriam only the Weapon section has 4 color values. Transfer all 4 color values in that case.

And that's it...you now should have a functioning .costume file. Don't forget to save it.

Here's what Maid Mariam's .costume file looks like:
Code: [Select]
{
Scale 13.575571
BoneScale -1.000000
ShoulderScale -0.224286
ChestScale -1.000000
WaistScale -0.820286
HipScale -1.000000
LegScale 0.014233
HeadScales  -0.090000,  0.720000,  0.120000
BrowScales  0.250000,  -0.250000,  0
CheekScales  0,  0,  0
ChinScales  0.660000,  0,  0
CraniumScales  -0.310000,  -0.110000,  0
JawScales  0.090000,  -0.420000,  -0.380000
NoseScales  0.260000,  0,  0
SkinColor  191,  123,  83
NumParts 28
BodyType 1
CostumePart ""
{
Geometry shorts
Texture1 skin_tights
Texture2 miniskirt_1
DisplayName P000000000
RegionName "Lower Body"
BodySetName Tight
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Tight
Texture1 tights
Texture2 none
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry V_fem_Head.GEO/GEO_Head_V_Asym_Standard
Texture1 !v_sf_face_skin_head_02
Texture2 !V_Face_Small_Mask_2
DisplayName P000000000
RegionName Head
BodySetName standard
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Smooth
Texture1 skin_wrapped_01a
Texture2 skin_wrapped_01b
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  51,  17,  0
Color2  0,  102,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Folded
Texture1 smooth_01
Texture2 Blend
DisplayName P000000000
RegionName "Lower Body"
BodySetName Tight
Color1  51,  17,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Tech_01
Texture1 Tech_01a
Texture2 Tech_01b
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  51,  17,  0
Color2  212,  140,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Ponytail
Texture1 Long_01a
Texture2 Long_01b
DisplayName P000000000
RegionName Head
BodySetName standard
Color1  85,  56,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Head
BodySetName standard
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Tight
Texture1 base
Texture2 Bullseye
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  51,  17,  0
Color2  212,  140,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Weapons
BodySetName Weapons
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Head
BodySetName standard
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry ShortSkirt_02
Texture1 Plain
Texture2 none
DisplayName P000000000
RegionName "Lower Body"
BodySetName Tight
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName "Upper Body"
BodySetName Tight
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Head
BodySetName standard
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Weapons
BodySetName Weapons
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx WEAPONS/Custom_Bow/Fem_Bow_Longbow01.fx
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Weapons
BodySetName Weapons
Color1  51,  17,  0
Color2  127,  84,  0
Color3  255,  255,  255
Color4  255,  255,  255
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Shields
BodySetName "Cavalier Shield"
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName Weapons
BodySetName Weapons
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P000000000
RegionName "Lower Body"
BodySetName Tight
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


}

« Last Edit: June 25, 2013, 05:36:53 AM by Xenos »

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #35 on: June 25, 2013, 05:22:14 AM »
Finishing touches.

Fire up Icon, and create a character of the correct gender (male/female/huge) and load your new costume file. If you are lucky it'll load without a hitch or any warnings.

With Maid Miriam I was not quite that lucky. It loaded fine, but I got a warning that the Costume Creator could not find a match for parts (1,pants) (20, skirt). I think this happend because this was an older costume, which did not reflect the current version of the costume creator. You'd gotten the same message if you had opened up this costume in the tailor. This is luckily a quick fix in the costume creator.

If your Weapon or Shield does not show up properly, select the appropriate weapon in the costume creator and reload the costume file. Eventually the Weapon should show up with the correct colors. It's a little wonky...don't know why.

After you are happy with the costume in the costume creator, Save the costume with a new name. Below is the Maid Mariam New.costume - please note that every instance of DisplayName has now a proper value (I told you we'd fix that):
Code: [Select]

{
Scale 13.58
BoneScale -1
ShoulderScale -0.2243
ChestScale -1
WaistScale -0.8203
HipScale -1
LegScale 0.01423
HeadScales  -0.09,  0.72,  0.12
BrowScales  0.25,  -0.25,  0
CheekScales  0,  0,  0
ChinScales  0.66,  0,  0
CraniumScales  -0.31,  -0.11,  0
JawScales  0.09,  -0.42,  -0.38
NoseScales  0.26,  0,  0
SkinColor  191,  123,  83
NumParts 28
BodyType 1
CostumePart ""
{
Geometry shorts
Texture1 skin_tights
Texture2 bikini_3
DisplayName P1525729866
RegionName "Lower Body"
BodySetName NewSkirts
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Tight
Texture1 Tights
Texture2 none
DisplayName P566009771
RegionName "Upper Body"
BodySetName Tight
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry V_fem_Head.GEO/GEO_Head_V_Asym_Standard
Texture1 !v_sf_face_skin_head_02
Texture2 !V_Face_Small_Mask_2
DisplayName P687117166
RegionName Head
BodySetName standard
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Smooth
Texture1 skin_wrapped_01a
Texture2 skin_wrapped_01b
DisplayName P3937616722
RegionName "Upper Body"
BodySetName Tight
Color1  51,  17,  0
Color2  0,  102,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Folded
Texture1 smooth_01
Texture2 none
DisplayName P2104750136
RegionName "Lower Body"
BodySetName NewSkirts
Color1  51,  17,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Tech_01
Texture1 tech_01a
Texture2 tech_01b
DisplayName P177456852
RegionName "Upper Body"
BodySetName Tight
Color1  51,  17,  0
Color2  212,  140,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Ponytail
Texture1 Long_01a
Texture2 Long_01b
DisplayName P2681220175
RegionName Head
BodySetName standard
Color1  85,  56,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P2793026233
RegionName Head
BodySetName standard
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry Tight
Texture1 Base
Texture2 Bullseye
DisplayName P2281134661
RegionName "Upper Body"
BodySetName Tight
Color1  51,  17,  0
Color2  212,  140,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P772741860
RegionName "Upper Body"
BodySetName Tight
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P3890352428
RegionName Weapons
BodySetName Weapons
Color1  31,  31,  31
Color2  227,  227,  227
Color3  31,  31,  31
Color4  227,  227,  227
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P2371314042
RegionName Head
BodySetName standard
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry ShortSkirt_02
Texture1 plain
Texture2 none
DisplayName P3930658043
RegionName "Lower Body"
BodySetName NewSkirts
Color1  0,  102,  0
Color2  38,  26,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P1848153390
RegionName Head
BodySetName standard
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
Color1  31,  31,  31
Color2  227,  227,  227
Color3  31,  31,  31
Color4  227,  227,  227
}


CostumePart ""
{
Fx WEAPONS/Custom_Bow/Fem_Bow_Longbow01.fx
Geometry none
Texture1 none
Texture2 none
DisplayName P974978278
RegionName Weapons
BodySetName Weapons
Color1  51,  17,  0
Color2  127,  84,  0
Color3  255,  255,  255
Color4  255,  255,  255
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P1164533673
RegionName Shields
BodySetName "Cavalier Shield"
Color1  31,  31,  31
Color2  227,  227,  227
Color3  31,  31,  31
Color4  227,  227,  227
}


CostumePart ""
{
Fx none
Geometry none
Texture1 none
Texture2 none
DisplayName P2864400186
RegionName Weapons
BodySetName Weapons
Color1  31,  31,  31
Color2  227,  227,  227
Color3  31,  31,  31
Color4  227,  227,  227
}


CostumePart ""
{
Geometry none
Texture1 none
Texture2 none
DisplayName P546439883
RegionName "Lower Body"
BodySetName NewSkirts
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


CostumePart ""
{
Color1  0,  0,  0
Color2  0,  0,  0
Color3  0,  0,  0
Color4  0,  0,  0
}


}



And here's a picture of the recreated Maid Miriam in the same old spot.


Looking back at all the instructions, I doubt that anyone will be crazy enough to attempt this themselves. But, as I had said before, maybe one of our more technical friends can use this information to cook up a little app that will do the heavy lifting for us. I am more than happy to answer any questions, or help out where I can...but a coder I am not.

In any case, I hope it helps someone. It was a fun puzzle for me. Night all.
« Last Edit: June 25, 2013, 05:41:31 AM by Xenos »

Turjan

  • Elite Boss
  • *****
  • Posts: 270
  • You cannot kill a dream
Re: Costume File Formats
« Reply #36 on: June 25, 2013, 12:05:21 PM »
Looking back at all the instructions, I doubt that anyone will be crazy enough to attempt this themselves.

Crazy enough?

Well, I suppose someone has to point this out - just look around you here chum...you're in an asylum ;)

When it comes to crazy, this place makes Arkham look like Sanity City  ;D

Your work epitomises the very essense of the mad scientist, plotting the reanimation of heroes with a zeal that would make Victor Frankenstein proud. Moar power to you sir - it's alive...it's ALIIIIIVE!!!  8)

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Costume File Formats
« Reply #37 on: June 25, 2013, 07:44:23 PM »
Wow.

Great stuff, Xenos.

:)
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Xenos

  • Lieutenant
  • ***
  • Posts: 67
Re: Costume File Formats
« Reply #38 on: June 26, 2013, 03:29:08 PM »
When it comes to crazy, this place makes Arkham look like Sanity City  ;D

I guess that explains why I keep coming back.  ;)

All kidding aside, if someone is crazy enough to try it, i'd love to hear how it worked for them.

As an FYI, I timed my last conversion...and it took me about 40 minutes. (Ouch!)

Phaetan

  • Elite Boss
  • *****
  • Posts: 250
Re: Costume File Formats
« Reply #39 on: June 26, 2013, 04:22:35 PM »
With all due respect to Xenos, I'm really hoping someone can (at least partially) automate this, or at least write another guide.  I tried it on a sentinel file last night, but got pretty lost partway through.

EDIT: And when looking for a matching boneset, try just using "Find Previous" for "boneset" after finding the right Geo/tex1/tex2 listing.
« Last Edit: June 26, 2013, 06:10:16 PM by Phaetan »