grep -v "\[Guild\]\|\[NPC\]\|\[Tell\]\|\[Group\]" <charname>_chat.txt
The -v options is known to me. That would not allow the option of turning the logging on and off but simply clean out all incidences of Guild and Alliance entries. A guild war, for example, may want to be logged for IC reasons.
The strong reaction to my request makes me wonder if it is a technical issue or a political one.
Sorry, was really only a suggestion how to deal with it. I usually like it better to have all available information in my logs (an that includes even stupid OOC crap) and choose afterwards what I want to look at. That's why I prefer the grep method which doesn't touch my original logs at all and keeps all infos in them. Who knows what funny flame tells I may get that are worth posting in the OL forums for the enjoyment of others if I have my logging for tells turned off.
Oh..and just because I am too stupid to get it...how can anything in guildchat or alliancechat be IC at all?
But I agree that sometimes an option to choose more precisely what to log would be nice. Not really hard to do at all. It would only need a few additions in the src/client/gui/chatwindow.cpp file. In the pawsChatWindow::LoadChatSettings() it could be loaded from the chat.xml file what channels should be logged. Something like this would do the trick:
...
else if (nodeName == "LogNPCChat")
settings.logNPCChat = option->GetAttributeValueAsBool("value", true);
else if (nodeName == "LogGuildChat")
settings.logGuildChat = option->GetAttributeValueAsBool("value", true);
else if (nodeName == "LogGroupChat")
settings.logGroupChat = option->GetAttributeValueAsBool("value", true);
else if (nodeName == "LogTellChat")
settings.logTellChat = option->GetAttributeValueAsBool("value", true);
else if (nodeName == "LogAllianceChat")
settings.logAllianceChat = option->GetAttributeValueAsBool("value", true);
else if (nodeName == "LogHelpChat")
settings.logHelpChat = option->GetAttributeValueAsBool("value", true);
else if (nodeName == "LogChannelChat")
settings.logChannelChat = option->GetAttributeValueAsBool("value", true);
...
The pawsChatWindow::SaveChatSettings() would of course also need some adjusting to write back the values in the xml file:
...
npcChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
npcChatLogNode->SetValue("LogNPCChat");
npcChatLogNode->SetAttributeAsInt("value",(int)settings.logNPCChat);
guildChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
guildChatLogNode->SetValue("LogGuildChat");
guildChatLogNode->SetAttributeAsInt("value",(int)settings.logGuildChat);
groupChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
groupChatLogNode->SetValue("LogGroupChat");
groupChatLogNode->SetAttributeAsInt("value",(int)settings.logGroupChat);
tellChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
tellChatLogNode->SetValue("LogTellChat");
tellChatLogNode->SetAttributeAsInt("value",(int)settings.logTellChat);
allianceChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
allianceChatLogNode->SetValue("LogAllianceChat");
allianceChatLogNode->SetAttributeAsInt("value",(int)settings.logAllianceChat);
helpChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
helpChatLogNode->SetValue("LogHelpChat");
helpChatLogNode->SetAttributeAsInt("value",(int)settings.logHelpChat);
channelChatLogNode = optionNode->CreateNodeBefore(CS_NODE_ELEMENT,0);
channelChatLogNode->SetValue("LogChannelChat");
channelChatLogNode->SetAttributeAsInt("value",(int)settings.logChannelChat);
...
The struct ChatSettings in the chatwindow.h file had to be expanded:
...
bool logNPCChat;
bool logGuildChat;
bool logGroupChat;
bool logTellChat;
bool logAllianceChat;
bool logChannelChat;
...
The pawsChatWindow::LogMessage method would need some logic to detemine if this message should be logged at all:
...
if ((((type == CHAT_NPC) || (type == CHAT_NPC_ME) || (type == CHAT_NPC_MY)) && !settings.logNPCChat) ||
((type == CHAT_GUILD) && !settings.logGuildChat) || ((type == CHAT_GROUP) && !settings.logGroupChat) ||
((type == CHAT_TELL) && !settings.logTellChat) || ((type == CHAT_ALLIANCE) && !settings.logAllianceChat) ||
(((type == CHAT_ADVISOR) || (type == CHAT_ADVICE)) && !settings.logHelpChat) ||
((type == CHAT_CHANNEL) && !settings.logChannelChat)) return;
...
With this you could already change the logging behaviour when editing the text files and restarting the game. But I guess not what you wanted so pawsconfigchat.h and pawsconfigchat.cpp had to be edited also to enable some check boxes for what to log.
pawsconfigchat.h:
...
pawsCheckBox* logNPCChat;
pawsCheckBox* logGuildChat;
pawsCheckBox* logGroupChat;
pawsCheckBox* logTellChat;
pawsCheckBox* logAllianceChat;
pawsCheckBox* logChannelChat;
...
pawsconfigchat.cpp / pawsConfigChat::pawsConfigChat():
...
logNPCChat = NULL;
logGuildChat = NULL;
logGroupChat = NULL;
logTellChat = NULL;
logAllianceChat = NULL;
logChannelChat = NULL;
...
pawsconfigchat.cpp / pawsConfigChat::PostSetup():
...
logNPCChat = (pawsCheckBox*)FindWidget("lognpcchat");
logGuildChat = (pawsCheckBox*)FindWidget("logguildchat");
logGroupChat = (pawsCheckBox*)FindWidget("loggroupchat");
logTellChat = (pawsCheckBox*)FindWidget("logtellchat");
logAllianceChat = (pawsCheckBox*)FindWidget("logalliancechat");
logChannelChat = (pawsCheckBox*)FindWidget("logchannelchat");
...
pawsconfigchat.cpp / bool pawsConfigChat::LoadConfig()
...
logNPCChat->SetState(settings.logNPCChat);
logGuildChat->SetState(settings.logGuildChat);
logGroupChat->SetState(settings.logGroupChat);
logTellChat->SetState(settings.logTellChat);
logAllianceChat->SetState(settings.logAllianceChat);
logChannelChat->SetState(settings.logChannelChat);
...
pawsconfigchat.cpp / bool pawsConfigChat::SaveConfig()
...
settings.logNPCChat = logNPCChat->GetState();
settings.logGuildChat = logGuildChat->GetState();
settings.logGroupChat = logGroupChat->GetState();
settings.logTellChat = logTellChat->GetState();
settings.logAllianceChat = logAllianceChat->GetState();
settings.logChannelChat = logChannelChat->GetState();
...
and at last you had to put the checkboxes, their positions and text in "data/gui/configchat.xml"
adding some lines like:
<widget name="lognpcchat" factory="pawsCheckBox">
<frame x="xxxx" y="yyyy" width="wwww" height="20" />
<text string="Log NPC-chat to file" />
</widget>
<widget name="logguildchat" factory="pawsCheckBox">
<frame x="xxxx" y="yyyy" width="wwww" height="20" />
<text string="Log Guild-chat to file" />
</widget>
<widget name="loggroupchat" factory="pawsCheckBox">
<frame x="xxxx" y="yyyy" width="wwww" height="20" />
<text string="Log Group-chat to file" />
</widget>
<widget name="logtellchat" factory="pawsCheckBox">
<frame x="xxxx" y="yyyy" width="wwww" height="20" />
<text string="Log tells to file" />
</widget>
<widget name="logalliancechat" factory="pawsCheckBox">
<frame x="xxxx" y="yyyy" width="wwww" height="20" />
<text string="Log Alliance-chat to file" />
</widget>
<widget name="logchannelchat" factory="pawsCheckBox">
<frame x="xxxx" y="yyyy" width="wwww" height="20" />
<text string="Log Channel-chat to file" />
</widget>
The xxxx, yyyy, wwww had to be replaced with useful value of course...
So, no it's no problem to include this in game at all..also not in a way that doesn't annoy anyone as they can keep exactly the behavior they have right now and only get some more options. But of course you won't get this..some dev will come up with a stupid reason why there is no time to do this and that there are more important things that need to be done. Next time better ask for a change that adds some colorful effect or something else that attracts more noobs to the game..you have a much higher chance to get something like this implemented than asking for something that actually could be useful. But stay for some time and you will find this out on your own. And don't listen to people like Akkaido...almost every post of him is just about telling others why they don't need what they ask for instead of giving it any thought at all. But that attitude makes him a prefect candidate for the PS team.
Edit:
- Added one line
- Typos