Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [0.9a RC10] Autofit doesn't consider SO when choosing weapon ranges  (Read 1453 times)

Zhentar

  • Commander
  • ***
  • Posts: 100
    • View Profile

Autofit doesn't consider short range weapons unless the variant template calls for one. Unfortunately, the inverse does not get applied for ships with Safety Overrides, causing long range weapons which are considered "better" because of their long range to be favored even though their better-ness can't actually be used. And since the short range heavy machine gun & assault chaingun are a major contributor to the strength of Safety Overrides, this can significantly harm their combat effectiveness.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile

(Moved it out of bug reports as this isn't a bug, more of a possible thing to improve.)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile

Ditto - please post these kinds of things in suggestions - and preferably in this thread, as these are all related and there doesn't seem to be a reason to create multiple threads for this, especially not in bug repports - as they're clearly not bugs. Or, at least, "not clearly bugs" - if there's any significant doubt, it should *not* go in that forum.

And in most cases of code-diving like this, there ought to be a lot of doubt unless it's a fairly clear copy/paste error or some such. (Case in point: there's more to autofitting than just the autofit plugin, so any analysis that's based on that is going to be misleading and incomplete. One of the things to look at is, for example, what weapons are actually made available to the autofit plugin, which is *not* "everything the faction knows".)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile

Oh, what the ... I merged the threads, and it looks like that ate the second thread somehow? Except when I went to reply to it, the 2nd post was there. You didn't delete it or something, did you?

Just in case, here's your second post - that I was responding to, and which I just dug out of my browser history:
Quote from: Zhentar
While individually larger weapons are favored during randomization as a result of their higher base level, this advantage can be significantly reduced as a result of undersampling - that is, there are usually more candidate weapons of smaller mount sizes than there are of larger sizes. Given two medium weapons, and one large weapon 5 levels higher, the randomization has a 44.5% chance of choosing one of the mediums. This causes AI randomized variants to be chronically under-armed because they often don't use full sized weapons.

That's really weird that it would do that. Hm. Edit: ok, yeah, it was definitely there, so the thread merge did work correctly.
« Last Edit: May 05, 2019, 09:59:19 PM by Alex »
Logged

Zhentar

  • Commander
  • ***
  • Posts: 100
    • View Profile

Oh, what the ... I merged the threads, and it looks like that ate the second thread somehow? Except when I went to reply to it, the 2nd post was there. You didn't delete it or something, did you?
ehehehe... I was trying to edit it but missed the touch target. I was intending to add:


I should note that percentage is assuming ties favor smaller weapons because they happen to get evaluated first.

This effect is largely a result of how large the random level adjustment is relative to the level difference between mount sizes; reducing the random range to 0..9 instead of 0..19 drops the chance of undersizing down to 24.5% which I think would have a much better feel to it.
Logged

Zhentar

  • Commander
  • ***
  • Posts: 100
    • View Profile

Oh, here's a thought: what if instead of
Code
level += random.nextInt(20);
it were something like
Code
level += random.nextInt(25*Math.max(0.35,faction.getDoctrine().getAutofitRandomizeProbability())
? That would leave pirates with just as wacky autofit choices while toning things down a lot for more resource-laden factions.

Also, noted re: subforum & separate thread critieria
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile

Hmm. It should be noted that even when "randomize" is set, variants are randomized half the time. So .75 for pirates means that only 37.5% of their variants are randomized.

IIRC, the reason for setting the level variance that high was specifically to avoid always/mostly picking large weapons for large slots - since it's often the case that few large weapons for a particular slot type are available, the variants didn't really feel that random.

Due to the nature of how "randomize" works, optimal results are kind of out the window anyway, right? So in this case it's prioritizing getting more variety and stuff that looks different immediately vs getting somewhat more effective loadouts.
« Last Edit: May 06, 2019, 10:03:34 AM by Alex »
Logged