[Dev Tool] OOS Combat Simulator (Alpha)

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
halo112358
Posts: 374
Joined: Thu, 16. Feb 06, 07:56
x3

[Dev Tool] OOS Combat Simulator (Alpha)

Post by halo112358 » Wed, 16. May 07, 13:21

Here's an OOS combat test framework that I wrote, it sets up OOS combat in an un-observed sector and logs the result. There is no real user interface besides the script editor, if someone feels motivated to create something more useable please be my guest.

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 :D

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
Last edited by halo112358 on Tue, 19. Jun 07, 21:56, edited 1 time in total.
*** modified ***

[ external image ]

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Wed, 16. May 07, 16:37

'.z7'? What format is that?


Would it be nice to know the state (shield/hull) of the winners at the end?
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Wed, 16. May 07, 16:42

.7z extension is file compression with zip genius
http://www.zipgenius.it/eng/index.php

Player.
Posts: 3910
Joined: Fri, 8. Jul 05, 08:57
x3tc

Post by Player. » Wed, 16. May 07, 17:19

You can still open it with Winrar :wink:
http://forum.egosoft.com/viewtopic.php?t=183585 - X2 The Threat High Definition Mod - You know you wanna :)

Squelch
Posts: 252
Joined: Sat, 15. May 04, 11:03
x2

Post by Squelch » Wed, 16. May 07, 19:52

Thanks Halo,

I just know this will be put to good use.

How did you resolve the $killer dilema?

User avatar
halo112358
Posts: 374
Joined: Thu, 16. Feb 06, 07:56
x3

Post by halo112358 » Wed, 16. May 07, 21:43

Squelch wrote:Thanks Halo,

I just know this will be put to good use.

How did you resolve the $killer dilema?
The same way the autotrader does, it's best of the bad workarounds.

Code: Select all

skip if $killer -> exists
  $killer = [THIS] -> get attacker
*** modified ***

[ external image ]

LynkDead
Posts: 281
Joined: Sat, 29. Apr 06, 23:52
x3tc

Post by LynkDead » Thu, 17. May 07, 08:24

Bunny wrote:.7z extension is file compression with zip genius
http://www.zipgenius.it/eng/index.php
Not that it really matters, but *.7z is 7-zip compression.

http://www.7-zip.org/

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Tue, 22. May 07, 21:25

Really cool idea!

Jlehtone's comment about knowing state of survivvors' hull & shields is especially pertinent for 1-on-1 duels.

And I had absolutely no idea Hyperion gets iced 100% of time by an Elephant OOS. Who would've thought...

Hieronymos

User avatar
halo112358
Posts: 374
Joined: Thu, 16. Feb 06, 07:56
x3

Post by halo112358 » Tue, 22. May 07, 22:08

Hieronymos wrote:Really cool idea!

Jlehtone's comment about knowing state of survivvors' hull & shields is especially pertinent for 1-on-1 duels.

And I had absolutely no idea Hyperion gets iced 100% of time by an Elephant OOS. Who would've thought...

Hieronymos
It should be possible to log the hull & shields of leftover ships when garbage collection occurs. I'll add that in if you guys are interested in it ;)
*** modified ***

[ external image ]

aka1nas
Posts: 1414
Joined: Thu, 7. Jul 05, 05:17
x4

Post by aka1nas » Tue, 22. May 07, 22:14

Hieronymos wrote:Really cool idea!

Jlehtone's comment about knowing state of survivvors' hull & shields is especially pertinent for 1-on-1 duels.

And I had absolutely no idea Hyperion gets iced 100% of time by an Elephant OOS. Who would've thought...

Hieronymos
Makes a little sense in hindsight as the Elephant with BPPCs is going to have much higher laser values.

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Tue, 22. May 07, 22:48

But considering Elephant's inferior laser energy (27,300/273), shielding (625Mj), shield recharge (4,700), manueverability (0.89%)--compared to Hyperion's...shows how badly the Dev's overcalculated the OOS combat power of the BPPC.

DDRS Rebalanced has an M6, the Paranid Achilles Gunboat, armed with 5x BPPC's in her front-fixed battery. Of course she lacks the weapons power to really use them properly (she's supposed to be a capship-hunter, but can't really cut it as such vs. M2's, even in larger numbers)..but it'd be interesting to see how she fares against an Elephant OOS. What I'd really like to see is an M7 class "Heavy Raider" with something like 4x GPPC's or 5-8x BPPC's in a fixed-front battery. With ~2Gj shielding, reasonable turn rate, and M7 class sized powerplant(s), she'd be a viable threat to M2's. IS anyway!..but I digress.

Again, your script is an excellent modding tool. And the victor's leftover hull/shield % are especially useful for 1-on-1 M2 and M1 duels., and variations thereof. When working the stats for Rebalanced, I did all those combat trials "by hand" the hard way.

A tidbit that I found during that time: vanilla M2's with GPPC's in their front turrets--instead of BPPC's--would win 1-on-1 IS duels against M2's with BPPC's up front ~90% of the time.

Thanks Again!

Hieronymos
Last edited by Hieronymos on Tue, 22. May 07, 22:56, edited 1 time in total.

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Tue, 22. May 07, 22:53

One BPPC would do 16,187 points of shield damage. Eight of them 129,496.

Shorter fight took 51 seconds. Three 1 GJ shields do recharge 38,142 points in 51 seconds (assuming they need to recharge right from start).

=> 3,038,142 kJ of shield will go down with 24 broadsides of 8 BPPC.

AHEPT: 1995, BHEPT: 4200
One 12 BHEPT + 6 AHEPT volley is thus 62,370.

Five 125 MJ recharge 191,173 points in 51 seconds. Total shield to kill: 816,173 kJ.

=> 13 hits from all guns of Hyperion should consume all shield that Elephant can have in 51 seconds.

In sector BPPC has worse rate of fire than HEPTs. Assuming fully equipped ships on both sides does not quite explain the result.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Tue, 22. May 07, 23:16

I prefer to calculate shield and hull weapons damage output in terms of "damage per minute".
Thus:

BPPC=1,230k shield, 335k hull per minute.
BHEPT=890k shield, 148k hull.
AHEPT=564k shield, 93k hull.

Thus, Elephant's "Alphastrike" capacity is 9,840k shield/min, 2,680k/min.
While Hyperion's is 14,064k shield/min, 2,334k hull/min.

Elephant's vs. Hyperion's shield strength ratio is 4.8:1 in Hyperion's favor.
Even given max range of BPPC (5.1km.) vs. BHEPT (2.3km.), OOS combat result cannot be explained within a 51 second timeframe even with a 100% hit rate.

Another possibility is that the testing program didn't load Hyperion with all 3 1Gj shields.

Regards,

Hieronymos

Kitty
Posts: 304
Joined: Mon, 5. Sep 05, 19:59
x3tc

Post by Kitty » Thu, 10. Jul 08, 23:52

Trying to use this script in a X3 2.5 with XTM configuration.
Does not work.
The oponents do not move.
Anybody has an idea of what's wrong ?

Gqqnbig
Posts: 66
Joined: Fri, 12. Jul 13, 14:08

Post by Gqqnbig » Tue, 20. Aug 13, 09:13

Doesn't work untill I change START to = in line 002 in aa.h.combatsimulator.attack.xml.

Gqqnbig
Posts: 66
Joined: Fri, 12. Jul 13, 14:08

Post by Gqqnbig » Wed, 23. Sep 15, 07:07


Post Reply

Return to “X³: Reunion - Scripts and Modding”