[MOD][UI] Squelch and Ignore Fix v1.0

Features:
- Fixes the /squelch and /ignore commands. They currently do not work fully without this mod. (only normally works if the player's name that you are squelching is already all lowercase.)

Notes:
This is a User-Interface mod, so it doesn't require anyone else to have it installed.

How to Install:

Extract the folder into the Mods directory for Demigod.
eg. C:\Program Files (x86)\Stardock Games\Demigod\bindata\mods

How to Enable:
Inside Demigod, and under the Mod Manager, simply enable the mod!

If you have problems, make sure that your directory setup is akin to:
C:\Program Files (x86)\Stardock Games\Demigod\bindata\mods\Squelch and Ignore Fix\mod_info.lua

Files modified (for mod conflict checking only):
lua\ui\game\chat.lua

Download here
or
Here

9,060 views 17 replies
Reply #1 Top

Ah... ui mod!  This is actually very useful then.  Thanks Chirmaya. 

Reply #2 Top

So umm.... now when i type " /ignore xxxx" it not display chat messages from a certain player in game?

Also: what does /squelch do?

Nobody from Stardock told us what these 2 things do or how to enable them.

Reply #3 Top

They are exactly the same ^_^ And yeah, /ignore JoeBuddyDude in chat. Do it again to un-ignore.

Reply #4 Top

Quoting Chirmaya, reply 3
They are exactly the same And yeah, /ignore JoeBuddyDude in chat. Do it again to un-ignore.

Thanks!k1

Reply #5 Top

Quoting Chirmaya, reply 3
They are exactly the same And yeah, /ignore JoeBuddyDude in chat. Do it again to un-ignore.

Thanks for the clarification.  Updated op mayhaps?  Thanks for all your work on mods Chirmaya.  I'm glad you still play dg and are willing to put the time into modding.  You too, morph.  Kudos!

Reply #6 Top

You too, morph. Kudos!

No not me.  Kudos to Chirmaya! I learned from him some very basic things.

:thumbsup:  

Reply #7 Top

Superb! k3

Reply #9 Top

Does the ignore for a particular player carry over from one game to the next?

Reply #10 Top

I don't believe it does, trigeminal. 

Chirmaya - do you know if it would be possible for us to edit the mod itself so that specific individuals would automatically be blocked?  I'm guessing no, but I am curious. 

Reply #11 Top

yes.  Open up hook\lua\ui\game\chat.lua and find this code:

 

function SetupIgnoreList()
    local armies = GetArmiesTable()
    local focus = armies.focusArmy
    for id, army in armies.armiesTable do
        -- Can't ignore yourself, as much as you may want to
        if id != focus and army.human then
            ignoredPlayers[string.lower(army.nickname)] = false
        end
    end
end

Now change the line that sets ignoredPlayers to false to instead read:

ignoredPlayers[string.lower(army.nickname)] = army.nickname=='IHateThisGuy' or army.nickname=='ThisGuyHasAPottyMouth' or army.nickname=='TalksTooMuch'
Reply #12 Top

Nice!  Glad you guys took the time to learn lua.  I'm so tempted now.  What's another language, after all.

Reply #13 Top

Won't this cause even more broken teamwork in game play?

Reply #14 Top

No it won't, However, irresponsible and excessive abuse of this mod on the part of the mod user him/herself would. :P

Reply #15 Top

Bumping for future reference - think I'm going to add this to the combined installer.

edit - hmm... this is apparently listed in the change log for Demigod 1.2.  Will have to test to see if the squelch command works without the mod.

Reply #16 Top

The ignoredPlayers list looks to be properly keyed and referenced with all lowercase values now.  It should work fine.

Reply #17 Top

Ah - ok then.  Saved me some testing time then.  Thanks!