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: New music for Galatia Academy (06/12/24)

Pages: 1 ... 400 401 [402] 403 404 ... 722

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1793519 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 #6015 on: January 27, 2020, 09:32:17 PM »

Sounds like you've got it sorted, but in case you find yourself unable to do it for some files: Notepad++ also has a directory wide (and recursive subdirectory) search/replace feature.

Thanks for the added information.  :)

If I run into that I'll keep this tool in my back pocket.
Logged

creature

  • Captain
  • ****
  • Posts: 404
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6016 on: January 29, 2020, 05:15:22 AM »

How can I run a continuous script throughout the campaign? I tried making an everyframe script that polls the current month every set inverval, but I don't know how to get it to run during the campaign layer...
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24412
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6017 on: January 29, 2020, 08:22:22 AM »

Hmm - Global.getSector().addScript() sounds like what you're looking for.
Logged

creature

  • Captain
  • ****
  • Posts: 404
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6018 on: January 29, 2020, 03:13:05 PM »

Hmm - Global.getSector().addScript() sounds like what you're looking for.
It certainly was, thank you very much!
« Last Edit: January 29, 2020, 06:55:36 PM by creature »
Logged

TimeDiver

  • Captain
  • ****
  • Posts: 364
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6019 on: January 31, 2020, 01:15:51 PM »

Is there a tag for weapon_data.csv that forces the AI to factor in stray debris when a (very) long-range sniper weapon is set to autofire?

I've already added the 'STRIKE' and 'USE_VS_FRIGATES' tags to ensure it doesn't waste its time targeting fighters, but is there one for the above?

Yes, I'm aware that such a weapon is far better being left in the player's control, but I'm experimenting with a sniper support frigate.
« Last Edit: January 31, 2020, 01:19:49 PM by TimeDiver »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24412
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6020 on: January 31, 2020, 01:26:32 PM »

The AI considers it by default - well, it checks for disabled ships/pieces of them, anyway, but not (iirc) asteroids.
Logged

Bellou

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6021 on: February 01, 2020, 09:19:13 AM »

How can i edit the Shipdesign.java skill to give +20% ordnance point bonus? i tried changing the "public static final float OP_BONUS = 20f;" but its not working.

Thanks
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24412
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6022 on: February 01, 2020, 06:19:59 PM »

Hi - you can't edit the file directly; the source is just provided for reference. Since the value here is "final", you can't change it from other code as well, so the only way to change it would be to implement a copy of this with your new values, and then point the skill to your new copy from skill_data.csv. Hope that makes sense!
Logged

Bellou

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6023 on: February 01, 2020, 11:29:13 PM »

Hi - you can't edit the file directly; the source is just provided for reference. Since the value here is "final", you can't change it from other code as well, so the only way to change it would be to implement a copy of this with your new values, and then point the skill to your new copy from skill_data.csv. Hope that makes sense!

I see thanks.
Logged

creature

  • Captain
  • ****
  • Posts: 404
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6024 on: February 02, 2020, 10:13:30 PM »

How can I trigger nearby patrols to inspect the player fleet? Also is there a reference I could look up to define something as illegal when the ship's player is inspected?
Logged

ThunderElemental

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6025 on: February 03, 2020, 04:16:43 AM »

I'm trying to create a hullmod that either buffs the ship's torpedo-type missiles only, or forbids equipping missiles other than torpedoes, but I find myself stumped. Any advice on how (or if) this can be achieved?
Logged

creature

  • Captain
  • ****
  • Posts: 404
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6026 on: February 03, 2020, 05:10:24 AM »

I'm trying to create a hullmod that either buffs the ship's torpedo-type missiles only, or forbids equipping missiles other than torpedoes, but I find myself stumped. Any advice on how (or if) this can be achieved?
There isn't, as far as I know, a "torpedo" classification. They're all missiles. I believe vanilla ones have the STRIKE tag, but other weapons have that too. But depending on what you want to buff or the effect you want to achieve, you can probably check by taking a list of all missiles in the map and seeing if they have "Torpedo" in their name, I guess.
Logged

Sinosauropteryx

  • Captain
  • ****
  • Posts: 262
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6027 on: February 03, 2020, 07:42:55 AM »

Is there a way to determine whether the battle is a regular battle or a fleet pursuit? Or more generally, where a given ship's retreat plane is? For example, if I want the AI to only activate a system when pointed in the direction of retreat.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24412
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6028 on: February 03, 2020, 09:47:23 AM »

I'm trying to create a hullmod that either buffs the ship's torpedo-type missiles only, or forbids equipping missiles other than torpedoes, but I find myself stumped. Any advice on how (or if) this can be achieved?
There isn't, as far as I know, a "torpedo" classification. They're all missiles. I believe vanilla ones have the STRIKE tag, but other weapons have that too. But depending on what you want to buff or the effect you want to achieve, you can probably check by taking a list of all missiles in the map and seeing if they have "Torpedo" in their name, I guess.

Right, yeah - unfortunately, the methods involved are not exposed, and if they were, there's no mechanism to buff certain weapons that selectively. In the next release, there'll be a "WeaponOPCostModifier" you can add to a ship's stats (generally via a built-in hullmod) that would be able to make fine-grained distinctions like this, though you'd *still* have to figure out in some way whether a weapon is a torpedo or not.


How can I trigger nearby patrols to inspect the player fleet? Also is there a reference I could look up to define something as illegal when the ship's player is inspected?

Just roughly, you'd give the patrol fleet an intercept assignment with whatever text override was appropriate. And... you'd have to do *something* to make it actually do a customs inspection - there are rules regarding this in rules.csv; I forget exactly what the trigger is, you can look at the tOffPatrolBeginNoTalk rule and the ones around there. As far as what's illegal, that would be defined in the faction's file. You could also re-rig the entire interacton via rules if you need something truly custom, if it's worth the effort.


Is there a way to determine whether the battle is a regular battle or a fleet pursuit? Or more generally, where a given ship's retreat plane is? For example, if I want the AI to only activate a system when pointed in the direction of retreat.

CombatFleetManagerAPI.getGoal() - then, based on that and the side (player or enemy) you're looking at, it's either up or down.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6029 on: February 03, 2020, 01:50:42 PM »

Okay, I'm at the end of my rope on this one.

I have a SHIP_WITH_MODULES that spawns as a neutral hull when deployed with one of the modules destroyed from a previous battle and not repaired yet. The trick is that it doesn't do that when using any other type of module, and the issue appears on other ships if their modules are replaced by the problematic ones.

So it definitely is an issue stemming for the modules, yet they both are identical line-by-line in any way but name (same fields, same hullmods, similar stats).

It just spawns like this
[close]

Any pointer to things that could trigger such behavior would be an immense help.
Logged
 
Pages: 1 ... 400 401 [402] 403 404 ... 722