Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 406 407 [408] 409 410 ... 711

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

IraqiWalker

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6105 on: February 21, 2020, 10:24:19 PM »

I tried looking around, but couldn't find anything yet (Maybe I haven't dug deep enough).
However, I followed the Intro to Modding walkthrough by Vayra, and when I try to launch my game with the mod I created (simple ship mod to test adding ships in) I get a crash instantly with the error "Fatal:null"
I'm guessing the cause is probably the mod_info.json file, but I compared to others and the main difference has been the lack of .jar files, which I'm not sure if I need or not considering I'm not using any special assets.

Logged

Pandora

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6106 on: February 22, 2020, 04:58:53 AM »

I've seen a few mods that had no .jar files, and they are normally ship adds... What you could do is look at the mod Missing Ships. The only thing they do is add a few ships, and they have no .jar file at all.

They oughta help you see if there is anything missing.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6107 on: February 22, 2020, 09:26:08 AM »

if you check starsector.log, that should have a stack trace which - along with the few lines before it - might point in a more specific direction as far as what the issue is.
Logged

IraqiWalker

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6108 on: February 22, 2020, 10:39:02 PM »

I've seen a few mods that had no .jar files, and they are normally ship adds... What you could do is look at the mod Missing Ships. The only thing they do is add a few ships, and they have no .jar file at all.

They oughta help you see if there is anything missing.
I double checked, and it looks like my file is fine. Thanks for the recommendation.

if you check starsector.log, that should have a stack trace which - along with the few lines before it - might point in a more specific direction as far as what the issue is.

Looked through it, and after sifting through a LOT of text, I ran into this line:
37883 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [ABSOLUTE_AND_CWD: null]

I'm not sure why it's not seeing my csv file in the /mods/mymod/data/hulls folder.

Any ideas?
Logged

Pandora

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6109 on: February 23, 2020, 06:42:33 AM »

It could be a pathing error in the CSV file itself... Do all your ships have the right IDs?

Because the problem could be that it can't find them with the names they have in the file itself.

Also, also, you could join the unofficial Discord. They have a few veteran modders there along with a channel dedicated to modding and scripting.
Spoiler
Invite code is TBhcFNh
[close]
« Last Edit: February 23, 2020, 06:44:50 AM by Pandora »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6110 on: February 23, 2020, 09:45:53 AM »

Looked through it, and after sifting through a LOT of text, I ran into this line:
37883 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [ABSOLUTE_AND_CWD: null]

I'm not sure why it's not seeing my csv file in the /mods/mymod/data/hulls folder.

Any ideas?

What you want to do is 1) run the game and get a crash, then 2) open up the log file and go to the very end, then scroll up looking for the first (i.e. closest to the end of the file) error. That's going to be the one relevant to the crash.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3023
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6111 on: February 24, 2020, 06:22:51 AM »

Does ImportantPeopleAPI actually do anything or is it just a management tool?
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 840
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6112 on: February 24, 2020, 02:03:54 PM »

Once again back with something that will probably be part of the next release,
I need to decrease build cost if an industry had a specific previous instance. something like:


Code
		if (previous instanceof industry_A) {
this.getBuildCost().reduce??
}
I'd need to do the same for build time.
Can't find a method to do that - do you have any ideas?


Found a workaround, upgrade to temp industry, remove if present and replace with required industry.
thank you nonetheless!
« Last Edit: February 24, 2020, 02:09:03 PM by SirHartley »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6113 on: February 24, 2020, 02:24:12 PM »

Does ImportantPeopleAPI actually do anything or is it just a management tool?

It's a management tool for e.g. not giving multiple active procurement missions to the same person, etc.
Logged

Pandora

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6114 on: February 24, 2020, 05:29:43 PM »

Edit: Never mind, found out what the problem was!
« Last Edit: February 24, 2020, 07:27:15 PM by Pandora »
Logged

hyoukikyo

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6115 on: February 26, 2020, 01:26:37 AM »

Hello,

I am new to the forum and i hope i am not breaking any standard protocol.

My question is that I could just never find a standard midline brawler in any of the markets.
I am able to find a tri-tachyon variant but never the standard one.

I tried editing by following the numbers and tags of a centurion because it is after all a fairly common midline ship that i see everywhere.

What happened though is that now I can see hegemony fleets using the standard midline brawler but it is still never in the markets.

Please help?

I have edited the following:
hegemony.faction
default_ship_roles

and i checked ship_data to see if they are different but centurion and brawler are practically the same.
i do not know what else to do.
« Last Edit: February 26, 2020, 01:34:32 AM by hyoukikyo »
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 840
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6116 on: February 26, 2020, 08:07:55 AM »

I am trying to figure out a concurrent modification error that happens only in an extremely specific set of circumstances, and am at my wits end with this.

The issue:
I have an industry that applies fleet listeners to all fleets in the system, tallies any FleetPoint loss, and adjusts output according to that.
It also creates a second market on the entity it is installed on, to enable production budget increase if Heavy Industry is present on the planet. The secondary market ("SalvageMarket") has an industry that gets the smallest produced amount of ship hulls on the primary market, and applies it to itself.
This SalvageMarket is created/removed depending on the presence of Heavy Industry.

All of the above works without a hitch.

The problem:
If HeavyIndustry is removed form a planet with an active SalvageMarket, the game crashes with a ConcurrentModificationError.

This is not caused by SalvageMarket removal directly - the game runs a few other methods from my class before crashing, even after SM is no longer present, and crashes once the removal triggers an economy update.

This does not happen in any other case - removing the ScrapYards is fine, up/downgrading...

Main Industry Class:
https://bitbucket.org/SirHartley/deconomics/src/master/deconomics_ScrapYard
Secondary:
https://bitbucket.org/SirHartley/deconomics/src/master/deconomics_AltHullProd

Crash info:
Code
46435 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    at java.util.ArrayList$Itr.next(Unknown Source)
    at com.fs.starfarer.campaign.econ.reach.ReachEconomy.nextStep(Unknown Source)
    at com.fs.starfarer.campaign.econ.Economy.nextStep(Unknown Source)
    at com.fs.starfarer.campaign.econ.Economy.tripleStep(Unknown Source)
    at com.fs.starfarer.campaign.ui.marketinfo.IndustryListPanel.recreateOverview(Unknown Source)
    at com.fs.starfarer.campaign.ui.marketinfo.OO0o.dialogDismissed(Unknown Source)
    at com.fs.starfarer.ui.N.dismiss(Unknown Source)
    at com.fs.starfarer.ui.impl.K.dismiss(Unknown Source)
    at com.fs.starfarer.ui.impl.K.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.O0Oo.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)

do you have any idea what could cause this? I think it might be some check related either to the production budget or the presence of the market itself.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6117 on: February 26, 2020, 08:29:52 AM »

Spoiler
Hello,

I am new to the forum and i hope i am not breaking any standard protocol.

My question is that I could just never find a standard midline brawler in any of the markets.
I am able to find a tri-tachyon variant but never the standard one.

I tried editing by following the numbers and tags of a centurion because it is after all a fairly common midline ship that i see everywhere.

What happened though is that now I can see hegemony fleets using the standard midline brawler but it is still never in the markets.

Please help?

I have edited the following:
hegemony.faction
default_ship_roles

and i checked ship_data to see if they are different but centurion and brawler are practically the same.
i do not know what else to do.
[close]

Hi - hmm. Hard to say exactly, but is it possible that the brawler is showing up on the military markets, just not on the open market? Or that you haven't waited long enough for the ships to refresh enough times? What you've done - without knowing the specifics - sounds like, at least conceptually, should have done the job.

I am trying to figure out a concurrent modification error that happens only in an extremely specific set of circumstances, and am at my wits end with this.
Spoiler
The issue:
I have an industry that applies fleet listeners to all fleets in the system, tallies any FleetPoint loss, and adjusts output according to that.
It also creates a second market on the entity it is installed on, to enable production budget increase if Heavy Industry is present on the planet. The secondary market ("SalvageMarket") has an industry that gets the smallest produced amount of ship hulls on the primary market, and applies it to itself.
This SalvageMarket is created/removed depending on the presence of Heavy Industry.

All of the above works without a hitch.

The problem:
If HeavyIndustry is removed form a planet with an active SalvageMarket, the game crashes with a ConcurrentModificationError.

This is not caused by SalvageMarket removal directly - the game runs a few other methods from my class before crashing, even after SM is no longer present, and crashes once the removal triggers an economy update.

This does not happen in any other case - removing the ScrapYards is fine, up/downgrading...

Main Industry Class:
https://bitbucket.org/SirHartley/deconomics/src/master/deconomics_ScrapYard
Secondary:
https://bitbucket.org/SirHartley/deconomics/src/master/deconomics_AltHullProd

Crash info:
Code
46435 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    at java.util.ArrayList$Itr.next(Unknown Source)
    at com.fs.starfarer.campaign.econ.reach.ReachEconomy.nextStep(Unknown Source)
    at com.fs.starfarer.campaign.econ.Economy.nextStep(Unknown Source)
    at com.fs.starfarer.campaign.econ.Economy.tripleStep(Unknown Source)
    at com.fs.starfarer.campaign.ui.marketinfo.IndustryListPanel.recreateOverview(Unknown Source)
    at com.fs.starfarer.campaign.ui.marketinfo.OO0o.dialogDismissed(Unknown Source)
    at com.fs.starfarer.ui.N.dismiss(Unknown Source)
    at com.fs.starfarer.ui.impl.K.dismiss(Unknown Source)
    at com.fs.starfarer.ui.impl.K.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.O0Oo.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)
[close]
do you have any idea what could cause this? I think it might be some check related either to the production budget or the presence of the market itself.

This means that when you delete remove the SalvageMarket, you're doing this from a method that's called while the game is iterating over a list of markets, somewhere further up the stack. Once it gets back up the stack to the loop where it was iterating over the list, it'll try to go to the next element, see that the list has changed, and throw this exception. In practical terms, this means you'll need to defer market removal somehow, perhaps by adding an EveryFrameScript that does this instead of doing it in the apply()/unapply() methods.

(I've changed the economy code so this specific error should no longer happen, btw.)
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 840
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6118 on: February 26, 2020, 08:40:49 AM »

Shouldn't there also be concurrency issues on market addition? Adding it works just fine, and is done within the same method.

Removal also works fine if triggered with the removal of the ScrapYard.
It really only causes that error if the heavy industry is removed.
« Last Edit: February 26, 2020, 08:44:04 AM by SirHartley »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6119 on: February 26, 2020, 08:49:26 AM »

It just depends on where it happens; apply()/unapply() get called from various places in the core code.
Logged
Pages: 1 ... 406 407 [408] 409 410 ... 711