Page 1 of 1

An issue with "Find" button on the global map [RESOLVED]

Posted: Sat Jun 17, 2017 2:38 am
by electrorobobody
"Find" button on the global map in Daggerfall Unity has an issue. Try searching for "Kingsly Manor" in province "Daggerfall"

Actual Result:
The find returns "Buckingsly Manor", making impossible to travel to "Kingsly Manor", unless you exactly know the location on the map

Expected Result:
Searching "Kingsly" should give priority to "Kingsly Manor" location as it does in the original Daggerfall

Daggerfall Unity Version 0.4.25, latest master branch on 2017-06-16

Re: An issue with "Find" button on the global map

Posted: Sat Jun 17, 2017 11:35 am
by R.D.
I can confirm.

Looks like the way Daggerfall works is it compares from the beginning of the place names. So "fall" won't turn up the city of Daggerfall, while it will in DF Unity, which checks whether the text is a part of the place name. Daggerfall does skip over the "The" at the beginning of many place names when making the comparison, though.

Re: An issue with "Find" button on the global map

Posted: Mon Jun 19, 2017 6:40 am
by Nystul
I consider dfunity search behavior superior to vanilla df. Though we need to fix this bug mentioned.
An easy way would be to search for exact name and use the current approach as a fallback when the exact name is not found.

edit: i fixed this bug by implementing the behavior pointed out above - issued a pull request - should be in next build ;)

Re: An issue with "Find" button on the global map

Posted: Mon Jun 19, 2017 11:48 am
by R.D.
An easy way would be to search for exact name and use the current approach as a fallback when the exact name is not found.
Yes, searching for an exact match first seems to be what Daggerfall does.
I consider dfunity search behavior superior to vanilla df.
It kind of depends in my opinion. DFUnity allows you to say, search for a word in the middle of the name and potentially get your match. But it also will, for example, find "Wayrest" if you search for "yre," which seems overly lenient to me. If it were up to me I think I would implement original DF behavior.

1. Look for exact match. If first four characters of the search input or the place name are "the ", skip past them.
2. If 1 failed, look for a match in the first "n" characters of the place names, "n" being the length of the search input. Again, skip over "the " if they are they are the first four characters.

Re: An issue with "Find" button on the global map

Posted: Mon Jun 19, 2017 12:43 pm
by Nystul
i haven't written the travelmap code myself, so I would like to keep the changes at a minimum.
maybe lypyl will come up with a even more sophisticated solution later.

for the moment - with these minimal changes - it works fine now with priorizing the exact name for search first ;)

Re: An issue with "Find" button on the global map

Posted: Wed Jun 21, 2017 10:46 pm
by electrorobobody
Thank you for the fix Nystul. I would agree with the minimal changes just fixing the showstopper.
This bug shows how "lucky" I am. I was playing with the quest engine. I wrote my own quest where PC is sent to a random location to meet King of Worms. And the first generated location was "Kingsly Manor". It is quite funny, as I expected all sort of bugs from the quest system, but later it appeared that my quest works with no issues after I started it again. And the only problem I met was the first location, which I was not able to find on the map.

Re: An issue with "Find" button on the global map

Posted: Wed Jun 21, 2017 11:00 pm
by Interkarma
Hey electrorobobody, I just realised I forgot to post a thank you for the bug report earlier. it was a good catch and I'm happy the community came to the rescue with a fix thanks to Nystul.

You guys rock. :)

Re: An issue with "Find" button on the global map

Posted: Thu Jun 22, 2017 4:33 am
by Narf the Mouse
I like this forum. :)

Re: An issue with "Find" button on the global map

Posted: Thu Jun 22, 2017 7:11 am
by Narf the Mouse
More relevant to this thread, the Find button in Classic also continues searching if you click "No". It just doesn't usually come up, because there isn't usually an alternative.

I don't know if it searches whole words or just part of words, though. It might just search whole words, as "X Manor" and "X Moor" can both come up on a search, if you click "No" on the first.