TL;DR This script helps faction managers to change balance of multiple faction members.
Install: https://greasyfork.org/en/scripts/536376-batch-balance
Introduction
It's common practice to change balances for multiple faction members at once, such as for RW income distributions or custom OC reward management. Many factions have developed their own workflows and tools to streamline this process. In SMTH, we've long relied on a dedicated userscript to efficiently handle batch balance changes.
However, the recent rebuild of the Give to User system rendered our original script unusable, necessitating significant rewrites. Understanding that other factions might face similar challenges, I've decided to publicly share our updated userscript with the Torn community.
How the Userscript Works
This userscript doesn't function on its own. Instead, it integrates directly with your existing accounting or management tool. Whether you're using a spreadsheet, Discord bot, Python script, or another method to calculate the amounts of money to distribute, your tool will need a minor update to generate a specialized URL. This URL encodes the amounts and corresponding player IDs.
Once faction managers have installed the userscript, opening this special URL will display an intuitive interface, as shown in the screenshot below. Clicking through the provided buttons effortlessly completes the balance updates.
Example Scenario
Suppose you maintain a spreadsheet after completing an RW: Duke is rewarded $120 and Leslie gets $500 for their contribution, while bogie incurs a penalty of $1000 due to hostile revivals by opponents.
To generate the special URL, insert the following formula into a new cell:
=HYPERLINK("https://www.torn.com/factions.php?step=your#/tab=controls&batbal_uids="&TEXTJOIN(",",FALSE,B2:B4)&"&batbal_amounts="&TEXTJOIN(",",FALSE,C2:C4))
This generates a URL like: https://www.torn.com/factions.php?step=your#/tab=controls&batbal_uids=4,15,148747&batbal_amounts=120,500,-1000
Clicking the link directs you to the Give to User page, where the script automatically interprets the parameters and presents a simple interface. Clicking "Start" initiates balance adjustments, and each subsequent click on the button below updates the next player's balance. The script remembers unfinished tasks. If you close your browser prematurely, simply reopen the URL to continue seamlessly.
Important: Do not run this script in multiple browser tabs simultaneously, as it will disrupt saved progress.
Technical Documentation
The userscript utilizes the following URL parameters from the fragment identifier (after #) of the base URL "https://www.torn.com/factions.php?step=your#/tab=controls".
- batbal_uids (required): Comma-separated player IDs to update.
- batbal_amounts (required): Corresponding comma-separated integer values indicating balance changes.
- batbal_action (optional): "add" (default) to adjust balances, or "give" for direct transfers.
- batbal_asset (optional): "money" (default) or "points".
Q & A
Q: Does this script require my API key?
No.
Q: Is TornPDA or mobile devices supported?
Yes.
Q: It doesn't work on Firefox. Why?
This script is not compatible with Greasymonkey. Please try Tampermonkey or Violentmonkey.
Q: It doesn't work on Chrome. Why?
If you are using Tampermonkey, please follow it's documentation to enable Developer Mode in Chrome. Without doing this, Tampermonkey doesn't execute any script at all.
Credit: Special thanks to MAVRI, who provided valuable inspiration during the latest rewrite of this script.
Mentions: mavri [2402357] · Patch list #385 : 13/05/2025