Jump to content


Photo

Auto-Emit INSERT/DELETE_BYTES


  • Please log in to reply
1 reply to this topic

#1 japheth

japheth

    Codewalker

  • Member
  • 317 posts

Posted 06 September 2002 - 09:50 AM

Hey Wes, is it possible to take the --cmp-from X --cmp-to X a step further and have it so that if the files happen to be different sizes, WeiDU will not only do the WRITE_BYTES, but will also do the INSERT/DELETE_BYTES as well?

This would be nice to have if you make a bunch of changes to an existing area/item/spell etc, and you want to incorporate it into a tp2 file.

Just a thought.
Check out BG1Tutu.

#2 weimer

weimer
  • Member
  • 1569 posts

Posted 06 September 2002 - 10:51 AM

This is a complicated theoretical problem for which a number of different algorithmic solutions have been proposed.

If you are not familiar with this area, you can compare it to spell-checking. One file is the "wrong word the user typed in" and the other file is the "correct word from the dictionary".

To see why this problem might be difficult, consider:

miset
limitless

You should able to come up with at least four different and "equally" valid ways to transform miset into limitless using "insert letter", "delete letter" and "change letter".

If you try to find the "smallest set of changes needed" the task is computationally difficult (related to the length of the word) *and* you will probably still end up with two different "minimal" solutions.