Fractal Softworks Forum
April 18, 2019, 03:28:20 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Starsector 0.9a is out! (11/16/18); In-dev patch notes for 0.9.1a (01/31/19)
 
   Home   Help Search Login Register  
Pages: 1 ... 299 300 [301]
  Print  
Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 703801 times)
Alex
Administrator
Admiral
*****
Posts: 13412


View Profile
« Reply #4500 on: April 07, 2019, 04:11:10 PM »

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: 828



View Profile Email
« Reply #4501 on: April 11, 2019, 03:29:41 PM »

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: 2612


Kickstarter is NOT a magic spring of free money!


View Profile Email
« Reply #4502 on: April 11, 2019, 04:10:50 PM »

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: 13412


View Profile
« Reply #4503 on: April 11, 2019, 05:46:28 PM »

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: 828



View Profile Email
« Reply #4504 on: April 11, 2019, 06:20:27 PM »

Alright, gotcha; thanks for the heads up then.
Logged
Vayra
Captain
****
Posts: 308



View Profile
« Reply #4505 on: April 12, 2019, 08: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

Kadur Remnant mod: http://fractalsoftworks.com/forum/index.php?topic=6649.0

Modding tutorial for complete beginners: http://fractalsoftworks.com/forum/index.php?topic=14905.0
(Direct Link: 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: 13412


View Profile
« Reply #4506 on: April 12, 2019, 11: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: 308



View Profile
« Reply #4507 on: April 13, 2019, 01:07:43 AM »

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?  Cheesy
Logged

Kadur Remnant mod: http://fractalsoftworks.com/forum/index.php?topic=6649.0

Modding tutorial for complete beginners: http://fractalsoftworks.com/forum/index.php?topic=14905.0
(Direct Link: 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: 13412


View Profile
« Reply #4508 on: April 13, 2019, 01:13:45 AM »

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
« Reply #4509 on: April 15, 2019, 02:08:44 PM »

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


Kickstarter is NOT a magic spring of free money!


View Profile Email
« Reply #4510 on: April 15, 2019, 04:14:25 PM »

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: 308



View Profile
« Reply #4511 on: April 17, 2019, 07: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, 09:07:50 AM by Vayra » Logged

Kadur Remnant mod: http://fractalsoftworks.com/forum/index.php?topic=6649.0

Modding tutorial for complete beginners: http://fractalsoftworks.com/forum/index.php?topic=14905.0
(Direct Link: 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: 13412


View Profile
« Reply #4512 on: April 17, 2019, 04:23:10 PM »

Let me add getBurstDuration() to WeaponSpecAPI, all the same.
Logged
JDCollie
Commander
***
Posts: 227



View Profile
« Reply #4513 on: April 17, 2019, 06:21:53 PM »

Where/how do I control if a faction requires a commission to access military markets?
Logged
Pages: 1 ... 299 300 [301]
  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!