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 ... 527 528 [529] 530 531 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7920 on: August 31, 2021, 09:04:27 AM »

Hello,
I tried to make Heavy Weapons Integration, so in 1st step I took Heavy Ballistics Integration from source archive, changed the name wherever it was due, added .cvs entry accordingly and changed package name in code's first line to data.hullmods. Didnt change what it does yet, just wanted to see if the game would start.
Then I took
Spoiler
22456 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [data.hullmods.mm_hwi]
java.lang.RuntimeException: Error loading [data.hullmods.mm_hwi]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassFormatError: Inconsistent constant value type in class file data/hullmods/mm_hwi
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at org.codehaus.janino.JavaSourceClassLoader.defineBytecode(JavaSourceClassLoader.java:244)
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:194)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
[close]
to the knee.
It obviously tells me nothing as I am uneducated schmuck. Is the solution compiling it manually or something completly else?

Thank you from the mountain, as we say in my country.
I presume this is a loose file, rather than compiled?
The compiler packaged with the game really doesn't like generic object types.

This is very true, yeah. In addition:

public static final float COST_REDUCTION  = 10;

I think it doesn't like a float being assigned an int value. Changing the "10" to a "10f" might also get around that issue.

may not be your paricular issue, but iirc what determines if the decal gets the damage overlay is if the cell of the ship its on takes damage. So if the decal isn't on those exact coordinates where damage is taken, it won't be reflected

(Ahh, good catch!)
Logged

Omnicast

  • Ensign
  • *
  • Posts: 22
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7921 on: August 31, 2021, 10:47:38 PM »

Just throwing ideas out there. Is it possible for Alex to get fighter/bomber/drone LPCs to spawn multiple wings from one hanger slot? Would it be possible to make it adjustable in game? So each LPC has a min/max and the player can choose a number from min to max using +/- buttons next to the hanger slot. The higher the number the more penalties to rearming/crew required/supplies needed/etc, but you can burst the enemy down with more small crafts.

So if I modified the Talon Interceptor Wing LPC it would spawn 5 wings of 4 fighters each for a grand total of 20 fighters using one hanger slot. Of course it's gonna cost 5x more crew, supplies, and CR to recover fully.

Anyways the point is I want my computer to overload with fighters/bombers/drones swarming everywhere.

Second idea... is it possible for some badass animator to make fighters do flips and ***? Like barrel rolls? Maybe it actually has a function like giving a dodge bonus or temp invulnerability while looking cool.

Idea three. Pilot promotions. After a few space battles there's a chance that some Talon pilot actually survives enough times to be qualified as a experienced pilot. This could tie in with my first idea and a more experienced pilot could act like a squad leader allowing more wings to watch his/her flank. They can level up like officers and pick Pilot skills. Some of which could have cool animations like my second idea.

Stealing ideas from 1C's Star Wolves series they could get active special abilities that they will automatically use when the right situation calls for it. Missiles heading their way? If the pilot has the flares ability then the small craft/assisting wings will fire off personally mounted flares.

Or the pilot has an alpha strike ability that increases fire rate for all weapons on the craft being piloted by 20-40% for 4 seconds with a CD of 30 seconds.

Stealing from Star Fox we could have a tiny window open up where the pilot's sprite is shown and a small dialogue oozing overconfidence! Said overconfident Talon pilot dies right away.  ;D

Feeling ambitious? Animate the pilots portrait!

This will make me take recovery shuttles. Otherwise that mod is god damn useless.  ;)
« Last Edit: August 31, 2021, 10:50:03 PM by Omnicast »
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7922 on: September 02, 2021, 04:46:45 PM »

For
Global.getSector().getPlayerPerson().getStats().setSkillLevel();
Presuming the Sector,PersonAPI and their stats are not null, what would cause this loc to cause a NPE?
I've been stumped on this one for a bit. I have a skill added to a mod that runs this line in the ModPlugins onGameLoad. It works for me, but it always results in NPE for the person testing when they trying loading up a game.

The only way I can reproduce this is by completely deleting the skills folder and trying to load, but even when I provided them with my data folder, it still crashes. Is there anyway another skill could be somehow overwriting the  one i've added, or something like that?
« Last Edit: September 02, 2021, 04:49:08 PM by shoi »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7923 on: September 02, 2021, 04:48:42 PM »

Just real quick - need to see a stack trace for this sort of thing.

(But, yeah, my initial guess would be a skill id getting passed in that doesn't match any actual skill...)
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7924 on: September 02, 2021, 04:50:26 PM »

whoops, here it is.

118067 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
    at com.fs.starfarer.campaign.CharacterStats.refreshCharacterStatsEffects(Unknown Source)
    at com.fs.starfarer.campaign.CharacterStats.setSkillLevel(Unknown Source)
    at data.scripts.MechaModPlugin.onGameLoad(MechaModPlugin.java:127)
    at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(Unknown Source)
    at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
    at com.fs.starfarer.ui.Oo0O.dismiss(Unknown Source)
    at com.fs.starfarer.ui.impl.o0oO.dismiss(Unknown Source)
    at com.fs.starfarer.campaign.save.J.actionPerformed(Unknown Source)
    at com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source)
    at com.fs.starfarer.ui.I.?00000(Unknown Source)
    at com.fs.starfarer.ui.I.processInput(Unknown Source)
    at com.fs.starfarer.ui.newnew.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
    at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
    at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
    at com.fs.starfarer.coreui.oo0o.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
    at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
    at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
    at com.fs.starfarer.E.I.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
    at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
    at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.Oo0O.processInputImpl(Unknown Source)
    at com.fs.starfarer.campaign.save.J.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
    at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
    at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
    at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
    at com.fs.starfarer.title.TitleScreenState.processInput(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(Thread.java:748)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7925 on: September 02, 2021, 04:55:50 PM »

Thank you! Unfortunately that's a pretty long method so it doesn't narrow things down much.

There has to be some difference between your setup and the setup of the person helping you test (mods enabled, mod versions?, settings tweaks, etc). If it's a possibility, I'd suggest trying to eliminate those differences until you find what's causing the issue.
Logged

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7926 on: September 02, 2021, 07:18:25 PM »

How do I edit the effects of special items on industries? The special_items.csv only seems to list general things like graphics, price, description etc.
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7927 on: September 02, 2021, 07:38:31 PM »

Thank you! Unfortunately that's a pretty long method so it doesn't narrow things down much.

There has to be some difference between your setup and the setup of the person helping you test (mods enabled, mod versions?, settings tweaks, etc). If it's a possibility, I'd suggest trying to eliminate those differences until you find what's causing the issue.
We found the issue to be an outdated version of Quality Captains that abuses the "replace" in the mod_info.json.

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7928 on: September 05, 2021, 11:51:53 PM »

Is there a way to pass float values into RepActionEnvelope instead of RepActions(Or is there way to create a custom one?)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7929 on: September 06, 2021, 10:13:29 AM »

Is there a way to pass float values into RepActionEnvelope instead of RepActions(Or is there way to create a custom one?)

There's a CustomRepImpact class you can pass in there; see: PunitiveExpeditionIntel.applyRepPenalty()

How do I edit the effects of special items on industries? The special_items.csv only seems to list general things like graphics, price, description etc.

Sorry I missed this!  See the ItemEffectsRepo class; you'll need to add your own effect to the static ITEM_EFFECTS map - you can do this from another class in your own code. Make sure not to have any data members in your InstallableItemEffect implementation since these persist across saves.
Logged

theDragn

  • Captain
  • ****
  • Posts: 305
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7930 on: September 06, 2021, 05:54:39 PM »

may not be your paricular issue, but iirc what determines if the decal gets the damage overlay is if the cell of the ship its on takes damage. So if the decal isn't on those exact coordinates where damage is taken, it won't be reflected

this is hugely useful, thank you!

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7931 on: September 06, 2021, 07:34:50 PM »

How do I edit the effects of special items on industries? The special_items.csv only seems to list general things like graphics, price, description etc.

Sorry I missed this!  See the ItemEffectsRepo class; you'll need to add your own effect to the static ITEM_EFFECTS map - you can do this from another class in your own code. Make sure not to have any data members in your InstallableItemEffect implementation since these persist across saves.

Wait, but where do I find this? I don’t seem to be able to find it in special_items.csv and no other file seems to contain relevant data.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7932 on: September 06, 2021, 07:48:51 PM »

How do I edit the effects of special items on industries? The special_items.csv only seems to list general things like graphics, price, description etc.

Sorry I missed this!  See the ItemEffectsRepo class; you'll need to add your own effect to the static ITEM_EFFECTS map - you can do this from another class in your own code. Make sure not to have any data members in your InstallableItemEffect implementation since these persist across saves.

Wait, but where do I find this? I don’t seem to be able to find it in special_items.csv and no other file seems to contain relevant data.
It's in code; com.fs.starfarer.api.impl.campaign.econ.impl.ItemEffectsRepo
Logged

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7933 on: September 06, 2021, 09:13:51 PM »

True, a while after I wrote that I managed to find it. However, I still do have a question:

How do I tweak an item to only boost production to only a single supplied commodity of an industry? Say, I want the special item to only increase supply of Metals from a Refining, instead of increasing both Metals and Transplutonics production.
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7934 on: September 08, 2021, 08:06:19 AM »

About DamageListener...seems that if hit by a beam, the damage would be unreasonable....
Logged
My mods


Pages: 1 ... 527 528 [529] 530 531 ... 706