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 ... 747 748 [749]

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

Ruddygreat

  • Admiral
  • *****
  • Posts: 565
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11220 on: December 29, 2024, 04:37:05 AM »

can't figure out how to make a true binary system in which both stars orbit around an invisible entity. I could fool around creating something invisible to the player. But I was thinking that there might be something more logical to do...

you want to use StarSystemAPI.InitNonStarCenter() to get an invisible entity that the two stars can then orbit around

Killer of Fate

  • Admiral
  • *****
  • Posts: 1968
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11221 on: December 29, 2024, 08:59:39 AM »

can't figure out how to make a true binary system in which both stars orbit around an invisible entity. I could fool around creating something invisible to the player. But I was thinking that there might be something more logical to do...

you want to use StarSystemAPI.InitNonStarCenter() to get an invisible entity that the two stars can then orbit around
Okay, I managed to put
      system.initNonStarCenter();
into the java file and the game didn't crash...
Now how do I use it?
I cant just make star = StarCenter or whatever...

Any tips?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3092
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11222 on: December 29, 2024, 05:54:19 PM »

How do you get the radius and width of ring/belt terrain?
Logged

banano of doom

  • Captain
  • ****
  • Posts: 287
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11223 on: December 29, 2024, 11:49:04 PM »

How do you get the radius and width of ring/belt terrain?
cast entity in question to (RingBandAPI), it has the relevant methods
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.

Ruddygreat

  • Admiral
  • *****
  • Posts: 565
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11224 on: December 30, 2024, 05:03:21 PM »

Now how do I use it?
I cant just make star = StarCenter or whatever...

Any tips?

put the return value of initNonStarCenter() into a variable & you can then set the stars & planets to orbit that.

ToaFeron

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11225 on: December 31, 2024, 04:54:00 PM »

Is there a list of mods which include unique IBB/MagicBounties bounty ships? Trying to compile a Bounty Hunter playthrough modlist right now.

So far I have ArmaArmatura, Tahlan Shipworks, RotcesRats, Looted Sector, Amazigh's Ship Foundry, The Apocrita Association, and LOST_SECTOR.
« Last Edit: December 31, 2024, 05:03:35 PM by ToaFeron »
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1968
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11226 on: January 01, 2025, 05:46:28 AM »

Now how do I use it?
I cant just make star = StarCenter or whatever...

Any tips?

put the return value of initNonStarCenter() into a variable & you can then set the stars & planets to orbit that.
honestly, don't know how to do that. I will have to look into other people's mods and see how they did it. And then see if I can replicate it...

edit: need to make sure
   "techMiningDecay":0.95,
Means the amount of loot gets multiplied by 0.95... So we lose 5% each time...
Right?
If I make it 0.975 then we lose only 2.5%?
« Last Edit: January 01, 2025, 06:01:33 AM by Killer of Fate »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24973
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11227 on: January 01, 2025, 11:19:49 AM »

Sorry, I was kind of in holday mode and not checking this thread. Happy new year, everyone!

how do i make an npc skill that runs everyframe script during combat? is that even possible?
i guess i could have a general everyframe script that iterates through all ships and checks if captain has the skill, but i was hoping there is a more straightforward way?

Hmm, I think that might be your best bet, actually. Either that or a hidden hullmod, if you know what types of ships this skill would be on.

also, is there a way to completely hide ui indicator for a specific ship? i mean the whole target thing, dinstance, hull, armor, weapons, etc

I don't believe so, not without making the ship non-targetable by making its hull damage taken multiplier zero. Station armor modules get a tag that hides everything except for the hull bar, though.


Anyway, another question. How do I modify or create planet_gen_data.csv without accidentally breaking the whole system? Every time try it causes all planets to generate with no conditions

Um, do it more carefully? I know you know this isn't nearly enough information for any kind of useful answer :)

Well, I'll try: compare your file with the vanilla one and see what's messed up. Probably the columns don't match up for some reason.

Also, how do I rename the corona of a star? I want to make a black hole system, but the star's punishment radius is called a corona instead of event horizon

.setTerrainName() on the terrain plugin might do it.


can't figure out how to make a true binary system in which both stars orbit around an invisible entity. I could fool around creating something invisible to the player. But I was thinking that there might be something more logical to do...

IIRC that's how it works in vanilla already so you can have a look at the StarSystemGenerator class for an example of that.


If two mods add the same portrait to the same faction, does that make the portrait double as likely to spawn in that faction? I don't think any mods do this but I was thinking about it anyways lol

I *think* so, but not 100% sure.

Second question, if I make a portrait pack and I want to apply its portraits to modded factions, can I make a world file for those faction and will it apply to the modded faction? I've been hand copy pasting the portraits into the modded factions folders one by one for years but it only just occurred to me there might be an easier way

Not sure what you mean by "world" file, but I think the only easier way would be to do it with code, possibly. I don't remember if the FactionSpecAPI class has the right methods to let you do that. ... or if that interface is in the current release, actually, or is just an in-dev thing :)

If I make it 0.975 then we lose only 2.5%?

That seems right, yeah, from what I remember about how it works.
Logged

belone

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11228 on: January 02, 2025, 02:54:02 PM »

How do I guarantee a new bar event I've set up to appear? Would greatly help me with testing.
Logged

HiddenPorpoise

  • Ensign
  • *
  • Posts: 21
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11229 on: January 02, 2025, 08:55:28 PM »

I am trying to figure out how to read all of a ship's guns' damage types in such a way that I can change them. I'm trying to make a hullmod that turns HE into fragmentation (among other things) and I can't come up with a way to do that that doesn't turn into a pile of modified shield/armor damage values.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24973
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11230 on: January 03, 2025, 12:39:58 PM »

How do I guarantee a new bar event I've set up to appear? Would greatly help me with testing.

Hmm, use AddBarEvent in rules? Or override the BaseBarEvent.isAlwaysShow() method to return true.

I am trying to figure out how to read all of a ship's guns' damage types in such a way that I can change them. I'm trying to make a hullmod that turns HE into fragmentation (among other things) and I can't come up with a way to do that that doesn't turn into a pile of modified shield/armor damage values.

Hmm, it looks like setDamageType() is not exposed in WeaponSpecAPI; just added it

That said, I think a DamageDealtModifier might be a cleaner way of doing it than cloning and modifying the weapon specs, depending on exactly what you're doing, I suppose.
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1968
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11231 on: January 03, 2025, 06:33:36 PM »

what are hab_5 planets?
They don't have any objects selected in planet_gen
Are they the planets with sets of solar shades and such?
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1968
    • View Profile

made this thing by recycling deciv subpopulation and unused icon

Spoiler
[close]

But because it uses deciv subpopulation script, it will display inproper text in the tooltip

Spoiler
[close]

I know I have to make a custom market condition... And I was wondering if I could get some pointers... Like maybe if there is a simple way to do this without packaging it as a src file... Or if there was an accessible tutorial. Or a simple method... I guess this is a very vague question... Sorry, in advance. I will need to do some research on my own...
« Last Edit: Today at 08:15:05 AM by Killer of Fate »
Logged
Pages: 1 ... 747 748 [749]