Actors with duplicate names (MH-Ziki)

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Actors with duplicate names (MH-Ziki)

Post by Barbie »

sektor2111 wrote:And if you call an iterator from another I cannot be sure what will happen when map has 3000+ actors.
If a map is dupe-free, my algorithm has the complexity of n² and therfore the error condition (more than 10,000,000 loops) is reached at TRUNC(SQRT(10^7))+1=3163. "MH-Andromeda-Ancient-Test1V" is such a candidate.

Recently I was able to read the export table from a map with duplicates with my Win32 executable, and on a first quick view that table was dupe free, too (beside the name table). I wonder where these duplicate Actors are hiding... :omfg:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Actors with duplicate names (MH-Ziki)

Post by sektor2111 »

So my way is much healthy and simple. Usually I do in game checks using default MH (no replacements) else items replaced won't return any duplicate as long as iterator hack is slower to prevent a crash.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Actors with duplicate names (MH-Ziki)

Post by Barbie »

Barbie wrote:Recently I was able to read the export table from a map with duplicates with my Win32 executable and on a first quick view that table was dupe free
I'm still on it...
Recently I used the »ut_packages_pas22« library to explore UT packages: that library also reads the tables only, and does not parse the data section. (Because UTPT is using this library also, I wasn't able to find duplicates with it neither.) Because the name and export tables of the package are dupe free, I'm now convinced that the duplicate Actors are within the data section. UCC.EXE respective the editor seem to parse this data section instead of relying on the export table.
The wiki describes the structure of a package file as follows:
  1. Header
  2. Name-Table
  3. Import-Table
  4. Data section
  5. Export-Table
Does anyone know how to parse the data section? I guess its a stream, and I don't need the details for each object; only its start and end and the offset of the name table index is of interest.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply