Author Topic: Assault Transport Oversight?  (Read 20788 times)

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Assault Transport Oversight?
« Reply #15 on: May 02, 2015, 05:44:03 am »
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Bognor

  • Hero Member
  • *****
  • Posts: 570
Re: Assault Transport Oversight?
« Reply #16 on: May 03, 2015, 06:21:56 am »
There have been so many posts about Assault Transports' power, I wonder... Has anyone confirmed they really work as intended at various ship caps, aside from the bug?  For reference, here are the relevant patch notes, with the key lines highlighted:

Quote
The MkII Transport, in honor of doing quite well in the poll:
    Has been renamed to the Assault Transport.
    Cap from 20 => 10 (metal cost, crystal cost, and build time doubled accordingly).
    Unload rate from 20/sec => 200/sec (so effectively instant.
    Where the normal Transport causes all unloaded ships to do a full reload cycle before firing, the Assault Transport unloads them at halfway through the reload cycle (or wherever they were in the reload cycle when they loaded into the transport, whichever is greater).
    The Assault Transport has cloaking.
    The Assault Transport has an attack. Unloaded, the cap of Assault Transports has a little over half the bonus-cap-dps of the mkI fighter so it's not very impressive (particularly considering the K cost). But every 10 ships in an assault transport gives it an additional shot-per-salvo, so a fully loaded cap of these is actually fairly powerful (but nowhere near as powerful as that many normal combatants). And before you ask, yes, Science ships (and other unarmed things) count for this, but 2,000 science ships involves a... rather prohibitive economic cost, considering the payoff.
        This attack can be suppressed by putting the unit in stand-down mode; everything else it does (loading, unloading, cloaking, etc) will continue to function just fine but this will prevent it from unilaterally breaking its own cloak. At the same time, the attack behavior can be used (while not in stand-down) to suppress the cloak so you can use the transports' traditional "damage sponge" role.
    Health from 2x a normal transports => 4x.
    Knowledge cost from 4000 => 3000.


Actually, I'd like it if ships could repair engine damage when they're in the vacuum...
Engines should slowly repair over time, right?  The AI's ships' engines do, and I'm pretty sure human ships' do, too.
Your computer can help defeat malaria!
Please visit the World Community Grid to find out how.

Offline Chris_Stalis

  • Newbie Mark III
  • *
  • Posts: 40
Re: Assault Transport Oversight?
« Reply #17 on: May 03, 2015, 02:42:43 pm »
I actually filed a bug for this on 4/17 on the tracker here. Don't know if it is or has been duplicated by this point, but I couldn't find anything similar when I filed it.

Currently, the AT is ranging between 1 shot per volley when empty and 30 shots per volley when full. Shots per volley was calculated by assessing net damage against a 0 armor target (wormhole guardpost, if I recall). The volley rate seems to scale as a percentage of contained units, not on the 10 unit / shot mechanic stated. The AT is also given a very low priority in the AI targeting logic, even though I routinely use full ATs to tear through amassed threat (10 fully armed ATs can drop around 600-1000 assorted threat units, depending on composition of swarming style units like the microfighter or laser gatling). This means it is profoundly powerful in AI homeworld assaults, as 10 ATs can drop a Mk III force field in around 10 volleys by themselves, but do it even faster when aided by ship caps of bombers or tanks.

I really think the developers need to weigh in to discuss what purpose the AT is supposed to have, because right now I use it for the majority of all my assaults and ship movements anywhere. I even use it on the fallen spire campaign, because no fallen spire ships are immune to transportation. It seems to be filling every niche imaginable, so even just making the current AT a mk IV variant wouldn't solve the problem so much as delay it.

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: Assault Transport Oversight?
« Reply #18 on: May 03, 2015, 03:55:55 pm »
Confirmed that the AT is still programmed to use the 1 shot/10 units formula, *but* the wiki information isn't complete and that's what's causing the confusion -- there are TWO formulae in play that determine the final shot/damage output of the AT.  1/10 is only the beginning.

Here's the relevant C# code extracted from the decompiled game.

First, the basic stats for ATs get set on game startup (only the stats related to shots is in the snipped below, don't need all the other dozen things in this discussion):

Quote
                    this.BaseAttackRechargeSeconds = 4;
                    this.SetBaseAttackPowerByMkICapDPS(15000);
                    this.GainsOneSecondaryShotPerThisManyTransportedUnits = 10;

Then, here's the actual method that determines the rest at combat time:

Quote
    public int GetEffectiveNumberOfSecondaryShots(FInt ContainedStrength, int TransportedUnitCount)
    {
        int intValue;
        FInt containedStrength;
        if (ContainedStrength > 0)
        {
            if (this.GainsOneSecondaryShotPerThisManyCarrierListEntries > 0)
            {
                <snipped, don't care>
            }
            else if (this.GainsOneSecondaryShotPerThisManyTransportedUnits > 0)
            {
                int num = this.NumberSecondaryShots;
                containedStrength = ContainedStrength / this.GainsOneSecondaryShotPerThisManyTransportedUnits;
                intValue = num + containedStrength.IntValue;
                return intValue;
            }

        }
        if (TransportedUnitCount > 0)
        {
                <snipped bits relating to swallowers/powerslavers>
        }
        intValue = this.NumberSecondaryShots;
        return intValue;
    }

Now everyone can see exactly what's going on under the hood.  :)


Follow up question aimed at everyone -- what percentage of the current fully-loaded damage would you consider to be ideal?
« Last Edit: May 04, 2015, 01:57:46 am by Red.Queen »
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline Chris_Stalis

  • Newbie Mark III
  • *
  • Posts: 40
Re: Assault Transport Oversight?
« Reply #19 on: May 03, 2015, 05:17:37 pm »
Red.Queen, did you decompile the latest build of the game? I ask because:

If cap DPS = 15000, recharge of 4 sec => damage / volley = 3750 (target armor = 0)
3750 / 240 (shot damage) = 15.625 shots / volley (at max DPS)

I can definitely confirm that 1 full volley at 200 ships transported yields 7440 damage / volley against a wormhole guardpost (31 shots / volley @ 240 damage / shot). This is also independent of the strength of the contained units, because I've tried loading an AT with nothing but engineer type units (Mk I/II/III engies, rebuilders, cleanup drones & mobile builders), and it yields the same damage as a full load of mixed fleet ships (fighters/bombers/frigates).

The code snippet you provided also doesn't provide what trigger condition invokes that function on each AT. It seems to be whenever total carried ships is updated, but there's likely a mistake in the update logic because decreasing the number of ships inside doesn't trigger a recalculation, only adding ships. Also: adding a load of 100, unloading all 100, then reloading all 100 does not cause the AT weapons to reach full power.

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: Assault Transport Oversight?
« Reply #20 on: May 03, 2015, 06:34:57 pm »
Yep, current stable Windows build.

The issues with the damage not updating correctly is a known bug that I think someone Mantised already -- it tends to not update the current damage of the AT once loaded until you quit back to the main menu and reload the save.  The class that does most of the stat setting, which this code is from, ForegroundUnitTypeImmutable appears to run once at game load when it sets up all the ships/structures that your combo of expansions and settings have permitted.

It's definitely not based on the DPS of the ships inside, I remember seeing a post from Keith a while ago that mentioned people doing silly things like sticking dozens of Science stations in them (I see Bognor's post pulls up the patch notes that covered that), or Hacking modules when those were transportable (he patched that last one, that was a flat out exploit since they are free).  I haven't tracked down exactly what value it's pulling there -- the class all this stuff is in is almost 60,000 lines of C# so navigation is somewhat challenging.

I haven't found where the GetEffectiveNumberOfSecondaryShots function gets called after startup either, IF it gets called after startup -- it's a unique name so it should turn right up when searching across the whole assembly if something specifically fires it.  As far as I can tell, nothing outside of its host class does.  But there does seem to be some updating that happens without having to reload a save, albeit buggy, so I suspect there are certain points where the game may retrigger the whole damn class.  Likely candidates would be from a class I saw that handles monitoring the population of ships on each planet as that runs periodically.

Tracking down the specific reference may take me a while, most of these core classes are... somewhat north of "enormous" in size, and the FUTI class is heavily used by just about everything, so searching for refs to it turns up a number of hits that's not practical to walk through.  I need to see if I can get my decompiler to spit out a list or something so I can try to do some tricks to filter out the obvious crap.

Frankly I may be better off trying to trace it in the ~1M line Assembly language dump I have -- sometimes I find it easier to work with, weirdly enough.

We'll see, the hunt continues.

Interesting that the damage/volley that you're seeing is nearly perfectly double the expected amount, that almost sounds like it's taking the base value from that formula and then feeding it back in again.  That's probably not supposed to happen...

Can you describe exactly when you're noticing the ATs updating their damage and when they're not?  What happens if you load your game, move an empty one to an enemy planet, load it up there, then shoot something WITHOUT moving through a wormhole?  Does it do damage that's more in line with the expected amount?  Less?  More?  What happens when you move it through a wormhole and shoot something on the new planet?  Does the damage suddenly double?
« Last Edit: May 04, 2015, 01:58:13 am by Red.Queen »
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: Assault Transport Oversight?
« Reply #21 on: May 04, 2015, 02:17:28 am »
So... many... reused names of functions and variables...  I'm having to bounce back and forth between the decompiled AND the disassembled code to track down all the points the transport salvo stuff pops up to hunt for potential points of failure.

I'm really wondering now whether the AI Carriers are affected by this bug as well -- if anyone wants to let a carrier shoot at their stuff while it unloads units and report the damage they see before and after a partial unload, that would be extremely useful.

The AT tests I mentioned in my last post would also be great if anyone wants to give them a shot -- I'm curious if there's *ever* a point where the game picks up changes after an AT has been initially loaded (it generates a list so it's no longer null at that point) without saving and reloading.

AI Carriers (Barracks too) use the same main function for determining number of shots that the AT does, BUT they use a different block in it that is basing number of shots off of the *strength* of what's packed inside, rather than just raw unit count like the ATs.   Incidentally Powerslavers go off of raw unit count "transported" as well, so I am suspicious they share the AT's bug, as they go off the same value.

If transported strength but *not* number transported is successfully updating, that is going to be very interesting as so far I don't see much of a reason for that to happen, but then again I haven't looked closely at the Carrier/Barracks specific logic -- but they do have some extra checks that could be catching changes and forcing an update, if they are unaffected by this bug.

If they are all bugged, then that narrows it down significantly, it's probably a failure in one of two functions in the AIUnit class where does some unit status checks.

Incidentally, there is one place that I know for sure updates counts correctly -- the unload menu in the UI for ATs that shows what's inside them.  That actually forces its own check of contents.  So if for some bizarre reason it's only number carried that's failing to refresh (might be a timing issue) a temporary fix could theoretically be jury-rigged by grabbing that tally and kicking it back into the relevant variable the salvo stuff looks at.

Anyway, I'm out of brandy and have to crash before a 12 hour workday so I'm gonna call it a night on this and go enjoy my buzz while I rock out to some industrial.  8)
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline Bognor

  • Hero Member
  • *****
  • Posts: 570
Re: Assault Transport Oversight?
« Reply #22 on: May 04, 2015, 09:32:18 am »
Incidentally Powerslavers go off of raw unit count "transported" as well, so I am suspicious they share the AT's bug, as they go off the same value.
I don't believe Powerslavers ever unload, nor do they attrition their slaves.  So I don't think the bug would have any opportunity to affect them.
Your computer can help defeat malaria!
Please visit the World Community Grid to find out how.

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: Assault Transport Oversight?
« Reply #23 on: May 04, 2015, 02:25:06 pm »
Good point Bognor.  That means that even if they are technically affected by the bug, it will never actually be noticeable since the "transported" count wouldn't drop.

So it's ATs and Carriers that are the test cases for exploring how far this quirk reaches.
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline Chris_Stalis

  • Newbie Mark III
  • *
  • Posts: 40
Re: Assault Transport Oversight?
« Reply #24 on: May 04, 2015, 07:42:03 pm »
I'll get that more detailed behavior on the AT later tonight. I also will say that I haven't noticed this bug affecting the AI carriers, but I'm usually busy as all hell trying to kill them, so... grain of salt with that one. Is there any way to spawn one using cheats for debug purposes? Like, one that would be under the control of the player?

Also, is the decompiled version of the game available to the general public? I could also hunt through the C# and see if I can offer any additional insight. I'll admit that I'm much more used to C++, but I ought to be able to pick up general logic easily enough.

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: Assault Transport Oversight?
« Reply #25 on: May 04, 2015, 08:36:58 pm »
Schweet, much appreciated Chris.

There is indeed a way to spawn any unit and have it under your control -- it's the "ilostit" command.  Not sure if there are instructions on the wiki on using it, but I know it works -- a couple of guys here used it in a very amusing AAR where one player was given a Hunter Killer Mk.V to pilot as his sole ship of doom.

As for the decompiled code, nope, definitely not publicly available.  If you have ILSpy, Telerik JustDecompile, or some other tool that can handle C#, you can just toss the Assembly-CSharp.dll into it and read away, though take the output with a small grain of salt, it's not perfect.  I don't actually break the .dll down into its component .cs files -- they're useless because without the actual original source you can't recompile if you try to edit anything.  Unity is a pain like that.  Actually changing stuff requires either hex editing (hell no) or disassembling the file and working in MSIL (an Assembly language, but if you are familiar with C++ you probably knew that already).  I rather like MSIL, but I may be a little weird.  ;)
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline The Hunter

  • Full Member Mark II
  • ***
  • Posts: 153
  • H/K Mk5
Re: Assault Transport Oversight?
« Reply #26 on: May 05, 2015, 09:43:43 am »
it's the "ilostit" command.  Not sure if there are instructions on the wiki on using it, but I know it works -- a couple of guys here used it in a very amusing AAR where one player was given a Hunter Killer Mk.V to pilot as his sole ship of doom.

Good times.  :) Theres a decent guide of using it, by the way: http://www.arcengames.com/forums/index.php?topic=15676.0 , though cant recall if it can spawn usable carriers.

Offline Traveller

  • Jr. Member Mark III
  • **
  • Posts: 96
Re: Assault Transport Oversight?
« Reply #27 on: May 05, 2015, 02:52:26 pm »
The more I think about it, the more I'd be happy with ATs that can't fire at all.  Stealth and insta-unload are powerful enough, and they should really be prioritized higher by the AI (so you'd want to escort them with scout ships for the stealth boost).

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Assault Transport Oversight?
« Reply #28 on: May 05, 2015, 03:10:22 pm »
The more I think about it, the more I'd be happy with ATs that can't fire at all.  Stealth and insta-unload are powerful enough, and they should really be prioritized higher by the AI (so you'd want to escort them with scout ships for the stealth boost).
Indeed, these features are not bad at all. Also you can build more (20 IIRC) than normal transports. So the same, without shooting, and maybe less Knowledge cost? Like 2,000 or 1,500? (Instead of 3,000)
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Traveller

  • Jr. Member Mark III
  • **
  • Posts: 96
Re: Assault Transport Oversight?
« Reply #29 on: May 05, 2015, 04:10:06 pm »
You have the unit cap backwards, it's 20 regular transports, 10 assault.

I'd buy them most games even at the current knowledge cost without an attack.