This is a general request of "allow mods to control/augment/filter chat messages" - and a possible proposal to do it via something like "game.do_not_print_broadcasted_chat_messages = true". This would then allow a scenario/mod to register an on_console_chat event handler, and manually do the player.print() augmented message.
A different possible way to implement this would be to have a on_deliver_chat_message event, which has a default handler that essentially calls player.print, and some option to remove the default handler.
Ideally the functionality would also cover /shout, /whisper, and /reply (i.e. some way of preventing them from being printed, and we could use on_console_command to implement the functionality ourselves), but those are less important to me (it would also be fine if the same overall option just prevented whisper and shout as well).
Also, Ideally, there would be a form of player.print that we could pass a "from_player" argument, so that /ignore would continue to work as expected.
This request is related to the on_pre_console_chat request: viewtopic.php?f=28&t=53976 But the suggested implementation is different enough that I thought that it deserved its own post. If forum admins feel differently, feel free to close this request.
For context as to why I want this functionality: in Biter Battles, we have three relevant forces, "north", "south", and "spectator". It is very helpful if we can augment messages to indicate who can see them. We already have "/north-chat", "/south-chat" and "/spectator-chat" commands, but it is annoying to use them every time, and many new players do not know/understand who can see their chats when they just send them normally (especially because the rules for spectators are confusing, depending on whether it is a "tournament mode" game or not). Thus it would be nice if we could always print out something like "(spectator) username (to all): message" vs "(to north)" etc.
Allow mods/scenarios to filter chat messages
Place to ask discuss and request the modding support of Factorio. Don't request mods here.
-
- Inserter
- Posts: 20
- Joined: Thu Dec 03, 2020 4:52 pm
- Contact:
Return to “Modding interface requests”
Jump to
- General
- ↳ Releases
- ↳ News
- ↳ General discussion
- ↳ Multiplayer
- ↳ Find Servers / Tools / Guides
- ↳ Show your Creations
- ↳ Videos
- ↳ Combinator Creations
- ↳ Mechanical Throughput Magic (circuit-free)
- ↳ Railway Setups
- ↳ Energy Production
- ↳ Medium/Big/Gigantic Sized Structures
- ↳ Fan Art
- ↳ Gameplay Help
- ↳ Spread the Word
- ↳ Off topic
- ↳ This Forum
- ↳ Celebration Party
- Support
- ↳ Gameplay Help
- ↳ Discover Factorio Wiki
- ↳ Discover Others Creations
- ↳ Discover Mods
- ↳ Discover Tools Around Factorio
- ↳ Technical Help
- ↳ Bug Reports
- ↳ Resolved for the next release
- ↳ Assigned
- ↳ Not a bug
- ↳ Pending
- ↳ 1 / 0 magic
- ↳ Duplicates
- ↳ Minor issues
- ↳ Desyncs with mods
- ↳ Won't fix.
- ↳ Resolved Problems and Bugs
- Factorio Direction
- ↳ Ideas and Suggestions
- ↳ Outdated/Not implemented
- ↳ Frequently Suggested / Link Collections
- ↳ Implemented Suggestions
- ↳ Implemented in 2.0
- ↳ Development Proposals
- ↳ Balancing
- Contributions
- ↳ Mods
- ↳ Download mods
- ↳ Mod portal Discussion
- ↳ Mods
- ↳ Mod Packs / Libs / Special Interest
- ↳ 5dim's mod
- ↳ Angels Mods
- ↳ Atomic Power
- ↳ Bob's mods
- ↳ DyWorld
- ↳ F.A.R.L
- ↳ Fentus Challenge & Tool Mods
- ↳ Logistic Train Network
- ↳ MoMods
- ↳ Reika's Mods
- ↳ Resource Spawner Overhaul
- ↳ Yuoki Industries
- ↳ PyMods
- ↳ Questions, reviews and ratings
- ↳ Modding Discussions
- ↳ Modding discussion
- ↳ Modding help
- ↳ Ideas and Requests For Mods
- ↳ Modding interface requests
- ↳ Implemented mod requests
- ↳ Already exists
- ↳ Won't implement
- ↳ Documentation Improvement Requests
- ↳ Resolved Requests
- ↳ Development tools
- ↳ Tools
- ↳ Mod and installation managers
- ↳ Cheatsheets / Calculators / Viewers
- ↳ Development tools
- ↳ Special interest mods and libraries
- ↳ Modding Development
- ↳ Multiplayer / Dedicated Server
- ↳ Multiplayer Board
- ↳ Archive
- ↳ Maps and Scenarios
- ↳ Translations
- ↳ Texture Packs
- ↳ Fan Art
- ↳ Wiki Talk
- ↳ To be sorted
- ↳ Campaign / Scenario suggestions