Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 390 391 [392] 393 394 ... 710

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

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5865 on: December 26, 2019, 10:51:17 AM »

What does the "withJunkAndChatter" boolean argument officially do in the addMarket() method for EconomyAPI? I'm not sure I've figured it out and I'm still speculating...

Also, what does MarketAPI setHasSpaceport(true/false) do? Is it pre-0.9? Because now you just add a spaceport industry, right?
« Last Edit: December 26, 2019, 11:21:32 AM by WadeStar »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5866 on: December 26, 2019, 11:53:33 AM »

What does the "withJunkAndChatter" boolean argument officially do in the addMarket() method for EconomyAPI? I'm not sure I've figured it out and I'm still speculating...

There's space-junk in orbit around populated planets/stations, and there's a "radio chatter" sound effect when approaching the market. This parameter being true automatically adds both.

Also, what does MarketAPI setHasSpaceport(true/false) do? Is it pre-0.9? Because now you just add a spaceport industry, right?

The spaceport industry sets hasSpaceport to true, and then other things that check to see if the market has a spaceport check that. It's both a faster check and not hardcoded to depend on the specific vanilla spaceport industry.
Logged

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5867 on: December 26, 2019, 01:31:35 PM »

Thank you!

The spaceport industry sets hasSpaceport to true, and then other things that check to see if the market has a spaceport check that. It's both a faster check and not hardcoded to depend on the specific vanilla spaceport industry.

I see. This method will allow us to make our own custom spaceport industry/installations if we wanted to.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5868 on: December 26, 2019, 01:58:56 PM »

Yep, exactly.
Logged

boggled

  • Admiral
  • *****
  • Posts: 1129
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5869 on: December 26, 2019, 04:05:38 PM »

Hmm - stack trace? If there's an exception, the stack trace is pretty much mandatory to look at in trying to figure it out.

Here's the stack trace. The industry illustration appears blank when I open the building menu, and the null exception occurs as soon as I click to build the industry. It seems the problem is that it can't find the image I'm trying to point it to - but I'm not sure where the code that tries to load the image is located. The decompiler seems to be having issues with the UI files. Any ideas? Thanks!

Spoiler
25180 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.ui.u.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.oOO0.o00000(Unknown Source)
   at com.fs.starfarer.ui.newnew.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.marketinfo.q.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.marketinfo.IndustryListPanel.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.marketinfo.intnew.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.marketinfo.newsuper.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.o0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.String.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.N.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.O0oO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.render(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.render(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]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5870 on: December 26, 2019, 04:07:42 PM »

Are you sure the image you're providing exists? And, right, it needs to be loaded; i.e. either directly referred to from the industries csv or added in the "graphics" section of settings.json.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5871 on: December 26, 2019, 04:30:55 PM »

Also, are JPEGs supported by the game?
Logged

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5872 on: December 26, 2019, 04:32:13 PM »

Minor addition:

I don't think withJunkAndChatter=false is working. My colonies/planets/markets always have floating debris and comms sound effects even when I pass false to the method call.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5873 on: December 26, 2019, 04:44:44 PM »

Also, are JPEGs supported by the game?

Yep! Situational due to lack of transparency, of course, but e.g. the backgrounds and illustrations are jpegs. Generally faster load times for larger images...


I don't think withJunkAndChatter=false is working. My colonies/planets/markets always have floating debris and comms sound effects even when I pass false to the method call.

It'll auto-add junk when you reload the game, and will also add chatter when you start a new game, so false there isn't saying "never ever add it", just "don't do it right now".
Logged

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5874 on: December 26, 2019, 08:19:39 PM »



I don't think withJunkAndChatter=false is working. My colonies/planets/markets always have floating debris and comms sound effects even when I pass false to the method call.

It'll auto-add junk when you reload the game, and will also add chatter when you start a new game, so false there isn't saying "never ever add it", just "don't do it right now".

Ah, so it's more to cut down on in-game fluff? Like if someone is dynamically creating colonies or for when players create colonies? Just curious what its practical use is...

If I'm adding a market in onNewGame() it might speed up initialization slightly by cutting down a redundant procedure???
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5875 on: December 26, 2019, 08:25:27 PM »

The use case is "the junk and chatter already exist, but the market isn't in the global economy". I think the only use of it in vanilla is when you finish the tutorial and Ancyra/Derinkuyu are added to the economy when the jump-points start working again.
Logged

boggled

  • Admiral
  • *****
  • Posts: 1129
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5876 on: December 27, 2019, 07:30:53 AM »

added in the "graphics" section of settings.json.

I had no idea that section of the settings.json existed. Problem solved! Thank you!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5877 on: December 27, 2019, 09:53:58 AM »

Glad you got it sorted out!
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5878 on: December 27, 2019, 06:08:48 PM »

Is there a listener to check when a market changes hand (or is colonized from neutral to something that isn't neutral)?

creature

  • Captain
  • ****
  • Posts: 400
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5879 on: December 28, 2019, 01:38:04 AM »

Is there a way to make a ship "braver" without changing its loadout? I'm not really sure how the backend deals with it, but I made a modular ship where the core is almost unarmed and has 1 fighter bay. It, however, has three huge modules with tons of close range weapons. However, instead of brawling up-close, it seems to prefer to act like a dedicated carrier and move far outside the range of its weapons or, even its short-ranged fighters (despite having the CARRIER, COMBAT tag - this behavior happens even if I remove all tags).

EDIT: Also another question:

Is there a way to trigger a script in the middle of a campaign? My aim is to spawn some planets/stations after X years have passed using the same code in the SectorGeneratorPlugin I used to create the system in the first place.

Also on the same topic, I also wanted to add/delete industries - is this possible? I wanted to simulate long-term growth by adding/upgrading (delete then add) some buildings after X years have passed.

EDIT 2: Different question now:

I am having issues with issuing full retreat, but then the combat doesn't end even when there are no ships or fighters on my side anymore. Looking at other mods, they seem to have some plugins that take care of modules to solve this issue, however, when I tried porting it over to my files, it seems the function calls they use are deprecated...  Is there a workaround for this?
« Last Edit: December 30, 2019, 05:06:32 PM by creature »
Logged
Pages: 1 ... 390 391 [392] 393 394 ... 710