Author Topic: Chat Overhaul - 3 small mods in one!  (Read 5778 times)

Chat Overhaul v2.2
What the f#@% is this for?
-You are able to mute other users with the use of a button!
-It plays a sound when someone chats
-Saves chat to a log file, log file changeable with a press of a button!
-IT IS CLIENT SIDED!

Ok I got the addon, what do I do now?
-To mute other users, press whatever key you assigned to Open GUI in Chat Overhaul in options, type their FULL NAME in the box and press mute! To unmute them do the same but with the unmute button.
-To make a new log file, press whatever key you assigned to Open GUI in Chat Overhaul in options, type the FULL PATH in the box, and press new log file!

Seems nice! Can I download it?
Yeah, sure. The download link is here.  The DL link will hopefully be updated as soon as I update the addon.

Changelog:
v1.0: Added Addon
v2.0: Added nice GUI, Optimised the writeToLog function
v2.1: Improved the GUI
v2.2: Improved the GUI, once again :P

Images:

The GUI in action.

Please post your flames & hates. I know this addon is completely useless but I'm just learning coding and want to know your feedback on what should I do to improve (excluding not posting stuffty addons)
« Last Edit: December 03, 2013, 10:38:54 AM by Pencil42 »

while i appreciate the effort you've put into this, and it's probably your first mo-
I'm just learning coding
okay yeah anyway there's a few things i don't like about this
1: there are three mods already on rtb that already do this-
know this addon is completely useless
okay you've got that down too. i guess having them all in one is a good thing.

the biggest thing i don't like with this mod is that you force end users to use their console

this should never happen. make a gui, make a button, make one of the !command things, i don't really give a stuff (automated running all the time is the best option) but making a user use the console is the wrong solution.
and yes, it is easiest to you. we as modders make these mods with the end user in mind, if they don't get it or something and they aren't abnormally stupid, then we've done something wrong.

In the code, you can choose whether or not to notify if someone said something.
i missed this the first time through

forget no

forgetity forget no

we do not make the end user delve into the source code to change something

we make variables, we make a function that has to go in the console, anything but forcing them to modify the mod

option 0: do what you have now. wrong answer. really the wrong answer big time. like, if you're going to do this, at least tell them exactly what to change.
option a: gui. hard. wrong choice for you
option b: specify a variable for config, such as $PencilMod::showMutedNotifications = false; then have the end user type that in the console. better than 0, worse than a, easier than a.
option c: use a ! command. best option for this mod and your skill level probably

while i appreciate the effort you've put into this, and it's probably your first mo-okay yeah anyway there's a few things i don't like about this
1: there are three mods already on rtb that already do this-okay you've got that down too. i guess having them all in one is a good thing.

the biggest thing i don't like with this mod is that you force end users to use their console

this should never happen. make a gui, make a button, make one of the !command things, i don't really give a stuff (automated running all the time is the best option) but making a user use the console is the wrong solution.
and yes, it is easiest to you. we as modders make these mods with the end user in mind, if they don't get it or something and they aren't abnormally stupid, then we've done something wrong.

i missed this the first time through

forget no

forgetity forget no

we do not make the end user delve into the source code to change something

we make variables, we make a function that has to go in the console, anything but forcing them to modify the mod

option 0: do what you have now. wrong answer. really the wrong answer big time. like, if you're going to do this, at least tell them exactly what to change.
option a: gui. hard. wrong choice for you
option b: specify a variable for config, such as $PencilMod::showMutedNotifications = false; then have the end user type that in the console. better than 0, worse than a, easier than a.
option c: use a ! command. best option for this mod and your skill level probably




Thanks for the feedback! I will try making a gui, if that fails I'll make a few more of those !commands :)

could you put in the op that this is client sided mod


function writeToLog(%msg){
   %file = new FileObject();
   %file.openForRead("config/clf.txt");
   %logPath = %file.readLine();
   %file.close();
   %file.delete();
   
   %file1 = new FileObject();
   %file1.openForAppend(%logPath);
   %file1.writeLine(%msg);
   %file1.close();
   %file1.delete();
}

every time you want to write to a file, you open another file to get the file path, then open the file path file to write to it??

You can easily make this more efficient by:
storing the file path in a variable
not opening and closing a new file object each time you write a line

Thanks for the feedback! I will try making a gui, if that fails I'll make a few more of those !commands :)

I like you
you seem very pleasant

could you put in the op that this is client sided mod


function writeToLog(%msg){
   %file = new FileObject();
   %file.openForRead("config/clf.txt");
   %logPath = %file.readLine();
   %file.close();
   %file.delete();
   
   %file1 = new FileObject();
   %file1.openForAppend(%logPath);
   %file1.writeLine(%msg);
   %file1.close();
   %file1.delete();
}

every time you want to write to a file, you open another file to get the file path, then open the file path file to write to it??

You can easily make this more efficient by:
storing the file path in a variable
not opening and closing a new file object each time you write a line

I got to the proble-
I'll just put that on top of the code so it saves the variable. I'll hopefully update it along with the GUI :)

EDIT: Alright, this is done, now I need to figure out how to do the GUI
« Last Edit: December 01, 2013, 04:50:47 AM by Pencil42 »

Just a heads up, your mute script would work a lot better if it blocked users by their BL_ID instead of their name. This is because all one would have to do to circumvent your mute system is change their handle.

option a: gui. easy, but requires training and creativity. if you want to create a gui you should reserve a few days to learn how to use the gui editor.
fixed

Updated! I added a GUI and optimised the writeToLog(); function.



Not bad! Keep working at it, you have potential.

Some small things:
 - You're storing settings in a text file. An easier way to do this is to simply use variables that are prefixed by $Pref::Client::. They will be automatically saved and loaded.
 - Since this is a client-sided mod, direct your config to config/client/whatever.


Some tips for your gui

1.
make the buttons bitmap buttons and the image
base/client/ui/button1 or base/client/ui/button2
this is what most of the buttons in blockland use and will make it look nicer

2.
you also don't need all that extra space and can compact it a bit

3.
instead of a close button make the x close it out
you can do this by setting the window's closeCommand to pop the dialog