Reflexive Detecting in Meta Related Code
Posted: Fri Aug 07, 2009 12:25 am
All current map editors have the issue I'll be discussing in this topic; false positives.
When extracting tag meta, the map editor will find something it thinks is a reflexive and add it to an .xml file. This sounds fine when you're not considering the amount of false positives most map editors will output.
During my development of Pearl, I learned many ways of checking possible reflexives to get them as accurate as possible.
As an example, I'll use a snippet of an .xml file extracted using the latest Eschaton (0.8 )
Now how can there be a negative number of chunks?
There are a few simple checks you can apply to your code to make sure you're getting as much accuracy as possible:
1. Make sure the potential reflexive is inside the tag's meta section; it's value is greater than the tag offset, yet smaller than the tag offset plus the tag length.
2. Making sure that the reflexive modified by the map magic is greater than the current stream's position.
3. THIS IS A BIGGY! Make sure the suspected count is GREATER than zero. This will not allow things that look like chunks but have no count, or the count is negative, to be considered a reflexive.
That should do it!
When extracting tag meta, the map editor will find something it thinks is a reflexive and add it to an .xml file. This sounds fine when you're not considering the amount of false positives most map editors will output.
During my development of Pearl, I learned many ways of checking possible reflexives to get them as accurate as possible.
As an example, I'll use a snippet of an .xml file extracted using the latest Eschaton (0.8 )
Code: Select all
<Reflexive location="0x148C" chunkcount="-1101209351" translation="0x12D5F"/>
There are a few simple checks you can apply to your code to make sure you're getting as much accuracy as possible:
1. Make sure the potential reflexive is inside the tag's meta section; it's value is greater than the tag offset, yet smaller than the tag offset plus the tag length.
2. Making sure that the reflexive modified by the map magic is greater than the current stream's position.
3. THIS IS A BIGGY! Make sure the suspected count is GREATER than zero. This will not allow things that look like chunks but have no count, or the count is negative, to be considered a reflexive.
That should do it!