PDA

View Full Version : Hat menu Tweak. HELP!


^^Marie^^
20 Feb 2009, 13:09
http://img21.imageshack.us/img21/3117/menuhattweakdb3.jpg

That was the best thing I got... but when I select the custom hat I only see a blank worm (even without the eyebrows).

-What I did:

Open this file ...\data\Tweak\WormAttachments.xml. In this file we can see about the hats, gloves, glasses... And also the many positions those accessories can have (When we right-click in the glove/hat/glasses while we set them, it changes of possition...):


<ContainerResources href='WXFE.A.Gloves.Spacesuit'/>
<ContainerResources href='WXFE.A.Gloves.Spacesuit.B'/>
<ContainerResources href='WXFE.A.Gloves.Spacesuit.G'/>
<ContainerResources href='WXFE.A.Gloves.Spacesuit.P'/>
<ContainerResources href='WXFE.A.Gloves.Terminator'/>
<ContainerResources href='WXFE.A.Gloves.White'/>
<ContainerResources href='WXFE.A.Gloves.White.Br'/>
<ContainerResources href='WXFE.A.Gloves.White.D'/>
<ContainerResources href='WXFE.A.Gloves.White.Y'/>
<!-- Custom hats -->
<ContainerResources href='WXFE.A.Hat.Aerith'/>
<!-- end of Custom hats -->
<ContainerResources href='WXFE.A.Hat.Afro'/>
<ContainerResources href='WXFE.A.Hat.Alien'/>
<ContainerResources href='WXFE.A.Hat.American'/>
<ContainerResources href='WXFE.A.Hat.American.Bl'/>
<ContainerResources href='WXFE.A.Hat.American.S'/>
<ContainerResources href='WXFE.A.Hat.American.Y'/>
<ContainerResources href='WXFE.A.Hat.Arabian'/>
<ContainerResources href='WXFE.A.Hat.Arabian.D'/>
<ContainerResources href='WXFE.A.Hat.Arabian.R'/>
<ContainerResources href='WXFE.A.Hat.Arabian.W'/>

I just added my hat like the others...

And now, I do write the "details" for "ContainerResources" tag. Just like the other hats have. I place it alphabetically sorted, in the first place of hats and after the last gloves "details":

<WXFE_AttachmentOffsets id='WXFE.A.Gloves.White.Y-1'>
<PositionOffset x='0' y='-25' z='0' />
<OrientationOffset x='0' y='0' z='0' />
<ScaleOffset x='1.4' y='1.4' z='1.4' />
</WXFE_AttachmentOffsets>
<!-- custom hats -->
<XContainerResourceDetails id='WXFE.A.Hat.Aerith'>
<Value href='WXFE.A.Hat.Aerith-0'/>
<Name>WXFE.A.Hat.Aerith</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<WXFE_WormAttachments id='WXFE.A.Hat.Aerith-0'>
<MeshID>Aerith</MeshID>
<FrontEndMeshID></FrontEndMeshID>
<MeshTextNameID>FETXT.Hat.Aerith</MeshTextNameID>
<Glasses>true</Glasses>
<Tash>true</Tash>
<Type>0</Type>
<Offsets href='WXFE.A.Hat.Aerith-1'/>
<FrontEndOffsets href='WXFE.A.Hat.Aerith-2'/>
<Lock>Lock.Hat.Aerith</Lock>
<Eyebrow>false</Eyebrow>
</WXFE_WormAttachments>
<WXFE_AttachmentOffsets id='WXFE.A.Hat.Aerith-1'>
<PositionOffset x='0' y='0' z='0' />
<OrientationOffset x='0' y='0' z='0' />
<ScaleOffset x='1' y='1' z='1' />
</WXFE_AttachmentOffsets>
<WXFE_AttachmentOffsets id='WXFE.A.Hat.Aerith-2'>
<PositionOffset x='0' y='0' z='0' />
<OrientationOffset x='0' y='0' z='0' />
<ScaleOffset x='1' y='1' z='1' />
</WXFE_AttachmentOffsets>
<!-- end of custom hats -->
<XContainerResourceDetails id='WXFE.A.Hat.Afro'>
<Value href='WXFE.A.Hat.Afro-0'/>
<Name>WXFE.A.Hat.Afro</Name>
<Flags>81</Flags>
</XContainerResourceDetails>

To do that, I just copied the details of a hat and changed the name of that hat to "Aerith".

Okay, now if we save the file and start the game, we'll see this thing in the hats menu:

http://img155.imageshack.us/img155/3742/menuhattweak2bq1.jpg

The hat name in the menu now is: FETXT.Hat.Aerith .... and it shows a blank worm:

http://img54.imageshack.us/img54/2659/menuhattweak3go5.jpg

By the way, I've my hat in Character and Objects folders as: HatAerith.xom, Aerith.xom in both folders.

I just found how to correct that, so coming back to the WormAttachments.xml, to the beginning of the file:

<?xml version='1.0' ?>
<xomArchive>
<xomObjects>
<XDataBank id='id-0'>
<Section>0</Section>
<!-- Custom hats -->
<StringResources href='FETXT.Hat.Aerith'/>
<!-- end of Custom hats -->
<ContainerResources href='WXFE.A.Glasses.3D'/>
<ContainerResources href='WXFE.A.Glasses.Elvis'/>

That string will include the name that must be shown in the menu.

Okay, now as always.. we write the "details" here, after <XDataBank> ends:

<ContainerResources href='WXFE.A.Mustache.Viking'/>
<ContainerResources href='WXFE.A.Mustache.Viking.Bk'/>
<ContainerResources href='WXFE.A.Mustache.Viking.G'/>
<ContainerResources href='WXFE.A.Mustache.Viking.R'/>

</XDataBank>

<!-- custom hats -->

<XStringResourceDetails id='FETXT.Hat.Aerith'>
<Value>Aerith</Value>
<Name>FETXT.Hat.Aerith</Name>
<Flags>64</Flags>
</XStringResourceDetails>

<!-- end of custom hats -->

Now we see the correct name, but worm will be blank:

http://img149.imageshack.us/img149/7694/menuhattweak4ui6.jpg

So... Im stucked at this point! Help!

_Kilburn
20 Feb 2009, 19:08
Hello there. :)



<MeshID>Aerith</MeshID>

This seems to be the faulty part, although I'm surprised it didn't crash. This isn't a valid mesh identifier, unless you know something I don't. As far as I know, you can't add mesh IDs without having to edit WORMS 4 MAYHEM.exe, which seems to be a bit tricky and unpractical.
Does your custom hat replace any existing model? If so, which one?

^^Marie^^
20 Feb 2009, 22:38
Merci Kilburn! =)

I'll keep searching a solution, but as you said I can find MeshID's in WORMS4MAYHEM.exe... that could be a possible solution, but not a smart one.

Posting here if I go further with this.

Laters!

^^Marie^^
21 Feb 2009, 17:23
Well, after 2 day of insomnia and many cups of coffee... I found a way to add custom hats to the hat's menu and still having the original ones.

First of all, this solution wasnt what I thought at first, cause we'll need to replace some .xom's (not accesories). So, maybe this is not the best solution but its a solution at all.

http://img232.imageshack.us/img232/4513/menuhattweak5.jpg

http://img9.imageshack.us/img9/5831/menuhattweak6.jpg

<WXFE_AttachmentOffsets id='WXFE.A.Gloves.White.Y-1'>
<PositionOffset x='0' y='-25' z='0' />
<OrientationOffset x='0' y='0' z='0' />
<ScaleOffset x='1.4' y='1.4' z='1.4' />
</WXFE_AttachmentOffsets>
<!-- custom hats -->
<XContainerResourceDetails id='WXFE.A.Hat.Aerith'>
<Value href='WXFE.A.Hat.Aerith-0'/>
<Name>WXFE.A.Hat.Aerith</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<WXFE_WormAttachments id='WXFE.A.Hat.Aerith-0'>
<MeshID>Factory.Proj.Donut</MeshID>
<FrontEndMeshID></FrontEndMeshID>
<MeshTextNameID>FETXT.Hat.Aerith</MeshTextNameID>
<Glasses>true</Glasses>
<Tash>true</Tash>
<Type>0</Type>
<Offsets href='WXFE.A.Hat.Aerith-1'/>
<FrontEndOffsets href='WXFE.A.Hat.Aerith-2'/>
<Lock>Lock.Hat.Aerith</Lock>
<Eyebrow>false</Eyebrow>
</WXFE_WormAttachments>
<WXFE_AttachmentOffsets id='WXFE.A.Hat.Aerith-1'>
<PositionOffset x='0' y='1' z='0' />
<OrientationOffset x='-180.5' y='0' z='0' />
<ScaleOffset x='1' y='1' z='1' />
</WXFE_AttachmentOffsets>
<WXFE_AttachmentOffsets id='WXFE.A.Hat.Aerith-2'>
<PositionOffset x='0' y='0' z='0' />
<OrientationOffset x='0' y='0' z='0' />
<ScaleOffset x='1' y='1' z='1' />
</WXFE_AttachmentOffsets>
<!-- end of custom hats -->
<XContainerResourceDetails id='WXFE.A.Hat.Afro'>
<Value href='WXFE.A.Hat.Afro-0'/>
<Name>WXFE.A.Hat.Afro</Name>
<Flags>81</Flags>
</XContainerResourceDetails>

Here we go:

<MeshID>Factory.Proj.Donut</MeshID>

We edit again our WormAttachments.xml and make sure you change inside MeshID's tags, from 'Aerith' to 'Factory.Proj.Donut'. This is a valid MeshID (not a MeshID at all, but a GraphicResourceID... I need to search for more valid ones, but there are a lot of them).

<WXFE_AttachmentOffsets id='WXFE.A.Hat.Aerith-1'>
<PositionOffset x='0' y='1' z='0' />
<OrientationOffset x='-180.5' y='0' z='0' />
<ScaleOffset x='1' y='1' z='1' />
</WXFE_AttachmentOffsets>

Why that numbers? Yes, I know... thats a foolish question but I noticed that 'our' hats have a relative position different of this Meshes, so its easier to correct it from here. Although, I noticed some problems when I try to correct the relative position with 3D Studio... but I'll have to investigate that problems/issues later.

When we have those 2 steps, we rename our hat as: "object_Donut.xom" and copy/paste/replace inside \data\Weapons\Custom.

IMPORTANT NOTE 1: AS WE ALWAYS DO... DONT FORGET TO BACKUP ALL FILES THAT YOU WANT TO EDIT.
IMPORTANT NOTE 2: I didnt have enough time to test this.... please report me some bugs/problems.

_Kilburn
22 Feb 2009, 08:45
I guess I'll have to share that with you, since keeping it for myself would make me a bit selfish.
There are 17 placeholders models in data\Theme\Custom, they are blank models that are loaded in game, but never used.

Bank06\B06_Det_Detail05.xom

Bank07\B07_Det_Detail01.xom
Bank07\B07_Det_Detail05.xom

Bank08\B08_Det_Detail01.xom
Bank08\B08_Det_Detail02.xom
Bank08\B08_Det_Detail03.xom
Bank08\B08_Det_Detail04.xom
Bank08\B08_Det_Detail05.xom

Bank09\B09_Det_Detail01.xom
Bank09\B09_Det_Detail02.xom
Bank09\B09_Det_Detail03.xom
Bank09\B09_Det_Detail04.xom
Bank09\B09_Det_Detail05.xom

Bank10\B10_Det_Detail02.xom
Bank10\B10_Det_Detail03.xom
Bank10\B10_Det_Detail04.xom
Bank10\B10_Det_Detail05.xom

The Mesh ID for each of those models is Dbb_dd, where bb is the BANK number and dd the DETAIL number. For instance, D08_02 is the Mesh ID for Bank08\B08_Det_Detail02.xom. Pretty easy, isn't it? :)

^^Marie^^
22 Feb 2009, 15:18
Thanks for your tips Kilburn, but this time I am ahead with that =P

I found that about Banks (but I didnt know about blank ones =P) and I tried do what I did... but with that meshes (BX_Y), but I found more bugs and problems that I expected... unfortunately, I still need to check for bugs (I found em)....

Anyway thanks for your support! I'll keep everyone updated about some new improvements!

... going to warm up some coffee =)