Pythagoras Project - CIS

Company Intelligence System for Torn company training, staff, analytics, and local reporting.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
MoDuL
Dnevne instalacije
1
Ukupnih instalacija
49
Ocjene
0 0 0
Verzija
3.0.5
Stvoreno
03.06.2026.
Ažurirano
17.08.2026.
Size
846 KB
Licenza
All Rights Reserved
Primjenjuje se

Pythagoras Project - CIS

Pythagoras Project - CIS is a full company management userscript for Torn, built for directors who want one place to handle training, staff records, business analytics, stock watch, wage planning, reporting, and long-term company history without bouncing between notes, spreadsheets, and memory.

It loads on:

https://www.torn.com/companies.php*

The full interface renders directly on the Torn company page.

The script is designed for Tampermonkey, works in embedded or popup mode, stores its data locally, and follows Torn-safe usage rules:

  • No background scraping.
  • No hidden automation chains.
  • Manual syncs only; larger backfills are user-triggered and rate-limited.
  • Only Torn API data or currently loaded page data is used.

That means syncs, imports, and updates only happen when you trigger them.

Work in progress: this project is already usable, but it is still actively being refined. Expect regular improvements, workflow cleanup, and feature expansion as the system matures.

Video teaser: https://youtu.be/vwSDAd-iQ3M

Standalone CIS dashboard: https://pp-api.sokin.xyz/dashboard

Dashboard API-key privacy: the Torn API key is used only to verify each request and retrieve the requested data. It is never written to the CIS database. The browser retains it only in session storage until logout or the browser session ends.

Latest Update

v3.0.4b - Exact training counts in News

  • Company News now reconciles training entries against Torn's exact training-action log by employee and date.
  • Grouped News replaces timestamp-collapsed company-news totals with the exact daily total.
  • Raw News shows each unique Torn action after Training sync, including actions performed in the same second.
  • Previously saved exact rows immediately replace lossy News rows with a correct daily summary.
  • Exact action IDs and timestamps persist through local and cloud reloads without being deduplicated away.

Recent Changes

v3.0.4 - Mobile settings and exact Training Ledger counts

  • Settings forms collapse into readable full-width phone layouts.
  • Training Log sync reads Torn's exact company training-action log.
  • Same-second actions correct linked Training Ledger usage without double-counting company news.

v3.0.3 - Daily cost and Employee Efficiency history

  • Company sync stores observed Advertisement Budget snapshots for completed Torn company days.
  • Employee sync stores Wage, total EE, and all nine raw Employee Efficiency components.
  • The Staff tab and standalone dashboard include entitlement-aware Employee Efficiency history views.

v3.0.2 - VM-backed daily snapshots

  • Employees and Business sync preserve one server-backed record per employee and completed Torn company day.
  • Additional same-day syncs update the daily record instead of creating duplicates.
  • Existing valid workspace rows load automatically; unavailable older Torn values are not projected.

v2.9.2 - Balance sync stability

  • Advertising budget history now records Torn API V2 profile values as explicit dated rows and ignores older unmarked zero rows in Balance.
  • Balance wages now use current synced employee wages and saved wage history only; wage estimates are no longer included in Balance profit.
  • Notification hides now survive page refresh until the next 18:10 TCT business reset.
  • Weekly operating performance graphs now use adaptive Y-axis labels so weekly mode stays readable.
  • Services Sold now states that Torn does not specify the period for sold_amount.
  • The title bar now shows the userscript version and compact Sync buttons.

v2.9.1 - Stock settings persistence

  • Stock card restock toggles, warning thresholds, warning modes, and restock quantities now save to a dedicated stock settings map.
  • Stock settings update the 24-hour sync cache immediately on input/change, so fast Torn page switches and refreshes keep the latest values.
  • Stock sync, suggested restock, stock import/export, and legacy migration now preserve stock settings instead of falling back to default row values.

v2.9.0 - API DNS Update

v2.8.12 - Advertising budget history

  • Business/Profile sync records Torn API V2 advertisement_budget as dated advertising-budget history.
  • Balance uses the latest observed advertising budget on or before each report date.
  • The Pythagoras API stores advertising-budget history separately from latest company settings.

v2.8.10 - Staff load guardrail and Mechanic Shop training rotation

  • Cloud/database member loading now treats a valid left date on or after hire date as past staff before the current staff list is built.
  • Mechanic Shop auto training ranks free/sponsored slots by lowest known total working stats first.
  • Projected sponsored picks now carry a training penalty so one staff member cannot dominate the same slot all week.

v2.8.9 - Staff departure guard and Balance cleanup

  • Company news left/fired events now override stale current-staff snapshots unless a newer hire event exists.
  • Employee sync now runs full staff dedupe after merging API rows.
  • Balance ledger and generated balance reports no longer show the unreliable Employees column.

v2.8.8 - Business Profile and Balance render fix

  • Business Profile daily/weekly fallback now reads lightweight report rows instead of building the full Balance ledger during profile render.
  • Balance ledger caches staff hire/left and wage-history data once per render instead of recalculating it for every report date.

v2.8.7 - Loading, rate limits, and Balance fixes

  • Torn API calls now run through a shared throttle queue.
  • Startup renders the panel before rebuilding stored timeline analytics so loading does not appear frozen on large histories.
  • Business Profile daily and weekly income/customer rows fall back to synced daily report data.
  • Balance keeps unknown historical ad budget/rating values blank instead of copying current values backward.

v2.1.7 - Working-day notification dismissals

  • Dismissed notifications now stay hidden across reloads until the next 18:10 TCT business reset.
  • The reset boundary matches the post-report window when daily reports and staff status checks are expected to refresh.
  • Notification dismiss buttons now describe the new working-day behavior instead of saying "until page reload".

v2.1.6 - Inner footer alert glow

  • Footer notification pulses now glow inside the native footer button instead of around it.
  • The alert state no longer relies on drop-shadow, so it keeps the footer button cleaner beside Torn's native icons.

v2.1.5 - Torn-wide launcher

  • The userscript matched Torn pages generally with https://www.torn.com/* at that time.
  • The full CIS interface rendered only on companies.php.
  • On other Torn pages the native footer icon acted as a launcher and sent the user to the company page.
  • Non-company pages did not show the CIS panel or popup badge.

v2.1.4 - Footer alert pulse

  • Footer notifications now use a soft red glow pulse every five seconds instead of a constant outer border.
  • The footer triangle icon is larger inside the native footer button.
  • The footer triangle icon now uses neutral #bdbdbd strokes to better match Torn's native panel icons.

v2.1.3 - Native footer launcher

  • The footer launcher now copies Torn's native Trade button wrapper and button classes.
  • The launcher mounts as its own footer sibling instead of inserting inside another button wrapper.
  • The launcher stays available while the embedded window is expanded.
  • The footer icon now uses the simplified Pythagoras triangle mark.

v2.1.2 - Footer minimized button

  • Minimized embedded mode mounts a Torn-style footer button beside Torn's own panel controls when available.

v2.1.1 - Docked minimized button

  • Minimized embedded mode can still fall back to the compact Pythagoras pill with the refreshed icon mark.
  • The minimized control uses the active Pythagoras accent colour as its button background.

v2.1.0 - Risk strikes and report-gap backfill

  • Staff cards now keep a Risk strikes history for addiction threshold breaches and inactivity longer than 24 hours.
  • Strikes are recorded during Business/Employee sync and avoid duplicating the same strike repeatedly in one day.
  • Fetch older news now checks unfilled daily-report gaps when normal backfill has already reached the company start date, so missing weeks can be targeted with further manual clicks.

v2.0.9 - Paid switch fix

  • Training Orders now respect the Paid switch exactly.
  • Full payment no longer forces an order back to Paid after adding it or toggling it off.
  • Legacy orders without a saved paid flag can still infer paid status from payment, so older data stays sane.

v2.0.8 - Greasemonkey storage compatibility

  • Added support for modern Greasemonkey promise-style helpers: GM.getValue, GM.setValue, GM.deleteValue, GM.xmlHttpRequest, and GM.addStyle.
  • Kept support for legacy Tampermonkey helpers: GM_getValue, GM_setValue, GM_deleteValue, GM_xmlhttpRequest, and GM_addStyle.
  • This improves Android Firefox / Greasemonkey behaviour where validating or saving a key could appear to do nothing because the script manager did not expose the older GM_* functions.


What It Does

Training Operations

  • Training Orders ledger for paid and sponsored training.
  • Date-based entries with stable order IDs.
  • Manual, merit, loyalty, and promo discount support.
  • Receipt generation for paid training orders.
  • Training Log built from company news.
  • Train Schedule with auto, manual, and hybrid planning.
  • Queue carry-over so the same people do not get stuck at the front forever.
  • New-hire protection rules so staff are not scheduled for training during their first 3 days.
  • In-script training handoff tools for working through the queue.

Staff And Director Tracking

  • Current staff and past staff views.
  • Current directors and past directors views.
  • Company timeline built from company news.
  • Current and past staff cards.
  • Director cards.
  • Contract tracking.
  • Suggested role and suggested wage support.
  • Role history, company position history, and wage history storage.
  • Racing details for relevant company types.

Business Intelligence

  • Business Profile for rating, age, director, staff count, effectiveness, and daily / weekly performance snapshots.
  • Detailed company metrics such as popularity, efficiency, environment, advertising budget, storage, value, and train availability.
  • Weekly analytics based on daily report history.
  • Balance table.
  • Daily and weekly graphs.
  • Services sold tracking.
  • Stock watch and restock planning.
  • Low stock notifications.

Usability And Customisation

  • Embedded mode and popup mode.
  • Draggable, resizable, minimizable interface.
  • Mobile-friendly layout for Torn PDA.
  • Multiple company workspaces.
  • Privacy mode for screenshots.
  • Theme presets plus a full theme editor.
  • Contract and graph colour controls.
  • Built-in tutorial.
  • Import / export tools.
  • Newsletter and report helpers.


Setup Flow

  1. Install the userscript in Tampermonkey.
  2. Open your Torn company page.
  3. Open the built-in tutorial if you want a guided walkthrough of the whole script before setup.
  4. Open Settings inside the script.
  5. Paste your Torn API key.
  6. Click Check key.
  7. Confirm the detected user and company are correct.
  8. Run the sync controls.

Recommended first-time sync order:

  1. Check key.
  2. Sync business.
  3. Sync employees.
  4. Sync company news.
  5. Fetch older news.
  6. Sync training log.
  7. Sync past staff.
  8. Sync services sold.

Once those are done, the rest of the script has enough local context to start linking staff, training, analytics, and history together properly.


Major Sections

Timeline

Shows company history and report activity in one place. It helps you review hires, departures, director changes, fund actions, reports, and other company events without digging through Torn manually every time.

Training Ledger

This is the operational heart of the script. You can create paid or sponsored training orders, track trains given and remaining, apply discounts or ignore them for older records, import qualifying entries from logs, generate receipts, review the news-based training log, and manage the Train Schedule.

Staff

Shows current and past staff with extra counters and per-member cards. Those cards let you store internal contract details, wage ideas, racing notes, role history, and personal planning notes without losing the synced Torn values.

Directors

Keeps director history separate from normal staff history and gives you a dedicated place to review current and past leadership records.

Business Profile

Combines company profile and company detailed data into one operational overview: rating, train availability, company age, founded date, director, staff count, average effectiveness, income flow, customer flow, popularity, efficiency, environment, storage, and value details.

Balance

Adds day-level visibility for income, customers, wages, ad budget, profit, and known company metrics so you can see operational drift instead of just weekly totals.

Stock

Builds a stock and service overview from Torn data. Restockable products can carry restock warnings and quantity planning, while non-restockable services stay visible as service performance instead of fake stock rows.

Wage

Provides role wage planning and calculators so pay decisions can be based on staff value, role expectations, effectiveness, and your own rules rather than rough guesses.

Data

Used for local backups, imports, exports, report generation, and workspace management.

Settings

Acts as the control room for API key handling, sync controls, training setup, discount rules, date formatting, notifications, and role management.

Theme Editor

Lets you tune shell colours, graph colours, and contract colours without touching the code.


Workflow Notes

  • The script is built around local-first company management, so the more complete your initial sync is, the better the connected panels become.
  • Business sync gives the company profile, stock, employees, and detailed data context used by other panels.
  • Company news is especially important because it powers the timeline, training log, parts of analytics, and past-history reconstruction.
  • Staff contracts are designed to be editable locally, so you can keep your own internal training arrangements even when Torn itself does not track that distinction.
  • Training orders are separated by order ID so multiple purchases from the same player do not merge into one messy row.
  • Privacy mode is there specifically so you can take screenshots without exposing numbers you do not want to share.

Best Use Case

Pythagoras Project - CIS is best for directors who are actively running a company, especially if training is a regular part of the business.

It is particularly useful if you:

  • Sell paid trains.
  • Rotate sponsored staff.
  • Want proper current and past staff records.
  • Need a local operational history.
  • Want faster reporting without external spreadsheets.
  • Care about business visibility over time, not just today's page state.

Support And Closing Notes

This project is meant to reduce admin drag, keep decisions grounded in actual company data, and make day-to-day company management feel more structured without crossing Torn's safety lines.

If you need help, updates, or want to follow development, join the Discord:

https://discord.gg/q74pJfGdE5

If you use the script heavily, the best way to get value from it is simple:

  • Sync cleanly.
  • Keep contracts accurate.
  • Use the ledger and schedule together.
  • Let the business profile and balance panels show you the bigger picture.