Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 506 507 [508] 509 510 ... 706

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

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7605 on: June 22, 2021, 02:00:46 PM »

This is throwing up a null error, and I'm not sure why:
Code
package data.scripts;

import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.WeaponAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
import com.fs.starfarer.api.loading.WeaponSlotAPI;

public class YunruPhaseMounting {
   
    public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, ShipAPI ship, String id) {
for (WeaponAPI w : ship.getAllWeapons()) {
WeaponSlotAPI m = w.getSlot();
if (m.isTurret() != true) continue;
float arc = m.getArc();
arc = arc*1.5f;
m.setArc(arc);
}
}
}

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7606 on: June 22, 2021, 04:00:33 PM »

i keep getting this error
Spoiler
5341292 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteSegment.isInSystem(RouteManager.java:141)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteData.getInterpolatedHyperLocation(RouteManager.java:379)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.shouldSpawn(RouteManager.java:651)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.spawnAndDespawn(RouteManager.java:617)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.advance(RouteManager.java:577)
   at com.fs.starfarer.api.impl.campaign.CoreScript.advance(CoreScript.java:128)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]


not sure where to begin on fixing this other than asking if anyone knows of any conflictions with the mods i have causing this
any help at all would be appreciated
i have no direction really to speak of in fixing this
i can type out an actual list of my mods if that helps, but i figured this would work


Spoiler
{"enabledMods": [
  "pantera_ANewLevel40",
  "adjustable_skill_thresholds",
  "Adjusted Sector",
  "idx_as_ships",
  "anotherportraitpack",
  "ARSWP",
  "armaa",
  "raccoonarms",
  "automatedcommands",
  "battlefleets",
  "beyondthesector",
  "BSC",
  "HMI_brighton",
  "Csp",
  "charmingly_wearisome",
  "combat_docking_module",
  "timid_commissioned_hull_mods",
  "lw_console",
  "domain_mship_controllable",
  "diyplanets",
  "DetailedCombatResults",
  "diableavionics",
  "exshippack",
  "XLU",
  "sun_flux_reticle",
  "gladiatorsociety",
  "GrandColonies",
  "HHE",
  "HMI_SV",
  "gaaius_hpw",
  "HMI",
  "gunnyhegexpeditionary",
  "hte",
  "hiigaran_descendants",
  "holyludd",
  "hm_barratry",
  "hullmod_specialization",
  "sun_hyperdrive",
  "IndEvo",
  "kadur_remnant",
  "kazeron",
  "keruvim_shipyards",
  "kingdomofterra",
  "lw_lazylib",
  "leadingPip",
  "ArkLeg",
  "logisticsNotifications",
  "low_maintenance",
  "luddenhance",
  "gaaius_mhp",
  "mag_protect",
  "MagicLib",
  "Mayasuran Navy",
  "yunru_midline_expansion",
  "su_CarrierHullmod",
  "mir",
  "more_ship_names",
  "Musashimanufactor",
  "nexerelin",
  "kayse_phaseships",
  "OcuA",
  "Ocutek",
  "luddandlions",
  "old_hyperion",
  "ORA",
  "console_overlord_additionalcommands",
  "pn",
  "paraqueeght",
  "wisp_perseanchronicles",
  "plight_of_the_valkyries",
  "PulseIndustry",
  "QualityCaptains",
  "m561_ramscoop",
  "rebalanced_doom",
  "remnant_command_transfer",
  "repdec",
  "rotcesrats",
  "roider",
  "sun_ruthless_sector",
  "tahlan_scalartech",
  "SCY",
  "secretsofthefrontieralt",
  "SEEKER",
  "shadow_ships",
  "PT_ShipDirectionMarker",
  "simpleplayerflags",
  "solsystem",
  "speedUp",
  "sputnik",
  "sw",
  "smc",
  "starpocalypse",
  "sun_starship_legends",
  "Steelclad",
  "stelnet",
  "hakkari",
  "timid_supply_forging",
  "surveycorpssp",
  "tahlan",
  "exalted",
  "star_federation",
  "TORCHSHIPS",
  "trulyautomatedships",
  "underworld",
  "UNSC",
  "US",
  "ungp",
  "unpackblueprints",
  "UGH",
  "vanidad",
  "vayrashippack",
  "XhanEmpire",
  "audio_plus",
  "astroidships",
  "prv",
  "ifonly",
  "shaderLib"
]}
[close]

i apologize for doing it this way but this was the most expedient way i could think of to post my mod list
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7607 on: June 22, 2021, 05:38:02 PM »

"req_military" means a hull is sold *only* on military submarkets.

Was there ever a bug with this?

I have added this to several ships and this does not seem to be the case. Iirc I'm on RC12. They are still showing up in both the open market and black markets often as pristine hulls.

Paragon,archean_paragon,Battleship,High Tech,archean_highenergyfocus,31,40000,2000,50000,30000,1350,525,4,40,20,25,4,10,3500,FRONT,,360,0.7,0.6,,,450,1000,500,200,8,50,7,600000,5,5,900,0.5,42,10,,,,,,,,"archean_ultra_rare_bp, no_autofit, req_military, hist3t",0.1,0.6,4,6,,6

Astral,archean_astral,Supercarrier,High Tech,archean_fortressshield,29,30000,800,40000,15000,950,500,10,20,20,25,4,10,3000,FRONT,,360,0.8,0.6,,,350,1000,450,300,7,150,7,500000,7,7,820,0.25,38,10,,,,,,,CARRIER,"archean_ultra_rare_bp, no_autofit, req_military",0.1,0.6,3,4,,2

Aurora,archean_aurora,Cruiser,High Tech,archean_highenergyfocus,13,14000,800,22000,18000,620,230,2,60,40,40,15,13,1800,FRONT,,360,0.6,0.6,,,75,200,100,120,4,50,7,200000,8,8,680,0.5,17,5,,,,,,,,"rare_bp, archean_tritachyon_bp, no_autofit, req_military",0.35,0.6,2,3,,13

Tempest,archean_tempest,Frigate,High Tech,archean_flarelauncher_active,6,5000,200,9000,2813,380,50,1,100,200,175,50,110,200,OMNI,,120,0.8,0.85,,,10,25,40,15,1,10,10,36000,12,12,450,1,6,1,,,,,,,,"rare_bp, archean_tritachyon_bp, no_autofit, req_military, hist1t",0.33,0.5,2,2,,24

Spoiler




[close]

*EDIT*

I updated to RC15 and reproduced this in vanilla. I added the tag to the Wolf, Wolf(H), Enforcer, Eagle, Lasher, and Brawler. They also show up in the black market. They do seem to be a bit rarer.

Spoiler

[close]
« Last Edit: June 22, 2021, 06:19:47 PM by Morrokain »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7608 on: June 22, 2021, 06:27:30 PM »

This is throwing up a null error, and I'm not sure why:

Need to see the stack trace! It'll tell you the line where the NPE is, which you can then look at and see what's null where you're not expecting it to be.

i keep getting this error
Spoiler
5341292 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteSegment.isInSystem(RouteManager.java:141)
[close]
Hmm, this should probably go in the modded bug reports subforum. Actually, there's another thread with the same (or what looks like the same) issue:
https://fractalsoftworks.com/forum/index.php?topic=21603.msg327174#msg327174

Was there ever a bug with this?

*facepalm* looking at the code, what it was actually doing is making sure those ships spawned anywhere except for military submarkets. Fixed that up.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7609 on: June 22, 2021, 07:25:08 PM »

*facepalm* looking at the code, what it was actually doing is making sure those ships spawned anywhere except for military submarkets. Fixed that up.

Ah good to know! Thanks!
Logged

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7610 on: June 22, 2021, 11:32:07 PM »

Ah okay, here we go (crash occurs when clicking to bring up hullmod list when the hullmod in question is known):

EDIT: So... this happens when you forget to extend BaseHullMod...

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7611 on: June 22, 2021, 11:54:13 PM »

Ah okay, here we go (crash occurs when clicking to bring up hullmod list when the hullmod in question is known):

We need more information.

This gives very little. At the very least a mod list is required, but ideally it should be narrowed down further.
Logged

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7612 on: June 23, 2021, 12:27:35 AM »

This is throwing up a null error, and I'm not sure why:
Maybe it's because you used this:
Code
public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, ShipAPI ship, String id)
Instead of this?:
Code
public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
Logged

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7613 on: June 23, 2021, 01:04:39 AM »

Ah okay, here we go (crash occurs when clicking to bring up hullmod list when the hullmod in question is known):

We need more information.

This gives very little. At the very least a mod list is required, but ideally it should be narrowed down further.
I don't know what more to give? It's that script that's causing the issue. I know it is because, well, before I tried to implement it, there was no crash.

... Aaaand looking over it I can already see something wrong: It neither imports nor extends BaseHullMod.

EDIT: Yup, that was the source of the crash. New problem: The hullmod doesn't actually do anything (it was supposed to increase turret arcs).

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7614 on: June 23, 2021, 07:28:27 AM »

it seems as though the issue was indeed using random sector nex alongside the industry rev mod
i guess my youtube playthrough will be standard sector!
ive been itching to get it going, and i think i will have my first episode ready within a week.
FINGERS CROSSED
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7615 on: June 23, 2021, 12:53:15 PM »

I don't know what more to give?

Ah ok I didn't see the first post only the second one with the error - which was vague without any useful information because unfortunately errors can sometimes not really give you much. Glad you figured it out though!
Logged

HiddenPorpoise

  • Ensign
  • *
  • Posts: 20
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7616 on: June 23, 2021, 09:04:17 PM »

If I were making a system that makes guns use a secondary damage type without losing the primary where would I look in the documentation?

The end goal is an attack destroyer with a system that gives its guns bonus HE damage but slashes its range while active.
Logged

shoi

  • Admiral
  • *****
  • Posts: 649
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7617 on: June 24, 2021, 02:13:21 AM »

Where would I look at to try to replicate the Story Point Officer Promotion event that sometimes pops up and lasts a few months?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7618 on: June 24, 2021, 09:28:04 AM »

Where would I look at to try to replicate the Story Point Officer Promotion event that sometimes pops up and lasts a few months?

You are looking for com.fs.starfarer.api.impl.campaign.intel.PromoteOfficerIntel.java in starfarer.api.zip. The intel events are created in com.fs.starfarer.api.impl.campaign.FleetEncounterContext.java on line 2038.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7619 on: June 24, 2021, 10:14:48 AM »

If I were making a system that makes guns use a secondary damage type without losing the primary where would I look in the documentation?

The end goal is an attack destroyer with a system that gives its guns bonus HE damage but slashes its range while active.

You'd probably want to have a look at DamageDealtModifier and have the system add/remove that to the ship. RangedSpecialization (the implementation of the skill) might be a decent starting point to look at.
Logged
Pages: 1 ... 506 507 [508] 509 510 ... 706