Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 350 351 [352] 353 354 ... 710

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

Ed

  • Captain
  • ****
  • Posts: 442
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5265 on: October 01, 2019, 06:05:14 PM »

Setting "hidden" to true in your hull_mods.csv should do the trick.
Thanks
Logged
Check out my ships

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5266 on: October 01, 2019, 06:05:30 PM »

Weapons need the right tags to work with autofit; that's probably it.

Ah, I guess you didn't see my response :)
Logged

Ed

  • Captain
  • ****
  • Posts: 442
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5267 on: October 02, 2019, 07:35:31 AM »

I am trying to make a custom Fighter AI, but I am having trouble, is there any mod that has custom fighters so i can check how it was done?
Logged
Check out my ships

worldwidewizard

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5268 on: October 02, 2019, 08:14:48 AM »

One time I saw my AI-controlled Odyssey go full BOOSTO FIYA into an enemy frigate and smash it to pieces. Luddic Path ships occasionally do this as well, but not regularly. Is there a way to make the ship AI do this as a tactic? Say, if I mounted a ram to the front of a ship, how could I make the AI regularly use it aside from assigning it a "reckless" officer?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5269 on: October 02, 2019, 12:04:05 PM »

I am trying to make a custom Fighter AI, but I am having trouble, is there any mod that has custom fighters so i can check how it was done?

(I don't know, personally.)

One time I saw my AI-controlled Odyssey go full BOOSTO FIYA into an enemy frigate and smash it to pieces. Luddic Path ships occasionally do this as well, but not regularly. Is there a way to make the ship AI do this as a tactic? Say, if I mounted a ram to the front of a ship, how could I make the AI regularly use it aside from assigning it a "reckless" officer?

You'd have to write a custom ship system AI that would basically detect when activating the system would result in a ramming action and use it then. Actually making the ship actively seek out ramming opportunities would be much more complicated.
Logged

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5270 on: October 02, 2019, 12:04:13 PM »

Is there a way to check if a ship or weapon has a blueprint? (Not a specific blueprint, just any tag ending in _bp.)

For context, I'm working on something that'll add "common" blueprints. Like rare blueprints, but only for things that A) have blueprints, B) don't have no drop, and C) don't have rare_bp. I'm hoping for a way to exclude things that don't have package or rare blueprints without having to relist everything, as that would make it... quite incompatible.

Also, does anyone know where the code for generating a rare_bp lies?

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5271 on: October 02, 2019, 02:03:39 PM »

Is there a way to check if a ship or weapon has a blueprint? (Not a specific blueprint, just any tag ending in _bp.)
I don't know if there's a convenient API method for it, but if worse comes to worse you could always iterate over the ship/weapon spec's tags to see if any end in "_bp"

Also, does anyone know where the code for generating a rare_bp lies?
Not sure if this answers your question, but the only occurrence of "rare_bp" in the API is when it's assigned to com.fs.starfarer.api.impl.campaign.ids.Items.TAG_RARE_BP. There are no usages of that field referenced in the API, so I suspect all of that stuff is handled by obfuscated code. Hopefully someone will correct me if that's not the case. (edit: It's not. rare_bp is referenced in some loose files, such as drop_groups.csv)

I'm pretty sure Vesperon Combine adds new ways to obtain blueprints. You might find it useful for reference.
« Last Edit: October 02, 2019, 04:18:47 PM by Sundog »
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5272 on: October 02, 2019, 02:13:03 PM »

Quote
I am trying to make a custom Fighter AI, but I am having trouble, is there any mod that has custom fighters so i can check how it was done?
Fighter AIs are basically Ship AIs (with various caveats, depending on what Vanilla features you wish to support).  The only extant full AI replacement mod is mine, so far as I'm aware.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5273 on: October 02, 2019, 02:31:44 PM »

Not sure if this answers your question, but the only occurrence of "rare_bp" in the API is when it's assigned to com.fs.starfarer.api.impl.campaign.ids.Items.TAG_RARE_BP. There are no usages of that field referenced in the API, so I suspect all of that stuff is handled by obfuscated code. Hopefully someone will correct me if that's not the case.
I know drop_groups.csv has:
Code
#item_:{tags:[single_bp], p:{tags:[rare_bp]}}
item_ship_bp:{tags:[rare_bp, !no_drop]}
item_weapon_bp:{tags:[rare_bp, !no_drop]}
item_fighter_bp:{tags:[rare_bp, !no_drop]}
item_:{tags:[package_bp, !no_drop]}
But I'm not sure how it distinguishes between ship weapon and fighter, and how that'd affect adding new ones.

Ed

  • Captain
  • ****
  • Posts: 442
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5274 on: October 02, 2019, 02:32:27 PM »

Quote
I am trying to make a custom Fighter AI, but I am having trouble, is there any mod that has custom fighters so i can check how it was done?
Fighter AIs are basically Ship AIs (with various caveats, depending on what Vanilla features you wish to support).  The only extant full AI replacement mod is mine, so far as I'm aware.
Oh juicy, thanks
Logged
Check out my ships

Sinosauropteryx

  • Captain
  • ****
  • Posts: 262
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5275 on: October 02, 2019, 04:03:55 PM »

Is there a way to have a ship start battle with fewer than the full number of charges for its ship system?
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5276 on: October 02, 2019, 04:34:50 PM »

I know drop_groups.csv has:
Code
#item_:{tags:[single_bp], p:{tags:[rare_bp]}}
item_ship_bp:{tags:[rare_bp, !no_drop]}
item_weapon_bp:{tags:[rare_bp, !no_drop]}
item_fighter_bp:{tags:[rare_bp, !no_drop]}
item_:{tags:[package_bp, !no_drop]}
Ah, good point. I should've known something like that wouldn't be obfuscated. I'll edit my post to cross out that misleading suggestion.


Is there a way to have a ship start battle with fewer than the full number of charges for its ship system?
I think you'll probably end up having to manually set the number of charges when the ship is deployed:
Code
ship.getSystem().setAmmo(3);
I'm not aware of any non-awkward way to access ships the moment they're deployed though (@Alex: hint-hint, wink-wink)

Sinosauropteryx

  • Captain
  • ****
  • Posts: 262
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5277 on: October 02, 2019, 06:56:18 PM »

Dang, thanks. Do you know any awkward ways to do it? From some amateurish poking around, it seems I can't get a valid ShipAPI from a MutableShipStatsAPI at all.

EDIT: Nevermind, I figured it out :) and it wasn't even that awkward.
« Last Edit: October 02, 2019, 07:12:29 PM by Sinosauropteryx »
Logged

connortron7

  • Captain
  • ****
  • Posts: 439
  • "God has cursed me for my hubris" - brian gilbert
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5278 on: October 02, 2019, 08:01:02 PM »

Im currently in a campaign rn with a mod im working on and im wondering if i add a ship to it will it show up naturally in the campaign after a lil bit or nah?

worldwidewizard

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5279 on: October 02, 2019, 08:34:05 PM »

You'd have to write a custom ship system AI that would basically detect when activating the system would result in a ramming action and use it then. Actually making the ship actively seek out ramming opportunities would be much more complicated.
That sounds like a challenge :D Please bear with me because I'm really new to this, but where would I find the files that deal with ship system AI or ship AI in general? Up until now I've resorted to digging through the APIs and .java files for references and it's all been incredibly overwhelming.
Logged
Pages: 1 ... 350 351 [352] 353 354 ... 710