EDIT: No, that's not it. It's also happening in the cycle 206 colony and I have no idea why aaaa
Well, I already have a workaround in mind (if colony growth progress reaches 100% within X days of founding, reset it) which I'll try.
Hmm, weird! Nothing comes to mind as far as any sort of "catch up" code in vanilla. Well - let me know if there's anything you want me to have a look at?
Is there any easy way of making a ship system spawn a drone at a target location instead of from the ship's hull?
I basically want to spawn a drone/autonomous ship like one places a doom mine.
I'm not sure if there's an elegant-er way of doing it, but at a minimum you could probably have a script that detects when the drone spawns and moves it wherever you like.
public class PLIntel extends BaseIntelPlugin {
public void createLargeDescription(CustomPanelAPI panel, float width, float height) {
TooltipMakerAPI info = panel.createUIElement(width, height, false);
panel.addUIElement(info).inTL(0, 0);
// sorry
info.addPlaythroughDataPanel(width, height);
}
}
Oh... well, it's Ok, Alex, I understand. But, just to make sure, is there any way for us to use the great looking elements on display in the playthrough log intel?
Ah - not to repeat the comment, but - sorry
In the DamageListener.reportDamageApplied()
method is there a way to get the WeaponAPI or DamagingProjectileAPI? So far all the testing I've done shows it as just a ShipAPI. I don't think it's possible to track a unit of damage back to the originating weapon (or ship system) with the listener, but I wanted to verify that's correct before I start doing anything silly to try and tie it together. Thanks!
I think you're right, yes.
I'm able to parse apart what's happening with the DamageListener when the damage comes from a DamagingProjectileAPI but when the damage comes from a BeamAPI I'm having trouble. From what I can tell with beams, multiple damages caused by the same type of weapon are usually only reported once (like if you have an Eagle with 3 gravitron beams hitting the same target, there will be only one DamageListener event.) But even when there are many dissimilar beams hitting the same target, if all the beams do the same damage type, most of the time there will be only one reported event to the DamageListener.
Maybe there's a bug in the listener code with regards to beams? Also regarding the DamageListener interface, if the reportDamageApplied method could also include the WeaponAPI that caused the damage, not only would it make the stuff I'm doing in my mods easier it might enable other mod authors to do some weird on-hit stuff with some weapons. (If there's not already a way to do that sort of thing)
Thanks!
Maybe you're just seeing the beam damage events reported every 1/10th of a second, and they don't line up on the same frame? Haven't looked at the code, but it's *really* hard to imagine how beam damage from multiple beams would accidentally get aggregated and/or only reported once. That'd take some real work and a bunch of code.
Re: passing in a WeaponAPI: duly noted! Would involve passing it through a bunch of method calls that currently don't have it, though. ... perhaps adding it to DamageAPI might be the way to go. I'll make a note.
Hello Alex. How would you decrease the quality of ships (fleets and submarket) globally? I'd love to make pristine ships very rare but have no idea where to start looking at.
Found it - qualityPerDmods setting - set it to something low.
That's not quite what you want, I don't think. E.G. if you set it to 0.05 then a ship with 0.8 quality would get 4 d-mods. But a ship with 1.0 quality would still have 0-1 d-mods, and so on.
Some fleets spawned by the game just have a fixed quality, too, so they wouldn't be affected.
I think the best way to do this would be to apply a quality modifier to all colonies. Something like what PopulationAndInfrastructure does:
float stabilityQualityMod = FleetFactoryV3.getShipQualityModForStability(stability);
market.getStats().getDynamic().getMod(Stats.FLEET_QUALITY_MOD).modifyFlatAlways(getModId(0), stabilityQualityMod, "Stability");
That'd... affect just about everything, except fleet spawns where quality is fixed.
Also, how can I change the buying price of d-modded ships? We have "hullWithDModsSellPriceMult" but not "hullWithDModsBuyPriceMult" (seems to be hardcoded to 0.8 per d-mod).
I don't think you can; there's just a mult the ship buy price, but whether it has d-mods doesn't look like it's factored in at all.