C&C Combat Simulator

By Deyhak Last update Dec 23, 2012 — Installed 120,445 times.

Script Summary: This is a basic working battle simulator for C&C Tiberium Alliances



Version: 0.4

Inspired by the script located at http://userscripts.org/scripts/show/137418

C&C Tiberium Alliances combat simulator

This version is compatible with:

Firefox + Greasemonkey
Google Chrome + Tampermonkey

You MUST install the Greasemonkey/Tampermonkey first, then press on the install button at the top right corner of the page.

This code is an open source, feel free to reuse, edit or what not.
Enjoy.

Script Content Progress:


Combat Simulator (100%):
-Unlock Button(100%)
-Options (100%)

-Tools (100%):
--Current Buildings HP (100%)
--Current Defense HP (100%)
--Current CY HP (100%)
--Current DF HP (100%)
--Current Repair Time (100%)
--Predicted Buildings HP (100%)
--Predicted Defenses HP (100%)
--Predicted CY HP (100%)
--Predicted DF HP (100%)
--Battle Result (100%)
--Predicted Battle Duration (100%)

-Formation Shift (100%):
--Formation Move key window(100%)

Patch Notes:


0.4:
*Repair times added. This is experimental and may sometimes not be the right value.

0.3.3:
*Fixed the script to work with the new API introduced by EA.

0.3.2:
*Minor bugfix

0.3.1:
*Added offensive units health end / health start to give clue about the amount of damage taken for each unit type.
This is a preparation for the future repair time calculation which is being worked on.

0.3:
*Predicted Stats are now updating properly

0.2.1:
*Fixed return to setup button

0.2:
*Massive change in code's structure - Globalized variables
*Removed Formation Saver & Loot summery from the code as it doesn't belong here.
-For the formation saver visit: http://userscripts.org/scripts/show/136299
-For the loot summery visit: https://userscripts.org/scripts/show/137978

Note:All previous data used by those scripts is saved in your browser's local storage, which means all the formations you saved will be available once you re install the script.

*Prepared some functions for the next API update.

0.1.7.9:
* Separated Current stats from predicted stats.

0.1.7.8:
*Bug fix - fixed a bug which made unlock button appear a few times when changing buttons side

0.1.7.7:
*Bug which caused crashes has been fixed.

0.1.7.6:
*Options box complete
- you can now choose which sides you prefer your buttons at (left/right).
- you can now choose whether you want the unlock combat buttons (on/off). (Requires restart!!!)

0.1.7.5:
*Bugfix - Now closes all windows when changing view

0.1.7.4:
*Stats now shows the current CY and DF HP.

0.1.7.3:
*Minor Adjustment to formation arrows, now appears in a movable box so you can put it wherever you wish.

0.1.7.2:
*New look - Smaller button to keep it outside the formation for some people who use lower resolution.
Please comment on the new look here: http://userscripts.org/topics/116958
*Starting to work on options to help people fit things the way the want, still in development.

0.1.7.1:
*Minor bug fix: shift keys missing in tools has been fixed.

0.1.7:
*Base summery added (Not the one in tools info, but when clicking a base in the region view) by MrHIDEn

*Added Formation Saver by Panavia2

0.1.6.4:
*Added battle time on stats.
Currently only updates once every 10 seconds after either reopening tools window or using the moving formation button.
API Allows simulate once every 10 seconds, which is why the time can only be updated once every 10 seconds.
Sucks, but it's better the nothing.

0.1.6.3:
*Minor changes to the stats window for the values that are yet to work + checking auto updater.

0.1.6.2:
*Added auto updater.
Special thanks goes for wikrie

0.1.6.1:
*Managed to get some of the Stats in tools to show the right values. Still a lot of work is ahead, but yet another step to understand how this API works.

0.1.6:
*Added "Shift Keys" to my tools
Thanks to Duarte for the development and to S9 for the edited non OOP function.

0.1.5:
*Started working on tools with layout saver, So far it is just visual of how it's going to be, nothing works yet.

0.1.4:
*Since API doesn't allow more then 1 request every 10 seconds, removing the 10 seconds delay was misleading.
What in fact happened if you simulate more than once every 10 seconds it would just give you the first simulation you received.
So I had to add it back.
However, I added a "Wait..." to signal you when the simulation is available again.

0.1.3:
*Removed the 10 seconds delay between simulations because it really annoys me.

0.1.2:
*Added combat lock

0.1.1:
*Added "Setup" Button that takes you back to you formation outside the simulator.

0.1:
*Basic Combat Simulate