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 ... 413 414 [415] 416 417 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6210 on: March 21, 2020, 08:36:47 PM »

No on both counts, I'm afraid - crew/marines are hardcoded as the only ones in a few different places. Sorry!
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6211 on: March 22, 2020, 03:46:03 AM »

Ah, ouch. Could it be changed to read the personnel tag in commodities.csv?

Two new questions:
  • How do I get a fleet's immediate movement waypoint (e.g. "I want to go to another star system, so I am currently headed for jump point X")? Is NavigationModulePlugin.getClickToMoveLocation() what I should be using?
  • A user reported a graphical glitch in my mod's use of FleetMemberPickerDialog; see the white square in
    https://www.youtube.com/watch?v=VWmW5NmbaHU
    At a guess, what might cause such a thing?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6212 on: March 22, 2020, 09:20:01 AM »

Ah, ouch. Could it be changed to read the personnel tag in commodities.csv?

Probably not, honestly, not unless there's a vanilla use case. It'd be too much of a pain to do and make sure that it works (and that it continues to work) otherwise. There are many loose ends where I'm not *quite* sure whether they would "just work" or would need to be changed, and it's a lot of stuff to look through.

How do I get a fleet's immediate movement waypoint (e.g. "I want to go to another star system, so I am currently headed for jump point X")? Is NavigationModulePlugin.getClickToMoveLocation() what I should be using?

Hmm. So the ultimate course target is SectorAPI.getUIData().getCourseTarget(). The intermediate one... <digs in> doesn't look like it's exposed. Let me add these to CampaignUIAPI:
   SectorEntityToken getCurrentCourseTarget();
   SectorEntityToken getNextStepForCourse(SectorEntityToken courseTarget);
   void layInCourseForNextStep(SectorEntityToken courseTarget);
   String getNameForCourseTarget(SectorEntityToken entity, boolean isEndpoint);
   float getLastLegDistance(SectorEntityToken courseTarget);
   
In the meantime, I think playerFleet.getInteractionTarget() should do the job. NavigationModulePlugin is ... ahh, I totally misinterpreted the question, thought it was about the course widget. Aha. Actually, getInteractionTarget() should work there, too, but it may not always point to that, i.e. if the fleet gets distracted chasing an enemy. getClickToMoveLocation() is just going to be some point along the path, which gets adjusted depending on how fast the fleet wants to go etc (and is iirc capped out at 10,000 units away from the fleet), it's not always going to be the destination.


A user reported a graphical glitch in my mod's use of FleetMemberPickerDialog; see the white square in
...
At a guess, what might cause such a thing?

Probably the icon rendering not being tested with icons that large - it does some stuff clearing out the destination alpha buffer and this likely means that the quads it's doing this with start overlapping for neighboring icons past a certain size and cause a bit of a mess. I *think* I may have tweaked this in the dev version? Not 100% sure.
Logged

Karamitsuko

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6213 on: March 24, 2020, 10:49:10 AM »

Is there any way to add restricted hullmods (such as the missile autoforge) to ships that aren't meant to have them by the use of console commands? Or, would I have to actually add them to the ship files themselves in order to do it? I've already tried manually adding the blueprint for certain restricted modspecs into my inventory and learning them that way, but they still won't allow me to actually put them on a ship
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 839
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6214 on: March 24, 2020, 12:05:09 PM »

I am facing a rather problematic situation - I got a class that just won't load:

Code
java.lang.RuntimeException: Problem loading class [com.fs.starfarer.api.impl.campaign.econ.conditions.deconomics_edict_conscription]
at com.fs.starfarer.loading.scripts.ScriptStore.Ó00000(Unknown Source)
at com.fs.starfarer.loading.newsuper.getNewPluginInstance(Unknown Source)
at com.fs.starfarer.campaign.econ.MarketCondition.readResolve(Unknown Source)
at com.fs.starfarer.campaign.econ.MarketCondition.<init>(Unknown Source)
at com.fs.starfarer.campaign.econ.Market.addCondition(Unknown Source)
at com.fs.starfarer.campaign.econ.Market.addCondition(Unknown Source)

All entries seem fine and the other 7 conditions I made load without issue.
This happens regardless of what the content of the class is.

Do you have any pointers for me?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6215 on: March 24, 2020, 12:22:36 PM »

Is there any way to add restricted hullmods (such as the missile autoforge) to ships that aren't meant to have them by the use of console commands? Or, would I have to actually add them to the ship files themselves in order to do it? I've already tried manually adding the blueprint for certain restricted modspecs into my inventory and learning them that way, but they still won't allow me to actually put them on a ship

You'd have to either edit the variant file or set the hullmod to not be hidden (via hull_mods.csv), but the latter might have some unintended consequences such as other ships starting to use it. Not 100% sure.

Do you have any pointers for me?

Post more of the error - there should be another stack trace, I believe? - and the contents of the class :)

My guess would be the maybe it doesn't have a default constructor?
Logged

SirHartley

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

Oh my god there is a second stack trace
problem solved - thank you so much
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6217 on: March 26, 2020, 02:56:32 PM »

Are there hardcoded/seeded (by hull id specifically) derelicts in vanilla, and if so, what class in the API handles that and can it be easily modified?

If that part is obfuscated from the API, can I by chance alternatively get a list of the hull ids that can be seeded?

(I've removed all the vanilla references to hull ids in favor of a unique TC prefix for each of my ids (to prevent any mod merging from causing crashes or other weirdness) and replaced each hull instance that is necessary with an overriding csv line which removes its tags for blueprints/faction use and adds hints to remove them from the codex and prevent them from spawning in markets.)

Trying to cover all my bases for the full TC experience before working on additional tweaks to the "lite version"
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6218 on: March 26, 2020, 04:18:34 PM »

Other than MiscellaneousThemeGenerator spawning XIV Legions, hmm. There's a derelict shuttle on the station near Asharu (see: Corvus.java), and I *think* that might be it. Nothing else comes to mind, at least.

Oh! The game will also spawn a nebula_Standard whenever it can't find a ship that it's trying to spawn.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6219 on: March 26, 2020, 06:19:04 PM »

Other than MiscellaneousThemeGenerator spawning XIV Legions, hmm. There's a derelict shuttle on the station near Asharu (see: Corvus.java), and I *think* that might be it. Nothing else comes to mind, at least.

Oh! The game will also spawn a nebula_Standard whenever it can't find a ship that it's trying to spawn.

Thanks! The only thing that may be a problem there for me is the legion. The shuttle is unchanged in the TC (I'm like 90% sure anyway) and the nebula which will change with the next release shouldn't ideally come up if I'm doing things correctly.

I'll take a look at the theme generator class and see about different solutions. I feel that not changing the id may inevitably interfere with other mods, so I will likely have to do something.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6220 on: March 27, 2020, 05:04:32 AM »

How do I get the list of freelance administrators the player has hired?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6221 on: March 27, 2020, 05:18:31 AM »

CharacterDataAPI has getAdmins()
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 839
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6222 on: March 27, 2020, 09:14:25 AM »

I'm trying to selectively disable the storage parts of a Submarket - as in, can't store ships in a commodity-only-Submarket.
Could you point me in the right direction? I'm not finding anything in BaseSubmarketPlugin...


never mind, I can't read.
thanks
« Last Edit: March 27, 2020, 09:18:46 AM by SirHartley »
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6223 on: March 27, 2020, 07:11:28 PM »

What's the fastest way to grab the player's selected skill for quests and such?

ArneHD

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6224 on: March 28, 2020, 06:42:49 AM »

Does anyone here know how to get a hold of Java 7? I've set up Netbeans IDE, but I've only been able to find JDE 14/13.

Thanks for your help.
Logged
Pages: 1 ... 413 414 [415] 416 417 ... 706