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 ... 263 264 [265] 266 267 ... 706

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

MesoTroniK

  • Admiral
  • *****
  • Posts: 1731
  • I am going to destroy your ships
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3960 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.

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3961 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: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3962 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

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3963 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:
Spoiler
[close]

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.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3964 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

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3965 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.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3966 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

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3967 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:
Spoiler
[close]
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.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3968 on: September 29, 2018, 09:04:14 PM »

Else, good question, but i know probably the answer:
Spoiler
[close]
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

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3969 on: September 29, 2018, 10:31:51 PM »

Else, good question, but i know probably the answer:
Spoiler
[close]
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.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Jay2Jay

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3970 on: October 22, 2018, 02:38:55 PM »

Yo, I was wondering if I could make a sort of smoke stack by using like, particle effects or something to generate some thick black smog from ma ship.
Logged
"The greatest pleasure is to vanquish your enemies and chase them before you, to rob them of their wealth and see those dear to them bathed in tears, to ride their horses and clasp to your bosom their wives and daughters." ~Ghengis Khan

TheWetFish

  • Commander
  • ***
  • Posts: 140
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3971 on: November 07, 2018, 09:16:31 PM »

Yo, I was wondering if I could make a sort of smoke stack by using like, particle effects or something to generate some thick black smog from ma ship.
Do you mean a small smoke stack by generating smoke particles via CombatEngineAPI.addSmokeParticle or something bigger & better performance via MagicRender.objectspace to draw overlapping spinning smog sprites?
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3972 on: November 13, 2018, 04:34:43 AM »

Hypothetical:

Does a fighter wing's FleetMemberAPI have persistence between battles? Or can it be identified with a specific LPC instance to serve as its permanent identifier, even if the FMAPI itself is recreated every battle?
(Suppose I want to associate a particular string value with Spark Wing #92, which is currently installed on the ISS Foobar, Drover-class, but could be moved to another ship or sold tomorrow)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3973 on: November 13, 2018, 09:40:05 AM »

It doesn't persist, no. Hmm - nothing comes to mind, really. As far as the variant is concerned, the fighter LPC is just a string with the id of the fighter wing, so I don't think there's any way to differentiate one from another. Once installed on a ship, LPCs (and weapons) stop existing aside from just as that string.
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 #3974 on: November 13, 2018, 07:34:47 PM »

I want to make a small library only used by my own mods, so if I put the library and the mod into one jar(and there are 2 mods do so)will they conflict with each other because of class loader?
Logged
My mods


Pages: 1 ... 263 264 [265] 266 267 ... 706