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 ... 552 553 [554] 555 556 ... 706

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

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8295 on: December 23, 2021, 10:11:09 AM »

Now that I think about it, one time this came up recently, iirc, was when someone had a problem with one of the .variant files... trying to remember what it was (or who it was, so I can look it up) but having a hard time remembering. But it was something like one of the variants having a different number of modules than the rest, though I'm not sure what the additional factor was that made this into a crash instead of being fine.

It could for example be something like: the ship is in a player-faction fleet, and has "goal" variants for autofit. In which case there's a chance that it'll try to fit with that variant as the "target" instead of the original variant of the fleet member. And if there's a mismatch in the number of modules, then that would cause a crash, without any dynamic modification of the variant - but simply because a stock variant, and a player-made goal variant (based on another stock variant) had a different number of modules, if that makes sense.

Ok, hmmm, this is just offhand (and I will continue checking variant files for mismatches either way), then this could only occur with the Mothership and Guardian encounters based upon an initial assessment since the Guardian is technically acquire-able through a mod-setting-only which defaults to false. The .ship with modules couldn't be in the player fleet otherwise unless in an "Allied Battle" - assuming no mod alteration influences at least - and therefore wouldn't be part of any autofit considerations - though technically a base setting removes autofit from being a possibility through the default presence of the "no_autofit" tag in most ship definitions. However, this is also customizable in settings so it is relatively unreliable in a report since this is the case... so sigh.

I'll try and see what additional info I can produce, if any,
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8296 on: December 23, 2021, 11:19:06 AM »

It could for example be something like: the ship is in a player-faction fleet, and has "goal" variants for autofit. In which case there's a chance that it'll try to fit with that variant as the "target" instead of the original variant of the fleet member. And if there's a mismatch in the number of modules, then that would cause a crash, without any dynamic modification of the variant - but simply because a stock variant, and a player-made goal variant (based on another stock variant) had a different number of modules, if that makes sense.

I think I get what you mean here, but just in case this would otherwise be an issue, I disabled   "goalVariant": true, -to:   "goalVariant": false, - in all of my mod's station modules. Since the mod overrides variants that reference separate ship files, I would therefore think that wouldn't be an issue, but this is a safeguard in case multiple things are coming together from a user customization standpoint to cause this error.

I haven't tested this yet to see what this impacts in the TC, but I will see if I can reproduce anything later on.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8297 on: December 23, 2021, 11:54:57 AM »

I think I get what you mean here, but just in case this would otherwise be an issue, I disabled   "goalVariant": true, -to:   "goalVariant": false, - in all of my mod's station modules. Since the mod overrides variants that reference separate ship files, I would therefore think that wouldn't be an issue, but this is a safeguard in case multiple things are coming together from a user customization standpoint to cause this error.

That wouldn't necessarily matter here - a custom variant could become a "goal" variant if the player saves their current variant as such, using the autofit dialog.
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8298 on: December 23, 2021, 04:20:29 PM »

Is there some way to get the color of a small area of pixels from a sprite (say, the area around a ship where a deco was) then shift the hue of the deco to better match the color of the ship? AFAIK, turret covers do this somewhat, but i'm not sure how i'd be able to reproduce it.
Logged

BreenBB

  • Commander
  • ***
  • Posts: 150
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8299 on: December 24, 2021, 01:06:57 AM »

Interesting its possible to edit UI? For example I want add some skill as new one, without overwriting, but then skills kinda don't fit the screen:
Logged

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8300 on: December 24, 2021, 03:14:55 AM »

Making them new aptitudes, such that they have their own line, is the only option.



How do I make hyperspace storms deal no damage? I have a hullmod that should set the damage to 0 (multiplies it by 0), but when struck, ships are losing armour still (no hull damage though).

Inhilicon

  • Lieutenant
  • **
  • Posts: 61
  • I like when the ship
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8301 on: December 24, 2021, 03:22:18 AM »

Hello, altruistic helper folks whom I wish merry christmas to. I'm having a problem with my custom ship. It seems to ignore variants and keeps placing a Hammer barrage on the sole large ballistic slot of the ship. Any guess as to why?
Logged

Inhilicon

  • Lieutenant
  • **
  • Posts: 61
  • I like when the ship
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8303 on: December 24, 2021, 04:10:12 AM »

What Faction does it belong to? Chances are they don't know the blueprint for the weapon you want there.

EDIT: Nevermind all that, it apparently had a built-in weapon that was invisible in the editor. Thanks for the help anyway, Yunru. And merry christmas!
« Last Edit: December 24, 2021, 04:17:43 AM by Inhilicon »
Logged

BreenBB

  • Commander
  • ***
  • Posts: 150
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8304 on: December 24, 2021, 04:58:01 AM »

Speaking of UI, adding new altitudes is easy apparently, but its now have only one skill in it:
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8305 on: December 24, 2021, 06:03:39 AM »

Speaking of custom skill aptitudes, I don't suppose it's possible to give a skill custom requirements (say, it requires no skill points but the player must have another skill X, and spend N story points)?
Well, could just create a separate GUI to learn such skills, with the character screen only for displaying its effects. Shame to waste the established skill GUI though...

How do I make hyperspace storms deal no damage? I have a hullmod that should set the damage to 0 (multiplies it by 0), but when struck, ships are losing armour still (no hull damage though).
Dunno if it fits your needs, but UNGP's Storm Rider rule gives the whole fleet immunity to storm damage by setting a memory key on loop:
Code: java
fleet.getMemoryWithoutUpdate().set("$stormStrikeTimeout", true, 0.1f);
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8306 on: December 24, 2021, 12:48:51 PM »

Is there some way to get the color of a small area of pixels from a sprite (say, the area around a ship where a deco was) then shift the hue of the deco to better match the color of the ship? AFAIK, turret covers do this somewhat, but i'm not sure how i'd be able to reproduce it.

Not of a subsection of a sprite, but there's SpriteAPI.getAverageColor(). And SpriteAPI.setColor().

Speaking of custom skill aptitudes, I don't suppose it's possible to give a skill custom requirements (say, it requires no skill points but the player must have another skill X, and spend N story points)?

Ah, sorry - that'd be fairly involved and also runs into the usual "not used in vanilla so would probably be broken in some way or at some point in time" issues.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8307 on: December 25, 2021, 12:56:28 AM »

Well, figured as much.

New questions:
- Once a fleet has despawned, is it possible to respawn it? Adding it to a containing location doesn't seem to make it appear.
- Can LocationAPI.createToken tokens be renamed? They still seem to be named "unknown location" after my setName call.
Logged

styrud

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8308 on: December 25, 2021, 04:12:43 AM »

I need some help. I'm trying to import parts of the neutrino mods that a mod I've made for myself is dependent on. I've fiddled around a bit but I can't find where the error is hiding. It seems to be the NeutTractorbeamEffect script or something related to it.
I posted the last part of the log where the error seems to be.

Spoiler
299256 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [data.scripts.weapons.NeutTractorbeamEffect]
java.lang.RuntimeException: Error loading [data.scripts.weapons.NeutTractorbeamEffect]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: data.scripts.weapons.NeutTractorbeamEffect
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
[close]

Any help would be appreciated. Merry Christmas and a happy new year.
Logged

Alex

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

New questions:
- Once a fleet has despawned, is it possible to respawn it? Adding it to a containing location doesn't seem to make it appear.

Checked; doesn't look like it. Some stuff is set when a fleet despawns to make it fade out etc and there's no way to reset that.

- Can LocationAPI.createToken tokens be renamed? They still seem to be named "unknown location" after my setName call.

It can't - a large number, the vast majority, really, of the methods for these kinds of tokens are just empty no-op implementations.


Caused by: java.lang.ClassNotFoundException: data.scripts.weapons.NeutTractorbeamEffect
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more[/spoiler]

Any help would be appreciated.

Hmm - that almost sounds like the class defined in that file is not named NeutTractorbeamEffect? It'd help to see the full source of the file it's complaining about.

Merry Christmas and a happy new year.

You too!
Logged
Pages: 1 ... 552 553 [554] 555 556 ... 706