Warns/highlights allied faction members on profiles and attack pages (subtle lists)
Torn - Allied Faction Warning
This userscript helps prevent accidental attacks/muggings on players from factions your faction has diplomacy agreements with.
You can paste in your allied faction list (one faction per line), and the script will warn you whenever you view a player who belongs to one of those factions.
Features
Profile warning:
When you open a player profile, a clear banner appears if they’re in an allied faction.
Attack page warning:
Same banner appears on single-target attack pages.
Subtle list badges:
On attack/target lists, allied members get a small “Allied” pill next to their name (no aggressive highlighting or UI clutter).
Fast + polite:
Uses Torn’s official API only when needed and caches results to avoid spam.
How to configure
Visit any player profile or attack page.
Click “Configure allied factions.”
Paste your allied factions list in this format (one per line):
Faction Name 12345
Another Faction 67890
The script will extract the numeric IDs automatically.
API Key Info (important)
You will be prompted once for a Torn API key.
A limited/minimal-access key is enough.
The key is stored locally in your browser via Tampermonkey.
It is only used to call Torn’s official API and is never sent anywhere else.
Notes
This script is UI-only. It does not automate gameplay or perform actions for you.
If Torn changes page layouts, some list pages may need minor selector updates — report issues and they’ll be patched.
Changelog (paste into “Additional info” / “Changelog”)
0.3.3
Made list highlighting less aggressive:
Removed red side borders/row styling.
Badges now only attach next to real player names.
Ignores tooltip/hovercard XIDs to prevent false positives.
Avoids attaching to profile pics or action icons.
Reduced list scan rate + tightened throttling.
0.3.2
Fixed “extra warnings” on list pages:
One highlight per XID per page.
List scanning disabled on single-target Profile/Attack pages.
Improved row/container detection.
0.3.1
Added support for attack pages + attack lists.
Improved allied list import (paste FactionName ID format).
Added author + contributor credits.
0.2.0
Added paste-friendly allied list parsing.
Added config button UI.
Added caching to reduce API calls.
0.1.0
Initial release: profile-based allied faction warning.