LANGUAGE alias for Player.DisplayName?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: LANGUAGE alias for Player.DisplayName?

Re: LANGUAGE alias for Player.DisplayName?

by Graf Zahl » Sat Oct 03, 2015 5:18 pm

Ok, forgot about that. It's still broken beyond repair, though.

Re: LANGUAGE alias for Player.DisplayName?

by Grubber » Sat Oct 03, 2015 12:25 am

Graf Zahl wrote:The entire player class selection is done via display name. If that gets replaced by a LANGUAGE lookup it'd all fall apart.
I have no idea why Grubber implemented it this way as it's completely stupid.
Yes you do. Do I have to remind you every 5 years? :-)

(Sorry for bumping the thread.)

Re: LANGUAGE alias for Player.DisplayName?

by Ed the Bat » Fri Aug 28, 2015 8:50 am

That would be just fine with me. I'd even retract my feature suggestion from last year to make Tag default to DisplayName, if it would be considered the new 'proper' method for nice names.

Re: LANGUAGE alias for Player.DisplayName?

by Xaser » Fri Aug 28, 2015 8:25 am

I'd be all for such a change. It'd remove a persistent thorn for sure.

Re: LANGUAGE alias for Player.DisplayName?

by Graf Zahl » Fri Aug 28, 2015 4:48 am

I think you are correct. The best option would probably be to officially deprecate the 'displayname' property, wrap all accesses into some functions, add a new property solely for display and use the class name in other places and the old 'displayname' only in the places where it's necessary but fall back to the class name if none is specified. But that'd require some serious thinking.

Re: LANGUAGE alias for Player.DisplayName?

by Arctangent » Fri Aug 28, 2015 4:30 am

Perhaps this could be better resolved by the addition of Player.NiceName or making Tag functional on player classes, which will override the name on the menu if defined? It's definitely kind of silly that that's a direction this would be required to take, but the simpler option is clearly unavailable due to poor implementation.

Re: LANGUAGE alias for Player.DisplayName?

by Ed the Bat » Fri Aug 28, 2015 1:57 am

Ah, I see. How disappointing... :(

Re: LANGUAGE alias for Player.DisplayName?

by Graf Zahl » Fri Aug 28, 2015 1:55 am

That's basically fine. The language lookup is only used in the menu.
The problem I was talking about is that I cannot retroactively change current player names because it'd break all mods out there, for the simple reason that some parts of the code use the 'display'-name for identification purposes - and expose this to some definition lumps!

Re: LANGUAGE alias for Player.DisplayName?

by Ed the Bat » Fri Aug 28, 2015 1:26 am

I do just what I was hoping to see done to DoomPlayer (and the other internal player classes)
In LANGUAGE:

Code: Select all

[enu default]
MYPLAYERNAME="My Player";
In DECORATE:

Code: Select all

ACTOR NewPlayer : PlayerPawn
{
	Player.DisplayName "$MYPLAYERNAME"
	...
}
I've seen no problems so far, but if you know of something I should be looking for...

Re: LANGUAGE alias for Player.DisplayName?

by Graf Zahl » Fri Aug 28, 2015 1:23 am

What precisely do you do?

Re: LANGUAGE alias for Player.DisplayName?

by Ed the Bat » Fri Aug 28, 2015 1:15 am

I'll have to take your word for it, then... So would you recommend I not use LANGUAGE for my classes' names?

Re: LANGUAGE alias for Player.DisplayName?

by Graf Zahl » Fri Aug 28, 2015 1:14 am

The entire player class selection is done via display name. If that gets replaced by a LANGUAGE lookup it'd all fall apart.
I have no idea why Grubber implemented it this way as it's completely stupid.

Re: LANGUAGE alias for Player.DisplayName?

by Ed the Bat » Fri Aug 28, 2015 12:46 am

What kind of things would break? I've successfully made player classes that reference a LANGUAGE string in their DisplayName, and didn't notice problems. What should I be looking out for?

Re: LANGUAGE alias for Player.DisplayName?

by Graf Zahl » Fri Aug 28, 2015 12:44 am

Sadly not. Despite the term 'Displayname' this property is used for other purposes as well which should have been using the class name in the first place.
I'd really like to change this design bug, but that'd break pretty much any player mod out there.

Re: LANGUAGE alias for Player.DisplayName?

by Ed the Bat » Thu Aug 27, 2015 6:47 pm

Excellent point; I forgot to even consider that.

Top