Fractal Softworks Forum
October 15, 2018, 07:10:42 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New blog post: Once More, with Feeling (10/05/18); In-dev patch notes for Starsector 0.9a (06/01/18);Starsector 0.8.1a is out!
 
   Home   Help Search Login Register  
Pages: 1 ... 263 264 [265]
  Print  
Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 582090 times)
Histidine
Admiral
*****
Posts: 1839



View Profile WWW Email
« Reply #3960 on: September 22, 2018, 08:03:29 AM »

Could SettingsAPI.getVariant(variantId) (and maybe FactoryAPI.createFleetMember(variantId)) with a variant that doesn't exist return null instead of throwing a RuntimeException? Doing a try/catch to check if a variant exists feels pretty silly.
« Last Edit: September 22, 2018, 08:06:12 AM by Histidine » Logged

Alex
Administrator
Admiral
*****
Posts: 11914


View Profile
« Reply #3961 on: September 22, 2018, 09:09:14 AM »

Added: SettingsAPI.doesVariantExist(String variantId)

I'd like to keep the runtime exception behavior since it makes it easier for me to track down problems (say, when a variant is not found due to a *bug*) because then I'll know the variant ID that caused it.
Logged
Plasmatic
Captain
****
Posts: 459


Curious no?


View Profile Email
« Reply #3962 on: September 22, 2018, 11:57:39 PM »

What program would be best used to modify .csv files?

A program that isn't microsoft excel.

I've tried libreoffice, but apparently that makes the game crash even when i save as a .csv.

so I'm wondering if I'm missing something..
Logged

"Better to remain silent and be thought a fool than to speak out and remove all doubt"
- Abraham Lincoln
MesoTroniK
Admiral
*****
Posts: 1180


I am going to destroy your ships


View Profile
« Reply #3963 on: September 23, 2018, 12:23:00 AM »

LibreOffice is fine, you probably don't have the separator / delimiter options setup correctly.



While that is a screenshot from Open Office, the same line of thought applies.
Logged

Histidine
Admiral
*****
Posts: 1839



View Profile WWW Email
« Reply #3964 on: September 23, 2018, 02:21:10 AM »



What makes the core worlds have the multi-colored background, and how do I duplicate it?

The core sector generation scripts don't create a constellation, so I'm guessing it's automatically generated from the in-system nebulae at some point. But when I create a custom constellation, it either uses a uniform nebula color for the whole starscape, or no nebula at all (with ConstellationType.NORMAL).
(I'd try not making the constellation at all, but NameAssigner needs a constellation param)
Logged

Alex
Administrator
Admiral
*****
Posts: 11914


View Profile
« Reply #3965 on: September 23, 2018, 09:58:06 AM »

system.setAge(StarAge.age);
system.setHasSystemwideNebula(true);

Both of the above are called from StarSystemGenerator.addSystemwideNebula(), which is how this happens for the vanilla core worlds.

The color of the nebula around the star is based on the StarAge of the system. Amber = old, purple = average, and blue = young, iirc.
Logged
Snrasha
Captain
****
Posts: 473



View Profile
« Reply #3966 on: September 26, 2018, 04:51:20 AM »

Hello, i have a weird problem.
I cannot reproduce the bug, just one person has this crash(2times).
On my mod, i generate a BountyEvent with a faction then set the fleet with a casual faction(like Pirate)
Code:
      fleet.setFaction(GS_Constants.GSFACTION_ID, true);

When this fleet catch the player and then crash.
Quote
332599 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain - java.lang.NullPointerException java.lang.NullPointerException at src.data.scripts.campaign.missions.GS_EventEndlessBattle.getCurrentImage(GS_EventEndlessBattle.java:438) at com.fs.starfarer.campaign.CampaignEngine.reportEventStage(Unknown Source) at com.fs.starfarer.campaign.CampaignEngine.reportEventStage(Unknown Source) at src.data.scripts.campaign.missions.GS_EventEndlessBattle.advance(GS_EventEndlessBattle.java:242) at com.fs.starfarer.campaign.events.CampaignEventManager.advance(Unknown Source) 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$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

The game try to catch the logo of the fleet and get a null.
But, this thing happens for this player after the 17th to 19th BountyEvent.(Where the fleet points is bigger each time(20capitals+ at this moment))


Code:
   @Override
    public String getCurrentImage() {
        return faction.getLogo();
    }

The code is here, but i do not think this is usefull, like this thing is a random crash where just the fleet size of the fleet look like a problem.

The only other link except the size is the faction used for the generation, the remnant faction.
One of these fleet:

But i am sure than every available faction is set and have a logo.
« Last Edit: September 26, 2018, 04:59:52 AM by Snrasha » Logged

I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Artefact
Two weird faction.

Sanguinary Anarchistic Defectors A fan-mod of Shadowyard.
Alex
Administrator
Admiral
*****
Posts: 11914


View Profile
« Reply #3967 on: September 26, 2018, 09:25:13 AM »

The only possible way it can throw a NullPointerException on that line:

return faction.getLogo();

is if faction is null. So, I'd look for any reason that might be the case. Offhand, it's *probably* because:

Global.getSector().getFaction(content.getEndlessFaction());

returns null at some point. That is, the getFaction() method does, because of whatever is passed in.
Logged
Snrasha
Captain
****
Posts: 473



View Profile
« Reply #3968 on: September 26, 2018, 09:39:57 AM »

The only possible way it can throw a NullPointerException on that line:

return faction.getLogo();

is if faction is null. So, I'd look for any reason that might be the case. Offhand, it's *probably* because:

Global.getSector().getFaction(content.getEndlessFaction());

returns null at some point. That is, the getFaction() method does, because of whatever is passed in.
But like he need the faction for made the fleet who have be created, the faction is not null :x
Logged

I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Artefact
Two weird faction.

Sanguinary Anarchistic Defectors A fan-mod of Shadowyard.
Alex
Administrator
Admiral
*****
Posts: 11914


View Profile
« Reply #3969 on: September 26, 2018, 09:58:41 AM »

Could be that it failed to create the fleet, but it advances one frame before being removed. If so, then an "if (isDone()) return" check in advance() might fix this.

Regardless, faction is *definitely* null there. No other way for that crash to happen. Regardless of how that might seem to be impossible, that is nonetheless the case, and any investigation of the bug ought to be based on figuring out why/how it's null there.
Logged
Snrasha
Captain
****
Posts: 473



View Profile
« Reply #3970 on: September 29, 2018, 01:19:36 PM »

Could be that it failed to create the fleet, but it advances one frame before being removed. If so, then an "if (isDone()) return" check in advance() might fix this.

Regardless, faction is *definitely* null there. No other way for that crash to happen. Regardless of how that might seem to be impossible, that is nonetheless the case, and any investigation of the bug ought to be based on figuring out why/how it's null there.

Look like this is that, for the person, he do not have crash anymore ^^. Thank.

Else, good question, but i know probably the answer:
Any means to slow the spin of these shields when you put a texture shield on them?
Thank!
Logged

I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Artefact
Two weird faction.

Sanguinary Anarchistic Defectors A fan-mod of Shadowyard.
Alex
Administrator
Admiral
*****
Posts: 11914


View Profile
« Reply #3971 on: September 29, 2018, 09:04:14 PM »

Else, good question, but i know probably the answer:
Any means to slow the spin of these shields when you put a texture shield on them?
Thank!

There isn't, but let me add some methods to ShieldAPI:

float getInnerRotationRate();
void setInnerRotationRate(float innerRotationRate);
float getRingRotationRate();
void setRingRotationRate(float ringRotationRate);
Logged
Snrasha
Captain
****
Posts: 473



View Profile
« Reply #3972 on: September 29, 2018, 10:31:51 PM »

Else, good question, but i know probably the answer:
Any means to slow the spin of these shields when you put a texture shield on them?
Thank!

There isn't, but let me add some methods to ShieldAPI:

float getInnerRotationRate();
void setInnerRotationRate(float innerRotationRate);
float getRingRotationRate();
void setRingRotationRate(float ringRotationRate);

Thank, same if this is not very important like, i suppose, i will be the unique guy who use these methods ^^.
Logged

I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Artefact
Two weird faction.

Sanguinary Anarchistic Defectors A fan-mod of Shadowyard.
Pages: 1 ... 263 264 [265]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!