Wiki

๐Ÿ“– Item206 Wiki

Help and documentation for all features โ€“ no login required.

๐Ÿ“– Faction Features Help
What Are Faction Features?

The Faction section of Torn Hub gives you comprehensive tools for managing and analysing your faction:

  • Faction Overview โ€“ member list, status tracking, and live chain information.
  • Faction Stats โ€“ detailed table with live bars, cooldowns, and battle stats for all members.
  • War Payout Calculator โ€“ calculate fair payouts based on war performance, with saved reports and analytics.
  • Faction Settings โ€“ grant manager permissions to trusted members.

All data is stored in MySQL โ€“ no files are used. This improves performance and reliability.

๐Ÿด Faction Overview โ€“ Member List

The Faction page displays your faction's header (banner, name, tag, leader/coโ€‘leader, rank) and a sortable member list.

  • Sortable columns โ€“ click any column header (ID, Name, Level, Days, Position, Status, Last Action) to sort ascending/descending. Your sort preference is saved.
  • Status indicators โ€“ a coloured dot shows the member's current state (green = Okay, red = Hospital/Jail, orange = Traveling, yellow = Idle, etc.).
  • Countdown timers โ€“ for statuses with a duration (e.g., Hospital, Jail), a live countdown shows remaining time.
  • Last action โ€“ shows the member's last activity relative to now.
  • Row background โ€“ members inactive for more than 24 hours appear with a fading background.
  • Chain card โ€“ shows current chain progress, modifier, and countdown timer.

The member list is cached for 120 seconds (2 minutes). Use the Refresh button to manually update it (60โ€‘second cooldown).

Required scope: faction.

๐Ÿ“Š Faction Stats โ€“ Detailed Member Table

The Faction Stats page provides a comprehensive table with live bars, cooldowns, and battle stats for all members.

  • Bars & cooldowns โ€“ shown only for members who have opted in and set their share level appropriately (see Privacy section).
  • Battle stats โ€“ displayed as effective (bold) and raw (parentheses) values, with modifier percentages.
  • Sortable columns โ€“ click any column header to sort by that metric (e.g., total effective stats).
  • Stale data warning โ€“ if a member's stats are older than 300 seconds (5 minutes), they are flagged with a yellow or red badge.
  • Individual growth chart โ€“ click the ๐Ÿ“ˆ button next to a member's total effective stats to view their personal stats growth chart.
  • Chain card โ€“ shows current chain progress, modifier, and countdown timer.

This table refreshes automatically every 300 seconds for optedโ€‘in users via the background cron.

Required scopes: faction (for member list), bars & cooldowns (for live bars), stats (for battle stats).

โš”๏ธ War Payout Calculator

The War Payout Calculator helps you fairly distribute war rewards based on member performance. It has three tabs:

๐Ÿงฎ Calculate
  • Enter a Ranked War ID to fetch the war report from Torn.
  • Set a PAYPOOL โ€“ leave blank to autoโ€‘calculate ($1,000,000 ร— total attacks). Enter 0 to see payouts of $0 (useful for preview).
  • Choose payout mode:
    • By Score โ€“ distributes based on respect earned.
    • By Attacks โ€“ distributes based on number of attacks made.
  • Faction Comparison โ€“ shows your faction vs opponent with scores, attacks, respect, rank changes, and rewards.
  • Payout Table โ€“ displays each member's attacks, score, and rounded payout.
  • Opponent Top Scorers โ€“ shows the opponent's top performers.
  • Auto-save โ€“ reports are automatically saved to your faction's report history for later reference.
  • Clear Report โ€“ clears the current report from your session.

Deduplication โ€“ members are automatically deduplicated if the API returns duplicate entries.

๐Ÿ“‚ Saved Reports
  • Search โ€“ search saved reports by War ID, username, or payout mode.
  • Sortable columns โ€“ sort by War ID, Created By, Payout Mode, Paypool, Winner, or War Date.
  • Load Report โ€“ click ๐Ÿ“‚ Load to restore a saved report and continue working on it.
  • Delete Report โ€“ leaders and managers can delete reports using the ๐Ÿ—‘๏ธ button.
  • Pagination โ€“ reports are paginated (20 per page).

Who can use it:

  • Any faction member can view saved reports.
  • Only Leaders and Managers (as assigned in Faction Settings) can create new reports and delete existing ones.

Required scope: faction (to fetch the war report).

๐Ÿ“Š Participation Analytics
  • Overview โ€“ tracks member participation across all saved war reports for your faction.
  • Key Metrics:
    • Participation Rate โ€“ (Wars Fought / Wars Present) ร— 100%
    • Attacks Per War โ€“ total attacks / wars present
    • Score Per War โ€“ total score / wars present
  • Charts โ€“ visual breakdown of Attacks Per War and Score Per War for top members.
  • Trend Chart โ€“ shows faction average score and attacks per war over time.
  • Filters โ€“ sort by any column, filter by participation level (Very Low, Low, Average, High, Very High).
  • Warnings โ€“ members with participation below 50% are flagged with a warning list.
  • Member Performance Table โ€“ shows each member's:
    • Wars Present (included in the report)
    • Wars Fought (had at least 1 attack or score)
    • Participation Rate (%)
    • Total Score, Score Per War
    • Total Attacks, Attacks Per War
    • Status (Very High, High, Average, Low, Very Low, Never Fought)
  • Only current faction members โ€“ members who have left the faction are excluded from analytics.

Note: Analytics requires at least 2 saved war reports to show meaningful data. Charts require at least 2 wars with data.

How Data Is Collected

Member list & basic info โ€“ Fetched from the faction API endpoint (cached for 120 seconds in MySQL).

Bars, cooldowns, and battle stats โ€“ Only collected for members who have opted in.

  • If you are opted in, your bars, cooldowns, and battle stats are updated every 300 seconds via the background cron (update_all.php).
  • If you are not opted in, your data is not collected โ€“ other members will see โ€” for your bars and stats.

War reports โ€“ fetched from the Torn API when a user enters a War ID. Reports are saved to the database and shared with all faction members.

Chain data โ€“ fetched alongside faction data and displayed in the chain card.

Stale data warning โ€“ If a member's battle stats are older than 300 seconds (5 minutes), they will be flagged as stale (๐ŸŸก or ๐Ÿ”ด). This usually means their API key no longer has the stats scope, or the cron hasn't run recently.

Privacy & Sharing Settings โ€“ Read This Carefully

Your bars, cooldowns, and battle stats are shared according to TWO conditions:

  1. You must be opted in. If you are not opted in, nothing is shared โ€“ regardless of your share setting.
  2. Your share setting (None, Leaders only, All members) only takes effect if you are opted in.

Share setting meanings:

  • None โ€“ Only you can see your own bars, cooldowns, and battle stats.
  • Leaders only โ€“ Faction Leader and Coโ€‘leader (and any Managers) can see your bars, cooldowns, and battle stats.
  • All members โ€“ Every faction member can see your bars, cooldowns, and battle stats.

How the "Sharing" column works on the Faction Stats page:

  • โœ”๏ธ Leaders โ€“ You can see this member's stats because you are a leader or manager, and they have set their share to "Leaders".
  • ๐Ÿ”’ Leaders โ€“ This member has set their share to "Leaders", but you are not a leader or manager, so you cannot see their stats.
  • โœ”๏ธ Members โ€“ The member has set their share to "All members", and you are a member, so you can see their stats.
  • ๐Ÿ”’ None โ€“ The member has set their share to "None", so only they can see their own stats.
  • โŒ No โ€“ The member is not opted in, so no stats are shared (regardless of their share setting).

Important reminder: If you are not opted in, setting your share to "All members" does nothing โ€“ your data will still be hidden from everyone (except yourself).

You can change these settings on your Profile Settings page.

Log in to see your current optโ€‘in status, share setting, and your role (leader/viewer/member).

๐Ÿ‘๏ธ Settings & Managers

Faction Leaders and Coโ€‘leaders can grant Manager permissions to trusted members via the Faction Settings page (previously called "Stat Viewers").

  • Managers have elevated rights:
    • View all optedโ€‘in members' battle stats (like leaders).
    • Create and delete war reports.
    • (Future) Manage factionโ€‘wide settings.
  • The page itself is now called Settings in the sidebar, and the permission is labelled Manager.
  • Leaders and Coโ€‘leaders do not need to be added โ€“ they have full access by default.
  • If a member leaves the faction, they are automatically removed from the managers list.

Required scope: faction (to load the member list) and stats (to view battle stats).

๐Ÿ”‘ API Key Requirements โ€“ Be Exact

Different faction features require different API key scopes. Here is exactly what each feature needs:

Feature Required Scope What Happens If Missing
View member list, names, positions faction Faction data will not load.
View your own bars & cooldowns bars, cooldowns You will see a warning that your key lacks these scopes.
View others' bars & cooldowns bars, cooldowns Others' bars will show โ€” unless they have opted in and shared.
View battle stats (raw & effective) stats Battle stats will show โ€” unless the member has opted in and shared.
War Payout Calculator โ€“ Fetch Report faction War report cannot be fetched.
War Payout Calculator โ€“ Save Reports faction Reports cannot be saved to the database.
War Payout Calculator โ€“ Delete Reports faction (plus Leader/Manager permission) Delete button is hidden.
War Payout Calculator โ€“ Analytics faction Analytics data will not load (needs saved reports).
Manage Managers (Faction Settings) faction (to list members) Member list will not load.

Important: The stats, bars, cooldowns, and faction scopes are not "higher level" โ€“ they are simply scopes that you can enable or disable when generating your API key on Torn. To see full faction data, your key must have faction, bars, cooldowns, and (for battle stats) stats scopes enabled.

Recommended: A key with faction, bars, cooldowns, and stats scopes enabled (or a Full Access key) for the best experience.

Need to update your key? Go to Torn API Settings and check the required boxes.

๐Ÿ”„ How Often Is Data Updated?
  • Faction member list โ€“ cached for 120 seconds (2 minutes). Refresh manually with the "Refresh" button on the Faction page (60โ€‘second cooldown).
  • Bars, cooldowns, battle stats โ€“ updated every 300 seconds by the background cron for optedโ€‘in users.
  • War reports โ€“ saved immediately when calculated. Analytics updates when new reports are saved.
  • Chain data โ€“ updated whenever the faction data is refreshed.
  • If you see stale data โ€“ wait for the next cron run (300 seconds) or check your optโ€‘in status and API key scopes.

All caches are stored in MySQL and automatically pruned.

Still Need Help?
  • Update your API key โ€“ Torn API Settings
  • Check your settings โ€“ Profile Settings
  • Learn more about Torn's API โ€“ Torn API Documentation
  • Ask in faction chat โ€“ your leader may be able to help.
  • Check saved reports โ€“ if analytics is empty, you need at least 2 saved war reports.