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: Planet Search Overhaul (07/13/24)

Pages: 1 ... 688 689 [690] 691 692 ... 739

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

vicegrip

  • Captain
  • ****
  • Posts: 271
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10335 on: November 22, 2023, 03:10:52 PM »

I have a mid range (600) large beam weapon with a pretty fast turn rate and short burst attack. The AI seems to like to sway the turret a bit between some of the attack cycles, causing the beam to sweep across an enemy hull rather than aim for the same spot for each burst like most weapons. This might be due to the weapon "losing interest" in an enemy that's just slightly out of range and go to its default resting position rather than aim for the current target even when it's out of range like most beam weapons. Is there a way to fix this behavior with tags or hints, or perhaps some other way?

Also I was wondering if I could get a bit of help with my previous question. Is there a way to obtain a list of the ship hulls currently being shown in the submarket the player is viewing? Thanks :)

Edit: One more question, is there a way to render a missile below its launcher aside from using a deco weapon cover? Or alternately is there a way to render a deco weapon on the fitting screen on top like it would in combat?
« Last Edit: November 22, 2023, 08:38:47 PM by vicegrip »
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1497
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10336 on: November 23, 2023, 02:48:56 AM »

How do I create a nebula systems out of a java script?
Logged

shoi

  • Admiral
  • *****
  • Posts: 665
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10337 on: November 25, 2023, 08:28:43 AM »

Is there a way to make a ship fire weapons without consideration of friendly fire?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24809
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10338 on: November 25, 2023, 11:37:04 AM »

What is the radius in pixels of the LARGE / MEDIUM and SMALL weapon mounts ?

Unless I'm missing something, you can just open up any ship sprite that has these and check? You'd find them under graphics/ships/


I have a mid range (600) large beam weapon with a pretty fast turn rate and short burst attack. The AI seems to like to sway the turret a bit between some of the attack cycles, causing the beam to sweep across an enemy hull rather than aim for the same spot for each burst like most weapons. This might be due to the weapon "losing interest" in an enemy that's just slightly out of range and go to its default resting position rather than aim for the current target even when it's out of range like most beam weapons. Is there a way to fix this behavior with tags or hints, or perhaps some other way?

The AI should actually be better about this in the next release. ... or maybe that was already in 0.96a? I'm not actually 100% sure. Either way, there's not going to be much you can do on your end, though as with most AI things, it's very difficult to say anything at all conclusive just based on a verbal description.

Also I was wondering if I could get a bit of help with my previous question. Is there a way to obtain a list of the ship hulls currently being shown in the submarket the player is viewing? Thanks :)

You can use SubmarketAPI.getCargo() or something similar, no? The context of where you're trying to get at this from is going to determine how you'd go about that/whether it's doable.

Edit: One more question, is there a way to render a missile below its launcher aside from using a deco weapon cover? Or alternately is there a way to render a deco weapon on the fitting screen on top like it would in combat?

I don't think so.


How do I create a nebula systems out of a java script?

This question is a bit too broad for this thread. In brief, you can take a look at StarSystemGenerator.java - among other things, it creates nebula-type systems for the campaign. If you try, fail, and have a more specific question, that would be a better fit here.

Is there a way to make a ship fire weapons without consideration of friendly fire?

Hmm. You could try setting the collision class to something that doesn't hit friendlies, and then have a script change it after it's fired. But generally speaking, for a ship firing whatever weapons, nothing comes to mind.
Logged

vicegrip

  • Captain
  • ****
  • Posts: 271
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10339 on: November 26, 2023, 03:43:24 PM »

Also I was wondering if I could get a bit of help with my previous question. Is there a way to obtain a list of the ship hulls currently being shown in the submarket the player is viewing? Thanks :)
You can use SubmarketAPI.getCargo() or something similar, no? The context of where you're trying to get at this from is going to determine how you'd go about that/whether it's doable.
I have a custom faction that uses the same two ships for all aspects of logistics, including cargo, fuel, and troop transport. This is fine except their major industrial market is absolutely flooded with these ships, since I imagine the game is treating it as making "different" ship types for sale to pad out these roles on the market. What I'm trying to do is to write a listener that checks for when players open a ship market window, see if there are >x copies of a certain hull for sale, then delete the excess. Would SubmarketAPI.getCargo() be suitable for that?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24809
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10340 on: November 26, 2023, 09:04:13 PM »

Ah, ok! Yeah, that should work fine - you'd implement a ColonyInteractionListener, and probably do your filtering out in the reportPlayerOpenedMarketAndCargoUpdated() method.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 578
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10341 on: November 27, 2023, 11:11:19 AM »

Would there be a way to "hide" the player fleet visually, or change the focus of the campaign camera?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24809
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10342 on: November 28, 2023, 12:11:48 PM »

Would there be a way to "hide" the player fleet visually, or change the focus of the campaign camera?

Hmm - does void forceSensorFaderBrightness() or void forceSensorContactFaderBrightness() not work for the player fleet?

And I'm assuming you've tried using SectorAPI.getViewport().set(...)? That might not work since it might end up being overridden with player-fleet-related coordinates before rendering, but then again it might.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 578
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10343 on: November 29, 2023, 05:26:55 AM »

Would there be a way to "hide" the player fleet visually, or change the focus of the campaign camera?

Hmm - does void forceSensorFaderBrightness() or void forceSensorContactFaderBrightness() not work for the player fleet?

And I'm assuming you've tried using SectorAPI.getViewport().set(...)? That might not work since it might end up being overridden with player-fleet-related coordinates before rendering, but then again it might.

The viewport stuff appears to work so thats nice, forceSensorFaderBrightness() and forceSensorContactFaderBrightness() dont seem to work though, or rather, they only work if the game is paused, so some other script seems to set their values aswell.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24809
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10344 on: November 29, 2023, 10:06:03 AM »

Ah, ok, that makes sense - now that you mention it, I vaguely recall those getting force-set to full brightness for the player fleet, somewhere. Glad the viewport stuff works, though!
Logged

Nick9

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10345 on: November 29, 2023, 10:43:55 AM »

I have a question about collision radius (there are 690 pages, not gonna try search it out).

What are some tips on getting it right? Should it extend further from ship if it's, let's say, 'bulky'? Should it be exactly at further polygon bound?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3068
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10346 on: November 29, 2023, 11:00:59 AM »

Shield radius and collision bounds must be within collision radius to be hit. AIs try to avoid overlapping their collision circles.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3068
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10347 on: November 30, 2023, 03:13:44 PM »

It's intended behavior, yeah. It's not likely that this would actually change.

What's the issue with making the hullmod not-hidden? The main thing hidden *does* is "do not show this in the hullmod picker" so unless I'm missing something, this behavior sounds like the primary feature of the flag, working. *Am* I missing something?

The issue is we only want these sort of hullmods to show up in a ship's built-ins and in the s-mod list. It might be possible to do this in some roundabout way atm, but I don't think so.

Really just need an exception for the S-mod list to show hidden hullmods that have an s-mod effect and are not hiddenEverywhere. Everything else is already good - e.g. s-modded built-ins can't be de-S-modded.

Worked on this some more. Core issue remains that adding permanent non-S-mod hullmods to a ship is not supported. Specifically, the hullmod pickers (regular and S-mod) don't correctly handle non-S-mod perma mods.

I did get built-in-only hullmods specified in the .ship to be S-moddable. It must be non-Hidden (so it shows in S-mod list), with "no_drop" and "no_drop_salvage" in the tags (so it does not drop as a mod spec anywhere, hopefully), and isApplicableToShip() must return false (so it never shows in the regular hullmod list).
Logged

Sorrydough

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10348 on: December 02, 2023, 04:46:49 AM »

Does music get unloaded from memory when the track stops playing? Like if I include 500mb of music in my mod, will that eventually all bloat up the ram if every track ends up playing during a session?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24809
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10349 on: December 02, 2023, 10:35:30 AM »

Does music get unloaded from memory when the track stops playing? Like if I include 500mb of music in my mod, will that eventually all bloat up the ram if every track ends up playing during a session?

It's never loaded into memory in the first place (except for in small chunks), all music is streamed from disk.

Edit: note that this is *not* the case for sfx. It's entirely possible to bloat the memory use by having a bunch of too-long/too-high-sample-rate/etc sfx. E.G. if one has a 10 second loop for a beam weapon, that's probably a bad idea. Won't matter on its own, but multiply that by a hundred different but similar cases, and you get into trouble...
« Last Edit: December 02, 2023, 10:37:31 AM by Alex »
Logged
Pages: 1 ... 688 689 [690] 691 692 ... 739