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.
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:
{
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
}
}