Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Xaiier

Pages: [1]
1
Modding / Bizarre behavior when trying to copy variant from ship to drones
« on: November 20, 2021, 02:28:17 PM »
Ok so from the title alone you probably have lots of questions, but the TL;DR is that I'm trying to make a ship which spawns "clones" of itself as a drone ship system. The key part of this is taking the loadout from the main ship and applying it to the spawned drones, so they match the main ship. This is where the problems start to arise.

I've tried two slightly different methods of accomplishing this, with similar results. Method 1 consists of a built-in hull mod which attempts to check if the ship in question is a drone, and copy the loadout from the mothership to itself:

Code
@Override
public void advanceInCombat(ShipAPI ship, float amount) {
if (ship.isDrone()) {
ship.setShipSystemDisabled(true);

ShipVariantAPI variant = ship.getVariant();
ShipVariantAPI parentVariant = ship.getDroneSource().getVariant();

variant.clearHullMods();
for (String mod : parentVariant.getHullMods()) {
variant.addMod(mod);
}

for (String slot : parentVariant.getFittedWeaponSlots()) {
variant.clearSlot(slot);
variant.addWeapon(slot, parentVariant.getWeaponId(slot));
}

variant.setNumFluxCapacitors(parentVariant.getNumFluxCapacitors());
variant.setNumFluxVents(parentVariant.getNumFluxVents());
}
}

This kinda works, except that the first 3 (out of 10 in this case) drones end up with an "old" loadout. The first time you enter the sim it puts the default variant weapons, and if you change the weapons in the refit screen and go into the sim again, the first three drones deployed will have whatever weapon was previously fitted. If you instead deploy a series of the ship each with different loadouts, you find that all of the drones deployed from each new ship have the weapons from the last ship that was deployed.

Method 2 consists of a built-in hull mod which attempts to find all the drones and copy the loadout from the mothership to them:

Code
@Override
public void advanceInCombat(ShipAPI ship, float amount) {
List<ShipAPI> drones = ship.getDeployedDrones();

for (ShipAPI drone : drones) {
drone.setShipSystemDisabled(true);

ShipVariantAPI variant = drone.getVariant();
ShipVariantAPI parentVariant = ship.getVariant();

variant.clearHullMods();
for (String mod : parentVariant.getHullMods()) {
if (mod != "xai_clone") {
variant.addMod(mod);
}
}

for (String slot : parentVariant.getNonBuiltInWeaponSlots() ) {
variant.clearSlot(slot);
String s = parentVariant.getWeaponId(slot);
if (s != null) {
variant.addWeapon(slot, s);
}
}

variant.setNumFluxCapacitors(parentVariant.getNumFluxCapacitors());
variant.setNumFluxVents(parentVariant.getNumFluxVents());
}
}

This works a bit better, however the first drone deployed always has the "old" loadout - either the previous (or default) weapon you went into the sim with, or the loadout of the last deployed ship of this type.


I'm totally stumped by this behavior, and any help figuring this out would be appreciated. As best as I can tell, my code is working correctly but getVariant() is somehow finding an old version that hasn't been cleaned up by the GC. What's really weird is that the two methods behave slightly differently which seems to indicate something really odd happening under the hood with how variants are handled, at least for drones specifically.

2
General Discussion / welp GG
« on: December 02, 2015, 08:59:10 PM »
Barely scraping by on <5k credits after repeatedly dying and losing what few moderately not crap ships and little money I was able to scrape together...

Do some missions that pay so poor they hardly pay for my supplies to get there...

Finally find a decent payout mission that I can afford to purchase the necessary items...

Get ganked by pirates on the way there...

Die...

Respawn in potato...

Attempt to run and finish mission...

Followed across system by pirates, while patrols derp around not being helpful...

Pirates catch up as I get to jump point...

Enter battle...

Realize potato can't even fight these weak (D) pirates...

Get overloaded by missile spam because no PD...

Get one-shotted by a pair of missiles...

Die...

Respawn in Lasher :D

Trash some scrub pirates...

Try to run to complete mission...cash is now >2k

Somehow boost through entire map without running into anyone or hitting any storms...

See friendly Tri-Tach fleet...

Go to press transponder so they don't get mad at me...

Fat finger the keys...

End up pressing go dark, lose all speed and get engaged by Tri-Tach fleet...

Spaz and fat finger the keys again, somehow getting into an engagement...

Run away, never fire, never even see them...

Retreat...

Oh well the rep loss wasn't too bad, at least they don't hate me...

Foolishly activate transponder...

They discover who I am...

"YOUR RECENT ACTS OF AGGRESSION..." -70 rep...

FUUUUUUUUUUUUUUUUUU...

Tri-Tach and Hegemony hate me...

Everyone else borderline hates me...

Mission runs out of time...

Deep in enemy territory...

Low on supplies and fuel...

Book it for nearest neutral system...

Run out of fuel and supplies on the way...

Take heavy CR hits...

Make it to safety...

1267 credits...

Can't afford supplies to even fix my ship into fighting condition...

Can't afford to do any missions...

Can't afford fuel to go anywhere else...

...

I think I'll be deleting this save now...


This is as much of a rant as it is a commentary on how brutal the early game is, as well as how certain mechanics are extremely frustrating or even nonsensical and unfair.
P.S. release 0.7.1a already  :-[

3
General Discussion / Volatiles for everyone!
« on: December 01, 2015, 12:33:08 PM »


Soo yeah, Mimir Siphon platform seems to be siphoning a bit too much...at this rate the gas giant will be gone by next week.

I tried to move them all into my cargo, got about half way done (and 150m credits value :o) before it started massively lagging and eventually crashed, likely due to overfilling the memory as it split each stack into many stacks of 1000.

4
Suggestions / Automated Repair Unit needs a rework
« on: October 28, 2014, 10:38:23 PM »
I've been looking at the Automated Repair Unit and it doesn't seem to be a sensible hull mod in any case.

5/10/15/25 ordinance points
50% greater speed for fixing disabled engines/weapons in combat
50% greater speed of repairs and CR
50% more logistics usage
Unlocked at Damage Control level 5

The ordinance cost is quite high.
The greater speed of combat repairs is somewhat borderline helpful, but not enough.
The greater speed of repairs and CR is only useful in rare cases where you need to do a lot of combat frequently and can't return to a station.
The increased logistic usage is an extra negative to the already high ordinance cost.
The unlock is late, and is under a skill that is typically not trained first, so it likely won't be unlocked until late in the game.

In the end, I can't think of a single situation where it would be a good choice to use (if anyone knows of one, feel free to post), and so I think it should definitely be looked at to improve its worth or reduce its negative effects, to make it a more viable hull mod.

5
General Discussion / My current problem...
« on: October 23, 2014, 02:05:26 PM »
Spoiler
[close]

This is basically how every high-tech planet's shipyard looks. No cruisers at all, except a couple Ventures, Herons, and Falcons on a few of the places, and only rarely. (Admittedly I had and lost two Eagles due to 360 flameout spins in the middle of enemy fleets) Despite this, there is almost always at least one, if not two capitals sitting around. I realize that ships and resources got a lot more scarce, but this seems really odd.

Another problem I have is that even if I did go and buy a capital, I would never be able to outfit it. I tried to buy an Onslaught and I flew all around to every base and I didn't find even a quarter of the weapons necessary to give it a respectable fitting. I even have trouble fitting frigates sometimes.

So, is anyone else experiencing a similar shortage of stuff, or is it just me?


6
Bug Reports & Support / I can't buy this game???
« on: September 23, 2014, 10:40:11 PM »
So, despite my attempts, I don't seem to be able to buy this game.

First try, used my debit card with the BMT Micro site, said it worked, then I received an email saying "Our automated fraud screening service detected an unusually high risk with processing your order." Well that's nice, the payment provider has an idiotic automated system that randomly marks things as fraud. I mean, sure, don't take my money. That's a good way to get people to buy stuff.

Second try, lets use amazon payments because I already have everything set up with them. Said it worked. No email yet, hours later, and no transaction registered with my card provider. Does anything this BMT Micro thing does work right?

What on earth is going on? Am I doing something wrong? Or is this BMT Micro payment system just horribly broken? I want to check this game out and support the developers, but it seems to be amazingly difficult to do so, and I'm nearing the end of my patience.

Pages: [1]