A Win32 GUI automation tool for the game Command & Conquer: Tiberium Alliances (CC:TA), built on pixel-measured BMP overlays. Written in C99, no external dependencies beyond the Windows API.
TABS V2 (Tiberium Alliances Battle Simulator V2) must be running before starting AwSim automation. The Target Refresh action used by all engines corresponds to a location inside the Statistic box generated by the TABS V2 simulator script. Without that script active, the target double-click has no effect and the engines will not function as intended.
| File | Description |
|---|---|
AwSim.c |
Full application source |
AwSim.rc |
Resource script (links the app icon) |
AwSim.ico |
Application icon |
Runtime assets (place in the same directory as the compiled EXE):
| File | Size | Contents |
|---|---|---|
AwSimUI-1.bmp |
580 x 70 | Header section |
AwSimUI-2.bmp |
580 x 138 | Engines section |
AwSimUI-3.bmp |
580 x 138 | Boxgrid section |
AwSimUI-4.bmp |
580 x 138 | Targets section |
Requires MinGW-w64 (gcc + windres on PATH).
windres AwSim.rc -O coff -o AwSim.res
gcc -O2 -o AwSim.exe AwSim.c AwSim.res -luser32 -lgdi32 -lmsimg32 -lshell32 -lole32 -luuid -ladvapi32 -mwindowsThe UI is a borderless WS_POPUP window made of four stacked BMP sections.
The < > buttons in the header cycle through six view states:
| State | Sections visible | Height |
|---|---|---|
| 0 | Header + Engines + Boxgrid + Targets | 477 px |
| 1 | Header + Engines + Boxgrid | 342 px |
| 2 | Header + Engines | 207 px |
| 3 | Header + Boxgrid | 207 px |
| 4 | Header + Targets | 207 px |
| 5 | Header only | 72 px |
A 12-character string stored in _AwSim.ini under _EngineVars:
. 1 0 0 0 0 0 0 0 0 0 3
| | | | | | | | | | | |
| | | | | | | | | | | MPC value (1-5)
| | | | | | | | | | |
| | | | | | | Advanced operations
| | | | | | |
| | | | | | Scout
| | | | | Permute
| | | | Row Ops
| | | Column Ops
| | |
| | Decoy
| AwSim
|
Selection display mode (.=tic #=run order)
## Execution flow
When Start is pressed, engines run in this order:
1. **FS (Finite Step) engines (3-6)** run once each, in their assigned run-order (lowest value first).
2. **CR (Continuous Run) engine (1-2)** then runs indefinitely in a repeating cycle -- or the program returns to idle if no CR engine is selected.
Right-click anywhere stops automation. Moving the cursor to x <= 3 exits the program.
---
## Engines
### Engine 1 -- AwSim (CR button 1)
Selects 3 boxes (or 2 if MPC = 1) at random from the **active** (checked) grid cells each cycle.
**Moves per cycle** (controlled by MPC):
| MPC | Moves |
| --- |---|
| 1 | Box1 -> Box2 |
| 2 | Box1 -> Box2, Box2 -> Box3 |
| 3 | + Box3 -> Box1 |
| 4 | + Box1 -> Box2 |
| 5 | + Box2 -> Box3 |
**Each Move:**
1. Click origin box
2. Press A
3. Click destination box
4. Press A
5. Wait 3333 ms
Before the very first cycle, keystrokes A X X are sent to reset the game cursor.
After all moves in a cycle, the active Target (TABS V2 Statistic box) is double-clicked
to refresh results. Runs indefinitely.
---
### Engine 2 -- Decoy (CR button 2)
Identical to Engine 1 with one difference in box selection:
- **Box 1** -- drawn from the **active** set
- **Box 2** -- drawn from the **inactive** (unchecked) set
- **Box 3** -- drawn from the **active** set (MPC >= 2 only)
Requires at least one inactive box to be available. The inactive box acts as a neutral
intermediary ("decoy") in the move sequence. Runs indefinitely.
---
### Engine 3 -- Column Ops (FS button 3, Extended Mode: EP7)
Operates on the 9 game columns via two buttons located above each column:
- **ColumnShiftDown** -- x offset: gx + 55 + col * (gw / 9), y: gy - 15
- **ColumnMirror** -- x offset: gx + 25 + col * (gw / 9), y: gy - 15
Only **active columns** (those containing at least one checked cell) are processed,
working left to right.
**Normal Mode -- per active column:**
- Click ColumnShiftDown, wait 3333 ms -- three times
- Double-click Target Refresh, wait 500 ms
**Extended Mode** (EP7 active) -- after Normal Mode, the same columns are processed
again with one addition: ColumnMirror is clicked first (+ 3333 ms wait) before the
three ShiftDown clicks.
The full sequence (Normal + Extended if enabled) runs **twice**, then Engine 3 finishes.
---
### Engine 4 -- Row Ops (FS button 4, Extended Mode: EP8)
Operates on the 4 game rows via buttons to the left of the boxgrid.
The user calibrates two points on first use:
- **MR1** -- top-left row button (Mirror, Row 1)
- **SR4** -- bottom-right row button (Shift Right, Row 4)
All 12 button x-positions are interpolated from those two points.
Row y-centers are fixed offsets from the grid top (gy):
**+20, +58, +97, +135 px** for rows 1-4.
The 12 buttons are:
| | Mirror (MR) | Shift Left (SL) | Shift Right (SR) |
|---|---|---|---|
| Row 1 | MR1 | SL1 | SR1 |
| Row 2 | MR2 | SL2 | SR2 |
| Row 3 | MR3 | SL3 | SR3 |
| Row 4 | MR4 | SL4 | SR4 |
**Basic Mode -- per row, processing rows 4 -> 3 -> 2 -> 1:**
1. Double-click SR (Shift Right), wait 3333 ms
2. Click SL (Shift Left), wait 3333 ms
3. Double-click SL, wait 3333 ms
4. Click SL, wait 3333 ms
5. Double-click Target Refresh, wait 500 ms
**Extended Mode** (EP8 active) -- the entire Basic Mode sequence is repeated once.
Engine 4 then finishes and control passes to the next engine or returns to idle.
---
### Engine 5 -- Permute (FS button 5, Extended Mode: EP9)
Operates on the Swap Rows buttons (1-2,2-3,3-4) 23 times for all permutations
of the 4 rows.
---
### Engine 6 -- Scout (FS button 6, Extended Mode: EP10)
Shifts entire formation horizontally to find an optimal starting position.
---
## Configuration
All settings auto-save to `_AwSim.ini` in the EXE directory on every meaningful action
and on exit. Calibrated coordinates (game grid, targets, row buttons) persist across sessions.
---
## Stop conditions
| Action | Effect |
|---|---|
| Right-click anywhere | Stop automation, bring AwSim to front |
| Move cursor to x <= 3 | Exit program |
---
## License
MIT