Author Topic: Looking to install certain elements of FunkySwerve’s SIMtools (specifically the chat ignore function.)  (Read 860 times)

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0


               Anyone interested in posting a tutorial on how to insulate a PW’s players from jerks coming on, and spaming the shout channel, or harassing players via tells?
 
I know the SIMtool allows ignore functions. I am hoping to be able to install pretty much just this, and not have to install the whole thing.
 
Any help would be appreciated, both by me, the Av3’s players, and other PW’s out there, and their players, that may benefit from this.
               
               

               
            

Legacy_acomputerdood

  • Sr. Member
  • ****
  • Posts: 378
  • Karma: +0/-0


               i use nwnx_chat, and the configuration for it is only one file.  i can't import the SIMTools .erf right now to see what's included, but i'd wager all of his configuration is in one chat file.

i see there's a bunch of other stuff in it like nwnx_odbc and the like.  for very basic use, you probably don't need any of that.

my suggestion would be to start off with a vanilla nwnx_chat, and then look at SIMTools to see how FS does the stuff you want.
               
               

               
            

Legacy_Pearls

  • Full Member
  • ***
  • Posts: 194
  • Karma: +0/-0


               shout channel can be easily fixed without simtools with the onplayerchat event and get/setpcchatvolume, i dont use simtools so i cant offer any assistance with tells though
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0


               One of the server's ini settings is to disallow shouting.

http://nwn.wikia.com...i/Nwnplayer.ini

Or do you want to allow shouting for DM's?

If so, you could disable shouting and tells for all players EXCEPT dms in the OnChat event as Pearls said. You don't need NWNX to do this.
You can also disable selectively per player.
               
               

               
            

Legacy_Thayan

  • Sr. Member
  • ****
  • Posts: 435
  • Karma: +0/-0


               DMs can still send shouts even with the shout setting in the .ini set to disallow.
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0


               Well I am hoping to continue to allow shouting and tells. I would just like our players to be able to set a specific problem player to ignore.

I will take a look at nwnx_chat and see if that functionality is there. If not, I will see if I can extract just the chat portion of the SIMTool. Thanks for the suggestions all.
               
               

               
            

Legacy_Osv_1

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0


               With simtools there should be a config script that allows you to set the settings how you want to if I remember correctly. We used it on Halls of the World when we had it up.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0


               Did you managed what you were hoping to on this? Happy to help pinpoint the method to use, without having to install SIMTools.

Funky
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0


               Not yet, I have been a bit busy recently, but it's good to see you online again Funky, and I would welcome any help getting this aspect of your SIMTool installed.

Mostly, our module is already massive, so installing the whole thing would be a bit much for our needs, but the chat functions (particularially being able to ignore a specific individual in shout and tell) would be a tremendous insulation against idiots coming on and harassing people.
               
               

               


                     Modifié par Lazarus Magni, 17 décembre 2012 - 04:39 .
                     
                  


            

Legacy_Highv Priest

  • Full Member
  • ***
  • Posts: 170
  • Karma: +0/-0


               Ah we did the same thing for my mod. This is the code I used:
if(GetLocalInt(oNoob, "SPAMMER") > 0 && GetPCChatVolume() != TALKVOLUME_PARTY)
    {
    FloatingTextStringOnCreature("Please don't spam macros unless in party chat.", oNoob);
    SetPCChatMessage("");
    SetLocalInt(oNoob, "SPAMMER", GetLocalInt(oNoob, "SPAMMER")+1);
    DelayCommand(1.5, SetLocalInt(oNoob, "SPAMMER", GetLocalInt(oNoob, "SPAMMER")-1));
    return;
    }
    else
    {
    SetLocalInt(oNoob, "SPAMMER", GetLocalInt(oNoob, "SPAMMER")+1);
    DelayCommand(0.8, SetLocalInt(oNoob, "SPAMMER", GetLocalInt(oNoob, "SPAMMER")-1));
    }

That function stops someone from just spamming the hell out of shout by using a macro.(they can still hit the button every 2 seconds, but it has much less of an effect.)

if(GetStringLeft(sMessage, 8) == "!ignore:")
    {
    string sAccount = GetStringRight(sMessage, GetStringLength(sMessage)-8);
if(GetLocalInt(oNoob, "CHAT_IGNORE" + sAccount) == TRUE)
SetLocalInt(oNoob, "CHAT_IGNORE" + sAccount, FALSE);
else
    SetLocalInt(oNoob, "CHAT_IGNORE" + sAccount, TRUE);
    return;
    }

This function is the "simtool" chat ignore function that sets a certain account to be ignored for -tells-. VERY useful! Oh my god I loved the day I put this in. If they are set to ignore then it will remove it, if they aren't it applies it.

This function must then be tied to the Chat nwnx event.(The script name is shown in your nwnx.ini if I recall)

if (GetLocalInt(oTarget, "CHAT_IGNORE" + GetPCPlayerName(oPC)))//check for ignore
            {
                SetLocalString(oPC, "NWNX!CHAT!SUPRESS", "1");//mute em
                SendMessageToPC(oPC, COLOR_RED + GetName(oTarget)+" is ignoring you"+COLOR_END);//tell em
            }
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Lastly you said you didn't want people coming and shouting all they want on shout. In your OnPlayerChat event
just include these 2 routines:

object oPCs = GetFirstPC();
int nCount = 0;
while(GetIsObjectValid(oPC))
{
nCount++
oPCs = GetNextPC();
}
nCount /= 2;//If half of the PCs want this guy to shut up then we don't let him shout.
if(GetLocalInt(GetModule(),"shoutban"+GetPCPlayerName(oNoob)) >= nCount)
    {
        if(GetPCChatVolume() == TALKVOLUME_SHOUT)
        {
            SetPCChatVolume(TALKVOLUME_TALK);
            return;
        }
    }

That routine is the actual silencer which checks if HALF or more of the PCs in your mod have voted to silence him.

if(GetStringLeft(sMessage, 8) == "silence:")
    {
    string sAccount = GetStringRight(sMessage, GetStringLength(sMessage)-8);
    object oMod = GetModule();
    if(GetLocalInt(oMod, "VotedToSilence"+GetPCPlayerName(oNoob)+sAccount) == FALSE)
    {
    SetLocalInt(oMod, "shoutban"+sAccount, GetLocalInt(oMod, "shoutban"+sAccount)+1);
    SetLocalInt(oMod, "VotedToSilence"+GetPCPlayerName(oNoob)+sAccount, TRUE);
    }
    }

This routine is the silencer part of it. They type in the player account name to silence and if half or more of them vote(they each only get one vote) it will silence him until your local vars are cleared(usually server reset).
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0


               I don't want our players to have to vote, I simply want them to be able to ignore (on an individual basis) certain problem players (both in shout and in tell chat.)

The SIMTools allows this from what I recall from playing PoA, and this is the aspect of this tool I was interested in implementing (with out implementing the bulk package.)
               
               

               


                     Modifié par Lazarus Magni, 17 décembre 2012 - 07:38 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0


               Looks like HighV has already done most of the groundwork for you, though he's not showing some of the code involved, particularly with tell interception/checking. Anyway, here's the post I finsihed typing up before I reloaded the page to see his post. '<img'>
=============

You do know SIMTools is almost entirely just chat functions, right? The overhead involved with installing just !ignore/unignore will be nearly as great as installing the whole thing. The bigger potential issue is with compiling, since the identifiers in it are so numerous that it comes close to breaking the standard bioware compiler by itself, even before you add other module scripts on the events it uses. If you're already using an improved compiler, that's a non-issue.

Further, you can't use this particular method with the standard bioware chat event, for a couple of reasons. First, you need the player to be able to target his tormentor. That involves either having them being in the same area (not likely to be the case all that often, depending on mod size) and use of an item, which involves borrowing a LOT of other SIMTools architecture, or using tell targeting, which the default bioware chat event cannot do - only the NWNX-based chat event can. Likewise, you also need to be able to intercept and suppress offending tells, which the bioware event just can't do.

If you want to elaborate on your reasons for not wanting to use the whole scriptset, I could probably give you better advice, but using it all is by far the simplest approach, for reasons you'll see below.

There are two scripts you'll want to look at. fky_chat has the overall structure breaking down chat.


//::////////////////////////////////////////////////////////////////////////:://
//:: SIMTools V3.0 Speech Integration & Management Tools Version 3.0        :://
//:: Created By: FunkySwerve                                                :://
//:: Created On: April 4 2006                                               :://
//:: Last Updated: March 27 2007                                            :://
//:: With Thanks To:                                                        :://
//:: Dumbo - for his amazing plugin                                         :://
//:: Virusman - for Linux versions, and for the reset plugin, and for       :://
//::    his excellent events plugin, without which this update would not    :://
//::    be possible                                                         :://
//:: Dazzle - for his script samples                                        :://
//:: Butch - for the emote wand scripts                                     :://
//:: The DMFI project - for the languages conversions and many of the emotes:://
//:: Lanessar and the players of the Myth Drannor PW - for the new languages:://
//:: The players and DMs of Higher Ground for their input and playtesting   :://
//::////////////////////////////////////////////////////////////////////////:://
#include "fky_chat_inc"

void main()
{
//////////////////////////////////Declarations//////////////////////////////////
    object oPC = OBJECT_SELF, oTarget;// Speaker = oPC
    string sText, sLogMessage, sLogMessageTarget, sType, sSort;
    int nChannel, nTarget;
/////////////////////////Gather Message and Target Data/////////////////////////
    SetLocalString(oPC, "NWNX!CHAT!TEXT", Speech_GetSpacer()); // Query for chattext
    sText = GetLocalString(oPC, "NWNX!CHAT!TEXT"); // Get chattext
    nChannel = StringToInt(GetStringLeft(sText, 2)); // Get channel
    nTarget = StringToInt(GetSubString(sText, 2, 10)); // Target ID - Return value of -1 is no target. IE, not a tell/privatemessage
    sText = GetStringRight(sText, GetStringLength(sText) - 12);// Remove Target & Channel Info
    if( nTarget != -1 )// Acquire possible target
    {
        oTarget = Speech_GetPlayer(nTarget);
        sLogMessageTarget = "->" + GetName(oTarget) + "(" + GetPCPlayerName(oTarget) + ")";
///////////////////////////////////DM Stealth///////////////////////////////////
        if (GetLocalInt(oTarget, "FKY_CHAT_DMSTEALTH") && (oTarget != oPC)) {DoStealth(oPC, oTarget, sText, nChannel, sLogMessageTarget); return;}
    }
    sType = GetSubString(sText, 0, 1);//this is the primary sorting string, the leftmost letter of the text
///////////////////////////////Command Completion///////////////////////////////
    int nCompletion = GetLocalInt(oPC, "FKY_CHAT_COMMAND_COMPLETE");
    if (nCompletion) DoCommandCompletion(oPC, sText, nCompletion);
////////////////////////////////Speech Processing///////////////////////////////
    else if (sType == EMOTE_SYMBOL) HandleEmotes(oPC, sText, nChannel);//emotes - taken from Emote-Wand V1000 UpDate Scripted By: Butch (with edits)
    else if (sType == COMMAND_SYMBOL) HandleCommands(oPC, oTarget, sText, nChannel);//commands
    else if (sType == "/")// metachannels and languages
    {
        SetLocalString(oPC, "NWNX!CHAT!SUPRESS", "1");
        sText = GetStringRight(sText, GetStringLength(sText) - 1);
        sSort = GetStringLeft(sText, 2);
        if (ENABLE_LANGUAGES && sSort == "l ") HandleOneLiners(sText, oPC, nChannel);//must be a space after the /l
        else if (ENABLE_METACHANNELS && sSort == "m ") HandleMetaMessage(sText, oPC);//must be a space after the /m
        else if ((VerifyDMKey(oPC) || VerifyAdminKey(oPC)) && sSort == "v ") HandleVentrilo(sText, oPC);//must be a space after the /m
        else FloatingTextStringOnCreature(COLOR_RED+BADCHANNEL+COLOR_END, oPC, FALSE);
    }
    else if ((GetStringLowerCase(GetStringLeft(sText, 3)) == "dm_") && (VerifyDMKey(oPC) || VerifyAdminKey(oPC)))
    {
        //HandleDMTraffic(oPC, oTarget, sText);//this has been moved to a new script to allow compiler to digest it
        SetLocalObject(oPC, "FKY_CHAT_DMSHUNT_TARGET", oTarget);//these locals pass the needed values to the new script
        SetLocalString(oPC, "FKY_CHAT_DMSHUNT_TEXT", sText);
        ExecuteScript("fky_chat_dm_comm", oPC);
    }
    else HandleOtherSpeech(oPC, oTarget, sText, nChannel, sLogMessageTarget);
////////////////////////////////////Logging/////////////////////////////////////
    if (TEXT_LOGGING_ENABLED) DoLogging(oPC, sLogMessageTarget, nChannel, sText);
////////////////////////////////////Cleanup/////////////////////////////////////
    DoCleanup(oPC);
}

From that, you would want the command handling, which is done with HandleCommands. You can find that in fky_chat_inc. I'm not going to post the whole function here, since it's around 900 lines, but here's the beginning, which shows the switch architecture:


void HandleCommands(object oCPC, object oCTarget, string sCText, int nCChannel)
{
        string sSort, sTarget, sPlayer, sInvite, sKey, sNormalCase;
        int nText, nCount, nPos, nLang, nCheck;
        object oItem;
        location lLoc;
        SetLocalString(oCPC, "NWNX!CHAT!SUPRESS", "1");//suppress command speech no matter what, helps avoid circumvention of shout ban
        if (!GetIsDead(oCPC))
        {
            sNormalCase = GetStringRight(sCText, GetStringLength(sCText) - 1); //preserve caps for setname command
            sCText = GetStringLowerCase(sNormalCase);  //case insensitive
            WriteTimestampedLogEntry(sCText);
            sSort = GetStringLeft(sCText, 1);
            nText = FindSubString("a d h i l m p s t u w", sSort);
            switch (nText)       //0 2 4 6 8 101214161820
            {
                case -1: CommandRedirect(oCPC, 1); break;
    /*a*/       case 0:
                if (sCText ==  "anon")
                {
                    SetLocalInt(oCPC, "FKY_CHAT_ANON", 1);
                    SendMessageToPC(oCPC, COLOR_RED+ANON+COLOR_END);
                }
                else if (GetStringLeft(sCText, 2) == "an") CommandRedirect(oCPC, 2);
                else CommandRedirect(oCPC, 1);
                break;
    /*d*/       case 2:

The ignore functionality is here:


    /*i*/       case 6:
                if (sCText == "ignore")
                {
                    if (!GetIsObjectValid(oCTarget))//target verification - do they need to use the command targeter?
                    {
                        oCTarget = GetLocalObject(oCPC, "FKY_CHAT_TARGET"); //have they already used the targeter?
                        if (!GetIsObjectValid(oCTarget))
                        {
                            FloatingTextStringOnCreature(COLOR_GOLD+REQUIRES_TARGET+COLOR_END, oCPC, FALSE);//tell them
                            SetLocalString(oCPC, "FKY_CHAT_COMMAND", OBJECT_TARGET+COMMAND_SYMBOL + sNormalCase);//mark them for the targeter
                            if (!GetIsObjectValid(GetItemPossessedBy(oCPC, "fky_chat_target"))) CreateItemOnObject("fky_chat_target", oCPC);//give them a targeter if they need one
                            return;
                        }
                        else DeleteLocalObject(oCPC, "FKY_CHAT_TARGET");//variable cleanup
                    }
                    //if (((nCChannel == 4) ||(nCChannel == 20)) && GetIsObjectValid(oCTarget))//can now target with command targeter
                    if (GetIsPC(oCTarget))
                    {
                        if ((!VerifyDMKey(oCTarget)) && (!VerifyAdminKey(oCTarget)))//can't ignore DMs or Admins
                        {
                            if (oCPC != oCTarget)
                            {
                                sTarget = GetPCPlayerName(oCTarget);
                                if (GetLocalInt(oCPC, "FKY_CHT_IGNORE" + sTarget) == FALSE)
                                {
                                    sPlayer = GetPCPlayerName(oCPC);
                                    SetLocalInt(oCPC, "FKY_CHT_IGNORE" + sTarget, TRUE);//ignore list stored on PC ignoring
                                    SendMessageToPC(oCPC, COLOR_RED+IGNORE3+ sTarget + "."+COLOR_END);
                                    SendMessageToPC(oCTarget, COLOR_RED + sPlayer +IGNORE4+COLOR_END);
                                }
                                else FloatingTextStringOnCreature(COLOR_RED+IGNORE5+ sTarget + "!"+COLOR_END, oCPC, FALSE);
                            }
                            else FloatingTextStringOnCreature(COLOR_RED+IGNORE6+COLOR_END, oCPC, FALSE);
                        }
                        else FloatingTextStringOnCreature(COLOR_RED+IGNORE7+COLOR_END, oCPC, FALSE);
                    }
                    else FloatingTextStringOnCreature(COLOR_RED+PC_ONLY+COLOR_END, oCPC, FALSE);
                    //else FloatingTextStringOnCreature(COLOR_RED+IGNORE8+COLOR_END, oCPC, FALSE);
                }
                else if (GetStringLeft(sCText, 2) == "ig") CommandRedirect(oCPC, 8);
                else CommandRedirect(oCPC, 1);
                break;

Here's unignore:


    /*u*/       case 18:
                if (sCText ==  "unignore")
                {
                    //if (((nCChannel == 4) ||(nCChannel == 20)) && GetIsObjectValid(oCTarget))//can now be targeted with the command targeter
                    //{
                        if (!GetIsObjectValid(oCTarget))//target verification - do they need to use the command targeter?
                        {
                            oCTarget = GetLocalObject(oCPC, "FKY_CHAT_TARGET"); //have they already used the targeter?
                            if (!GetIsObjectValid(oCTarget))
                            {
                                FloatingTextStringOnCreature(COLOR_GOLD+REQUIRES_TARGET+COLOR_END, oCPC, FALSE);//tell them
                                SetLocalString(oCPC, "FKY_CHAT_COMMAND", OBJECT_TARGET+COMMAND_SYMBOL + sNormalCase);//mark them for the targeter
                                if (!GetIsObjectValid(GetItemPossessedBy(oCPC, "fky_chat_target"))) CreateItemOnObject("fky_chat_target", oCPC);//give them a targeter if they need one
                                return;
                            }
                            else DeleteLocalObject(oCPC, "FKY_CHAT_TARGET");//variable cleanup
                        }
                        if (GetIsPC(oCTarget))
                        {
                            sTarget = GetPCPlayerName(oCTarget);
                            if (GetLocalInt(oCPC, "FKY_CHT_IGNORE" + sTarget) == TRUE)
                            {
                                sPlayer = GetPCPlayerName(oCPC);
                                DeleteLocalInt(oCPC, "FKY_CHT_IGNORE" + sTarget);//ignore list stored on PC ignoring
                                SendMessageToPC(oCPC, COLOR_RED+UNIGNORE1+ sTarget + "."+COLOR_END);
                                SendMessageToPC(oCTarget, COLOR_RED + sPlayer+UNIGNORE2+COLOR_END);
                            }
                            else FloatingTextStringOnCreature(COLOR_RED+UNIGNORE3+ sTarget + "!"+COLOR_END, oCPC, FALSE);
                        }
                        else FloatingTextStringOnCreature(COLOR_RED+PC_ONLY+COLOR_END, oCPC, FALSE);
                    //}
                    //else FloatingTextStringOnCreature(COLOR_RED+UNIGNORE4+COLOR_END, oCPC, FALSE);
                }
                else if (GetStringLeft(sCText, 3) == "uni") CommandRedirect(oCPC, 8);
                else if (sCText ==  "unanon")
                {
                    DeleteLocalInt(oCPC, "FKY_CHAT_ANON");
                    SendMessageToPC(oCPC, COLOR_RED+UNANON+COLOR_END);
                }
                else if (GetStringLeft(sCText, 3) == "una") CommandRedirect(oCPC, 2);
                else CommandRedirect(oCPC, 1);
                break;


Lastly, there's the actual muting of the communication itself, which is done in HandleOtherSpeech, found at the bottom of fky_chat_inc:


void HandleOtherSpeech(object oHOPC, object oHOTarget, string sHOText, int nHOChannel, string sHOLogMessageTarget)
{
        string sHOTarget, sEscape;
        switch(nHOChannel)//all speech besides emotes, player commands, and metachannels - sort by channel
        {
////////////Player speaker channels from 1-14
/*talk*/    case 1:
            if (ENABLE_METALANGUAGE_CONVERSION)
            {
                if (GetStringLowerCase(sHOText) == "lol" )
                {
                    SpeakString(LOL);
                    SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");
                }
                else if (ENABLE_LANGUAGES) HandleTalkSpeak(sHOText, oHOPC);
            }
            else if (ENABLE_LANGUAGES) HandleTalkSpeak(sHOText, oHOPC);
            break;
/*shout*/   case 2:
            if (GetLocalInt(oHOPC, "FKY_CHT_BANSHOUT"))//check for shout ban
            {
                SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");//mute em
                SendMessageToPC(oHOPC, COLOR_RED+BANNEDSHT+COLOR_END);//tell em
            }
            else if (GetIsSpam(sHOText) && SPAMBLOCK_ENABLED && (!VerifyDMKey(oHOPC)) && (!VerifyAdminKey(oHOPC))) DoSpamBan(oHOPC, sHOText);//check for advertising spam
            break;
/*whisper*/ case 3:
            if (ENABLE_LANGUAGES) HandleTalkSpeak(sHOText, oHOPC, TALKVOLUME_WHISPER);
            break;
/*tell*/    case 4:
            sHOTarget = GetPCPlayerName(oHOPC);
            if (GetLocalInt(oHOTarget, "FKY_CHT_IGNORE" + sHOTarget))//check for ignore
            {
                SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");//mute em
                SendMessageToPC(oHOPC, COLOR_RED + GetName(oHOTarget)+ISIGNORED+COLOR_END);//tell em
            }
            //HandleDMTraffic(oHOPC, oHOTarget, sHOText, sHOLogMessageTarget, nHOChannel);//handles dm traffic and tell forwarding//now handled earlier
            DMTellForwarding(oHOPC, sHOLogMessageTarget, sHOText, nHOChannel); //check for tell options
            break;
/*party*/   case 6:
            if (ENABLE_LANGUAGES) HandlePartySpeak(sHOText, oHOPC);
            break;
/*dm*/      case 14:
            if (GetLocalInt(oHOPC, "FKY_CHT_BANDM"))//check for DM ban
            {
                SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");//mute em
                SendMessageToPC(oHOPC, COLOR_RED+BANNEDDM+COLOR_END);//tell em
            }
            if (DM_PLAYERS_HEAR_DM) DMChannelForwardToDMs(oHOPC, sHOText);//check for dm players hearing dm
            if (ADMIN_PLAYERS_HEAR_DM) DMChannelForwardToAdmins(oHOPC, sHOText);//check for admin players hearing dm
            break;
////////////DM speaker channels from 17-30
/*talk*/    //case 17:
/*shout*/   //case 18:
/*whisper*/ //case 19:
/*tell*/    case 20:
            //HandleDMTraffic(oHOPC, oHOTarget, sHOText, sHOLogMessageTarget, nHOChannel);//handles dm traffic and tell forwarding//now handled earlier
            DMTellForwarding(oHOPC, sHOLogMessageTarget, sHOText, nHOChannel); //check for tell options
            break;
/*party*/   //case 22:
/*dm*/      case 30:
            if (DM_PLAYERS_HEAR_DM) DMChannelForwardToDMs(oHOPC, sHOText); //check for dm players hearing dm
            if (ADMIN_PLAYERS_HEAR_DM) DMChannelForwardToAdmins(oHOPC, sHOText);//check for admin players hearing dm
            break;
        }
        if (ENABLE_PERMANENT_CHANNEL_MUTING && GetIsChannelSuppressed(nHOChannel) && (!VerifyDMKey(oHOPC)) && (!VerifyAdminKey(oHOPC)) && (GetIsPC(oHOPC) || (!PERMANENT_CHANNEL_MUTING_FOR_PC_ONLY))) SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");//if the channel is always suppressed then suppress it
        else if (DISALLOW_SPEECH_WHILE_DEAD && GetIsChannelDeadSuppressed(nHOChannel) && GetIsDead(oHOPC) && (!VerifyDMKey(oHOPC)) && (!VerifyAdminKey(oHOPC))) SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");//otherwise suppress it when they are dead if it is deadsuppressed
        else if (DISALLOW_SPEECH_WHILE_SILENCED && GetIsChannelSilencedSuppressed(nHOChannel) && GetIsSilenced(oHOPC) && (!VerifyDMKey(oHOPC)) && (!VerifyAdminKey(oHOPC))) SetLocalString(oHOPC, "NWNX!CHAT!SUPRESS", "1");//otherwise suppress it when they are silenced if it is silencedsuppressed
}

In conclusion, you can certainly manage to cut out just the ignore functionality, but it involves a lot of reinventing the wheel, and doesn't save you much overhead. I didn't even bother touching on the item which would allow you to target in-area without tells, since that would involve even more scripts, and a ton of extra work for little additional gain.

Funky
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0


               

FunkySwerve wrote...

You do know SIMTools is almost entirely just chat functions, right? The overhead involved with installing just !ignore/unignore will be nearly as great as installing the whole thing. The bigger potential issue is with compiling, since the identifiers in it are so numerous that it comes close to breaking the standard bioware compiler by itself, even before you add other module scripts on the events it uses. If you're already using an improved compiler, that's a non-issue.

Further, you can't use this particular method with the standard bioware chat event, for a couple of reasons. First, you need the player to be able to target his tormentor. That involves either having them being in the same area (not likely to be the case all that often, depending on mod size) and use of an item, which involves borrowing a LOT of other SIMTools architecture, or using tell targeting, which the default bioware chat event cannot do - only the NWNX-based chat event can. Likewise, you also need to be able to intercept and suppress offending tells, which the bioware event just can't do.

If you want to elaborate on your reasons for not wanting to use the whole scriptset, I could probably give you better advice, but using it all is by far the simplest approach, for reasons you'll see below.


We are  using the nwnx_admin tool for our chat event to give me (and our DMs) the ability to manually restart since I am not the host, and don't have that capacity (and sometimes I want or need to apply an update before the restart timer.

It sounds like this system might not be for us. As far as the reason for not wanting to install the whole thing... how many resources does it take up Funky? I was under the impression it was pretty large. Our mod is something on the order of 30k resrources strong in the base dev version, and for the server version 14,760. Pretty darn close to the 16k limit (unless I do some more juggling/cleaning, which ultimately will have a limit). So... I perfer not to install systems that are super resource intensive, when we only need a few of the capabilities.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0


               Well, let's see. It uses a sender creature for messages, for one utc. It packs 6 item utis, though arguably only two, the targeter and the ventrol device are critical. That's 7 so far. It packs 23 script files (nss), and 20 compiled scripts (ncs). That's 50 resources on the dot. Really not all that resource-intensive, in terms of mod resources. Nor is it a lot of mod overhead. The main pain is the compiling, like I said. You'll probably wind up using more than that just to add a set of areas to your mod.

Really, though, if you're using nwnx, resources should be a total non-issue for you. Have you seen virusman's resman plugin? It's short for resource manager, and it allows you to load additional resources on boot from a set of directories, rather than from a hak or the module. It is, in a word, brilliant. We have over 1k resources in our folders (almost all utis), but we can also use it to hot-load scripts while the server is running, to run with dm_execute. Of course, if you don't have access to your host computer directly, you'd have to get your host to install it, and grant you access to folders...something to discuss with them, perhaps.

Anyway, I hope that helps you to decide. You would need to install the chat plugin either way, but you can definitely do a pared-down version - it's just labor-intensive.

Funky
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0


               50 is a lot less than I was anticipating, this might be doable after all.

And yes we do use resman, no other way to get a 30k resource mod down below the 16k limit that I know of. We have over 15k resources utalized by resman. And yes as I mentioned I can juggle more around to free up more space if I need.

I do have ftp access, just not full access to the server (since our host also hosts other PWs).

Let me ask you this though, if I do install the full SIMTool, is there a way to disable certain functions? And in what way does the delay restart functions interact with the reset plugin?

I will take a look at this later this week (hopefully if I have time), and I am sure I will have questions. Thanks to everyone for their responses.