Author Topic: Missing files referred to in .pigg files  (Read 2193 times)

wandererBC

  • Underling
  • *
  • Posts: 4
Missing files referred to in .pigg files
« on: April 20, 2014, 06:53:37 PM »
Hi, first off I'd like to say how much I've enjoyed using Icon since the end of COH.

That said there are are a couple of things I would like to see added that could come out before version 1.8 - 2.0. 

The first would be a way to dump or extract from memory the hidden files that are referred to in some of the pigg files, like the files listing what items  / .geo files are listed in each category in the costume creator for a particular category of costume part, or which ones make up a an npc entity, whether enemy or not.  These files must be generated at runtime, because there is no where to find them in the base COH program, yet they cannot be server generated or Icon could not work at all. 

If there could be a way for this to be accomplished it would provide a starting point for a user to add or remove new costume pieces to the creator, rearrange or add whole new menu categories to the costume creator, figure out how to get particular power fx working in icon without having to manually re-create them each time, etc.

This is all assuming these files can be extracted / dumped as simple text documents of course.

The second thing I and probably many others, would be interested in would be a way to extract the 3D models inside .geo files, either by some method of selecting an entity (player character, NPC, a building, etc.) directly in COH icon and exporting it, or using a 3rd party app such as Blender or Noesis using a custom script.

I remember a post from a while back detailing some success at extracting some of the .geo files and wonder if that could be built on.

Especially if we were also able to re export files into COH / Icon.

Thats, all, and thanks againfor what you've already done.

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Missing files referred to in .pigg files
« Reply #1 on: April 21, 2014, 09:08:56 AM »
From what I recall, costume parts are listed in one of the .bin files. You'd have to figure out that format first.
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

GuyPerfect

  • Mary Poppins
  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,740
Re: Missing files referred to in .pigg files
« Reply #2 on: April 21, 2014, 04:23:55 PM »
costume.bin contains all of the options present in the costume editor. The structure of that file is actually included in the EXE at byte offset 0x00BB81D0, which looks like this when converted to something human-readable:

Code: [Select]
<schema>

<struct name="root">
    <entry name="Costume" type="STRUCT" struct="root.Costume" array="dynamic" />
</struct>

<struct name="root.Costume">
    <entry name="Name" type="STRING" />
    <entry name="Origin" type="STRUCT" struct="root.Costume.Origin" array="dynamic" />
</struct>

<struct name="root.Costume.Origin">
    <entry name="Name" type="STRING" />
    <entry name="Filename" type="CURRENTFILE" />
    <entry name="BodyPalette" type="STRUCT" struct="root.Costume.Origin.BodyPalette" array="dynamic" />
    <entry name="SkinPalette" type="STRUCT" struct="root.Costume.Origin.BodyPalette" array="dynamic" />
    <entry name="PowerPalette" type="STRUCT" struct="root.Costume.Origin.BodyPalette" array="dynamic" />
    <entry name="Region" type="STRUCT" struct="root.Costume.Origin.Region" array="dynamic" />
    <entry name="CostumeSet" type="STRUCT" struct="root.Costume.Origin.CostumeSet" array="dynamic" />
    <entry name="GeoData" type="STRUCT" struct="root.Costume.Origin.GeoData" array="dynamic" />
</struct>

<struct name="root.Costume.Origin.BodyPalette">
    <entry name="Color" type="STRUCT" struct="root.Costume.Origin.BodyPalette.Color" array="dynamic" />
    <entry name="Name" type="STRING" />
</struct>

<struct name="root.Costume.Origin.Region">
    <entry name="Name" type="STRING" />
    <entry name="Filename" type="CURRENTFILE" />
    <entry name="DisplayName" type="STRING" />
    <entry name="Keys" type="STRING" array="dynamic" />
    <entry name="BoneSet" type="STRUCT" struct="root.Costume.Origin.Region.BoneSet" array="dynamic" />
    <entry name="StoreCategory" type="STRING" />
</struct>

<struct name="root.Costume.Origin.CostumeSet">
    <entry name="Name" type="STRING" />
    <entry name="Filename" type="CURRENTFILE" />
    <entry name="DisplayName" type="STRING" />
    <entry name="NPCName" type="STRING" />
    <entry name="Keys" type="STRING" array="dynamic" />
    <entry name="ProductList" type="STRING" array="dynamic" />
</struct>

<struct name="root.Costume.Origin.GeoData">
    <entry name="Name" type="STRING" />
    <entry name="Filename" type="CURRENTFILE" />
    <entry name="ShieldXYZ" type="F32" array="fixed" elements="3" />
    <entry name="ShieldPYR" type="F32" array="fixed" elements="3" />
</struct>

<struct name="root.Costume.Origin.BodyPalette.Color">
    <entry name="" type="F32" array="fixed" elements="3" />
</struct>

<struct name="root.Costume.Origin.Region.BoneSet">
    <entry name="Name" type="STRING" />
    <entry name="Filename" type="CURRENTFILE" />
    <entry name="DisplayName" type="STRING" />
    <entry name="Keys" type="STRING" array="dynamic" />
    <entry name="Product" type="STRING" />
    <entry name="Flags" type="STRING" array="dynamic" />
    <entry name="GeoSet" type="STRUCT" struct="root.Costume.Origin.Region.BoneSet.GeoSet" array="dynamic" />
    <entry name="Legacy" type="INT" />
    <entry name="COV" type="INT" />
    <entry name="COH" type="INT" />
</struct>

<struct name="root.Costume.Origin.Region.BoneSet.GeoSet">
    <entry name="DisplayName" type="STRING" />
    <entry name="BodyPart" type="STRING" />
    <entry name="ColorLink" type="STRING" />
    <entry name="Keys" type="STRING" array="dynamic" />
    <entry name="Flags" type="STRING" array="dynamic" />
    <entry name="Product" type="STRING" />
    <entry name="Type" type="INT" />
    <entry name="AnimBits" type="STRING" array="dynamic" />
    <entry name="ZoomBits" type="STRING" array="dynamic" />
    <entry name="DefaultView" type="F32" array="fixed" elements="3" />
    <entry name="ZoomView" type="F32" array="fixed" elements="3" />
    <entry name="FourColor" type="INT" />
    <entry name="NoDisplay" type="INT" />
    <entry name="Info" type="STRUCT" struct="root.Costume.Origin.Region.BoneSet.GeoSet.Info" array="dynamic" />
    <entry name="Mask" type="STRUCT" struct="root.Costume.Origin.Region.BoneSet.GeoSet.Mask" array="dynamic" />
    <entry name="Masks" type="STRING" array="dynamic" />
    <entry name="MaskNames" type="STRING" array="dynamic" />
    <entry name="Legacy" type="INT" />
    <entry name="Face" type="STRUCT" struct="root.Costume.Origin.Region.BoneSet.GeoSet.Face" array="dynamic" />
    <entry name="COV" type="INT" />
    <entry name="COH" type="INT" />
</struct>

<struct name="root.Costume.Origin.Region.BoneSet.GeoSet.Info">
    <entry name="DisplayName" type="STRING" />
    <entry name="GeoName" type="STRING" />
    <entry name="Geo" type="STRING" />
    <entry name="Tex1" type="STRING" />
    <entry name="Tex2" type="STRING" />
    <entry name="Fx" type="STRING" />
    <entry name="Product" type="STRING" />
    <entry name="Keys" type="STRING" array="dynamic" />
    <entry name="Tag" type="STRING" array="dynamic" />
    <entry name="Flags" type="STRING" array="dynamic" />
    <entry name="DevOnly" type="INT" />
    <entry name="COV" type="INT" />
    <entry name="COH" type="INT" />
    <entry name="COHV" type="INT" />
    <entry name="IsMask" type="INT" />
    <entry name="Level" type="INT" />
    <entry name="Legacy" type="INT" />
</struct>

<struct name="root.Costume.Origin.Region.BoneSet.GeoSet.Mask">
    <entry name="Name" type="STRING" />
    <entry name="displayName" type="STRING" />
    <entry name="Keys" type="STRING" array="dynamic" />
    <entry name="Product" type="STRING" />
    <entry name="Tag" type="STRING" array="dynamic" />
    <entry name="Legacy" type="INT" />
    <entry name="DevOnly" type="INT" />
    <entry name="COV" type="INT" />
    <entry name="COH" type="INT" />
    <entry name="COHV" type="INT" />
</struct>

<struct name="root.Costume.Origin.Region.BoneSet.GeoSet.Face">
    <entry name="DisplayName" type="STRING" />
    <entry name="Head" type="F32" array="fixed" elements="3" />
    <entry name="Brow" type="F32" array="fixed" elements="3" />
    <entry name="Cheek" type="F32" array="fixed" elements="3" />
    <entry name="Chin" type="F32" array="fixed" elements="3" />
    <entry name="Cranium" type="F32" array="fixed" elements="3" />
    <entry name="Jaw" type="F32" array="fixed" elements="3" />
    <entry name="Nose" type="F32" array="fixed" elements="3" />
    <entry name="COV" type="INT" />
    <entry name="COH" type="INT" />
</struct>

</schema>

The top-level structure, "Costume", contains settings for Male, Female and Huge body types.

The next structure, "Origin", contains costume parts for generic costumes, Arachnos Soldier and Arachnos Widow.

Next is "Region", which are the individual "Head", "Upper Body", etc. regions within the costume.

Next is "BoneSet", which corresponds with "Half Helmets", "Tops with Skin", etc.

Next is "GeoSet", which corresponds with "Hair", "Chest", "Boots", etc.

Last is "Info", which is the actual costume part in question. Each costume part is defined, in its most basic form, as a GEO asset, a base texture, and an optional mask texture ("Angelic", "Dagger", "Blend", etc.). The available mask textures are defined in GeoSet.Masks.

If a texture begins with an exclamation mark, it refers to a "trick" rather than a literal texture filename. Tricks are shader directives that the game engine uses to apply material attributes to surfaces rather than map images directly. That's sort of a discussion in its own right, however.

wandererBC

  • Underling
  • *
  • Posts: 4
Re: Missing files referred to in .pigg files
« Reply #3 on: April 23, 2014, 02:22:42 AM »
Interesting!  :D  Any chance you could post the full various .bin files (Costumes, Powers, NPCs, etc.  I'm not sure of all of them as I don't have my COH install on this machine.).  in human readable form, or let us know how to get them that way ourselves (Preferably without a lot of hex editing.).

Anyways, thanks for the info.  ;D