Starbase Combat Distance

Starbase Combat Distance and ship to ship initial distance; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Starbase Combat Distance

Post by Gowron »

Excerpts from a very nice thread, which started with a problem and ended with a full solution, thanks to great teamwork :)

Note that the Ultimate Editor supports combat distance changes :idea:
(Edit -> Graphics -> HOB Files -> Combat Radius)

-----------------------------------------------------------------------
-----------------------------------------------------------------------


The initial distance between a starbase and an attacking differs quite much for the different empires. These are the values:

Card. SB: 2100.66
Fedr. SB: 2705.44
Ferg. SB: 1725.89
Klng. SB: 4440.37 [insert random expletive here]
Roml. SB: 2093.56

Now I can certainly live with most of the differences, but when it comes to the Klingon value, then the fun comes to a sudden end, because there is a serious bug in BotF that sometimes prevents ships from approaching a starbase although they're set to "charge" or "assault". And the probability that this bug appears greatly increases with the distance. Btw, "flyby" seems to work every time, but the approach is very slow.

For testing purposes, I've switched the names of some HOBs, and the game crashed late enough to get the necessary results: The initial distance depends on the contents of the HOB file. It does not depend on the name of the HOB file. It does not depend on the scaling value in trek.exe.


If you set all of the scaling values in trek.exe to 1.0, then the Klingon starbase is clearly the largest one. This implies that the initial combat distance has something to do with the dimensions of the model.

To verify this, I downloaded the demo of Ultimate Unwrap 3D, but unfortunately that program has the habit of auto-scaling every opened HOB file to the same size, and it does not seem to be able to display the original dimensions. maybe this is an intended limitation to the demo version, or maybe I just didn't find the right menu entry.

So I hope that some of you who are more familiar with HOB file editing can find out the dimensions of the HOB files and post them here. I'd also like to know if it would be possible to change the overall size of the Klingon starbase without completely redoing the model.


-----------------------------------------------------------------------


UPDATE:

Thanks to jigalypuff, who sent me 2 differently scaled Klingon Starbase models, I was able to locate the HOB file offsets at which the model dimensions are stored:

position 0x50: minimum, X-axis
position 0x54: minimum, Y-axis
position 0x58: minimum, Z-axis
position 0x5C: maximum, X-axis
position 0x60: maximum, Y-axis
position 0x64: maximum, Z-axis

position 0x68: size

All values are stored as floats (4 bytes each).

Only the "size" value is important for the combat distance. I think that's it's something like a circumsphere radius.

Although I did not find an exact formula with "nice" numbers for the combat distance, it turned out that the correlation is more or less affine-linear.
So I put up this approximation whose average aberration is about 0.0001% for jigalypuff's models and the vanilla starbase models:

[Combat Distance] = 0.3268 * [size] + 949.0173

Note that cloaked attackers start 450.0 units closer to the starbase.


-----------------------------------------------------------------------


The value that determines the combat distance is always in the "..._a.hob" file.

The "..._b.hob" and "..._c.hob" files have similar entries at the same offsets, but they don't seem to have any effect on the combat distance.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron »

The_Nighthawk wrote:Gowron, have you taken advantage of this info in BoP yet?
Of course :)

From the v1.0a documentation:
The distances between defending starbases and attacking ships at the start of battle have been changed. The new distances are 1850 (Card.), 2000 (Fedr.), 1800 (Ferg.), 1900 (Klng.), and 1950 (Roml.).

It's the same in v1.0b and will be the same in v1.1 :)
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER »

cconnorsjr wrote:
Gowron wrote:Note that the Ultimate Editor supports combat distance changes :idea:
(Edit -> Graphics -> HOB Files -> Combat Radius)
I must be missing something... I'm looking for this option in Ultimate Editor and I can't find it. How would I go about editing the combat distance for each starbase? I want to increase the combat distance on all starbases to match the Klingon starbase.
It was renamed to model radius for clarification and in the brackets you'll see calculated combat distance.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Starbase Combat Distance

Post by Spocks-cuddly-tribble »

Gowron wrote:[Combat Distance] = 0.3268 * [size] + 949.0173

Note that cloaked attackers start 450.0 units closer to the starbase.
While searching for the plasma-weapon / ship-scale link, I came across the initial combat distance calculations (sub_51FCE0):


1.) ship to ship intial distance

(for fleets between "group leaders", so frontline ships come closer?)

51FCF6 mov esi, 407C2000h // 0x11F0F7 (4 bytes part of a 8 bytes value!)
default: 450.0
NOTE: multiplied by 2 (shared value)


2.) Starbase Combat Distance (analysis incomplete yet!)

[ds:597918] * [size 1 ?] / 10? + [ds:597918] * [size 2 ?] / 10? + [standard ship to ship intial distance]

ds:597918 // 0x195718 (8 bytes)
default: 1.634


3.) cloak approach

520286 fld ds: 584E0C // 0x182C0C (8 bytes)
default: 300.0
NOTE: multiplied by 1.5 (shared value)



Note the data reliability of tevent.txt seems questionable:

"fires beam on X at range Y." -> Y doesn't change when approaching to target X.

Same for "Hit probability". But it's clearly disproved by real weapon damage.


Also the impact of the hob centerpoint resp. shield perimeter to the actual weapon distances (or ram maneuver) has to be researched yet.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Post by thunderchero »

This is very interesting, But I think starbase is the biggest problem to date. So I will wait to use this until then.

But like the Idea of being able to set combat distance this way. strange how cloaked ships are set closer I had not noticed this in battle but will watch closer now. :wink:

Just a note for you to keep in mind monsters need to be thrown into this with edo and possibly many monsters they seem to act like starbases in battle (do not move) 0.0 agility. :?:

thunderchero
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

thunderchero wrote:I think starbase is the biggest problem to date. So I will wait to use this until then.
For Outposts/Starbases just manipulate 0x11F0F7 & 0x195718, with 0x11F0F7 also determining standard ship to ship distance and 0x195718 also the stations distance to a defending fleet.
thunderchero wrote:strange how cloaked ships are set closer I had not noticed this in battle
This only applies for complete cloaked fleets, of course. :wink:
thunderchero wrote:monsters need to be thrown into this with edo and possibly many monsters they seem to act like starbases in battle (do not move) 0.0 agility. :?:
0x11F0F7 does also affect monster vs. ship but not to the same extend (~*1, instead *2). So monsters are closer, depending on an other unknown, but apparently size related value.
0x195718 doesn't affect monsters (monster vs. station untested).

I don't intend to analyse this further w.r.t. monster, monster vs. starbase or 3(+) way battles, but I'm pretty sure agility has nothing to do with the subject.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Re: Starbase Combat Distance

Post by Gowron »

Spocks-cuddly-tribble wrote: 3.) cloak approach

520286 fld ds: 584E0C // 0x182C0C (8 bytes)
default: 300.0
NOTE: multiplied by 1.5 (shared value)
Just one note: This is actually the value which will be subtracted from the standard combat distance, so if this value is increased, cloaked fleets will be set closer to the target.

This can even be used to make cloaked fleets start up behind their opponents. An interesting option :)
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
Post Reply

Return to “Starbase Combat Distance and ship to ship initial distance”