Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Hyperspace Topography (10/12/22)

Pages: 1 ... 610 611 [612] 613 614 ... 625

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

SirHartley

  • Admiral
  • *****
  • Posts: 631
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9165 on: September 22, 2022, 09:53:15 AM »

is there a tag or a memKey that makes a CampaignFleet display built-in (or otherwise) weapon visuals?
I got a big gun that is clearly visible on a station and it gotta show up in the campaign layer station fleet visual but doesn't, making the thing look weird.
« Last Edit: September 22, 2022, 10:18:36 AM by SirHartley »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9166 on: September 22, 2022, 10:09:13 AM »

I don't think there is, sorry! You might get around this, perhaps, by calling station.setFleetForVisual(null) and adding your own non-interactive entity that matches the location of the station and has the sprite you want to show (i.e. station with gun). I *think* that ought to work but it could get a bit messy keeping these in sync.
Logged

SirHartley

  • Admiral
  • *****
  • Posts: 631
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9167 on: September 22, 2022, 11:15:24 AM »

I fixed it with absolutely genius legit moves

added module slot to the station and added the gun as module without bounds, that causes it to display it in the campaign
and then I added a hullmod to the module that sets the ship alpha to 0 on creation
since hullmods only apply themselves in dialogue previews and not on the campaign layer, the gun module is visible where I need it and removes itself for the preview where the weapon sprite is visible, and then I just replace it with a 1px blank sprite and have it kill itself in advanceInCombat so it doesn't mess with combat.
« Last Edit: September 22, 2022, 11:17:49 AM by SirHartley »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9168 on: September 22, 2022, 11:47:33 AM »

I fixed it with absolutely genius legit moves

QFT
Logged

Liral

  • Captain
  • ****
  • Posts: 411
  • Realistic Combat Mod Author
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9169 on: September 22, 2022, 07:54:11 PM »

What character encoding standards does Starsector support?  I know it supports the basic ASCII set, but what about fancier stuff like UTF-8?

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 166
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9170 on: September 23, 2022, 08:22:05 PM »

What kind of scenarios could generate this type of error?

For context, this occurs when a modular ship of mine has their core get destroyed (80% chance of break, 3 min pieces, 7 max). I have a hullmod on some of its modules that cause modules with a matching ID in their tags to explode, however the core doesnt have this hullmod, and it only seems to happen when the core dies.

EDIT: forgot... to fuckin,,,, assign bounds to a module. .
« Last Edit: September 24, 2022, 11:19:35 AM by NikoTheGuyDude »
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 166
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9171 on: September 23, 2022, 08:40:11 PM »

On that note, how about this one, too? it seems equally esoteric. Happened a few seconds after I went into the variant refit screen for my left heavy combat module on my satellite.
Logged

JAL28

  • Commander
  • ***
  • Posts: 196
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9172 on: September 24, 2022, 09:15:03 PM »

Is there a way for a shipsystem to automatically regenerate ammo for ballistic/ammo weapons constantly while it is activated? I know that there is missile auto forge for missiles but there doesn’t seem to be code connected to it so I’m not sure what to do here.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 2624
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9174 on: September 25, 2022, 03:55:22 AM »

Global.getSettings().isDevMode()



I am having trouble with playing custom music when I create a custom dialog directly in the campaign. I copied the way Sword of Eventide does it. I thought it was because the system I was in has custom music, but now I am not sure. Is there some surefire way to play music for a dialog?
Logged

TheProtagonists

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9175 on: September 25, 2022, 05:26:54 AM »

Is the amount of resources required/consumed when surveying and colonizing adjustable? If so where can I find them in the API?
Logged

quintudiast

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9176 on: September 25, 2022, 06:00:29 AM »

Does anybody know why the ship is duplicating when fighter/wings are deployed?

like this:


https://imgur.com/a/uwvR8mD

CONTEXT:
i'm trying to make new ship mod
« Last Edit: September 25, 2022, 07:41:51 AM by quintudiast »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9177 on: September 25, 2022, 09:57:58 AM »

What character encoding standards does Starsector support?  I know it supports the basic ASCII set, but what about fancier stuff like UTF-8?

Take a look at the .fnt files! It's "ASCII plus a bit", basically.

On that note, how about this one, too? it seems equally esoteric. Happened a few seconds after I went into the variant refit screen for my left heavy combat module on my satellite.

If the ship is null, the bounds are null, or the ship sprite is null. Sounds like the same "didn't specify bounds" issue.

(Side note: attaching stack trace screenshots is not the most convenient thing. I know sometimes there's characters in there that the forum can't handle, but it seems ok most of the time.)


How do you check if DevMode is on or not?

Quickest way would be to try some devMode command to see if it works. Like Ctrl-Z in the campaign to turn off sensors and reveal everything, or something along those lines.


I am having trouble with playing custom music when I create a custom dialog directly in the campaign. I copied the way Sword of Eventide does it. I thought it was because the system I was in has custom music, but now I am not sure. Is there some surefire way to play music for a dialog?

I'd suggest trying this in a system that doesn't have custom music to figure out if that's the issue or not. The way SOE does it should work, generally, though - unless some other script is also constantly running and calling the same methods, fighting it for control of the music player.


Is the amount of resources required/consumed when surveying and colonizing adjustable? If so where can I find them in the API?

A bunch of static values in SurveyPluginImpl.

Does anybody know why the ship is duplicating when fighter/wings are deployed?

Need a bit more info :)

Could be something like a ship system that launches drones but is set to the ship's variant, or something like that, but it's hard to say just from this.
Logged

Great Wound

  • Commander
  • ***
  • Posts: 214
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9178 on: September 25, 2022, 12:16:34 PM »

Re-post for Alex since nobody seems to have an answer in modding:

Quote
How do i go about adding a character to a station? typically, when you visit a station and pull up a comm listing of various contacts, you see all the individuals you can interact with. How would i add a custom individual to this list and instigate a conversation with them?

Thanks.

SafariJohn

  • Admiral
  • *****
  • Posts: 2624
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9179 on: September 25, 2022, 12:52:06 PM »

I am having trouble with playing custom music when I create a custom dialog directly in the campaign. I copied the way Sword of Eventide does it. I thought it was because the system I was in has custom music, but now I am not sure. Is there some surefire way to play music for a dialog?

I'd suggest trying this in a system that doesn't have custom music to figure out if that's the issue or not. The way SOE does it should work, generally, though - unless some other script is also constantly running and calling the same methods, fighting it for control of the music player.

"Great" news, if I put a debugger breakpoint right after I set the custom music, it plays the music until I let the code move on and play the ability sound, after which it goes silent again. When the dialog closes the custom music resumes instead of the campaign music. Pretty sketchy that debugging changes the sound player's behavior.

I'll see if I can trigger my custom music after the ability sound plays - that seems to be what is cutting it off.


EDIT:

Moved starting code to the ability's activateImpl() method after the dialog is opened, which got the music to start. I got it to quit properly too by changing the end code to:

Code: java
Global.getSoundPlayer().pauseCustomMusic();
Global.getSoundPlayer().setSuspendDefaultMusicPlayback(false);

instead of

Code: java
Global.getSoundPlayer().setSuspendDefaultMusicPlayback(false);
Global.getSoundPlayer().restartCurrentMusic();

because it was playing the default encounter music for a second or else it kept playing the custom music or else...

Only complaint left is that it restarts the campaign music instead of resuming it, but that is minor.
« Last Edit: September 25, 2022, 01:06:55 PM by SafariJohn »
Logged
Pages: 1 ... 610 611 [612] 613 614 ... 625