[CF-Devel] bug in the keyword-matching code

Andreas Vogl andi.vogl at gmx.net
Tue Apr 10 07:51:03 CDT 2001


Mark W. wrote:
>
     
      > When I put a phrase *before* the keyword, there is no
     
     >
     
      > longer a match. This is a bad bug!
     
     >
     
      >
     
     >
     
      > Example: The keyword is "open", in a magic_ear.
     
     >
     
      >
     
     >
     
      > - When I say "open", there is a match.
     
     >
     
      > - When I say "open the gate", there is a match.
     
     >
     
      > - When I say "dude open", there is NO match.
     
     >
     
     
     >
     
      Problem is no one really knows all the working of that code (the matching
     
     >
     
      code, which is really in regex I think).
     
     >
     
     
     >
     
      This is not something I want to look into right now.  I think the entire
     
     >
     
      conversation stuff needs to get redone at some point.
     
     >
     
     
     >
     
      I think the regex currently in crossfire is actually fairly out of date,
     
     >
     
      and certainly has a few custom hacks.  It should probably get
     
     redone/updated,
>
     
      but I don't really want to touch that right now - if even some obscure bug
     
     >
     
      in new code, that could really break a fair number of maps.
     
     
If you don't want to waste time on this issue, it's okay.
But I just wanted to make clear that this bug in fact does brake a lot
of maps already.
Take the map "/pup_land/lone_town/guild_freedom" for example. In a quest
(Tower of Ordeal), the player is told to speak "let's protect nature" to
the reception guy in guild_freedom. But because of the
apostrophy-compatibility
problem, the magic_ear matches only for "protect nature".
With the current code, there is no longer a match for speaking the correct
keywords.
I believe there are quite many cases like this one. Unfortunately,
Mark, you are right about the matching code being a mess.
If it's too hard to fix the code, should I try to change those maps?


Andreas V.


    
    


More information about the crossfire mailing list