/AutoResolve-Rust

My AutoResolve program implemented in Rust.

Primary LanguageRust

AutoResolve-Rust

My AutoResolve program implemented in Rust.

Performs same functionality as AutoResolve2.0

CLI Flags

-b/--battle

Specify which type of battle to run.

  • 1: Normal
  • 2: Siege
  • 3: Raid
  • 4: Naval
  • 5: Monster

-c/--count

Number of battle calculations to perform.

-h/--help

Display help information

-j/--json

JSON file to read and parse to battle. Mutually exclusive with r/--random and -b/--battle.

-l/--log

Display results from each battle run

-m/--multithread

Use multithreading to calculate runs. Noticeable benefit will only be gained when calculating > 100 battles.

-r/--random

Use randomly generated data for battle runs. Mutually exclusive with -j/--json.

-s/--save

Save battle results to .csv file. Can override default save location with -f/--file.

--treasure

Override default file for reading in treasure data

--unit

Override default file for reading in unit data

Resource Files

equipment.csv

Order of variables in equipment.csv file:

  1. Type: Armor, Weapon, Trinket, Banner, Follower (String)
  2. Name (String)
  3. Effect(s) (String)
  4. Coin Value (int)
  5. Id (unsigned int)
  6. Autoresolve Bonus (int)
  7. Range (int)

The 'Corpse Thief' Follower equipment has 1 as it's autoresolve bonus to help calculate bonuses when finding treasure at the end of battles.

units.csv

Order of Variables in units.csv file:

  1. Faction: Rebel, Beladimir, Lerastir, Menoriad (String)
  2. Name (String)
  3. Type: Melee, Cavalry, or Ranged (String)
  4. Autoresolve Bonus (int)
  5. Unit size(int)
  6. Unit id(unsigned int)

Data Capture

Data can be saved from test runs to .csv format.

Format

Columns in output from 4 regular battle types (Normal, Siege, Raid, Naval): Scroll down for read out of locations for Monster battle type

  1. Battle Type - String
  2. Battle Randoms Attacker Total - int
  3. Battle Randoms Defender Total - int
  4. Ending Total - float
  5. Outcome - String
  6. Attacker Won - bool(int)
  7. Supplies - int

Attacker:

  1. General Rank - int
  2. General Total Autoresolve Bonus - int
  3. General Armor Bonus - int
  4. General Weapon Bonus - int
  5. General Follower Bonus - int
  6. General Banner Bonus - int
  7. General Trinket Bonus - int
  8. Advanced Combat Deck - int
  9. Total Beginning Autoresolve Unit Bonus - int
  10. Total Beginning Melee Bonus - int
  11. Total Beginning Ranged Bonus - int
  12. Total Beginning Cavalry Bonus - int
  13. Total Beginning Soldiers - int
  14. Total Ending Autoresolve Unit Bonus - int
  15. Total Ending Melee Bonus - int
  16. Total Ending Ranged Bonus - int
  17. Total Ending Cavalry Bonus - int
  18. Total Ending Soldiers - int
  19. Amount of Rebel Rivermen Mercenaries - int
  20. Amount of Rebel Rangers of the Forest - int
  21. Amount of Rebel Courier Riders - int
  22. Amount of Rebel Mountain men - int
  23. Amount of Rebel Axemen of the Vale - int
  24. Amount of Rebel Vale Cavalry - int
  25. Amount of Rebel Light Woodmen - int
  26. Amount of Rebel Woodsmen Archers - int
  27. Amount of Rebel Riders of the Wood - int
  28. Amount of Light Woodmen - int
  29. Amount of Guards of Beladimir - int
  30. Amount of Beladimir Spearmen - int
  31. Amount of Woodsmen Archers - int
  32. Amount of Archers of Beladimir - int
  33. Amount of Coastal Guards - int
  34. Amount of Riders of the Wood - int
  35. Amount of Beladimir Cavalry - int
  36. Amount of Plains Cavalry - int
  37. Amount of Mountain Men - int
  38. Amount of Lerastir Shieldbearers - int
  39. Amount of Lerastir Spears - int
  40. Amount of Pikes of Lerastir - int
  41. Amount of Axemen of the Vale - int
  42. Amount of Bowmen of Lerastir - int
  43. Amount of Crossbowmen of the South - int
  44. Amount of Vale Cavalry - int
  45. Amount of Territory Guardsmen - int
  46. Lerastir Palace Cavalry - int
  47. Amount of Shieldmaidens of the North - int
  48. Amount of Menoriad Spearmen - int
  49. Amout of Axemen of the Wastes - int
  50. Amount of Menoriad Archers - int
  51. Amount of Rangers of the Forests - int
  52. Amount of Courier Riders - int
  53. Amount of Menoriad Cavalry - int
  54. Amount of Royal Cavalry - int
  55. Amount of Hunters of the North - int
  56. Amount of Rivermen Mercenaries - int
  57. Total Units - int
  58. Total Reinforcements - int
  59. Total Upgrades Received - int
  60. Total Unit Casualties - int
  61. Total Soldier Casualties - int
  62. End General State - String
  63. Treasure Received - bool(int)
  64. Faction - string
  65. Ships - int
  66. Rams - int
  67. Siege Towers - int
  68. Catapults - int

Defender:

  1. General Rank - int
  2. General Total Autoresolve Bonus - int
  3. General Armor Bonus - int
  4. General Weapon Bonus - int
  5. General Follower Bonus - int
  6. General Banner Bonus - int
  7. General Trinket Bonus - int
  8. Advanced Combat Deck - int
  9. Total Beginning Autoresolve Unit Bonus - int
  10. Total Beginning Melee Bonus - int
  11. Total Beginning Ranged Bonus - int
  12. Total Beginning Cavalry Bonus - int
  13. Total Beginning Soldiers - int
  14. Total Ending Autoresolve Unit Bonus - int
  15. Total Ending Melee Bonus - int
  16. Total Ending Ranged Bonus - int
  17. Total Ending Cavalry Bonus - int
  18. Total Ending Soldiers - int
  19. Amount of Rebel Rivermen Mercenaries - int
  20. Amount of Rebel Rangers of the Forest - int
  21. Amount of Rebel Courier Riders - int
  22. Amount of Rebel Mountain men - int
  23. Amount of Rebel Axemen of the Vale - int
  24. Amount of Rebel Vale Cavalry - int
  25. Amount of Rebel Light Woodmen - int
  26. Amount of Rebel Woodsmen Archers - int
  27. Amount of Rebel Riders of the Wood - int
  28. Amount of Light Woodmen - int
  29. Amount of Guards of Beladimir - int
  30. Amount of Beladimir Spearmen - int
  31. Amount of Woodsmen Archers - int
  32. Amount of Archers of Beladimir - int
  33. Amount of Coastal Guards - int
  34. Amount of Riders of the Wood - int
  35. Amount of Beladimir Cavalry - int
  36. Amount of Plains Cavalry - int
  37. Amount of Mountain Men - int
  38. Amount of Lerastir Shieldbearers - int
  39. Amount of Lerastir Spears - int
  40. Amount of Pikes of Lerastir - int
  41. Amount of Axemen of the Vale - int
  42. Amount of Bowmen of Lerastir - int
  43. Amount of Crossbowmen of the South - int
  44. Amount of Vale Cavalry - int
  45. Amount of Territory Guardsmen - int
  46. Lerastir Palace Cavalry - int
  47. Amount of Shieldmaidens of the North - int
  48. Amount of Menoriad Spearmen - int
  49. Amout of Axemen of the Wastes - int
  50. Amount of Menoriad Archers - int
  51. Amount of Rangers of the Forests - int
  52. Amount of Courier Riders - int
  53. Amount of Menoriad Cavalry - int
  54. Amount of Royal Cavalry - int
  55. Amount of Hunters of the North - int
  56. Amount of Rivermen Mercenaries - int
  57. Total Units - int
  58. Total Reinforcements - int
  59. Total Upgrades Received - int
  60. Total Unit Casualties - int
  61. Total Soldier Casualties - int
  62. End General State - int
  63. Treasure Received - bool(int)
  64. Faction - String
  65. Ships - int
  66. TownStat Level - int

Monster Battle: All are same as above unless listed otherwise

  1. Monster type - String
  2. Monster Coin Reward - int
  3. Monster Total AR Value - int