Whoa, super cool!
Is there a method to set the offset of a weapon? I'm using FX drones to 'reflect' the beams but the weapon offsets create a bit of a disjoint, and I'm not sure how to adjust them.
WeaponAPI.ensureClonedSpec() to make a copy of the weapon spec, so that your changes don't affet ALL weapons of this type in the game. And then you can do:
WeaponAPI.getSpec(), which returns a WeaponSpecAPI. That has:
List<Vector2f> getHardpointFireOffsets();
List<Float> getHardpointAngleOffsets();
List<Vector2f> getTurretFireOffsets();
List<Float> getTurretAngleOffsets();
List<Vector2f> getHiddenFireOffsets();
List<Float> getHiddenAngleOffsets();
You can edit these lists. The fire offsets are pairs of coordinates, so each "fire offset" list would have twice the size of the related "angle offset" list.
Secondly, I'm running into an issue where specific 'reflected' beams will hit the armor plate that has the hullmod, but appear to hit the armor plate instead of travelling normally. Here's another screenshot... Is there a way to make friendly beams pass through the armor plate, similar to fighter beams passing through their host ship?
You could set the collision class on the beam to CollisionClass.RAY_FIGHTER. Or you could try to finagle the offset so that the beam spawns outside the plate.
https://imgur.com/a/zQdwd5b
why this happen in my game??
Hi - this isn't the thread for this; if you have a suspicion which mod is causing the issue, you can ask/report the issue in that mod's thread. If not, a post in the modded bug reports forum might be the way to go; someone might have seen this before and be able to point you in the right direction.