Page 1 of 2

abbreviate player names in hud

PostPosted: Sun Apr 03, 2011 11:40 pm
by nurssbetty
Can you abbreviate the player names as they appear in the hud to only three characters?

Re: abbreviate player names in hud

PostPosted: Mon Apr 04, 2011 2:25 am
by tarix
In the Statistic Repository search for "Player Short".

Re: abbreviate player names in hud

PostPosted: Mon Apr 04, 2011 3:28 am
by WhiteRider
Those stats shorten it to 5 characters – if you want to change it 3 you can change the Format Expression of the stat.
Tutorial: Custom Reports and Statistics

Re: abbreviate player names in hud

PostPosted: Tue Apr 05, 2011 12:00 am
by nurssbetty
thanks,
after i found it, it asks if i want to save it and where to. then, how does it get incorporated into my hud?

Re: abbreviate player names in hud

PostPosted: Tue Apr 05, 2011 3:25 am
by WhiteRider
The "how do I add a stat?" link at the top of the Get More page explains how to import a stat into PT3. Once the stat has been imported you will be able to add to your HUD (although if the HUD is running you will need to stop the import first).

Re: abbreviate player names in hud

PostPosted: Tue Apr 05, 2011 5:49 am
by Parket
Great. Was wondering about this myself yesterday.
Really should start looking into those custom stats... seems awesome. Is it possible to add an ellipsis (...) if the player name gets truncated ? So 'Jan50' would show as 'Jan50' but 'MegaDonkPlayer' would show up as 'MegaD...' ?

Re: abbreviate player names in hud

PostPosted: Tue Apr 05, 2011 9:20 am
by kraada
That should be doable by editing the format expression of the stat to include something like + format("...").

Re: abbreviate player names in hud

PostPosted: Mon Jun 06, 2011 5:07 am
by duvelman
Hi,

This does not seem to work for player names that consist only of numbers since apparently the trim function performs a format_number when the first argument is a number, i.e. when the player name is a number, it shows the whole number with a komma after the first n digits instead of only showing the first n digits.

I looked at the documentation, but I cannot find how I can easily solve this. Could you point me in the right direction?

Thanks

Re: abbreviate player names in hud

PostPosted: Mon Jun 06, 2011 9:11 am
by kraada
Set the decimals to -1 in the statistics properties for that stat when it's in the HUD and that should fix it I think.

Re: abbreviate player names in hud

PostPosted: Mon Jun 06, 2011 10:31 am
by duvelman
kraada wrote:Set the decimals to -1 in the statistics properties for that stat when it's in the HUD and that should fix it I think.


Thanks kraada, that did the trick!

highfalutin