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: Anubis-class Cruiser (12/20/24)

Pages: 1 ... 685 686 [687] 688 689 ... 753

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10290 on: November 08, 2023, 11:47:45 AM »

DEM weapons seem to always have the doubled amount of damage of what they do per second in the actual weapon that fires the missile, which then fires the payload. Is there any reason for this, as the damage seems to depend on whats set in the payload anyways?

Just how the math works out in those particular cases, due to beam fade-in and fade-out. Damage scales quadratically with beam brightness, so the overall DPS during fade/in out is one third of the listed beam DPS. E.G. if your beam fades in instantly, fires for 0.25 seconds, and fades out for 0.75 seconds, it's equivalent to 0.5 seconds of firing at full power. So if your desired damage output is 1000, your DPS would need to be 2000. This sort of thing.

(Noting, of course, that beam damage is approximate because of being dealt in discrete ticks about 10x per second.)
Logged

Crimson Spirit

  • Ensign
  • *
  • Posts: 12
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10291 on: November 08, 2023, 11:58:22 AM »

This isn't really a modding question that is too minor to warrant its own thread

I just wanted to take a bit of time (and space -teehee) to thank you Alex (and the rest of the community) for the making and devotion you have for this masterpiece, it's truly inspiring

GO SPACE NERDS!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10292 on: November 08, 2023, 02:39:16 PM »

<3
Logged

vicegrip

  • Captain
  • ****
  • Posts: 287
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10293 on: November 08, 2023, 05:18:00 PM »

Are [faction] Strike Fleets and Large Strike Fleets a feature of the core game? And if they are is there a way to make them spawn without d-mods? Never mind they are exerelinInvasionSupportFleets

Is there a way to selectively not show the s-mod text of a hullmod via scripting in the hullmod file?

And how is the second line of tooltip text in structures that affect stability generated? I have a structure that adds a condition that adds stability, so the structure itself adds 0 stability, but I still want the tooltip to display the correct value. I can replicate the first line just fine, but for the second line \n isn't adding enough space between lines, and addPara is adding too much space. I also can't seem to get the padding to line up the text with other examples. Help would be appreciated.

Also I'm hoping you're feeling better now  :)
« Last Edit: November 10, 2023, 03:02:32 PM by vicegrip »
Logged

Kaysaar

  • Admiral
  • *****
  • Posts: 552
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10294 on: November 09, 2023, 03:27:40 AM »

Context: 
I tried to make horizontal scrollbar as i saw ScrollPanelAPI in TooltipMakerAPI have support of setting X offset and scrollbar itself is working but ...
To have a lot of space on x axis i made tooltip the size of 2400 while custom panel where is placed have 500 ( i made tooltip width 2400 not 500 as when i set XOffset to value like -600 , -700 it simply stops rendering content in tooltip)


Spoiler
[close]
Is there any way of rendering invisible mask that would block rendering tooltip , or i am forced to make fullscreen wide ui to "avoid" that mistake?
As i did not wanted horizontal scrollbar just to make UI width max 1.9 times larger ( not 2 due to having that few units as buffor so it wont stop rendering content)

Nevermind issue solved by moving every element inserted in tooltip manually instead of using xoffset
« Last Edit: November 10, 2023, 10:00:57 AM by Kaysaar »
Logged

Mule_Modder

  • Ensign
  • *
  • Posts: 21
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10295 on: November 09, 2023, 05:36:25 AM »

I use the OnFleetSync() method of a HullmodFleetEffect to add certain hullmods to ships.
> The hullmods get added and work like intended.

However: The first time after gameload / new game when I go to the refit screen the are not shown as hullmods. Only when I press the R key again they appear. It's a small problem but maybe there is a method to avoid that?

I suspect that opening the refit screen is the action that fires OnFleetSync in this case. Is there a method to force another update of the Refit Screen? I tried forceSync, but it did not update.


Another question: Is it possible to hook into the ship deployment picker? I'd like to influence deployment option (pre-battle) for the player / implement a custom autodeploy mechanic.
(I gave up on that for now)

Does anybody know a way to keep ships from deploying even in Escape Missions?
« Last Edit: November 10, 2023, 07:42:30 AM by Mule_Modder »
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 630
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10296 on: November 10, 2023, 07:14:00 AM »

Is it possible to somehow attach a module to another ship while already in combat?
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 630
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10297 on: November 10, 2023, 11:08:34 PM »

Also is there a way to hide a module from the fleet view & for the small fleet view in the campaign?. As in dont have it show up in the fleet screen at all. I have a module that essentialy exists to equip something in combat, so once you enter combat it despawns and only in refit its supposed to be visible on the side.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10298 on: November 11, 2023, 06:56:44 PM »

Is there a way to selectively not show the s-mod text of a hullmod via scripting in the hullmod file?

Hmm - I'd imagine so? You need to override the addSModEffectSection() and/or addSModSection() methods in the effect class.

And how is the second line of tooltip text in structures that affect stability generated? I have a structure that adds a condition that adds stability, so the structure itself adds 0 stability, but I still want the tooltip to display the correct value. I can replicate the first line just fine, but for the second line \n isn't adding enough space between lines, and addPara is adding too much space. I also can't seem to get the padding to line up the text with other examples. Help would be appreciated.

TooltipMakerAPI.addSpacer() is the method you want, I think - it lets you add an arbitrary height (even negative!) vertical spacer.

Also I'm hoping you're feeling better now  :)

Getting there, thank you :)


Does anybody know a way to keep ships from deploying even in Escape Missions?

(Sorry, I don't.)


Is it possible to somehow attach a module to another ship while already in combat?

I... don't know? :) I'd suspect probably not but it's not something I've tried, so I don't know if the methods exposed by the API are sufficient or not.


Also is there a way to hide a module from the fleet view & for the small fleet view in the campaign?. As in dont have it show up in the fleet screen at all. I have a module that essentialy exists to equip something in combat, so once you enter combat it despawns and only in refit its supposed to be visible on the side.

Doesn't look like it. One hack to make it work might be to set that module's hull spec to a blank sprite while in the campaign, though it'd need to be that when the view is created, so e.g. if a fleet is already on screen, it wouldn't work.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 630
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10299 on: November 12, 2023, 03:02:57 AM »


Is it possible to somehow attach a module to another ship while already in combat?

I... don't know? :) I'd suspect probably not but it's not something I've tried, so I don't know if the methods exposed by the API are sufficient or not.


Also is there a way to hide a module from the fleet view & for the small fleet view in the campaign?. As in dont have it show up in the fleet screen at all. I have a module that essentialy exists to equip something in combat, so once you enter combat it despawns and only in refit its supposed to be visible on the side.

Doesn't look like it. One hack to make it work might be to set that module's hull spec to a blank sprite while in the campaign, though it'd need to be that when the view is created, so e.g. if a fleet is already on screen, it wouldn't work.

Thanks for the responses. Atleast for my first question i figured out that i can keep the modules attached to the ship and just despawn it from the engine & add it back to the engine when its supposed to appear, atleast i havent seen any major issues with this.
Logged

Sorrydough

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10300 on: November 13, 2023, 01:15:33 PM »

Hey Alex, I've tried using ShipSystemStatsScriptAdvanced.isUsable() to check whether systems are usable, but it seems like this doesn't do what I need. I want to check funny modded ship systems that have goofy activation criteria when writing my own AI, so I can factor in whether a particular ship's system is usable in the situation. (such as the old phase teleporter being only usable while the ship has 0-flux boost) When you add a getter to check whether the ship's system is disabled, can you also do one for this?
« Last Edit: November 13, 2023, 01:21:54 PM by Sorrydough »
Logged

vicegrip

  • Captain
  • ****
  • Posts: 287
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10301 on: November 13, 2023, 02:43:56 PM »

How do I obtain the base shield efficiency flux/dam value in ships.csv and the modified version shown on the fitting screen for a ship? The various get methods in getShieldDamageTakenMult() don't seem to be giving the right results.

Edit: I got it to work with ship.getShield().getFluxPerPointOfDamage() * ship.getMutableStats().getShieldDamageTakenMult().getModifiedValue().

Also how do I access the various parameters in hull_styles.json for a given styleId, for example LOW_TECH shieldInnerColor?

« Last Edit: November 14, 2023, 12:34:12 AM by vicegrip »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10302 on: November 14, 2023, 10:10:00 AM »

(such as the old phase teleporter being only usable while the ship has 0-flux boost) When you add a getter to check whether the ship's system is disabled, can you also do one for this?

That's actually the only condition that the game checks for in the canBeActivated() method, which I've just added to ShipSystemAPI.


Also how do I access the various parameters in hull_styles.json for a given styleId, for example LOW_TECH shieldInnerColor?

This looks like it's not exposed via the API at all; your only option would be to read the file yourself.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 630
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10303 on: November 14, 2023, 06:42:01 PM »

Is it intended behaviour that a hullmod that is set as "Hidden" and has an smod effect and is built in to a hull, wont be shown in the smod selector?
Anyway around this?
« Last Edit: November 14, 2023, 06:44:44 PM by Lukas04 »
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3100
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10304 on: November 15, 2023, 06:56:02 AM »

Is it intended behaviour that a hullmod that is set as "Hidden" and has an smod effect and is built in to a hull, wont be shown in the smod selector?
Anyway around this?

I did not find a way. Would be nice.
Logged
Pages: 1 ... 685 686 [687] 688 689 ... 753