Torn Faction Respect Tracker

Track faction respect like a boss!

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Howard Felix
今日安裝
0
安裝總數
9
評價
0 0 0
版本
10020
建立日期
2025-10-17
更新日期
2025-10-22
尺寸
79.8 KB
授權條款
MIT
腳本執行於
所有網站

# Torn Faction Respect Tracker

A Tampermonkey userscript for tracking faction respect statistics in Torn City. Generate detailed Excel reports analyzing offensive and defensive performance during wars.

## Features

- **Comprehensive Analysis**: Defense (incoming attacks, respect lost, overseas), Offense (attacks made, respect gained, chains, warlord bonuses), Revives (successful/failed attempts)
- **Enemy Identification**: Automatically identifies attacks against specified enemy faction members
- **Attack Modifiers**: Tracks overseas bonuses, chain participation, and warlord effects
- **Auto-Save**: All inputs, positions, and modal state persist across sessions
- **Draggable UI**: Orange button and modal window can be positioned anywhere
- **Excel Reports**: Generates `.xlsx` files with main report and payment calculation sheets
- **Responsive Design**: Adapts to different screen sizes with stacked layout on narrow widths
- **Theme/Font Toggle**: Light/Dark theme and Small/Large font size options

## Getting Started

1. Click the orange "Run Script" button
2. Enter required data:
- **API Key**: Your Torn Limited API key ([Get here](https://www.torn.com/preferences.php#tab=api))
- **Enemy Faction ID**: ID of opposing faction
- **Start/End Time**: Format `HH:MM:SS - DD/MM/YY` (UTC)
- **War Payout**: Total amount distributed
- **Withheld**: Amount or percentage to withhold (toggle $ or %)
- **Payment %**: Set percentages for inside hits, outside hits, assists, and revives
3. Configure optional exclusions with checkboxes
4. Click "Run Report" to fetch data and generate Excel file

## Report Contents

### Main Report
- **Defense**: Attacks received, respect lost (total & overseas), assists received
- **Offense**: Attacks made, respect gained, breakdown by target (inside/outside), chains, overseas, warlord bonuses
- **Revives**: Successful and failed revive attempts
- **Totals Row**: Faction-wide aggregates

### Payout Sheet
- Displays payment configuration
- Calculates per-member payouts using weighted scaling based on contributions
- Shows both raw (per-hit) and scaled payout amounts

## Configuration

- **Revive Energy Cost**: Multiplier for revive payments (Default: 70 = 2.8x multiplier)
- **Exclude Options**: Skip assists, successful revives, or failed revives from payout calculations
- **Clear Data**: Reset all saved inputs and GUI settings

## Troubleshooting

- **No attacks found**: Verify time format and UTC timezone
- **API errors**: Check API key validity and rate limits (script auto-retries)
- **Modal not responsive**: Try resizing or refreshing the page
- **Report not downloading**: Check browser download settings and Downloads folder

## Privacy

- API key stored locally via Tampermonkey (never sent outside Torn API)
- All analysis happens in-browser
- No external server connections
- Fully open source and auditable