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: Simulator Enhancements (03/13/24)

Pages: 1 ... 513 514 [515] 516 517 ... 706

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

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7710 on: July 15, 2021, 05:55:05 PM »

The one's here are still very much in development, being moved to the mods section at the owner's request (usually only when they deem it stable enough).

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7711 on: July 15, 2021, 05:57:57 PM »

("Mods" was always locked. Generally speaking stuff will only be moved there when it's - at moderator discretion - warranted/is in good shape/is significant enough. But we've never actually hashed out any metrics for that.)
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7712 on: July 15, 2021, 06:29:38 PM »

Is there a way to detach modules from a ship, like how they do when data is reloaded in devmode?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7713 on: July 15, 2021, 06:37:05 PM »

Offhand - something like module.setStationSlot(null) should do it, I think?
Logged

2_Wycked

  • Commander
  • ***
  • Posts: 132
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7714 on: July 15, 2021, 07:00:24 PM »

Interesting, thanks yall. Thanks to all the modders, it's great seeing this community still going strong after so many years.
Logged

bananana

  • Commander
  • ***
  • Posts: 226
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7715 on: July 15, 2021, 07:07:49 PM »

what's the best way to force a (non-fighter) ship to exist in a different render layer - i.e. always render on top of other ships
or below, for that matter ?
how to ensure consistency? because just setting collision to FIGHTER does no always produce the same results, at least visually
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.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7716 on: July 15, 2021, 07:41:20 PM »

Hmm - I don't think you can, actually. At least, no way (besides setting it to "fighter") comes to mind.
Logged

SonnaBanana

  • Admiral
  • *****
  • Posts: 867
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7717 on: July 15, 2021, 09:41:09 PM »

Alex, now that the new sanity checks on respeccing previously permanent skills are going to be in place, is there something similar modders can do for skills which grant increased OP on ships?

Like anything which checks if a ships has more assigned OP than it's total and makes players remove vents/caps/weaps/hullmods/wings?
Or just straight up assign maluses if that happens?
Logged
I'm not going to check but you should feel bad :( - Alex

briansd9

  • Ensign
  • *
  • Posts: 47
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7718 on: July 16, 2021, 07:59:47 AM »

I am making a new faction and would like to change the way its ships and officers are named.

Specifically, I would like names to be randomly generated from a set of syllables (instead of selected from a fixed list, as is done currently). Can this be done?

I have found com.fs.starfarer.api.impl.campaign.procgen.MarkovNames which seems somewhat related to this, but it is unused.
« Last Edit: July 16, 2021, 08:03:14 AM by briansd9 »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7719 on: July 16, 2021, 08:19:56 AM »

Alex, now that the new sanity checks on respeccing previously permanent skills are going to be in place, is there something similar modders can do for skills which grant increased OP on ships?

Like anything which checks if a ships has more assigned OP than it's total and makes players remove vents/caps/weaps/hullmods/wings?

It's possible to add custom "skill change effects". But for this, you probably wouldn't actually need to - I've added one to vanilla, even though it doesn't need it. If a skill adds OP and is removed, ships that are over OP will have vents, capacitors, and hullmods (though not weapons/fighters - that gets tricky since they need to go somewhere, and it can't always be cargo or storage) removed.

I am making a new faction and would like to change the way its ships and officers are named.

Specifically, I would like names to be randomly generated from a set of syllables (instead of selected from a fixed list, as is done currently). Can this be done?

I have found com.fs.starfarer.api.impl.campaign.procgen.MarkovNames which seems somewhat related to this, but it is unused.

A few ways. The simplest would be to pre-generate your set of names with some code and paste that into the faction file. If you don't have too many syllables per name/too many syllables, that might be manageable.

A (probably better?) alternative would be to provide your own FleetInflater implementation (via CampaignPlugin.pickFleetInflater()) that does this in code. You'd likely want to extend DefaultFleetInflater and let it do most of the actual work, and only do the naming-related bits in yours.

I probably wouldn't use MarkovNames for this - it sounds like a different approach you'd want custom code for.
Logged

SonnaBanana

  • Admiral
  • *****
  • Posts: 867
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7720 on: July 16, 2021, 08:39:02 AM »

Alex, now that the new sanity checks on respeccing previously permanent skills are going to be in place, is there something similar modders can do for skills which grant increased OP on ships?

Like anything which checks if a ships has more assigned OP than it's total and makes players remove vents/caps/weaps/hullmods/wings?

It's possible to add custom "skill change effects". But for this, you probably wouldn't actually need to - I've added one to vanilla, even though it doesn't need it. If a skill adds OP and is removed, ships that are over OP will have vents, capacitors, and hullmods (though not weapons/fighters - that gets tricky since they need to go somewhere, and it can't always be cargo or storage) removed.
And for the harebrained edge case of all of a ship's OP being taken up entirely by weapons and wings while not a single point is given to vents, caps and hullmods?
Logged
I'm not going to check but you should feel bad :( - Alex

creature

  • Captain
  • ****
  • Posts: 400
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7721 on: July 17, 2021, 06:23:41 AM »

Is it possible to move a weapon's x and y position dynamically via code? I tried getSpite().setCenter() but this seems to only move the art and not the projectile spawns.
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7722 on: July 17, 2021, 09:21:28 AM »

Would like to know this too. Seems to only be acheivable with modules and a lot of hax
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7723 on: July 17, 2021, 09:27:33 AM »

Hmm - to alter the projectile spawns, you could do:
weapon.ensureClonedSpec()
And then manipulate:
weapon.getSpec().getHardpointFireOffsets()
weapon.getSpec().getTurretFireOffsets()
Etc.
Logged

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7724 on: July 17, 2021, 02:22:44 PM »

just throwing this idea out there in case it helps:  in the future for missions (specifically bar events) it would be neat if the game checks for fleet strength (via deployment level/how many big ships you have) and either wont let you accept the mission, or perhaps not even show up at all

just food for thought going forward, and only in case it has yet to enter anyones mind.  cheers!
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward
Pages: 1 ... 513 514 [515] 516 517 ... 706