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 ... 722 723 [724] 725 726 ... 748

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

Lukas04

  • Admiral
  • *****
  • Posts: 622
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10845 on: June 30, 2024, 06:14:04 AM »

I've tried looking for the border sprites in the skill menu (Like the ones surrounding the skill icons below) but havent been able to find them in the game files, anyone know where they are located?
I can find the elite borders, but not those two. I asume they are also grayscale, and id rather find the originals than to cut it together from a screenshot.



I need to recreate the skill selection icons and wanna do so the exact same as the original, got some fun stuff planned with it.
« Last Edit: June 30, 2024, 06:21:54 AM by Lukas04 »
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 622
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10846 on: June 30, 2024, 12:35:05 PM »

Nevermind, i just noticed that what i thought was purposeful, is just an artifact of the ui scaling i have set lmao, so it looked different. My bad.
« Last Edit: June 30, 2024, 12:42:25 PM by Lukas04 »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24928
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10847 on: June 30, 2024, 01:23:38 PM »

Are probabilities for ship name sources proportional to the number of names in a source?
For example, "source 1":1         has 10 names
                  "source 2":1         has 5 names
Are names from source 1 two times more likely to appear? Or do all 15 names have the same chance?

IIRC they are not proportional, so the frequencies you specify there are the actual frequencies.


Nevermind, i just noticed that what i thought was purposeful, is just an artifact of the ui scaling i have set lmao, so it looked different. My bad.

Haha! No worries. But yeah in case it wasn't clear, that border is not a sprite - it's just some procedural geometry.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 622
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10848 on: June 30, 2024, 01:32:55 PM »

Are probabilities for ship name sources proportional to the number of names in a source?
For example, "source 1":1         has 10 names
                  "source 2":1         has 5 names
Are names from source 1 two times more likely to appear? Or do all 15 names have the same chance?

IIRC they are not proportional, so the frequencies you specify there are the actual frequencies.


Nevermind, i just noticed that what i thought was purposeful, is just an artifact of the ui scaling i have set lmao, so it looked different. My bad.

Haha! No worries. But yeah in case it wasn't clear, that border is not a sprite - it's just some procedural geometry.

Mhh, is any chance you could share the underlying OpenGL code for that geometry? Im trying it with a sprite now, and yeah the scaling understandably messes 1px borders up even more in a sprite.
The lines you render have some color gradient on it, which i dont really know how to replicate.
I uh, also understand if you dont wanna look through your UI code for that lmao. So thanks for the reply anyways.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24928
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10849 on: June 30, 2024, 02:04:29 PM »

Had a look and ugh it's a bit of a pain to actually extract - a bunch of assorted method calls, commented out code from trying things that didn't look good, etc. Main thing, though: the gradient is achieved by just making a 1-pixel-thickness quad strip and having the alpha be set to zero on the ends and linearly going to 1 in the middle. Sometimes this is a GL_LINE_STRIP instead (I don't remember why), but the gradienting is the same.
Logged

Audax

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10850 on: July 01, 2024, 01:27:01 AM »

Anyway to reorder main menu missions list?? or move my main menu mod missions to the top of the list??

EDIT: best I could do was move my mission to starsector_core missions folder then add the mission to the top of missions_list.csv.
« Last Edit: July 01, 2024, 01:30:29 AM by Audax »
Logged

creature

  • Captain
  • ****
  • Posts: 415
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10851 on: July 01, 2024, 05:31:42 AM »

Hi, I'm trying to add a skill that gives the captain's ship a hullmod, but I'm having trouble actually getting the hullmod to appear and disappear from the ship as the captain is moved from ship to ship. I'm testing this via a clean campaign with just the bare essential mods and a starter fleet with the captain with the custom skill a part of my starting fleet.

I implemented a simple 1-level skill with implements AfterShipCreationSkillEffect. There were only two real statements in the whole file. The first being applying the hullmod when (I assume) the skill is active, in apply():

Code
        @Override
        public void apply(final MutableShipStatsAPI stats, final HullSize hullSize, final String id, final float level) {
        log.info("CALL APPLY BEFORE");
              stats.getVariant().addPermaMod("yrxp_TestSkill");
        }

And the second would be to remove it. Originally, I had it in unapply(), but then I was already having a problem - the hullmod was never being removed. So I tried placing it in unapplyEffectsAfterShipCreation():

Code

@Override
public void unapplyEffectsAfterShipCreation(ShipAPI ship, String id) {
    log.info("CALL UNAPPLY AFTER");
            ship.getVariant().removePermaMod("yrxp_TestSkill");

}

The problem with this now, is that the hullmod is always removed... And worse still, when I reassign the captain to a different ship, that's actually when the hullmod appears - left on the ship where the captain was just removed from. Very strange! So I figured there must something going on with the order in which these functions are being called, and sure enough, the logs showed that weirdness:

Code
294895 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294895 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294900 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294900 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294903 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294903 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294904 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294904 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294906 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294907 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294907 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE

Whenever I get the code to refresh - that is, switching the view from a different ship and back to the ship with the captain in question - the above logs appear. It was simply a result of adding a single log line to apply(), unapply(), applyEffectsAfterShipCreation() and unapplyEffectsAfterShipCreation(). Firstly, and what I expected, apply() was being called (though it was being called a heck of a lot which was a bit strange). This means that the call for adding the hullmod was certainly being called. however, what I find then is that, for some reason, the unapply() and unapplyEffectsAfterShipCreation() functions also get called? Did I misundestand that the unapply calls would only when the captain is removed? In any case, they, too are being called in rapid succession, and with seemingly no pattern to it. And that's probably what's causing the weird behavior.

tl;dr: How can I make it so a hullmod is applied to a captain's ship, and is then removed when they are dismissed or sent to a different ship?
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 80
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10852 on: July 01, 2024, 03:33:31 PM »

Hi, I'm trying to add a skill that gives the captain's ship a hullmod, but I'm having trouble actually getting the hullmod to appear and disappear from the ship as the captain is moved from ship to ship. I'm testing this via a clean campaign with just the bare essential mods and a starter fleet with the captain with the custom skill a part of my starting fleet.

I implemented a simple 1-level skill with implements AfterShipCreationSkillEffect. There were only two real statements in the whole file. The first being applying the hullmod when (I assume) the skill is active, in apply():

Spoiler
Code
        @Override
        public void apply(final MutableShipStatsAPI stats, final HullSize hullSize, final String id, final float level) {
        log.info("CALL APPLY BEFORE");
              stats.getVariant().addPermaMod("yrxp_TestSkill");
        }

And the second would be to remove it. Originally, I had it in unapply(), but then I was already having a problem - the hullmod was never being removed. So I tried placing it in unapplyEffectsAfterShipCreation():

Code

@Override
public void unapplyEffectsAfterShipCreation(ShipAPI ship, String id) {
    log.info("CALL UNAPPLY AFTER");
            ship.getVariant().removePermaMod("yrxp_TestSkill");

}

The problem with this now, is that the hullmod is always removed... And worse still, when I reassign the captain to a different ship, that's actually when the hullmod appears - left on the ship where the captain was just removed from. Very strange! So I figured there must something going on with the order in which these functions are being called, and sure enough, the logs showed that weirdness:

Code
294895 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294895 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294900 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294900 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294903 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294903 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294904 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294904 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294906 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294907 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294907 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
[close]

Whenever I get the code to refresh - that is, switching the view from a different ship and back to the ship with the captain in question - the above logs appear. It was simply a result of adding a single log line to apply(), unapply(), applyEffectsAfterShipCreation() and unapplyEffectsAfterShipCreation(). Firstly, and what I expected, apply() was being called (though it was being called a heck of a lot which was a bit strange). This means that the call for adding the hullmod was certainly being called. however, what I find then is that, for some reason, the unapply() and unapplyEffectsAfterShipCreation() functions also get called? Did I misundestand that the unapply calls would only when the captain is removed? In any case, they, too are being called in rapid succession, and with seemingly no pattern to it. And that's probably what's causing the weird behavior.

tl;dr: How can I make it so a hullmod is applied to a captain's ship, and is then removed when they are dismissed or sent to a different ship?

I've got a skill doing this exact thing and seemingly working, though I'm honestly not sure if it's really working in every case but I don't know of any issues.

The only difference however is that my skill implements ShipSkillEffect, with the relevant section of the .skill file being:
Code
"effects":[
    {"type":"SHIP", "script":"com.price_of_command.conditions.scars.personality_change.Cautious"},
]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24928
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10853 on: July 02, 2024, 11:02:38 AM »

Anyway to reorder main menu missions list?? or move my main menu mod missions to the top of the list??

EDIT: best I could do was move my mission to starsector_core missions folder then add the mission to the top of missions_list.csv.

Yeah, that sounds about right, not much else you can do there. (I really ought to overhaul that screen at some point, it's the pretty much the oldest bit of UI in-game right now.)
Logged

NikoTheGuyDude

  • Captain
  • ****
  • Posts: 426
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10854 on: July 03, 2024, 01:07:01 PM »

What does MEMORY_KEY_FLEET_DO_NOT_GET_SIDETRACKED  do?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24928
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10855 on: July 03, 2024, 04:36:40 PM »

What does MEMORY_KEY_FLEET_DO_NOT_GET_SIDETRACKED  do?

Makes it not go off chasing nearby hostile fleets, mostly. To ensure that if it's given a destination to go to, it actually gets there in a reasonable time without getting... sidetracked :)
Logged

NikoTheGuyDude

  • Captain
  • ****
  • Posts: 426
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10856 on: July 03, 2024, 07:52:09 PM »

Is there anyway to modify the combat nebula texture externally, not using a battlecreationplugin or a campaignterraiinplugin? Is there some var for this?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24928
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10857 on: July 03, 2024, 09:29:25 PM »

Nothing that's exposed in the API, sorry!
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1781
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10858 on: July 08, 2024, 01:46:17 AM »

does the "PlayerTradeVolumeForRepChangeMax" include the "PlayerTradeVolumeForRepChangeMin"? Or does it start counting after passing it?
For example if RepChangeMax is 1000k, RepChangeIncr is 25k, does this mean you can lose 40 rep at most?

Also, what does "PirateBaseMinMonthsForNextTier" do? What's the difference between it and the"daysUntilFullTimeFactor"?
« Last Edit: July 08, 2024, 01:55:54 AM by Killer of Fate »
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1781
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10859 on: July 08, 2024, 11:30:58 AM »

I don't want to post this under bugs, but i found out... Or at least I figured I found out something, maybe not, that the toxic_cold conditions might be unnecessarily lessened? Or is it just me misunderstanding how the generator works?

Spoiler
[close]

Considering toxic_cold is a cat_toxic planet, doesn't that mean that the chance of something getting generated is multiplied by the previous chance of generation? Or does this overwrite said chance?
Logged
Pages: 1 ... 722 723 [724] 725 726 ... 748