Torn Faction Respect Tracker

Track faction respect like a boss!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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