Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 299 300 [301] 302 303 ... 310

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13889
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4500 on: April 07, 2019, 09:11:10 AM »

Oh, that's... definitely weird. For the moment, you should be able to cast any of these to AssignmentTargetAPI - while the DeployedFleetMemberAPI / BattleObjectiveAPI interfaces do not implement it, the core implementations do.

Let me make these two extend AssignmentTargetAPI; there, done.


If I want to give an escort order on a ship in combat, should I create my own class that implements AssignmentTargetAPI?

(That wouldn't work, btw - the method expects a core implementation, and the AssignmentTargetAPI is more of a marker interface, anyway.)
Logged

MShadowy

  • Admiral
  • *****
  • Posts: 842
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4501 on: April 11, 2019, 08:29:41 AM »

So I got reminded of a miscellaneous problem I'm having in relation to fighter wing rarity, and I was kinda wondering if I'm missing something on it.

In a relatively recent update of Shadowyards I added the Shikome, a sort of advanced prototype fighter that's basically just kinda monstrous; suitably for it's lore and capabilities I set it to be pretty rare -- presuming a default weighting of 1, the Shikome has a weighting of 0.05, so it should be getting selected about 1/20th as often as a fighter with the probable default weighting.

This doesn't actually seem to be happening, however, and Shikomes appear regularly in Shadowyards fleets; in fact this query got started by some reporting a battle with 8(!?!?!) of the things at once, which is probably way more than you should encounter at one time. I can only presume I've got the weighting messed up somehow and am wondering if anyone has any insight.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 2651
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4502 on: April 11, 2019, 09:10:50 AM »

Actually, since we recently got a documentation post about loot drops, I owuldn't mind an in-depth look at how rarity works for everything, weapons wings and hulls.

The way I understand it, it is highly dependent on the number of available hulls for each role, and I suspect having a few rarity "tiers" rather than just a multiplier would help maintaining a consistent rarity regarless of the number of active mods.
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13889
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4503 on: April 11, 2019, 10:46:28 AM »

Rarity is just for drops - it doesn't affect fleet composition or weapon/fighter selection at all.

For weapons, higher tier means a lower chance of being available. For fighters, this isn't the case - there aren't enough fighters, i.e. there's no "Talon, but worse" and "Talon, but better" etc progression for each kind of fighter, so that didn't work very well. Instead, it just picks a couple of the available fighters for each autofit category.

com.fs.starfarer.api.impl.campaign.fleets.DefaultFleetInflater.java is a good place to look for the details; if you want specific behavior with regard to rarity etc, writing a custom one is probably the way to go. See also: CampaignPlugin.pickFleetInflater().
Logged

MShadowy

  • Admiral
  • *****
  • Posts: 842
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4504 on: April 11, 2019, 11:20:27 AM »

Alright, gotcha; thanks for the heads up then.
Logged

Vayra

  • Captain
  • ****
  • Posts: 358
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4505 on: April 12, 2019, 01:50:32 PM »

Is there any way to get weapon Impact via script? I don't see it in any of the methods on WeaponAPI, WeaponSpecAPI, DamagingProjectileAPI, or DamageAPI, but I might just have missed it.

Also curious about weapon spread stats -- the only one that seems accessible is current spread via getCurrSpread() but it'd be nice to be able to get min, max, per shot, and decay from the WeaponAPI as well.
Logged
jangala delenda est

Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=6649.0
Modding tutorial: https://starsector.wikia.com/wiki/Intro_to_Modding

im gonna push jangala into the sun i swear to god im gonna do it

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13889
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4506 on: April 12, 2019, 04:20:44 PM »

Is there any way to get weapon Impact via script? I don't see it in any of the methods on WeaponAPI, WeaponSpecAPI, DamagingProjectileAPI, or DamageAPI, but I might just have missed it.

There isn't, no. (And it's somewhat non-trivial to expose as it's part of an internal ProjectileSpec class that's not currently exposed in the API at all. Like, it's not hard, but it's also not just me adding a method to an existing interface.)

Also curious about weapon spread stats -- the only one that seems accessible is current spread via getCurrSpread() but it'd be nice to be able to get min, max, per shot, and decay from the WeaponAPI as well.

Ah, let me add methods for these to WeaponSpecAPI - done.
Logged

Vayra

  • Captain
  • ****
  • Posts: 358
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4507 on: April 12, 2019, 06:07:43 PM »

Is there any way to get weapon Impact via script? I don't see it in any of the methods on WeaponAPI, WeaponSpecAPI, DamagingProjectileAPI, or DamageAPI, but I might just have missed it.

There isn't, no. (And it's somewhat non-trivial to expose as it's part of an internal ProjectileSpec class that's not currently exposed in the API at all. Like, it's not hard, but it's also not just me adding a method to an existing interface.)

Also curious about weapon spread stats -- the only one that seems accessible is current spread via getCurrSpread() but it'd be nice to be able to get min, max, per shot, and decay from the WeaponAPI as well.

Ah, let me add methods for these to WeaponSpecAPI - done.

Ah, I see. Thanks for adding the spread methods! Out of curiosity, will those values just be readable, or did you add .set methods too?  :D
Logged
jangala delenda est

Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=6649.0
Modding tutorial: https://starsector.wikia.com/wiki/Intro_to_Modding

im gonna push jangala into the sun i swear to god im gonna do it

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13889
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4508 on: April 12, 2019, 06:13:45 PM »

With the set methods, yes.

I'm curious - is anyone actually using setXXX() methods in WeaponSpecAPI? Those change the values for all weapons of that type, not just the weapon in question. ... ahhh, right, there's WeaponAPI.ensureClonedSpec() for this; never mind.
Logged

Zmey

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4509 on: April 15, 2019, 07:08:44 AM »

Are there schematics for projectile trail plugins? What do I need to make one besides graphics of trails, vector utis.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 2651
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4510 on: April 15, 2019, 09:14:25 AM »

For basic projectile trails you just need to load the texture in your settings.json and duplicate trail_data.csv from MagicLib to your mod with your projectile entry. There are more detailed instructions in the original file.

For advanced stuff, you can take a look at the Trail manager script in MagicLib for pointers.
Logged
 

Vayra

  • Captain
  • ****
  • Posts: 358
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4511 on: April 17, 2019, 12:50:00 AM »

On the topic of weapon-related API methods, is there a way to get the burst duration of a beam? Either the "burst size" value or the actual burst duration including chargedown. WeaponSpecAPI.getBurstSize() returns an int, and DamageAPI.getDpsDuration() seems to be a dynamic counter for the actual amount of time since the last damage tick or something to that effect, and neither of those seem to work.

EDIT: Wait, I found it! DerivedWeaponStatsAPI.getBurstFireDuration() works. I'll leave this here so others might see it if they're likewise confused.
« Last Edit: April 17, 2019, 02:07:50 AM by Vayra »
Logged
jangala delenda est

Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=6649.0
Modding tutorial: https://starsector.wikia.com/wiki/Intro_to_Modding

im gonna push jangala into the sun i swear to god im gonna do it

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13889
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4512 on: April 17, 2019, 09:23:10 AM »

Let me add getBurstDuration() to WeaponSpecAPI, all the same.
Logged

JDCollie

  • Commander
  • ***
  • Posts: 231
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4513 on: April 17, 2019, 11:21:53 AM »

Where/how do I control if a faction requires a commission to access military markets?
Logged

MShadowy

  • Admiral
  • *****
  • Posts: 842
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4514 on: April 21, 2019, 01:21:51 PM »

As a bit of a followup to my earlier question are there any particular steps I would need to do in order to get an extension of the DefaultFleetInflater set up, or is it more likely that I'll just have to put in a complete replacement of the class?

E: To be more clear I currently have an extension of the DefaultFleetInflater written as a plugin, which I decided on because I was hoping to avoid having to replace the entire Inflater. It replaces the public void inflate section with some modifications to try and adjust the fighter spawning. However, as it currently doesn't seem to be doing anything and trying to directly load the plugin causes a crash, I figure I've gotten things mixed up somewhere.
« Last Edit: April 21, 2019, 01:51:38 PM by MShadowy »
Logged
Pages: 1 ... 299 300 [301] 302 303 ... 310