The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

[Mod] Enhanced Squelch/Chat

By on June 13, 2011 8:14:21 PM from Demigod Forums Demigod Forums

pacov

Join Date 02/2008
+182

Background

Demigod has had some issues with squelching and muting other players in chat.  Originally, you couldn’t squelch a player unless their name was all in lower case.  GPG released a patch way back that sorted that problem for us.  But, the system has never been all that friendly or easy to use on the fly.  That’s about to change thanks to miriyaka.

What’s it look like?

Here’s what happens when you type in /? in chat

List of commands

I’ll add a picture of how the ui looks when you run /pl later

What’s the point of the mod?

This mod simplifies the in game squelch/muting system and provides enhancements to the chat system.  It does the following:

  • Provides the ability to quickly squelch/mute players using a menu driven system
  • Provides the ability to quickly squelch/mute players using /s /i /squelch + player name
  • Creates a persistent list of players you’d like to see banned each game and mutes them at the start of the game
  • Creates a popup window at the start of a game so you know who you are muting in case you want to unmute them
  • Enables you to adjust the chat font size
  • Enables you to adjust the chat history timeout

The bottom line is that this mod enables you to quickly mute anyone in about 3-4 seconds without having to spell out the players entire name

Why make a mod?

It’s a logical addition that improves the Demigod UI.

What’s the most common use for this mod (or how should I use it?)

Open chat and type in /pl + enter.  Find the number associated with the player you want to mute.  Type /s + that number and hit enter.  Player is muted.  Type /s + that number to unmute

How do I use the mod?

Download the mod and run the installer.  Then, use the Demigod Mod manager to enable the mod. As this is a UI mod, all players DO NOT need to have this mod installed for you to use it.

Where can I download the mod?

http://www.box.net/shared/qyu2pdke456v7nojp71n

NOTE - You DO NOT need to download this version if you use the enhanced UI mod package.

 


Revision history

v1.0
- Release version – no changes from test release version 0.02
v0.02
- test release – minor change by miriyaka
v0.01
- Initial test release

Locked Post 19 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2011 8:14:27 PM from Demigod Forums Demigod Forums

NT

Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2011 11:26:11 PM from Demigod Forums Demigod Forums

Thanks for the mod guys. Great effort.

While we are on the topic of in-game chat - is there any way that the chat log from a game can be stored or associated with a replay as an alternate file? Or would a mod possibly be able to store a chat log and display it during a replay?

I think I asked you this the other day pacov, but cant remember...

Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2011 11:41:15 PM from Demigod Forums Demigod Forums

Funny you should mention this - I was chatting with Miri about this in another thread.  From what I understand, its possible to output the chat info to a log... but it would, unfortunately, contain a ton of other game logging info.  So, yes, you would be able to see team and all chat (not enemy chat) in the log, but its not going to be crystal clear to read without some sort of parsing of the file (eg a program/code that grabs every line starting with "CHAT" or something like that).  So, its not perfect, but it would get you that info... in an ugly form anyway. 

pie in the sky is a separate file that only includes game chat - but that one's in miri's court.  I don't know enough to figure that one out.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 1:47:11 AM from Demigod Forums Demigod Forums

100% not possible.  For very important security reasons, the game does not allow lua to just write to whatever files on disk it so pleases, and only the engine itself handles disk writing, making only two internal methods available to lua: preferences and log.  Preferences is great for saving things, but not so great for logging huge amounts of text.  The log works fine for that, but you just need a tool to sort through it, or you need to get used to running the game with the log window (/showlog) with only the 'custom' filter on, showing only '[CHAT]' (assuming you're running the other chat mod I just made).

Also, you might want to note at least the '/?' for help in the OP so people who are interested can find the ignore list, and the font size and window timeout options.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 2:13:21 AM from Demigod Forums Demigod Forums

Quoting miriyaka,
assuming you're running the other chat mod I just made

What? It's already made?

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 2:33:35 AM from Demigod Forums Demigod Forums

Well, it is now: http://code.google.com/p/nubletsupreme/downloads/detail?name=ChatLog.zip

Again, this doesn't hand you the chat on a silver platter, but it's the best that can be done without using an external tool to monitor memory or the log file.  The easiest way to save the chat is to use the log window (/showlog) and the custom filter with '[CHAT]', using CTRL+A and CTRL+C to copy all.  You probably want to run a log file as well, just in case you forget to switch to the log window before closing the game.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 1:23:43 PM from Stardock Forums Stardock Forums

Even if you don't have a need to squelch folks on a regular basis, please give the mod in the OP a try.  Feedback would be appreciated.  Thx.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 3:40:40 PM from Demigod Forums Demigod Forums

Hmm... When I enable that mod, I can squelch, etc. But if in match I am pressing enter button it opens chat (as expected), but if I don't write anything and I want to close it with "enter', it doesn't close. Thus forcing me to write at least something or forcing me to press "esc" to close it. Not sure why it's like that... Might try again later.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 3:58:34 PM from Stardock Forums Stardock Forums

I think that's related to the time outs for the chat box.  Those are settings you can tweak as well within the program (but I haven't toyed with them yet).  I'm pretty sure the chat dialog box will close on its own (without having to press escape), it just is taking longer than you are used to.  That might be something to tweak for a final version.  If I think of it, I'm going to toy around with it a bit after work tonight. 

oh - and if you want to see all the things the mod can current do, just press enter, then /? and then enter again - that will bring up all the command info.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 10:43:57 PM from Demigod Forums Demigod Forums

I moved the ToggleChat() call when enter is pressed into both the command condition and chat condition respectively, and didn't notice that it was also being called when there was no text at all.  Adding this below line 84 in chat.lua fixes that:

Code: c++
  1.         else
  2.             ToggleChat()
Make sure that else lines up with the 'if text ~= "" then' line above, and with the 'end' just below the pasted ToggleChat().

Or, just copy and re-paste the entire file from here: http://pastebin.com/iYxggZpH

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 11:26:30 PM from Demigod Forums Demigod Forums

Ah OK thx.  Do you think this will impact the dialog box that pops at the beginning of a game to show you who is squelched?  Just checking (I didn't review the code you updated in paste bin yet).  Let me know if you think this change requires me to retest. 

If you feel like adding any more comments or whatever to the lua, please do.  The more I learn the more likely I'll do a write up that nonprogrammers will likely be able to understand.  I know a lot of folks see our gibbering back and forth about code and just tune out.  But when I take the time to do some write ups, they are all ears.  Anyway, I'll compile an updated "beta" after work tomorrow.  So if you have any more ideas or w/e, just have it good to go by then and we'll have a near final release.  Thanks again!

oh - and if you want feeback of a more descriptive nature (eg I like the menu, but maybe you could...) - let me know.  I'm usually quite content to get a new mod... but I'm sure if I look it over a bit, I could come up with some suggestions.  That said - I don't want to take the time if you are pretty well satisfied already.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2011 12:21:18 AM from Demigod Forums Demigod Forums

No, this only affects the edit bar.

I'm open to suggestions, but I'm not too keen on doing anything really complicated like adding new UI windows for editing the things this mod allows to be changed via chat commands.  The reason I integrated it into the chat is because that took comparatively little effort, and everything it does is at least related to the chat system, and didn't require me to spend hours and hours learning about window controls.

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2011 4:14:13 PM from Demigod Forums Demigod Forums

OK.  New version created and uploaded.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2011 12:09:38 AM from Demigod Forums Demigod Forums

OK Miri - I'm going to bundle this up tomorrow - I've been working on other nerd modding stuff, so I haven't jumped back into this.  If you have any additional changes or think I need to do some testing, just say so.  Otherwise, I'll release a final version and update this thread as your official mod release page (unless you want to do that yourself - which you are welcome to).  So, tomorrow - new or updated mod thread... then added to enhanced ai mod... then added to combined installer.

Well actually, I doubt this is possible, but I do have 1 request.  This will sound a bit asinine, but I'll ask anyway.  Is there anyway to make it so I can mute myself?  I've had some games where I'm so tempted to complain and bitch about this or that.  I'd rather not behave that way - and "pulling the plug" on my chat ability would be great (eg because then I could (when I'm being more reasonable) kill my chat, and then if I get super annoyed, still say a bunch of crap without offending anyone).  That said, I'm guessing this could only be done if everyone had the mod installed.  But even if that's the case, it could still be useful.  Anyway, if that's something you could easily code (and tell me if it would only work for people with the mods installed), I'd appreciate it.  If its a hassle, then no worries. 

Ideally, I'd like to be able to look up my name with /pl and the /s [my number]

TIA

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2011 1:24:55 AM from Demigod Forums Demigod Forums

Even if I allowed you to mute yourself, other people would still be able to see what you typed, regardless of whether or not they have the mod installed.

 

If you include the mod in the Enhanced AI package, just make note of the /? help command somewhere in the description so people can figure out how to use it in-game.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2011 9:02:01 AM from JoeUser Forums JoeUser Forums

Quoting miriyaka,
If you include the mod in the Enhanced AI package, just make note of the /? help command somewhere in the description so people can figure out how to use it in-game.

yup - I'll make up some proper instructions, etc. 

Even if I allowed you to mute yourself, other people would still be able to see what you typed, regardless of whether or not they have the mod installed.

Ah - ok, then.  Looks like I'll release this today, then.  Thanks.

hmm... one other thought - any magical command that be dreamed up that makes it difficult to chat to accomplish the same Self mute goal?  For instance, if you resized chat window or made the font super small, or moved the window to somewhere its difficult to see. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2011 10:52:57 AM from Demigod Forums Demigod Forums

That's kind of a weird feature to have in a mod - if you don't want to chat, don't chat.  If you're so angry that you're chatting even when you don't think you should be, then you're probably not going to be deterred from turning your ability to chat back on anyway.

If you're dead set on crippling your ability to send chat messages, I guess you can comment out the entire 'else' block in the mod's bp.edit.OnEnterPressed override that actually sends the message.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2011 2:42:26 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
If you're dead set on crippling your ability to send chat messages, I guess you can comment out the entire 'else' block in the mod's bp.edit.OnEnterPressed override that actually sends the message.

OK - good to know.  I might code that in a private build for me at some point.  Thx.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2011 3:19:49 PM from Demigod Forums Demigod Forums

Final version is up.  Updated the OP.  Rolling out the changes to the enhanced ui mod now.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0000313   Page Render Time: