Weapons and Defense

some initial analysis

I've put together a spreadsheet of weapon and defense technologies and components that others might find interesting.

The spreadsheet contains data on all military technology RP cost, military component attributes, and graphs
Damage / Size versus RP Investment
Cost / Damage versus RP Investment
Defense / Size versus RP Investment
Cost / Defense versus RP Investment

It's in .xls (Excel) format; if you don't have Excel, there's a free viewer here: Link

gc2_military_techs.xls: Link

Here's what the plots look like:




I hope to do some statistical analysis in the next few days to determine once and for all how the combat system works. Let me know if this sort of post is useful to you.


18,484 views 17 replies
Reply #1 Top
Those are some nice plots. You might want to change the scaling on the cumulative research axis so it's easier to see what's happening earlier on in the game. Perhaps switch to square-root scaling.

Also, I wonder if there isn't something wrong with your calculations. Several of the 'special' techs seem to be below their base curves. While I might expect that on cost, on rating/unit I really don't see how that can be true.
Reply #2 Top
Missile, beam and mass drivers scale differently for hull sizes which means the damage to size ratio drops drastically as you go up in hull sizes especially for beam and mass drivers. This could mess up your results somewhat.
Reply #3 Top
Entropy Avatar wrote:
You might want to change the scaling on the cumulative research axis so it's easier to see what's happening earlier on in the game.

Yup, in the spreadsheet there are log-log plots of each of the graphs to make it easier to see what's going on in the beginning.

Safari Joe wrote:
Missile, beam and mass drivers scale differently for hull sizes which means the damage to size ratio drops drastically as you go up in hull sizes especially for beam and mass drivers. This could mess up your results somewhat.

Yikes. This would change things, to be sure. Can you elaborate on this? What's your source? Is this for weapons only or defenses too? It's the first I've heard of anything like this.
I'll be doing some testing soon on component size as a function hull size and miniturization level, and now I'll take a look at possible variations of this for beam/missle/mass driver, too. Any more information you have would help.

Reply #4 Top
This would change things, to be sure. Can you elaborate on this? What's your source? Is this for weapons only or defenses too? It's the first I've heard of anything like this.


It is a known phenomenon, and it probably has something to do with the SizeMod stat on the various weapons. But there is no information on exactly how this scaling works. You'd have to go into game and try it out on the various hulls to find out.
Reply #5 Top
So if I understand #4 correctly, each component has a value, probably SizeMod, that alters how much space the component requires given hull size and miniaturization? That is, this varies on a per-component, not per-branch (beam, missile, mass driver), basis?

Is there a file somewhere in my GalCiv2 directory that contains these SizeMod values?

My next step is collect some in-game data and then reverse-engineer the underlying functions from that. Something like this SizeMod business could make that much more complicated... more information, please!
Reply #6 Top
The amount of space required isn't changed by miniaturization. Miniaturization just gives you more space on each hull, so that won't affect your calculations.
Reply #7 Top
Hmm, yes, if you could figure out the component-size / hull-size variance for us I'd be quite happy. Less of my own effort to sate my curiousity.
Reply #8 Top
Entropy Avatar wrote:
Also, I wonder if there isn't something wrong with your calculations. Several of the 'special' techs seem to be below their base curves. While I might expect that on cost, on rating/unit I really don't see how that can be true.


It's possible that I made an error in entering the data or that the source of the data was wrong. Well, very possible on both counts (specific error reports would be greatly appreciated!). Note that the RPI for the special technologies include the cost of reasearching Good and Evil, which is 2555 RP. So, for example, Pysonic Beam (the components are psyonic, the techs psionic, go figure) requires research of Phasors, Psionic Beam, and Good and Evil for an RPI of 9580, while Phasors alone have an RPI of 6125. That may be part of why they seem off.

It's also worth noting that some of the strange behavior going on here is just the way Stardock designed it, for some unknown reason. For example, Mass Drivers III unlocks the Railgun MK VI and Railgun MK V, where the only difference between the two is that the railgun MK VI is 1 unit smaller. Why even have the MK V in there? Also, Disrupters III are in every way superior to the Subspace Blaster that comes after them. We have "Enhanced," "Advanced," and "Superior" alongside I, II, and III. One might expect these to be polished up and rebalanced in later versions if one is optimistic about Stardock's ongoing improvement efforts.
Reply #9 Top
Empyrean wruote:
The amount of space required isn't changed by miniaturization. Miniaturization just gives you more space on each hull, so that won't affect your calculations.

Starting a new game (v1.1 BETA-2A) in cheat mode and advancing instantly through the miniaturization techs gives me the following sizes for a hyperdrive on a cargo hull:
Hyperdrive Size, Cargo Hull Size, Miniaturization bonus, Miniaturization tech
11, 55, 0%, None
12, 60, 10%, Basic Miniaturization
12, 68, 25%, Enhanced Miniaturization
13, 77, 40%, Advanced Miniaturization
14, 85, 55%, Expert Miniaturization
15, 96, 75%, Ultimate Miniaturization
17, 110, 100%, Supreme Miniaturization

Reply #10 Top
Yeah, if you use larger hulls then weapons/armor are a bit larger. It's weird you are suprised by this, because it is kinda obvious when you play GC2. Your source should be just playing the game and writing down the numbers you get, otherwise

It's too cluttered in the beginning to see what's happening. Oh yeah, and you forget the nano-ripper.

What exactly do you need to reverse-engineer? The way combat and ship building works is pretty darn simple.
Reply #11 Top
xFlukex wrote:
Yeah, if you use larger hulls then weapons/armor are a bit larger. It's weird you are suprised by this, because it is kinda obvious when you play GC2. Your source should be just playing the game and writing down the numbers you get, otherwise

Re-reading what was written earlier, I may have misunderstood what Safari Joe was saying. I know that hull size affects component size. I thought that Safari Joe was saying that beam weapon size varies with respect to hull size at a different rate than missile weapons vary with respect to hull size. If all Safari Joe and Alfonse were saying is that component size varies with hull size, then there's no problem. The graphs are still going to be relevant because the data will stay in the same relation to each other. (There's a slight complication to this caused by the discretization of the values; the values will change slightly when fractional values are rounded down to the nearest integer.)

It's too cluttered in the beginning to see what's happening. Oh yeah, and you forget the nano-ripper.

In the Excel file there are 8 plots; the four I mentioned in the orignal post, and four that are copies of these but plotted logarithmically. Maybe I should have mentioned this... I only posted those two because they are probably the two most important, and saving the graph as a jpeg, uploading it to an image host, and linking it in the post is a bit tedious to do for large numbers of plots. Just check out the .xls file.

The nano-ripper is there. It's not an ethically dependent tech (as far as I know? is the documentation wrong?), just a high damage/size, high cost/size weapon available with Singularity Driver IV. It's the tall, vertical (because two components are available with that tech), red spike fairly early on in the Damage / Size plot.

What exactly do you need to reverse-engineer? The way combat and ship building works is pretty darn simple.

Are attack rolls 0-based (like the devs say, but game never shows), 1-based, or 0-based but with a minimum of 1? How exactly is the "most dangerous ship' in a fleet chosen when being fired upon? If a 10-0-0 offense fires upon a 0-4-4 defense, is the defense int(sqrt(4) + sqrt(4)) = 4, int(sqrt(4)) + int(sqrt(4)) = 4, or int(sqrt(4+4)) = 3? If a component has size S on a small hull, what is the size of that component on a large hull with Expert Miniaturization and Hyperion Shrinkers?

And then, once these are answered, you can start to answer questions like "What is the probabilty that Fleet A will defeat Fleet B without losing a ship?" and so on.

Reply #12 Top
To answer my own question, for those who might find this file useful:

Is there a file somewhere in my GalCiv2 directory that contains these SizeMod values?

It's at GalCiv2\MetaverseData\English\GC2Types.xml

Wish I had known about that sooner.
Reply #13 Top
The formula for component size is as follows:

ComponentEffectiveSize = INT(BaseComponentSize + (SizeMod / 100) * EffectiveHullSize)

Where

EffectiveHullSize = INT( BaseHullSize * (1 + TotalMiniaturizationBonus)); for example, 60 for a cargo hull (55) with 10% Miniaturization bonus.

BaseComponentSize is the no-hull size of a component listed in, for example, the Galactopedia;

SizeMod is an integer specific to each component, usually between 1 and about 10, in general starting high (5-8) in the technologically early components of a branch and decreasing down that branch to lower value (2-5), and listed only, as far as I know, in the GalCiv2\MetaverseData\English\GC2Types.xml. Thankfully Excel can import xml data...

I'll post a thread about this when I get a chance.
Reply #14 Top
I thought that Safari Joe was saying that beam weapon size varies with respect to hull size at a different rate than missile weapons vary with respect to hull size.


Beam, missile and mass drivers do scale at different rates, in fact for a massive hull the doom ray is actually larger then the black hole erupter as well as doing less damage. If it wasn't for this scaling factor missiles would totally suck.
Reply #15 Top
Yeah, I figured this out. The final formula in #13 takes the different rates of scaling into account.
Reply #16 Top
Ahhhh, ok, yeah miniaturization also changes the size of weapons/armor, I forgot that one too. Nice to know the exact formula. There are sometimes when getting more +mini results in a larger size of your weapon but even if this happens you just research another level of weapon tech and that'll get you optimized again.

I would point you towards the wikipedia site for galciv2's battle mechanics, but it seems that wikipedia is having problems today. Yeah you can roll a 0 for attack but it never displays it, I didn't believe it until I saw it myself. Targetting works by targetting the ship with the highest threat by the formula of: attack_rating/(defense_rating + hp) Not sure if that formula is 100% correct(not sure if it adds in hp or not and the obvious divide by 0 problem without hp added in), but it has been accurate in my games. Now ships with multiple types of armor and weapons, man I dunno about that. Using different types of armor and weapons on the same ship isn't really a good move. There is a fleet combat simulator out already, but I don't really trust it, heh.
Reply #17 Top
xFlukex wrote:
Yeah you can roll a 0 for attack but it never displays it, I didn't believe it until I saw it myself.

Yeah, I don't think this actually happens. I just booted up a test game, took a A(1-0-0) D(0-0-0) ship against a A(3-0-0) D(0-0-0) ship, and each round I did exactly 1 damage, and each round the enemy ship did 1-3 damage. We alterenated firing with no interruptions. If it was 0 based attack and just didn't display it, it would appear that ships occaisionally attack twice in a row. This never happened. So it looks like it's 1-based or 0-based with a minimum of 1.

attack_rating/(defense_rating + hp)

I've seen this formula around, but never any source or validation...