This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Blank WMO  (Read 1764 times)

Scytheria23

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 49
    • View Profile
Blank WMO
« on: July 04, 2015, 05:52:01 am »
Hi folks,

I wonder if anyone can help me by making (or explaining how to make) a blank WMO?  Essentially, one I can rename and use in a patch to easily remove unwanted WMOs from maps.  The idea is to replace an existing WMO file with one that has no mesh data.  I know noggit could remove them entirely, but I am editing some MOP maps which do not work in noggit.

I've tried creating a blank myself, but I'm lacking info on what to delete from a WMO file to leave just a header.  Everything I've tried just results in crashes.  I've used the same technique to remove unwanted M2s, which was easy, so I guess the same approach can work here.

Thanks in advance for your help/suggestions.
Scy
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

abdalrahman9

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 129
    • View Profile
Re: Blank WMO
« Reply #1 on: July 04, 2015, 09:33:51 am »
What i would do is just create a custom wmo with no vertices and just replace them that way. Using of course Mirror Machine.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

kojak488

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 351
    • View Profile
Re: Blank WMO
« Reply #2 on: July 06, 2015, 04:52:58 am »
Quote from: "abdalrahman9"
What i would do is just create a custom wmo with no vertices and just replace them that way. Using of course Mirror Machine.

Errors out when trying to convert a blank WMO, at least when I tried that in the past.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blank WMO
« Reply #3 on: July 06, 2015, 07:39:04 am »
Deleting everything should be quite fine. Have you tried looking in the wiki to see what the blocks mean? wowdev.wiki
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

abdalrahman9

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 129
    • View Profile
Re: Blank WMO
« Reply #4 on: July 06, 2015, 09:34:52 am »
Quote from: "kojak488"
Quote from: "abdalrahman9"
What i would do is just create a custom wmo with no vertices and just replace them that way. Using of course Mirror Machine.

Errors out when trying to convert a blank WMO, at least when I tried that in the past.
Well to tell you the truth, i never tried so i wasn't too sure. You could be right though

Quote from: "schlumpf"
Deleting everything should be quite fine. Have you tried looking in the wiki to see what the blocks mean? wowdev.wiki
Maybe if Scytheria tries it, he can tell us if it works or not.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Scytheria23

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 49
    • View Profile
Re: Blank WMO
« Reply #5 on: July 06, 2015, 01:55:23 pm »
I'm struggling to understand the WMO file structure to be honest.  I would prefer to use Noggit to remove the unwanted WMOs and M2s (a much cleaner method), but I'm also having trouble with some strange entry heights (on entering a modified map in-game, the camera defaults to a position high above the map and the character falls into infinity).  I know this is fixable (having read about similar issues being solved), but sadly, the ADT file structure is even less fathomable to me and unfortunately those who have marked their issues as solved have not specified how they solved them.

Does anyone know of a better guide to the ADT file structure?  I can see the 256 chunks clearly enough when I open one with a hex editor, but I've no idea what the rest means.

I'll keep plugging away and let you know of any progress.

Oh, and 'he' is a 'she'. :shock:
Scy
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blank WMO
« Reply #6 on: July 06, 2015, 03:30:28 pm »
both file structures are quite easy to follow if you see how chunked files work: always look at 4 bytes of chunk identifier, then a 4 byte size and size bytes data. eg {'MVER', 4, {17}}.

The ADT issue you reference is an error in MFBO chunks. To fix it, iterate chunks (look at 4 byte magic and check if correct one, look at 4 byte size and skip size bytes until your find the correct magic) until the first (and only) MFBO chunk. There, interpret the data given as described in http://wowdev.wiki/index.php?tit ... MFBO_chunk. To fix it without thinking about reality, let maximum be all the maximum value of a short (32767) and minimum -32767. To make the iterating easier, just look at the very end of the file, MFBO is one of the last ones, if not the last.
The 256 "chunks" of an ADT refer to the 256 MCNK chunks which have sub chunks. There, it will be [{'MCNK', size, {0x80 bytes of header, [more chunks of ]}}…].

I usually link my by now 8 years old guide about this topic: http://www.ownedcore.com/forums/world-o ... iting.html -- it probably is horrible by modern standards.

I will at some point install a filter that replaces all 'he' or 'she' by 'xhe' to avoid confusion.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Scytheria23

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 49
    • View Profile
Re: Blank WMO
« Reply #7 on: July 07, 2015, 12:28:14 am »
Many thanks for this information, Schlumpf.  I feel the issue is on the brink of resolution.

The offending MFBO information is, indeed, at the very end of the file and looks like this:

OBFM
$<bh:00><bh:00><bh:00>
<bh:f4><bh:01><bh:f4><bh:01><bh:f4><bh:01>
<bh:f4><bh:01><bh:f4><bh:01><bh:f4><bh:01>
<bh:f4><bh:01><bh:f4><bh:01><bh:f4><bh:01>
<bh:a6><bh:ff><bh:a6><bh:ff><bh:a6><bh:ff>
<bh:a6><bh:ff><bh:a6><bh:ff><bh:a6><bh:ff>
<bh:a6><bh:ff><bh:a6><bh:ff><bh:a6><bh:ff>

So, ok, I can now clearly see the three sets of numbers pertaining to the coordinates of the bounding planes.  I will try changing these to the max/min values you suggested. Unfortunately, I am about to head from Shanghai to the UK and won't be able to do this for another three weeks...

Once again, your patience and helpfulness is very much appreciated.
Scy
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blank WMO
« Reply #8 on: July 07, 2015, 01:05:56 am »
That MFBO should not be three sets of numbers but rather 2 time 3x3 values. The block you pasted does not exactly look like something a hex editor would output. What editor do you use?

Have fun in the UK.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Alastor

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1105
    • View Profile
Re: Blank WMO
« Reply #9 on: July 13, 2015, 10:21:00 am »
Open your ADTs in 010 Editor and load ADT template then remove WMOs

... Done
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
No matter how fast light travels it finds the darkness has always got there first and is waiting for it
Star Citizen Referral Code : STAR-XNFS-HVL9

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blank WMO
« Reply #10 on: July 13, 2015, 10:28:00 am »
Quote from: "Alastor"
Open your ADTs in 010 Editor and load ADT template then remove WMOs

... Done

This will result in the chunk size being wrong and if that is fixed, in MCRF still referencing the WMOs resulting in not exactly defined behavior. Wheey.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »