Script Summary: This is a basic working battle simulator for C&C Tiberium Alliances
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.
Script Content Progress:
Combat Simulator (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%)
*Repair times added. This is experimental and may sometimes not be the right value.
*Fixed the script to work with the new API introduced by EA.
*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.
*Predicted Stats are now updating properly
*Fixed return to setup button
*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.
* Separated Current stats from predicted stats.
*Bug fix - fixed a bug which made unlock button appear a few times when changing buttons side
*Bug which caused crashes has been fixed.
*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!!!)
*Bugfix - Now closes all windows when changing view
*Stats now shows the current CY and DF HP.
*Minor Adjustment to formation arrows, now appears in a movable box so you can put it wherever you wish.
*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.
*Minor bug fix: shift keys missing in tools has been fixed.
*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
*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.
*Minor changes to the stats window for the values that are yet to work + checking auto updater.
*Added auto updater.
Special thanks goes for wikrie
*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.
*Added "Shift Keys" to my tools
Thanks to Duarte for the development and to S9 for the edited non OOP function.
*Started working on tools with layout saver, So far it is just visual of how it's going to be, nothing works yet.
*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.
*Removed the 10 seconds delay between simulations because it really annoys me.
*Added combat lock
*Added "Setup" Button that takes you back to you formation outside the simulator.
*Basic Combat Simulate