Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 306 307 [308] 309 310 ... 710

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1719449 times)

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4605 on: May 30, 2019, 06:02:59 AM »

I wanted to make a hullmod that boosts damage on medium mounts by 25%, but looking at MutableShipStats, it seems I can only do boosts based on weapon type, not mount size. I guess this is a no-go?
Logged

Vayra

  • Admiral
  • *****
  • Posts: 627
  • jangala delenda est
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4606 on: May 30, 2019, 06:15:34 PM »

A quick one - is it possible to add a line to a skin file to ensure it doesn't show up in the codex?

Add the HIDE_IN_CODEX hint?
Logged
Kadur Remnant: http://fractalsoftworks.com/forum/index.php?topic=6649
Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=16058
Vayra's Ship Pack: http://fractalsoftworks.com/forum/index.php?topic=16059

im gonna push jangala into the sun i swear to god im gonna do it

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4607 on: June 01, 2019, 10:47:13 AM »

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF


This is driving me insane
Quote
301606 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.loading.specs.HullVariantSpec.computeWeaponOPCost(Unknown Source)
   at com.fs.starfarer.loading.specs.HullVariantSpec.computeOPCost(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.getMemberStrength(Unknown Source)
   at com.fs.starfarer.api.util.Misc.getMemberStrength(Misc.java:3777)
   at com.fs.starfarer.campaign.fleet.FleetData.updateFleetPointsUsed(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.syncIfNeeded(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.sort(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.sort(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3.createFleet(FleetFactoryV3.java:408)
   at com.fs.starfarer.api.impl.campaign.submarkets.BaseSubmarketPlugin.addShips(BaseSubmarketPlugin.java:472)
   at com.fs.starfarer.api.impl.campaign.submarkets.MilitarySubmarketPlugin.updateCar goPrePlayerInteraction(MilitarySubmarketPlugin.java:53)
   at com.fs.starfarer.campaign.ui.E.<init>(Unknown Source)
   at com.fs.starfarer.coreui.o00o.<init>(Unknown Source)
   at com.fs.starfarer.coreui.o00o.<init>(Unknown Source)
   at com.fs.starfarer.ui.newui.J$5.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.newui.J.setCurrentTab(Unknown Source)
   at com.fs.starfarer.ui.newui.J.setCurrentTab(Unknown Source)
   at com.fs.starfarer.ui.newui.U.showCoreInternal(Unknown Source)
   at com.fs.starfarer.ui.newui.U.showCore(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.rulecmd.OpenCoreTab.execute(OpenCoreTab.java:40)
   at com.fs.starfarer.ui.newui.super.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.k.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.oooO.new(Unknown Source)
   at com.fs.starfarer.ui.oooO.processInput(Unknown Source)
   at com.fs.starfarer.ui.Stringsuper.o00000(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Is this a weapon error?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24113
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4608 on: June 01, 2019, 10:49:38 AM »

This looks like it's likely to be "variant references a weapon ID, but there's no weapon with that ID". Could happen, say, if you change a weapon ID and load an older save, or disable a mod that provided that weapon.

(Let me make the error more helpful in this specific case. Been trying to do that for various *things* that can go wrong...)

Edit: this could also if there's an invalid fighter wing id.
« Last Edit: June 01, 2019, 10:51:56 AM by Alex »
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4609 on: June 01, 2019, 11:11:41 AM »

I did change some fighter wing loadouts.

Would refreshing the market help (as it crashes only on specific markets)?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24113
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4610 on: June 01, 2019, 11:17:56 AM »

It might or it might not, hard to say for sure as it depends on whether that ship would get re-rolled or not. If you cleared the market contents that might do the job. Assuming that it is in fact due to a ship in that market.
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4611 on: June 01, 2019, 11:18:14 AM »

On another note, I'm having an issue with hullmods that do not work. I have several, they all appear on the list and are selectable, but 3 do not work (nothing happens when I click on them, they are not installed).
I've been over hte files a dozen time but cannto find ANYTHINg wrong. they are properly defined and references in hull_mods.cvs

For example, THIS works:
Code
package data.hullmods;

import java.util.HashMap;
import java.util.Map;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

@SuppressWarnings("unchecked")
public class Radiators extends BaseHullMod {

public static final int HARD_FLUX_DISSIPATION_PERCENT = 50;

public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
{
stats.getHardFluxDissipationFraction().modifyFlat(id, (float)HARD_FLUX_DISSIPATION_PERCENT * 0.02f);
stats.getFluxDissipation().modifyPercent(id, 20f);
stats.getArmorBonus().modifyPercent(id, -20f);
stats.getHullBonus().modifyPercent(id, -10);
}

public String getDescriptionParam(int index, HullSize hullSize) {
if (index == 0) return "" + HARD_FLUX_DISSIPATION_PERCENT;
return null;
}

@Override
public boolean isApplicableToShip(ShipAPI ship) {
return
((!ship.getVariant().getHullMods().contains("heavyarmor")) &&
(!ship.getVariant().getHullMods().contains("comp_armor")) &&
(!ship.getVariant().getHullMods().contains("Deflectors")));
}
}


But these don't

Code
package data.hullmods;

import java.util.HashMap;
import java.util.Map;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
import com.fs.starfarer.api.combat.ShieldAPI;
import com.fs.starfarer.api.combat.ShieldAPI.ShieldType;

@SuppressWarnings("unchecked")
public class PoweredArmour extends BaseHullMod {

public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
{
stats.getArmorBonus().modifyPercent(id, 25f);
stats.getArmorDamageTakenMult().modifyPercent(id, -20f);
stats.getEmpDamageTakenMult().modifyPercent(id, -50f);
}

public void applyEffectsAfterShipCreation(ShipAPI ship, String id)
{
ship.setShield(ShieldType.NONE, 0f, 0f, 0f);

}


@Override
public boolean isApplicableToShip(ShipAPI ship) {
return
((!ship.getVariant().getHullMods().contains("PoweredArmour")) &&
(!ship.getVariant().getHullMods().contains("EnergyAbsorbers")) &&
(!ship.getVariant().getHullMods().contains("comp_armor")) &&
(!ship.getVariant().getHullMods().contains("Deflectors")));
}
}



Code
package data.hullmods;

import java.util.HashMap;
import java.util.Map;

import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class EnergyAbsorbers extends BaseHullMod {

public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {

stats.getArmorBonus().modifyPercent(id, -10f);
stats.getEnergyDamageTakenMult().modifyPercent(id, -25f);
}

@Override
public boolean isApplicableToShip(ShipAPI ship) {
return
((!ship.getVariant().getHullMods().contains("PoweredArmour")) &&
(!ship.getVariant().getHullMods().contains("EnergyAbsorbers")) &&
(!ship.getVariant().getHullMods().contains("heavyarmor")) &&
(!ship.getVariant().getHullMods().contains("comp_armor")) &&
(!ship.getVariant().getHullMods().contains("Deflectors")));
}

}


Code
package data.hullmods;

import java.util.HashMap;
import java.util.Map;
import com.fs.starfarer.api.combat.ShipAPI;

import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class Deflectors extends BaseHullMod {

public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {

stats.getFluxDissipation().modifyPercent(id, -20f);

stats.getProjectileDamageTakenMult().modifyPercent(id, -20f);
}

@Override
public boolean isApplicableToShip(ShipAPI ship) {
return
((!ship.getVariant().getHullMods().contains("PoweredArmour")) &&
(!ship.getVariant().getHullMods().contains("EnergyAbsorbers")) &&
(!ship.getVariant().getHullMods().contains("heavyarmor")) &&
(!ship.getVariant().getHullMods().contains("comp_armor")) &&
(!ship.getVariant().getHullMods().contains("Deflectors")));
}

}
Logged

vorpal+5

  • Captain
  • ****
  • Posts: 286
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4612 on: June 01, 2019, 11:30:11 AM »

Is there a mod that allow more zoom-in in tactical combat (because sometime it's hard to see what's going on) and more zoom-out in hyperspace (to understand the 'lay of the land' nebula and storm wise) ?
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4613 on: June 04, 2019, 02:57:37 AM »

How to prevent a beam weapon from targeting fighters? I've got an anti-capital beam that turned out to be FRIGHTENINGLY effective against fighters and when under AI control the guns seem to prioritize fighters
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4614 on: June 04, 2019, 08:39:26 AM »

Is there a mod that allow more zoom-in in tactical combat (because sometime it's hard to see what's going on) and more zoom-out in hyperspace (to understand the 'lay of the land' nebula and storm wise) ?
For combat, there are these two settings:
   "minCombatZoom":0.5, # zoomed in all the way
   "maxCombatZoom":2.0, # zoomed out all the way
I don't know of anything similar for the campaign layer.

How to prevent a beam weapon from targeting fighters? I've got an anti-capital beam that turned out to be FRIGHTENINGLY effective against fighters and when under AI control the guns seem to prioritize fighters
I'm pretty rusty on ways to manipulate weapon AI, but I think some tags will make weapons avoid fighters. I'm pretty sure "strike" is one. However, I would advise against intentionally making the AI avoid an effective strategy. You might want to consider toning down whatever makes the weapon so effective against fighters, or possibly even making the beam pass through them.

SpaceMonster

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4615 on: June 04, 2019, 06:26:57 PM »

Is it possible to increase the number of ships shown in the fleet bubble? I mean visually only.
I like to run with large fleet vs large fleet but the numbers in the bubble seem so small when there's 40-50+ ships in the fleet.
« Last Edit: June 04, 2019, 06:29:57 PM by SpaceMonster »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24113
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4616 on: June 04, 2019, 06:31:38 PM »

No, that's actually hard-limited to 20 total. Sorry!

(The reason it's not showing all ships is this has quite a large impact on performance, and since the bubbles stop getting larger at some point anyway, showing more ships inside them wouldn't do *that* much.)
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4617 on: June 04, 2019, 10:17:10 PM »

There doesn't seem to be a listener for "player founded a colony". If so, could we get one?
Logged

SpaceMonster

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4618 on: June 05, 2019, 11:06:37 AM »

How do I get bounties to spawn with large menacing fleets? I tried setting "maxShipsInAIFleet" to 100 but this seems to only result in a few more kites/shuttles/fluff.
My goal is to have a 50+ ship bounty fleet with, like, 5+ onslaughts or something. A big fleet vs big fleet challenge.
Logged

Legion0047

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4619 on: June 05, 2019, 11:27:15 AM »

So is there any reason why there are no mod stations?
Is it just that modders haven't had time to make new sprites and implement them or is there another reason?
Logged
Pages: 1 ... 306 307 [308] 309 310 ... 710