Open MrDadosz opened 5 years ago
you can rewrite chat yourself using dx,cef or cegui like some dayz server did it
and add features which you want
I know,I can rewrite everything but it doesn't make sense. Chat in MTA is good but it lacks several functions and you can customize it in the game's settings. That would improve every server, not only mine.
I agree that the chat input could do with some improvements.
Having done server console input improvements recently I am going to look at this one as well.
Support for basic selection manipulation and copy / paste keyboard shortcuts would be awesome too... :wink:
I personally think chat should be totally redone with more functions for server owners to customize it.
Total rewrites are unnecessary!
Total rewrites of 13+ year old code are.
No, it is not. It almost never is. Refactor whenever you can because before you know it you'll be breaking more than you want and you'll spend more time fixing bugs/being feature complete than you would otherwise have. As a famous man once said:
It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time.
Joel Spolsky wrote a great post on this matter, I suggest you give it a read. https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
I'm sorry but that's complete bull crap no matter how you take it. Not only do yo have in mind what could be improved over the previous system but there is also more collective experience to do a newer one. Refactoring old code ends up with a very poor, and unstable product a large chunk of the time.
Okay Cody. I'm sure your vast experience means more than what helpful people are trying to tell you. Clearly you're the expert.
Guys, I'm not saying which one of you is right because actually you both might be - this particular topic (rewrite vs refactor of legacy codebases) has been discussed by many individuals and companies over the world with different conclusions and it is not an easy and obvious problem. There is no silver bullet, it all depends on varying factors.
It seems however that you two don't like each other and you're starting to make the atmosphere toxic which might be discouraging for many current and potential contributors :) Why so serious? There is always a way to make discussions calm, fun and definitely more fruitful. Please either change the tone of your discussion or don't discuss publicly at all (especially if you hate each other). Thanks in advance :)
Explaining more deeper. making it behave just like the console functionality as mentioned. those also are rare ways used by people using their keyboards that's much useful. CTRL + A selects everything written, CTRL/Hold + Left/Right Arrows would make you travel faster within your text, Shift + Left/Right Arrows going to select the chosen direction to select faster, CTRL + A /+/ CTRL + X going to delete the sentence and copy it. those are so useful within all servers overall if they get implemented.
Up and down arrows to traverse through history (like in F8 console) would also be useful — if for example you write a message that’s too long for /say, or you've been blocked from posting a message because you did it too quickly after a previous message, instead of having to rewrite all of it, you would open up the chatbox, press up and shorten it down or post again, etc.
It would be also nice that you could select & copy text that was written on the chatbox. Also, what is the function of showing the cursor when chat is open if you can't do anything with it? Weird.
Can't we somehow use a CEGUI EditBox?
Maybe chat should be rewritten as default resource instead? Just like scoreboard is implemented as resource. Modern multiplayer mods have chats implemented as external scripts.
By implementing it as resource scripters could easily tweak it to own needs.
Maybe chat should be rewritten as default resource instead? Just like scoreboard is implemented as resource. Modern mutliplayer mods have chats implemented as external scripts.
By implementing it as resource scripters could easily tweak it to own needs.
I think that's a bad idea.
Maybe chat should be rewritten as default resource instead? Just like scoreboard is implemented as resource. Modern mutliplayer mods have chats implemented as external scripts. By implementing it as resource scripters could easily tweak it to own needs.
I think that's a bad idea.
Could you elaborate on why you think it's a bad idea from your standpoint? For me personally I'm mostly concerned over the performance but at the same time it would make it more easy for servers to customize. However there is no reason either why we can't have such a resource in place that you could use over the MTA version either way.
It would be a big change for existing servers. Certainly not something you'd do on a whim. I don't recommend refactoring it out of MTA at this point.
Could you elaborate on why you think it's a bad idea from your standpoint? For me personally I'm mostly concerned over the performance but at the same time it would make it more easy for servers to customize. However there is no reason either why we can't have such a resource in place that you could use over the MTA version either way.
Firstly, performance. I'm pretty sure that a resource that manages the Chat will perform worse than the current implementation.
Secondly, client configurations, they already exist. We should be looking for servers to be able to change the client chat instead.
Thirdly, backwards compatibility, and again, performance. Making showChat
into an exported function is slow. Imagine if you used in the past other functions (in my case I use one that I can't remember the name for calculating where I should put some DX elements). It would also requiere to manually add the export part for those functions, functions I will argue are used by every server.
For my liking, the scoreboard resource should be a part of MTA and not a resource. You already can create your own chat by simply using showChat(false) and making your own. We could add a copy of the chat as a resource, I wouldn't really mind that, but it'll probably be a waste of time.
It's always advised to not do this because it's slow (dxDrawText without rendertargets gets worse every character, even a simple sentence can drop 5fps). I can't see problems like these happening with the current chat implementation. Scoreboard isn't a good example either, it performs kinda poorly. It has some nice customization tho.
(I would be more inclined in making the F11 map into a resource, it behaves kinda weird sometimes, and it lacks translation making users that don't speak english ask how it works and why they can't see it even when open [they have alpha at 0%]).
Bump. MTA chat lacks of those features that would greatly enhance the user experience.
We can't currently select, delete, or edit individual words within a message without having to rewrite the entire message. This can be frustrating, specially when we're used to those features on other platforms.
It will undoubtedly make MTA chat a more user-friendly and efficient.
In my opinion default chat should not be part of mta, rather it should be resource. Now instead we focusing on adding features that you can't achive/are hard to achive in lua we are adding fancy feature that few people wants
a browser-based or even a CEGUI-based chat would do.
a browser-based or even a CEGUI-based chat would do.
In my opinion default chat should not be part of mta, rather it should be resource.
Valid points, but how do we proceed? Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?
Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?
first, make "default chatbox resource", ship it with mta, give ~3 years to migration, delete old chat from code ( make some option to test how server/client will work without build in mta chat )
Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?
first, make "default chatbox resource", ship it with mta, give ~3 years to migration, delete old chat from code ( make some option to test how server/client will work without build in mta chat )
Waiting for people to migrate doesn't make sense. It should automatically use that new chatbox resource in MTA servers after a certain version.
Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?
first, make "default chatbox resource", ship it with mta, give ~3 years to migration, delete old chat from code ( make some option to test how server/client will work without build in mta chat )
Waiting for people to migrate doesn't make sense. It should automatically use that new chatbox resource in MTA servers after a certain version.
mta should not touch resources folder at all, if you don't migrate after warnings, your problem. Browsers doing the same, they have 10000x greater user base, they can affect real businesses and they giving shorter window to migrate
If we want to finally overcome this problem, then it is time to develop a suitable solution. I personally think it wouldn't be a bad idea to remove the current implementation and import it as a default resource like the scoreboard, using CEGUI.
However, the owners of the servers should be given a lot of time to make the necessary changes and this would break backwards compatibility. Maybe it's best if we decide to refactor it, but we do it within the project so that the server owners don't have to make any changes.
Original issue
You can't now correct a typo at the beginning of a message and you have to delete everything, write it again or send a message with a typo. In the chat should be "|" character indicating position like in the console. You should be able to change location where you're typing with left/right arrow. If this idea were to be introduced, it would also be possible to remove characters by pressing the "Delete" key (but it should delete character after "|").
Almost every game has this option. Now sometimes is better to use console than chat, Chat should work exactly like a console, but introducing only this change would be a good improvement
Summary
MTA chat system could use some tweaking to make it more user-friendly.
Requested features
|