I intend this to be used by ship designers and mod developers to ensure that their ships are balanced both IS and OOS.
http://halo112358.googlepages.com/aa.hc ... mulator.7z
aa.h.combatsimulator.cmd is the initial script, edit this to set the ships given to each side - running this script will spawn the specified ships in a sector chosen at run time.
aa.h.combatsimulator.main is the body of the sim code - it spawns ships, assigns tasks and then waits for combat to resolve.
Once the sim is complete (one side wins) then all involved ships will be destroyed. All events are logged to log09876.txt. It's probably best to run the sim in an unknown sector (aka: empty sector) so that there isn't any interference.
let me know what you find if you do play with it
ps: If you pick 'null' as the sim sector you'll spawn the ships into the current [PLAYERSHIP] sector for IS combat simulation. This is useful for comparing OOS vs IS performance of a ship, it should highlight just how different OOS and IS combat really is (OOS an elephant wins against anything less than an M1/M2, IS it gets utterly owned by a given M6 or 3-5 M3's...)[/i]
re-use and derivation: do whatever you like with this code, have fun.
pps: you can learn all sorts of useless things by running this, like: Elephant > Hyperion
Code: Select all
(329052) START SECTOR (Unknown Sector)
(329052) ALPHA = ARRAY ( Kha'ak Hyperion )
(329052) BETA = ARRAY ( Xenon Elephant )
(329126) killer=(null)
(329126) Kha'ak Hyperion killed by Xenon Elephant(XTLSB-99) 1/1
(329126) END
(329126) h_1 fight took (74) seconds
(329126) h_2 Alpha lost (1) ships
(329126) h_3 Beta lost (0) ships
(329126) GC: destroyed 0 ships
(329126) GC: destroyed 1 ships
(329052) START SECTOR (Unknown Sector)
(329052) ALPHA = ARRAY ( Kha'ak Hyperion )
(329052) BETA = ARRAY ( Xenon Elephant )
(329101) THIS=(Xenon Elephant) attacker=(Kha'ak Hyperion) cmd=(0)
(329103) killer=(null)
(329103) Kha'ak Hyperion killed by Xenon Elephant(XTLSB-99) 1/1
(329103) END
(329103) h_1 fight took (51) seconds
(329103) h_2 Alpha lost (1) ships
(329103) h_3 Beta lost (0) ships
(329103) GC: destroyed 0 ships
(329103) GC: destroyed 1 ships