Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Updated the Forum Rules and Guidelines (02/29/20); Blog post: GIF Roundup (04/11/20)

Pages: 1 ... 384 385 [386] 387 388 ... 443

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

Morrokain

  • Admiral
  • *****
  • Posts: 1348
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5775 on: November 29, 2019, 04:22:37 PM »

Since ammo recharging is kind of a gimmick with a lot of Shadowyards weapons I've been planning on introducing a hullmod that boosts this recharge rate; unfortunately as I started trying to implement it it became clear that straightforward mechanisms for this don't seems to be present, at least not through MutableShipStats. It's already been requested through the API request thread but doesn't seem to have been implemented yet; as such I figured I may as well ask if anyone has any suggestions for an alternate implementation.

I messed with this idea a while back. Long and short of it is I don't think that value is exposed anywhere. I am nowhere even close to the best coder on this forum though. Just figured I'd say I tried and met no success.
Logged

passwalker

  • Commander
  • ***
  • Posts: 116
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5776 on: November 29, 2019, 10:32:11 PM »

does anyone know where i can get old starfarer releases - 0.34, 0.35 and the first alpha
blogpost download links are dead, they give me a 404 error
http://fractalsoftworks.com/tag/release/page/5/
i kinda want to look at old sprites and whatnot
to see where it all began.
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

Sundog

  • Admiral
  • *****
  • Posts: 1100
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5777 on: November 30, 2019, 06:57:07 AM »

No idea where you could get versions that old. Oldest one I have is 0.6.2

Since ammo recharging is kind of a gimmick with a lot of Shadowyards weapons I've been planning on introducing a hullmod that boosts this recharge rate; unfortunately as I started trying to implement it it became clear that straightforward mechanisms for this don't seems to be present, at least not through MutableShipStats. It's already been requested through the API request thread but doesn't seem to have been implemented yet; as such I figured I may as well ask if anyone has any suggestions for an alternate implementation.
Well, you could always modify ammo manually with myWeapon.setAmmo(), but that might get complicated/bug-prone depending on what you want to do.

creature

  • Captain
  • ****
  • Posts: 301
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5778 on: December 02, 2019, 07:58:47 PM »

How can I add custom combat messages on the textbox that appears at the top left of the screen during combat? I'd like to show event updates during a mission.
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1100
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5779 on: December 02, 2019, 08:43:01 PM »

You can do that with the CombatUIAPI, which can be accessed through the combat engine. e.g. Global.getCombatEngine().getCombatUI().addMessage()

creature

  • Captain
  • ****
  • Posts: 301
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5780 on: December 02, 2019, 08:57:11 PM »

You can do that with the CombatUIAPI, which can be accessed through the combat engine. e.g. Global.getCombatEngine().getCombatUI().addMessage()
Thanks for the quick reply! It worked!
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4621
  • Quantum Mechanic
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5781 on: December 04, 2019, 12:17:25 PM »

Can module weapon slots, image, etc be changed dynamically?

I've tried skin files and they also fail, so I think the answer is "no", unless I want to make actual .variant files for each combination of modules (which is impractical as there are hundreds).
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 16605
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5782 on: December 04, 2019, 12:57:38 PM »

Yeah, as I remember, module slots are limited to the specific hull type that's in the original variant.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4621
  • Quantum Mechanic
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5783 on: December 04, 2019, 04:59:21 PM »

Ahh, darn! Thanks for confirming! :)
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 1348
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5784 on: December 05, 2019, 09:45:23 PM »

Can't remember, is the standard recovery chance 50% or lower than that?


Actually, just want to make sure this does what I think it does because it would be difficult to test:

Code

    public static final float RECOVER_CHANCE = 0.75f;


public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {

if (stats.getEntity() != null && stats.getEntity().getOwner() != 0) {
stats.getDynamic().getMod(Stats.INDIVIDUAL_SHIP_RECOVERY_MOD).modifyMult(id, RECOVER_CHANCE);
}
}


Should reduce the chance to recover by 25% right?
« Last Edit: December 06, 2019, 12:34:00 PM by Morrokain »
Logged

mipen

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5785 on: December 06, 2019, 03:55:18 AM »

Is it possible to increase the number of blueprints that are dropped from ruins and salvaged structures?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 16605
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5786 on: December 06, 2019, 03:41:00 PM »

Should reduce the chance to recover by 25% right?

Correct!

Is it possible to increase the number of blueprints that are dropped from ruins and salvaged structures?

In theory, yes, but I think that'd involve providing your own copy of MarketCMD (and changing the relevant rules that call it), so it's a decent bit of work.
Logged

creature

  • Captain
  • ****
  • Posts: 301
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5787 on: December 07, 2019, 03:17:44 PM »

Is there a way to limit the use of specific LPCs via a hullmod? I've tried to go through the equipped fighters and then setting their stats by either one of

Code
           		ship.getVariant().getWing(i).setNumFighters(3);
            ship.getVariant().getWing(i).setOpCost(14);

But it seems this code changes the fighter spec for the entire game and not just the ship. I also can't go the converted hangar route because

Code
		stats.getDynamic().getMod(Stats.BOMBER_COST_MOD).modifyPercent(id, BOMBER_COST_PERCENT);
stats.getDynamic().getMod(Stats.FIGHTER_COST_MOD).modifyPercent(id, ALL_FIGHTER_COST_PERCENT);
stats.getDynamic().getMod(Stats.INTERCEPTOR_COST_MOD).modifyPercent(id, ALL_FIGHTER_COST_PERCENT);
stats.getDynamic().getMod(Stats.SUPPORT_COST_MOD).modifyPercent(id, ALL_FIGHTER_COST_PERCENT);

...these will affect a bunch of other ships.

Actually, would it be possible to add a custom category to these -> Stats.BOMBER_COST_MOD? And I could set the LPCs to that category and modify their costs this way.

Or if there's an easier method that I'm unaware of, I'd love to hear it!
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 1348
  • Megalith Dreadnought - Archean Order
    • View Profile
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1100
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5789 on: December 07, 2019, 07:18:19 PM »

Is there a way to limit the use of specific LPCs via a hullmod?
I don't think there are any ideal ways to do so, but Ed was asking a similar question a while ago, so you might be interested in reading: http://fractalsoftworks.com/forum/index.php?topic=5061.msg261097#msg261097

Actually, would it be possible to add a custom category to these -> Stats.BOMBER_COST_MOD? And I could set the LPCs to that category and modify their costs this way.
Maybe. It would be really cool if it worked, but I expect the way those stats are applied is hard-coded in a way that doesn't take non-vanilla LPC categories into account. Still, it's worth a try.
Pages: 1 ... 384 385 [386] 387 388 ... 443