Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 606 607 [608] 609 610 ... 711

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

Liral

  • Admiral
  • *****
  • Posts: 718
  • Realistic Combat Mod Author
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9105 on: September 08, 2022, 07:49:33 AM »

Hmm, your best bet might be to use SkillSpecAPI.addTag(Skills.TAG_NPC_ONLY) to manage which skills are actually shown in the character screen. You might also want to add Skills.TAG_PLAYER_ONLY to unused skills so that NPC officers don't pick them up, either - I *think* that should work, not 100% on it.

Excuse me, Alex, was this directed to my question about skills?  :)

Histidine

  • Admiral
  • *****
  • Posts: 4692
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9106 on: September 09, 2022, 06:27:09 AM »

Two questions:

- Is it intentional that FleetLogisticsAPI.getShipMaintenanceSupplyCost(), despite its name, also includes supply use from repair and CR recovery? I don't suppose there's an easy method for me to get the maintenance-only supply cost other than counting myself?

- Alex, did you see my thread here?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9107 on: September 09, 2022, 09:13:49 AM »

Excuse me, Alex, was this directed to my question about skills?  :)

Yes!

- Is it intentional that FleetLogisticsAPI.getShipMaintenanceSupplyCost(), despite its name, also includes supply use from repair and CR recovery? I don't suppose there's an easy method for me to get the maintenance-only supply cost other than counting myself?

Yes - iirc it was named before the terminology fully shook out and never renamed. And, unfortunately, no.

- Alex, did you see my thread here?

I didn't; let me take a look.
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9108 on: September 09, 2022, 01:44:16 PM »

What justify an important people in the API?

I know story npcs should be placed in there, but what about reproducable (infinite, but requires a specific condition to spawn) contacts? Do they go in there too or rather what is the purpose of this api?

Also what is the point of checking them out or in?

Liral

  • Admiral
  • *****
  • Posts: 718
  • Realistic Combat Mod Author
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9109 on: September 09, 2022, 08:15:33 PM »

Yes!

Thanks for clarifying!  I have another question.  I am writing a new version of VersionChecker, and  fetching the title of a mod forum thread would return the number of the latest version.  May I please code this new version of VersionChecker to do so?  :)

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9110 on: September 10, 2022, 02:10:08 AM »

How is production budget calculated?
I wanted to add an industry that increases it (even if a Heavy Industry is already present), but I'm not sure how to.

Ruddygreat

  • Admiral
  • *****
  • Posts: 525
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9111 on: September 10, 2022, 07:23:06 AM »

How is production budget calculated?
I wanted to add an industry that increases it (even if a Heavy Industry is already present), but I'm not sure how to.

it's 25k per unit of ship hulls produced

Inventor Raccoon

  • Captain
  • ****
  • Posts: 452
  • Digging through trash for a hydroflux catalyst
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9113 on: September 10, 2022, 08:03:15 AM »

Hmm, your best bet might be to use SkillSpecAPI.addTag(Skills.TAG_NPC_ONLY) to manage which skills are actually shown in the character screen. You might also want to add Skills.TAG_PLAYER_ONLY to unused skills so that NPC officers don't pick them up, either - I *think* that should work, not 100% on it.
TAG_PLAYER_ONLY doesn't work on officer level-up for the base officer plugin (it doesn't check for that tag - OfficerManagerEvent does, and since FleetFactoryV3 relies on that, it works on both recruitable and NPC-fleet officers) but the mod can always fix that on its own by providing its own officer level-up plugin. Making them deprecated should work, too - it works on the levelup plugin and that trickles down to the other two.
Logged

alaricdragon

  • Commander
  • ***
  • Posts: 163
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9114 on: September 10, 2022, 01:18:38 PM »

I have yet another random question, if someone is willing to answer:
is there an way to change / add to an commodities description using code? I want to add something like the thing weapons have were they show how mush cargo space each weapon takes.
thank you all once more for the help you all have given. it has saved me many long hours of headaches.
Logged

Audax

  • Commander
  • ***
  • Posts: 174
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9115 on: September 10, 2022, 10:22:18 PM »

Is it possible to set the max radius in hyperspace of a star system?

I am using the ConstellationGen methods to seperate the stars that I made and it uses the getMaxRadiusInHyperspace to seperate the stars, but the only way to increase the max radius in hyperspace is through using the autogenerateHyperspaceJumpPoints method in StarSystemAPI. Do we have other options  to increase the radius manually? I've been searching for a way but haven't found any.

Ruddygreat

  • Admiral
  • *****
  • Posts: 525
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9116 on: September 11, 2022, 05:24:01 PM »

does the SHIP_LIMITED_TOOLTIP variant tag work as intended? (or am I misinterpreting it?)
I'm spawning a ship with lazylib's spawnShipOrWingDirectly which creates a fleetmember then spawns the ship & it seems not to apply correctly, the ship still has it's default tooltip when I select it in the command screen.
the text2 & text3 fields in the ship's desc seem to be filled out correctly, the only thing that seems like it'll be messing up will be the fact that the ship's getting spawned mid combat?

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 236
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9117 on: September 11, 2022, 05:45:48 PM »

How do I get all undeployed ships of a given fleetside in combat? CombatFleetManagerAPI doesn't hold any references to every fleet, doesnt give any way to get all of them, etc. it only seems to care about one single fleet.

Alternatively, I could just get all ships, deployed and undeployed.

EDIT: nevermind apparantly fleetmanager is jsut not initialized correctly until advance() in an everyframe
« Last Edit: September 11, 2022, 05:57:42 PM by NikoTheGuyDude »
Logged

WiC2021

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9118 on: September 11, 2022, 09:28:52 PM »

Hey Everyone,

I'm trying to make a custom weapon with custom sprites but based off of existing vanilla weapons when it comes to the .wpn file in order to understand the modding process. Vayra's intro to modding got me far enough to actually have my custom weapon show up in the mission refit and look relatively correct, however whenever I try to fire my weapon, the game crashes with the following:

Quote
48871 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.combat.entities.ship.A.void.ÖO0000(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.A.void.createBeam(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.trackers.E.super(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.trackers.D.o00000(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.trackers.D.o00000(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.trackers.E.super(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.A.void.advance(Unknown Source)
   at com.fs.starfarer.combat.systems.G.advanceLinked(Unknown Source)
   at com.fs.starfarer.combat.systems.G.advance(Unknown Source)
   at com.fs.starfarer.combat.entities.Ship.fire(Unknown Source)
   at com.fs.starfarer.combat.entities.Ship.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

I originally used the tachyon lance as my basis for the .wpn file, but had the same errors above. I figured it might have to do with the ["beamEffect":"com.fs.starfarer.api.impl.combat.TachyonLanceEffect"] script somehow having a broken path, so I switched to the High Intensity Laser since it doesnt have a beamEffect line but the error remains. There is probably something stupid i'm missing so apologies in advance!  ;D

Histidine

  • Admiral
  • *****
  • Posts: 4692
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9119 on: September 13, 2022, 07:10:11 AM »

At a guess, there's something wrong with your beam properties somewhere although I can't tell what exactly from the error message. Compare to a working vanilla weapon and see what's different/missing.


Random thing that doesn't involve anything I'm working on but is bothering me:

How often do tooltips in general refresh? The ones in the character skills screen seem to do it every frame the button is moused over, which seems, uh, less than ideal.
I've heard of an issue where looking at a cargo screen with too many blueprint items in it causes a framerate drop, and was wondering if that could be related in any way.
Logged
Pages: 1 ... 606 607 [608] 609 610 ... 711