Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Uniquifying the Factions, Part 2 (04/30/22)

Pages: 1 ... 424 425 [426] 427 428 ... 585

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20353
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6375 on: May 07, 2020, 04:31:11 PM »

No, it's still better. Without it you'd lose supplies at the same rate and *also* lose additional CR you'd need to repair later after getting out of the corona.
Logged

ShadowDragon8685

  • Ensign
  • *
  • Posts: 45
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6376 on: May 07, 2020, 04:39:04 PM »

Okay, yeah, having tested it further, with values of 0.1, 0.05 (same as BladeBreaker Engineering) and my own 0, supplies still just absolutely evaporate... The weird thing is, with it at 0, supplies/day doesn't actually visually change, but with a 0.1 and 0.05 my fleet jumps from 7.8/day to 100+.

Why are supplies evaporating so fast, I'm trying to work out. And I'm also trying to work out if it's possible to do anything with a mod that won't break when and if you update StarCoronaTerrainPlugin.

Well, heck. I dunno. But thank you anyway, and thank you for actively engaging with us.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20353
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6377 on: May 07, 2020, 05:07:24 PM »

My guess is because the CR loss and recovery happens in the same frame, and the fleet is never in the "CR below maximum, so supply recovery is higher than baseline" state at the point when the UI calculates the supply use rate. So setting it to 0 kind of breaks the UI.

Edit: so, right, if you set the value to 0.01 or some such, it should show you accurate supply use numbers. Note that this number *will not change* if you set it to, say, 0.5. The number is the daily use rate, and setting the mult to a higher value ultimately means it'll take more days to repair the CR damage, but the supply use rate will remain constant.
Logged

boggled

  • Admiral
  • *****
  • Posts: 690
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6378 on: May 08, 2020, 06:06:17 AM »

I'm trying to add an option in my mod settings file to hide/disable a custom ship in my mod. I tried modifying the hints and tags on the ShipHullSpecAPI, but that doesn't seem to do anything. It is possible to do this?

Have you added the HIDE_IN_CODEX hint for it in ship_data.csv? Depends on what you mean by hide/disable, though, I'm not sure exactly what that means to you.

HIDE_IN_CODEX works if I put it in the ship_data.csv, but if I use the below code to try to reveal the ship in the codex in-game, it doesn't appear in the codex. Essentially I want the player to be able to toggle whether the ship appears in the codex, is available to build, and shows up in markets. Essentially, if they don't enable the ship in the settings file, the player should never encounter it or find out it exists unless they use the console to spawn one.

Thanks for your help!

Code
        if(Global.getSettings().getBoolean("boggledRequireConstructionRig"))
        {
            Global.getSettings().getHullSpec("boggled_construction_rig").getTags().clear();
            Global.getSettings().getHullSpec("boggled_construction_rig").getTags().add("base_bp");
            Global.getSettings().getHullSpec("boggled_construction_rig").getHints().clear();
            Global.getSettings().getHullSpec("boggled_construction_rig").getHints().add(ShipHullSpecAPI.ShipTypeHints.CIVILIAN);
        }
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 2443
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6379 on: May 08, 2020, 08:14:17 AM »

Fallback option: minimod with only that ship. Code it to throw an error if the main mod isn't enabled.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20353
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6380 on: May 08, 2020, 08:42:00 AM »

Hmm, I'm not sure that's doable. IIRC currently the Codex data is only built once at some point.
Logged

boggled

  • Admiral
  • *****
  • Posts: 690
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6381 on: May 08, 2020, 10:04:17 AM »

Hmm, I'm not sure that's doable. IIRC currently the Codex data is only built once at some point.

Ok. Thanks for the information!

Hmm, I'm not sure that's doable. IIRC currently the Codex data is only built once at some point.

I suppose this would solve the problem, although I don't want to hassle the player to download a second mod just for a single utility ship. Thanks!
Logged

SirHartley

  • Admiral
  • *****
  • Posts: 539
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6382 on: May 09, 2020, 05:12:18 AM »

I'm trying to change the icon placement of a submarket in the planetary menu, but it does not change position regardless of the order entered in submarkets.csv

Is this determined by something else?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20353
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6383 on: May 09, 2020, 09:04:48 AM »

Ah - "Storage" is hardcoded to be last, sorry! The order column should, iirc, let you position it on the rightmost side of the left group, though.
Logged

lethargie

  • Commander
  • ***
  • Posts: 180
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6384 on: May 09, 2020, 10:12:20 AM »

There are 3 colors you can specify for a faction: Color, baseuicolor and darkuicolor. How are they calculated if no value is given for them?. Baseuicolor seems to default to color, but darkuicolor seems noticably well, darker. I mean it make sense, since baseuicolor is text on top of darkuicolor. But If I wanted to preview the color effect whitout loading the game, what should i do?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20353
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6385 on: May 09, 2020, 12:25:30 PM »

The dark UI color is:
Misc.setAlpha(Misc.scaleColorOnly(color, 0.4f), 175)
Logged

lethargie

  • Commander
  • ***
  • Posts: 180
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6386 on: May 09, 2020, 12:40:13 PM »

so you set the alpha to 175  on a scaled color from the base? How does scaleColorOnly work? (And what the difference with scaleColor)
Logged

SirHartley

  • Admiral
  • *****
  • Posts: 539
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6387 on: May 09, 2020, 01:10:48 PM »

Ah - "Storage" is hardcoded to be last, sorry! The order column should, iirc, let you position it on the rightmost side of the left group, though.

Yep, positioning on the left group works - good enough for me, thank you.
Another question regarding this, I'd like to change the overlay/rim colour on that button - is this possible? I didn't find anything in BaseSubmarketPlugin.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20353
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6388 on: May 09, 2020, 01:35:46 PM »

so you set the alpha to 175  on a scaled color from the base? How does scaleColorOnly work? (And what the difference with scaleColor)

scaleColorOnly doesn't touch the alpha component. In this case it wouldn't matter since setAlpha overwrites it to 175 regardless, but it'd matter if a subsequent call scaled the alpha. (You can see the implementations of those methods in Misc...)

Another question regarding this, I'd like to change the overlay/rim colour on that button - is this possible? I didn't find anything in BaseSubmarketPlugin.

IIRC that's just based on the "faction" of the submarket.
Logged

SirHartley

  • Admiral
  • *****
  • Posts: 539
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6389 on: May 09, 2020, 02:17:14 PM »

Yep that did it, thanks for the help!
Logged
Pages: 1 ... 424 425 [426] 427 428 ... 585