Script Summary: Allows you to simulate combat both visually and textually before actually attacking. Works on Chrome with Tampermonkey and Firefox/Waterfox with Greasemonkey or Scriptish.
For those using Chrome with Tampermonkey v2.11.3007, their latest release asks that you please reinstall your scripts. If you have any problems after this latest update, please go ahead and try this. Thanks to q^2 for the information!
The new name of this page is to freely advertise my Tiberium Alliances alliance. Our members use this same simulator.
+ Fixed RT/Loot/Base HP issues with new EA Update (Thanks to KRS_L for RT time calc solution)
+ Fixed issue keeping it from working with the Waterfox browser
+ Fixed Base Health calculations when PVPing - there is rounding error, but nothing I can do about it.
+ Changed the labels on the 'Disable All Units' button and the 'Undo' button to images
+ In the repair section, the worst RT time is now displayed in black.
+ Added a Quick Save Button. Allows player to save layout without opening Layout Window
+ Layout Formations no longer require player to enter a name. Will generate a name if the textbox is empty.
+ Fixed an issue with Resources not calculating when entering a base on occasion.
+ 3.1.2: Fixed an issue with the loot display
+ Total Repair Time Storage now shown in Repair Times Section
- Repair time is green if enough to repair units after attack, red if not.
+ Renamed CY and DF to Con.Yard and Def.Fac respectively
+ New Option Window Layout
+ New Option to select which divider you want to use in the stat window " | " or " / "
+ Added Option to hide any section in the Stat Window on Startup. Ex. If you want to hide Loot section, check the box.
+ Added Undo Formation Button - Undo's previously saved formation. Formations saved when the Update or Simulate button is pressed.
+ Added a fix to the loot calculations. Hope it works!
+ Changed the Enemy Health color scheme back to the old way.
+ Reduced, if not eliminated, the chance of Auto Simulation failing
+ Added Replay Button to the Stats Window and disabled the visual Sim button when Simulations cannot be done. Can only due a simulation every 10 seconds (API restriction)
+ Added ability to set and save Stat Window position.
+ Added Persistent Formation Saver checkbox - allows saving formations for a player's city that can be used in any other enemy city. (Clear All Recommended)
+ Changed name of simulator to reflect script page title
+ Added Mirror Units Button (flips the formation over the Y axis)
+ Fixed problem with shift buttons not working properly
+ Changed Enemy Health Color to redorange when health is between 25 and 75
+ Added ability to calculate possible loot received from simulation/battle
+ Per above, total loot is now calculated differently
+ Offensive Health Percent added to RT section
+ Updated Options Menu for new RT option (Health Percent)
+ Flipped color scheme for Base Health (green is now >= 75, redorange stays the same, red is < 25)
+ Repair Time section labels now turn a different color based on unit types average health percentage.
+ Delayed loading of simulator when entering/exiting city to hopefully reduce large FPS drop
+ Added option to start simulation automatically when Simulate button is clicked
+ Added option to set Simulation Speed if Auto Simulation is on. x1, x2, and x4 settings.
+ Added Formation Saver (The Layout Button opens it)
+ Minimize/Maximize Stat Window Sections (To min/max click on the section header/title)
+ Stat Window stays open during visual simulation and combat unless it was closed before
+ Added a Stats button to the visual replay menu for those that might want to open it during simulation.
+ Renamed 'Auto Open Stats' Option in Option Window to make fully visible
+ Tool tips on option menu items
+ Fixed problem with first visual simulation not working properly.
+ Fixed issue with script error appearing if exiting a base before the load screen is finished
+ Option to auto open stat window or not(Default: Open Automatically)
+ Removed Visual Simulation Disable Feature (Still shows Countdown)
+ Option to show only Repair Time in Stat Window (Hides crystals)
+ Changed the Overall RT font color to blue to see easier
+ Added Disable/Enable All Units Button
+ Flipped the Loot and Misc Sections
+ Reduced Loot Section Space (Probably slightly noticeable)
Update 12/28/2012 Part 3 (Final Update for Day):
+ Auto-Open Stat Window - when player opens up enemy base the stat box will appear
+ Fixed issue where Shift Buttons stayed visible inside own player's base
+ Made text bold in Stat Window
+ Saves Option Configuration - settings selected in Option Window will be saved
+ New Total Loot image thanks eferz for finding it and MrHIDEn for using it!
+ New offensive crystal calculations for individual unit types
+ Added Victory, Total Victory, and Total Defeat Outcome images in outcome row
Update 12/28/2012 Part 2:
+ Added back Formation Shift Buttons
+ Added tool tips to the loot images (specifically the package image symbolizing total loot)
+ Renamed Stat Window Simulator button to "Update"
+ Added the option to use small buttons. (The "I" button is the "Stats" button when small)
+ Renamed Save button to "Layout" with small button being called "L" - still disabled
+ Removed some debug code from printing in console
+ Added some more information in userscript area of code (documentation)
+ Completely rewritten script
+ Options Window which allows player to disable/enable combat and repair unlock buttons
and move Simulator buttons to the left or right side of the screen.
+ New and improved stats window based off of the EA Example Script by Topper42(more to come)
? The disabled save button is something I'm working on. Working on adding the ability to save formation layouts for a particular city. Currently not in this version.
- Removed formation shift buttons, but if demand is there I could add them in a future update.
+ Added a row to the Loot tab that sums up all the loot. Used the package icon to represent this.
+ Removed the PVP restriction. EA may restrict this in the future.
+ Battle Time is now calculated and is shown in the info box
First, I would like to thank Topper42, Eferz98, Deyhak, and MrHIDEn (indirectly) for helping the most on this latest version. I could not have done without all of your help.
+ Simulation Statistics are now working except for Battle Time.
+ Loot calculations are also shown in the info box for the base being viewed
+ Colorized information to aid in visualizing the data
+ Battle Stats now shows how much crystals it will cost player due to damages
+ Both Simulation Buttons disable for 10 seconds after pressing either since the EA API can only be called every 10 seconds
+ Info box now closes when player changes view
+ Code uses MrHIDEn's obfuscation resistance code to get the loot calculations.
I've tried to stick to EA's API as much as possible, but there are certain things that just aren't possible without using some obfuscated code. With that said, I believe the simulator aspect of this script should not break unless EA changes their API.
Should work in Chrome with Tampermonkey AND Firefox with Greasemonkey. It seems to work with Scriptish as well, but I'm hesitant to say with 100% certainty due to not having as much feedback there. Have not tested it in any other environment.
Updated simulator to work with latest December patches. Does not calculate resources in base or simulation statistics. Still trying to find a way to do this.
Based off of https://userscripts.org/scripts/show/145717
For developers, I have also added in more comments to hopefully make it easier to understand the code. I am not an expert at this stuff, but spent an entire night trying to put two and two together. All credit really belongs to the developers who developed the code before me. I simply removed outdated code and made the code more compliant with EA API standards.
Works with Firefox with Greasemonkey AND Chrome with Tampermonkey. Does not work with Chrome without Tampermonkey at least in my tests. Have not tried any other browsers.