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

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

Killer of Fate

  • Admiral
  • *****
  • Posts: 1975
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11205 on: December 21, 2024, 04:08:20 AM »

what's the simplest way to add a new system?
I was thinking I could replace the gen file, but that could break something for other modders
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1975
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11206 on: December 23, 2024, 02:06:57 AM »

what does fpp per core do in the settings.json?
Logged

shoi

  • Admiral
  • *****
  • Posts: 693
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11207 on: December 23, 2024, 04:39:03 AM »

Is there some way to tell AI to ignore friendly fire risk, but only in certain scenarios?

E.G. Ship A has friendly Ship B in line of fire, normally it will hold fire - is there some way to dictate to fire anyway if the ship in front has a hullmod on it or something?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24976
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11208 on: December 23, 2024, 11:27:52 AM »

is there a way to program a DEM missile to attempt to collide with the ship?
Like a Gazer going wild and just coming closer and closer to then explode on the shield like a Tempest Drone?

Probably make an AI that derives from DEMScript and reduce preferredMaxFireDistance gradually, or something like that.

what's the simplest way to add a new system?
I was thinking I could replace the gen file, but that could break something for other modders

Add a new file (based on any of the existing systems) and then call its generate method it in your ModPlugin.onNewGame().

what does fpp per core do in the settings.json?

Fleet points per core - lower number means more AI cores in Remnant fleets.

Is there some way to tell AI to ignore friendly fire risk, but only in certain scenarios?

E.G. Ship A has friendly Ship B in line of fire, normally it will hold fire - is there some way to dictate to fire anyway if the ship in front has a hullmod on it or something?

I don't think so. Your best bet might be for code to manually take over the firing on the other ship, or something like that.
Logged

shoi

  • Admiral
  • *****
  • Posts: 693
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11209 on: December 24, 2024, 09:44:10 AM »

Thanks! I had one last question, I have a class that extends BlockadeFGI, which works similar to the Knights of Ludd Takeover Expedition Fleets. So the fleets are created properly and travel to the target system, but in this oen case, event progress (in this case stability decrease/ or fleets being defeated) never happens until I travel to the system myself, then things proceed as expected. I noticed that fleet comp changed when I did appear, so maybe the fleet was deinflated(??)

Do I have to set the fleets to be persistent for them to actually do something if i'm out of system? If so, would hostile fleets even be taken into consideration if that was the case? Basically, do I need to code some sort of "autoresolve" in scenarios where player isn't around?
« Last Edit: December 24, 2024, 09:46:49 AM by shoi »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24976
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11210 on: December 24, 2024, 12:20:00 PM »

If the stability decrease doesn't happen, it might be because you haven't called addListener(), since in KnightsOfLuddTakeoverExpedition, it does that, and also does the work in EconomyTickListener methods. Don't forget to also removeListener!

Regarding autoresolving - yes, you have to do it somewhere; KnightsOfLuddTakeoverExpedition does this in reportEconomyTick() and it's simple because there's no combat/relative fleet strengths to figure out.

FGRaidAction has an autoresolve() method for raids/bombardments which does look at fleet strengths etc.

The way it works with BlockadeFGI (and anything else extending FleetGroupIntel), iirc, is that the fleets are all spawned once the player is near where they would be, and remain spawned for the duration of the event, so once they spawned, they shouldn't change. If they did for you then I'm not sure why that would be.
Logged

shoi

  • Admiral
  • *****
  • Posts: 693
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11211 on: December 24, 2024, 08:25:58 PM »

The way it works with BlockadeFGI (and anything else extending FleetGroupIntel), iirc, is that the fleets are all spawned once the player is near where they would be, and remain spawned for the duration of the event, so once they spawned, they shouldn't change. If they did for you then I'm not sure why that would be.

Hmm, so would I be right to assume that a fleet that is "created" is not necessarily "spawned"? Like if the player is in the abyss and the event starts and fleets are created at some random market in the core - they aren't actually spawned until player gets near them? If fleet can still travel to their destination in this state, I guess that would explain what I saw
« Last Edit: December 24, 2024, 08:28:55 PM by shoi »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24976
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11212 on: December 25, 2024, 08:46:44 AM »

A RouteData is created and keeps track of where the fleet group would be if it actually existed. If the player gets near it, it spawns in (this is handled using FleetGroupIntel and RouteManager). I think just to keep the terminology more precise, it makes sense to say that the fleets do NOT exist prior to being spawned, but the RouteData does. IIRC it will attempt to use the same RNG seed for spawning fleets, but it may be possible for some external factors to change and affect that anyway,
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1975
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11213 on: December 25, 2024, 01:32:11 PM »

what's the simplest way to add a new system?
I was thinking I could replace the gen file, but that could break something for other modders

Add a new file (based on any of the existing systems) and then call its generate method it in your ModPlugin.onNewGame().
something like this?
Spoiler
[close]

if so, I'm getting a (bug fixed)
Spoiler
Spoiler
[close]

i don't know what this means and how to fix it

I know it has something to do with generating signature in the actual gen file, which I could share...
It starts like this, and I felt like this would be the correct way to generate it...
Spoiler
[close]

Truth be told, I never used a modplugin before so I'm very confused
[close]
nvm, I accidentally overwrote the moon's orbiting planet ID with the moon's ID, and the game was confused, fixed it
« Last Edit: December 25, 2024, 11:26:37 PM by Killer of Fate »
Logged

banano of doom

  • Captain
  • ****
  • Posts: 287
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11214 on: December 26, 2024, 08:45:38 PM »

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?
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
« Last Edit: December 26, 2024, 11:35:06 PM by banano of doom »
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.

Killer of Fate

  • Admiral
  • *****
  • Posts: 1975
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11215 on: December 27, 2024, 03:43:33 AM »

is there a simple way to clear out a part of hyperspace from having randomly generated systems in it so I can repurpose it for my own handmade ones?
Logged

banano of doom

  • Captain
  • ****
  • Posts: 287
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11216 on: December 27, 2024, 03:59:51 AM »

is there a simple way to clear out a part of hyperspace from having randomly generated systems in it so I can repurpose it for my own handmade ones?
systems generated onNewGame are accounted for when generating procgen systems and storms, there will always be some empty space around them
if you absolutely need to generate system after game is started, you can reserve that spot with an empty system onNewGame, and then delete it onNewGameAfterEconomyLoad
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.

Killer of Fate

  • Admiral
  • *****
  • Posts: 1975
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11217 on: December 27, 2024, 04:05:29 AM »

is there a simple way to clear out a part of hyperspace from having randomly generated systems in it so I can repurpose it for my own handmade ones?
systems generated onNewGame are accounted for when generating procgen systems and storms, there will always be some empty space around them
if you absolutely need to generate system after game is started, you can reserve that spot with an empty system onNewGame, and then delete it onNewGameAfterEconomyLoad
Interesting...  :D

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

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
« Last Edit: December 27, 2024, 04:21:54 AM by Killer of Fate »
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1975
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11218 on: December 28, 2024, 03:19:03 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...
Logged

lannnnnnar

  • Ensign
  • *
  • Posts: 24
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #11219 on: December 28, 2024, 10:39:50 AM »

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

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
« Last Edit: December 28, 2024, 11:13:46 AM by lannnnnnar »
Logged
Pages: 1 ... 746 747 [748] 749 750