- Status Closed
- Percent Complete
- Task Type Bug Report
- Category
-
Assigned To
Roland Schulz - Operating System
- Severity Very Low
- Priority
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Attached to Project: PlaneShift
Opened by Qia Fask - 01.09.2008
Last edited by Steven Schwartfeger - 21.09.2008
Opened by Qia Fask - 01.09.2008
Last edited by Steven Schwartfeger - 21.09.2008
FS#2208 - Names appear in lowercase when using Tab to complete them
I often press Tab to finish off the name of players and NPCs, but for some reason the most recent version of PlaneShift makes the last names of NPCs appear as all lowercase letters.
For instance:
Allel + Tab = Allelia symiestra
Whereas before it would fill in the correct name:
Allelia Symiestra
Closed by Steven Schwartfeger
21.09.2008 04:57
Reason for closing:
Additional comments about closing:
21.09.2008 04:57
Reason for closing:
Additional comments about closing:
Nice.
Verified.
This I never knew before… seems talking to them puts their name in the tab list, or something; I thought it was only characters you had used /tell or similar on.
The problem is the fact that the function takes for granted that there is only one word (the firstname) and there isn't a surname. While this works with players which sends only their name it doesn't work with npc which sends name and surname.
The function right now changes all letters to downcase and then makes the first one upper (check in npcroom1 that also MaleEnki gets Maleenki)
There are two ways to fix this and so I've done two patches:
The first just searches for a space and then changes also the first letter after it to upper case, which is more similar to the idea of who implemented the function:
http://pastebin.ca/1190258
The second removes the name normalization which shouldn't be necessary as it's already done during char creation and so names like ABCDE AFIADK shouldn't get in game to begin with and all should be already like Male Enky:
http://pastebin.ca/1190259
IMHO the correct fix is the second one…
Steven Schwartfeger:
I try to interact with NPCs quite a lot, as they are after all supposed to be "real people". :p As such, I use Tab for their names a lot. Any name used in regular chat or /tell is added to the list of Tab names. It was only recently that the last name started going to lowercase.
weltall:
Great, thanks for the fast fix! :)
setting patch included
committed to trunk, r2159
Basically this commit reverted my (yes, buggy) patch for
FS#1278- weltall's first patch is the way to go imho.Could you have a look at it again?
I've tried what's examplained in
FS#1278and it still worked fine. the comparenocase seems enough to fix that bug.Try "/tell aCrAig hi".
"aCraig" will be added to the list of known names and every time you use "/tell a[tab]" you'll get "/tell aCraig". Not exactly broken, but still ugly.
Other games seem to do this by going through the list of close by or visible objects and selecting the one that most matches the prefix before the tab was pressed (giving priority to objects already interacted with recently) and then inserting that full name. Any prospect up to do this? Should be easy, just iterate through the proxylist and come up with the closest match. Bonus points for coding it so pressing tab multiple times finds the next likely object and so on.
ok now i can see it peeg strange that when i did it with an autotell it worked fine maybe it was because it was already in the list ok then the right fix is the first one but to me the real fix should be that the name shouldn't be sent at all with wrong case (so fixing this somewere else)
if i do /tell VENGEANCE hello i shouldn't get you tell VENGEANCE: hello
this fixes both peeg problem and what I've pointed out above: (pratically the normalization is done when the player inputs the name which is the only case when an unnormalized name can be input in the list)
that's not the right fix. it will only capitalize the first letter.
Wow, so many comments for a bug that I thought was very simple. :p
Thank you all for your work on it.
I would also like to see it so typing in "qI" + Tab will fill in "Qia". Currently if you mis-capitalise a word, it will not let you use Tab on it. It lets you if it is all lowercase, but not if you mis-capitalise some letter.
There is only the first letter to capitalize in the tells: you can't send a tell to Acraig Newfie for example it will send Newfie as text.
anyway there is another way to fix this, which is server based:
the name in this case is 100% secure to be correct as it's taken directly from the server (like how it happens for who receives the tell)
last patch also commited
Setting read to test, but hoping someone can test this as I lost track of all the things that were changed here :)
Now things are really broken ;)
Log in Acraig and Vengeance.
As Vengeance type "/tell Acraig Hi" and look at your Tells tab, you'll see "You tell Vengeance: Hi" but it should of course be "You tell Acraig: Hi". Also Acraig isn't added to the list of known names.
Acraig's Tell tab will read "Vengeance tells you: Hi" which is correct.
committed a fix which works and resolves the remaining issues to r2166
Thanks for all your work.