NPC Talk Responses output truncated to 36 characters, response numbers are left justified.
_Synopsis:_ This is an issue that hails back to the commit for a message/formatting update in August of 2014
Issue A A longer response (longer than 36 characters) is sent to the user when talking to an NPC, the response text is truncated. When this commit was created, many of the changes were to tabular output, formatting the output to conform to the bounds of the chart output. The same was done to the NPC talk responses, but some official server response lines are longer than 36 characters.
Issue B The second issue that arises from this, when there are more than 10 responses possible (it happens!), the numbers are left justified, when right justification is the norm for tabular number fields.
_Example of the issue_
As it happens, there is one NPC on Renewal servers that displays both issues with ease! On a renewal server, go to payon_in01, and talk to "Inventor Jaax" (5, 134) in the northwest corner of the room.
Part of the NPC conversation, that displays Issue B (happens first in the conversation, so B comes first... deal with it)
------ Responses (Inventor Jaax) -------
# Response
0 Quiver
1 Iron Arrow Quiver
2 Steel Arrow Quiver
3 Oridecon Arrow Quiver
4 Fire Arrow Quiver
5 Silver Arrow Quiver
6 Wind Arrow Quiver
7 Stone Arrow Quiver
8 Crystal Arrow Quiver
9 Shadow Arrow Quiver
10 Immaterial Arrow Quiver
11 Rusty Arrow Quiver
12 Holy Arrow Quiver
13 Cancel Chat
----------------------------------------
Inventor Jaax: Type 'talk resp #' to choose a response.
The Issue A occurance, where the response get truncated:
------ Responses (Inventor Jaax) -------
# Response
0 Store as many arrows in quivers as p
1 Purchase 1 quiver
2 Cancel
3 Cancel Chat
----------------------------------------
The truncated response here should be "Store as many arrows in quivers as possible"
_Info_ OS:
Ubuntu 16.04.1 LTS
Using the server distro, if that matters. Kernel issue from "uname"
4.4.0-42-generic GNU/Linux
Perl:
perl --version
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi (with 58 registered patches, see perl -V for more detail)
Copyright 1987-2015, Larry Wall
Openkore:
*** OpenKore what-will-become-2.1 ( version bc07ae7_2016-10-14 ) - Custom Ragnarok Online client
_Cause:_
In Commands.pm, the formatting code for the responses was changed from a formatted number choice, and "unlimited" text to the former, and a left-justified 35 character field for the response.
$msg .= swrite( "@< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", [$i, $talk{responses}[$i]]);
Both these format fields that draw from the array need to be altered. The first should be right-justified, and the latter should not have a character limit.
There are few situations where the response text is truncated, and in most cases it's cosmetic, but there is the potential for important information to be cut off in a longer response, and not presented to the user.
_Solution:_
No user-facing solutions for this. It's a bug fix that will require a minor tweak to the codebase.
On the developer side, two feature requests:
- Right justify the "talk" command's numeric response code output
- Don't truncate the response text that follows the numeric code
@ChrstphrR I don't agree that the response numbers column should be right aligned. All other lists in kore (ml, nl, pl, etc.) use left alignment. If you think that the number column should be right aligned, it should be done to all commands across the board.