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: Anubis-class Cruiser (12/20/24)

Pages: 1 ... 687 688 [689] 690 691 ... 753

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

JlaXion

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10320 on: November 19, 2023, 12:55:00 PM »

Hi everyone, I'm pretty new in the modding scene and I'm wondering why my game is crashing every time I launch it with my mod activated.

I am always greeted with a:

Fatal: Mismatched quotes in the string; last quote: [

I have repeatedly checked my various .wpn, .proj, and .ship files and have found no error regarding a missing bracket or parenthesis. Is anyone able to point me in the right direction?

Edit 1: Okay perhaps I missed something but I think I finally fixed it but now something else is popping up and I don't know what it means.

11119 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - org.json.JSONException: JSONObject["name"] not found.
org.json.JSONException: JSONObject["name"] not found.
   at org.json.JSONObject.get(JSONObject.java:406)
   at org.json.JSONObject.getString(JSONObject.java:577)
   at com.fs.starfarer.loading.WeaponSpreadsheetLoader. 00000(Unknown Source)
   at com.fs.starfarer.loading.SpecStore.public(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(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(Thread.java:748)

my game crashed and here is the log, I dont know what happened.
« Last Edit: November 19, 2023, 01:30:19 PM by JlaXion »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10321 on: November 20, 2023, 12:16:28 PM »

How can we adjust how much a hyperspace storm throws a fleet off-course?  I have checked Solar Shielding, but its in-game description "...also has the same effect against storms in deep hyperspace" and code stats.getDynamic().getStat(Stats.CORONA_EFFECT_MULT).modifyMult(id, mult); are not explicitly about being thrown off course.

I ask because I have the idea that the player could somehow reduce this amount, whether through having more and larger ships in the fleet, having multiple Drive Field Stabilizer ships, or s-modding Solar Shielding or Augmented Drive Field.

Hmm, not easily. I think you'd have to detect when the fleet has a HyperStormBoost script, remove it, and replace it with your own version.


Would there be a way to hide the presence of a faction in a system, as in, dont have their name show up on hover & change the icon?
Would like to have a factions market be hidden, as they are nomadic, but not excluded from the economy, with the logic being essentialy only trading partners knowing their locations at all times.

Just setting the market to hidden *should* actually do it - looking at the tooltip code, it should skip over those. Unless we're talking about different things?

IIRC they'd still be in the economy, they just wouldn't get visible trade fleets going to/from. Not 100% sure on this.

A possible option is doing setHidden() only while the core UI is open.

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.

Unfortunately, doing the offset doesn't solve the issue. I can't find any methods to dynamically change the Collison Class of a beam. Does one exist?

I think you should be able to cast a BeamAPI to a CombatEntityAPI and use .setCollisionClass() on that.


there is few question here

1. Is there a way to make custom nebula system? one that without an anchor?

2. Is there a way to implement isolated MarketAPI into specific market? i want to make a hidden market still can import stuff

3. Is there a way to make market inside economy invisible to raid and saturation bombardment?

Thankyo

I'm sorry, could you be more specific with your questions? I don't really understand them; the actual details matter here. And since I don't remember everything about the codebase at all times, having more context is incredibly helpful - things you tried, that didn't work, why/in what way they didn't work.


11119 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - org.json.JSONException: JSONObject["name"] not found.
org.json.JSONException: JSONObject["name"] not found.

my game crashed and here is the log, I dont know what happened.

This means that the game is looking for a field called "name" in a file and not finding it. The name of the file is most likely on the previous line in the log.
Logged

Liral

  • Admiral
  • *****
  • Posts: 726
  • Realistic Combat Mod Author
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10322 on: November 20, 2023, 05:21:16 PM »

Hmm, not easily. I think you'd have to detect when the fleet has a HyperStormBoost script, remove it, and replace it with your own version.

Thanks!

SafariJohn

  • Admiral
  • *****
  • Posts: 3100
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10323 on: November 20, 2023, 05:37:38 PM »

A possible option is doing setHidden() only while the core UI is open.

Wonder how well this dark sorcery works
Logged

Zerias

  • Ensign
  • *
  • Posts: 17
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10324 on: November 20, 2023, 09:06:52 PM »

Hello! I decided to dip my toes into modding, and to start off I thought I'd take a peek into the Magnetar Mission mod, as it's one of the few High-Tech supercapitals that don't include a new faction.
I've managed to remove the dependency on the now-defunct Superweapons Mod, but given the entire thing about asset permissions that got Superweapons removed in the first place, I thought I'd ask here before posting a link.
Normally I'd just PM the author for permission, but it looks like IonDragonX hasn't been online since July, so getting a reply isn't likely.
Should I go ahead and post the link with the disclaimer that I'm just making a minor patch, or is there some licensing thing that says I shouldn't at all until and unless I get a response?
Apologies if this is in the wrong section, couldn't see one that stood out as the correct one for this question.
Logged

vicegrip

  • Captain
  • ****
  • Posts: 287
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10325 on: November 20, 2023, 10:16:50 PM »

Is there a way to obtain a list of the ship hulls currently being shown in the submarket the player is viewing?

Liral

  • Admiral
  • *****
  • Posts: 726
  • Realistic Combat Mod Author
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10326 on: November 21, 2023, 07:14:10 AM »

I have noticed in your implementation of HyperStormBoost:
Code
        ...
        if (mult < 0.0F) {
            mult = 0.0F;
        }

        if (mult > 1.0F) {
            mult = 1.0F;
        }
        ...
instead of
Code
    ...
    mult = Math.min(1, Math.max(0, mult);
    ...
Is there a reason for this choice?
« Last Edit: November 21, 2023, 07:16:21 AM by Liral »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10327 on: November 21, 2023, 10:02:58 AM »

Hello! I decided to dip my toes into modding, and to start off I thought I'd take a peek into the Magnetar Mission mod, as it's one of the few High-Tech supercapitals that don't include a new faction.
I've managed to remove the dependency on the now-defunct Superweapons Mod, but given the entire thing about asset permissions that got Superweapons removed in the first place, I thought I'd ask here before posting a link.
Normally I'd just PM the author for permission, but it looks like IonDragonX hasn't been online since July, so getting a reply isn't likely.
Should I go ahead and post the link with the disclaimer that I'm just making a minor patch, or is there some licensing thing that says I shouldn't at all until and unless I get a response?
Apologies if this is in the wrong section, couldn't see one that stood out as the correct one for this question.

Thank you for asking! You might try sending a PM anyway - their account might be set up to send a notification email when that happens. You do need permission to repost someone's work on the forum, yes.

I have noticed in your implementation of HyperStormBoost:
...
instead of
...
Is there a reason for this choice?

It's easier to read and understand at a glance, and requires less thinking. Obviously the max(min) thing isn't *hard* but the easier on yourself you make the simple things, the more brain cycles you have for things that actually need it. Or, to put another way, anything that makes one feel even slightly "clever" for doing, is a warning sign :)

(Also, if this was a hot code path, making extra function calls *might* slow it down, but that would require testing and it's absolutely NOT the reason for doing it that way here.)
Logged

Liral

  • Admiral
  • *****
  • Posts: 726
  • Realistic Combat Mod Author
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10328 on: November 21, 2023, 11:25:29 AM »

It's easier to read and understand at a glance, and requires less thinking. Obviously the max(min) thing isn't *hard* but the easier on yourself you make the simple things, the more brain cycles you have for things that actually need it. Or, to put another way, anything that makes one feel even slightly "clever" for doing, is a warning sign :)

(Also, if this was a hot code path, making extra function calls *might* slow it down, but that would require testing and it's absolutely NOT the reason for doing it that way here.)

Oh, that makes sense.  Thanks again!

6chad.noirlee9

  • Captain
  • ****
  • Posts: 369
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10329 on: November 21, 2023, 11:46:27 AM »

i have an odd error i was hoping to get some help with if anyone can.  thanks in advance.

Spoiler
45330 [Thread-3] INFO  com.fs.starfarer.campaign.rules.Rules  - Loading rule: ptes_riftgate
45404 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.UnsupportedClassVersionError: com/fs/starfarer/api/impl/campaign/rulecmd/ptes_riftGateDialog : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: com/fs/starfarer/api/impl/campaign/rulecmd/ptes_riftGateDialog : Unsupported major.minor version 52.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.access$100(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.campaign.rules.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.getCommandClass(Unknown Source)
   at com.fs.starfarer.campaign.rules.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.<init>(Unknown Source)
   at com.fs.starfarer.campaign.rules.Rules.o00000(Unknown Source)
   at com.fs.starfarer.loading.SpecStore.public(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(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]

edit: i added my enabled mod list
Spoiler
{"enabledMods": [
  "starpocalypse",
  "pantera_ANewLevel40R",
  "advanced_gunnery_control_dbeaa06e",
  "adversary",
  "A_S-F",
  "anotherportraitpack",
  "aotd_lost_glory",
  "Cryo_but_better",
  "aod_core",
  "aod_vos",
  "ash",
  "armaa",
  "Planetace_AstralAscensions",
  "automatedcommands",
  "ORK",
  "combatactivators",
  "lw_radar",
  "lw_console",
  "customizablestarsystems",
  "Toaster_deciv",
  "Diktat Enhancement",
  "dex",
  "EmergentThreats_Vice",
  "seven_nexus",
  "pt_exiledSpace",
  "lyr_ehm",
  "a111164_ExtendPack",
  "fleethistory",
  "GrandColonies",
  "hegfleetexpansion",
  "hte",
  "HIVER",
  "hyperdiving",
  "sun_hyperdrive",
  "aerialcombatsuit",
  "IndEvo",
  "interestingportraitspack",
  "Imperium",
  "kyeltziv",
  "lost_sector",
  "LTA",
  "lw_lazylib",
  "leg",
  "luddenhance",
  "lunalib",
  "MagicLib",
  "niko_moreCombatTerrainEffects",
  "MoreMilitaryMissions",
  "advent_seven",
  "ness_saw",
  "nexerelin",
  "sun_nomadic_survival",
  "PirateMiniMegaMod",
  "particleengine",
  "pirate_ransom",
  "portrait",
  "QualityCaptains",
  "assortment_of_things",
  "sun_ruthless_sector",
  "salshiexp",
  "scan_those_gates",
  "ScavengerTrading",
  "secretsofthefrontier",
  "swp",
  "spacetruckin",
  "speedUp",
  "sw",
  "swf",
  "sun_starship_legends",
  "StopGapMeasures3",
  "alcoholism",
  "symbiotic_void_creatures",
  "tahlan",
  "Terraforming & Station Construction",
  "thong",
  "underworld",
  "uaf",
  "unthemedweapons",
  "UGH",
  "WEAPONARCS",
  "which_industry",
  "shaderLib"
]}
[close]
« Last Edit: November 21, 2023, 12:22:09 PM by 6chad.noirlee9 »
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

SafariJohn

  • Admiral
  • *****
  • Posts: 3100
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10330 on: November 21, 2023, 05:45:26 PM »

It's easier to read and understand at a glance, and requires less thinking. Obviously the max(min) thing isn't *hard* but the easier on yourself you make the simple things, the more brain cycles you have for things that actually need it. Or, to put another way, anything that makes one feel even slightly "clever" for doing, is a warning sign :)

I did up something like clamp(min, value, max). Kotlin has coerceAtLeast(min)/coerceAtMost(max), but those are hard to read too IMO.
Logged

Xaiier

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10331 on: November 22, 2023, 12:10:23 AM »

Hi, I think I might have found a vanilla bug but I wanted to check to be sure I'm not doing something dumb...

I have a BeamEffectPlugin that does this:

Code
public void advance(float amount, CombatEngineAPI engine, BeamAPI beam) {

if (beam.getWeapon().getChargeLevel() > 0.99f) {
beam.getSource().getMutableStats().getTimeMult().modifyMult("aaa", 10f);
Global.getCombatEngine().getTimeMult().modifyMult("AAA", 0.1f);
}
else {
beam.getSource().getMutableStats().getTimeMult().unmodify("aaa");
Global.getCombatEngine().getTimeMult().unmodify("AAA");
}

if (!beam.didDamageThisFrame()) return;

engine.spawnExplosion(beam.getTo(), new Vector2f(), beam.getFringeColor(),15f, 1f);
}

It results in this:



The number of "extra" getTo() points seems to vary with the time multiplier.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10332 on: November 22, 2023, 11:17:36 AM »

i have an odd error i was hoping to get some help with if anyone can.  thanks in advance.

(Hmm - this isn't the right topic for this; you'd want to make a post in the modded bug reports forum. That said, it looks like a a mod is compiled for the wrong version of java, or something similar.)


I did up something like clamp(min, value, max). Kotlin has coerceAtLeast(min)/coerceAtMost(max), but those are hard to read too IMO.

Yeah, I think I've made a similar clamp() method in places! Definitely agree on the other methods being hard to read.

Hi, I think I might have found a vanilla bug but I wanted to check to be sure I'm not doing something dumb...

I have a BeamEffectPlugin that does this:
...

The number of "extra" getTo() points seems to vary with the time multiplier.

Yeah, that checks out - not something that's likely to be fixed, more of a "how it works" due to IIRC collision checking not running on the faster-time frames.
Logged

presidentmattdamon

  • Commander
  • ***
  • Posts: 249
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10333 on: November 22, 2023, 12:14:28 PM »

It's easier to read and understand at a glance, and requires less thinking. Obviously the max(min) thing isn't *hard* but the easier on yourself you make the simple things, the more brain cycles you have for things that actually need it. Or, to put another way, anything that makes one feel even slightly "clever" for doing, is a warning sign :)

I did up something like clamp(min, value, max). Kotlin has coerceAtLeast(min)/coerceAtMost(max), but those are hard to read too IMO.

Kotlin has Number.coerceIn(min..max) which is very readable.
Logged

JEENAH

  • Lieutenant
  • **
  • Posts: 53
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10334 on: November 22, 2023, 12:31:10 PM »

So i just realised that i created a *** post for a stupid little question. Dang. The moderators are gonna hate me -_-

So instead of continuing on my STUPID post ... I add my question here.


QUOTE : "Hello ! I'm actually creating a massive ship that will probably rival some of the biggest modded ships out there.

But since i can't find my info, a critical one ... I'm creating this post.

What is the radius in pixels of the LARGE / MEDIUM and SMALL weapon mounts ?

Actual weapons of the beast (Mounts) : 16 large, 28 medium, 30 small + 6 large missiles and probably more stuff later.

I'm also probably gonna have to request some assistance, because i wanna create it as a flag-ship with some lore behind it (It wont be a blueprint, but will be accessible as a derelict ship randomly in the sector. Intact).

Objective with it is to create a mobile-base like dreadnought that puts itself in the middle of the map and doesn't move at all. (Hull-mod that basically disable engines entirely, you can't move, but every bit of power is redirected to shields and weapons).

"A ship to rule the galaxy, a ship to teach those ants that we will never be defeated nor will we yield"

Anyway ! Wont spoil anything yet, i'm searching those weapon mount sprites but goddamn, its so hard to find.

EDIT : Seems like it's 32 pixels for the LARGE mounts"

Thanks ! Sorry for the pollution :(
Logged
Pages: 1 ... 687 688 [689] 690 691 ... 753