Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 523 524 [525] 526 527 ... 640

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

Neb

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7860 on: August 11, 2021, 10:03:19 AM »

Hello again!

I try to create a custom mine strike system but i don't know what im doing.
My approach was to just copy all the files related to vanilla mine strike and then modifying them.
It kind of worked but my mines still look the same even tho I changed the particle color in the wpn file and the weapon graphics.
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 #7861 on: August 11, 2021, 11:00:13 AM »

Oh, hmm, so the code you're seeing doesn't have a bunch of "else" clauses there, like so?

Code
if (weapon != null) {
    int min = 1, max = 2;
    ...
    if (num > 0) {
        looted.addWeapons(weapon.getWeaponId(), num);
        weaponValue -= val * num;
        totalValue += val * num;
    } else {
        break;
    }
} else {
    break;
}

If it doesn't, looks like this was fixed in dev, then.

No it doesn't have that and I confirmed that was the issue. Glad its fixed in dev!

Just in case, be aware that this is also the case for fighter wings and hullmods though if you fixed one place then the others are probably also fixed. Figured I'd let you know just to be sure. But the issue is fixed on my end just by making sure there are tier 0 things in those categories in the known section of the faction file if not the priority section.

As a side effect, this will also likely make markets of those factions seem more full than before so win-win.  ;D
Logged

JAL28

  • Commander
  • ***
  • Posts: 197
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7862 on: August 11, 2021, 04:28:27 PM »

Is there a way to configure supplies/month and DP costs of ships through raws? For example setting 40 DP to 35 DP etc

What do you mean "raws"?

I mean through code, since sifting through the hull code only seems to show bounds, attached hull mods, position of defined mounts but no options to change sup/month or DP
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 #7863 on: August 11, 2021, 05:48:21 PM »

I mean through code, since sifting through the hull code only seems to show bounds, attached hull mods, position of defined mounts but no options to change sup/month or DP

That's done through ship_data.csv under supplies/rec and supplies/month columns.
Logged

Pokpaul

  • Lieutenant
  • **
  • Posts: 57
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7864 on: August 12, 2021, 04:47:45 PM »

I was wondering if it was possible to modify the relationship hit depending on who initiated combat, i.e. if the other fleet pursues you and forces you to fight the relationship penalty would be less than if you did the same.
Logged

6chad.noirlee9

  • Captain
  • ****
  • Posts: 359
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7865 on: August 13, 2021, 06:55:27 AM »

if i wanted to update from 0.8a (for my own personal use from a mod that doesnt state it is supposed to be dead forever, im assuming tis ok for me to mess with it just so i can use an old mod i loved) what would that entail?
i really just want the fighters from that mod
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

passwalker

  • Commander
  • ***
  • Posts: 195
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7866 on: August 13, 2021, 06:04:46 PM »

question
how do i declare/reference vanilla music files as non-music sounds in sounds.json?
specifically so i can use it for beam loop sound
i tried copying vanilla declaration
but it works only if within the music category
and then the sound can't be used by a weapon, it crashes with null
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21292
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7867 on: August 13, 2021, 06:17:28 PM »

I mean through code, since sifting through the hull code only seems to show bounds, attached hull mods, position of defined mounts but no options to change sup/month or DP

Ah - yeah, looks like the ShipHullSpecAPI interface doesn't have all the methods that it perhaps should...

I was wondering if it was possible to modify the relationship hit depending on who initiated combat, i.e. if the other fleet pursues you and forces you to fight the relationship penalty would be less than if you did the same.

You'd have to provide your own implementation of FleetInteractionDialogPluginImpl, I believe. Not something you generally want to mess with, since that's a tough are for mods not to step on each others' toes in.

if i wanted to update from 0.8a (for my own personal use from a mod that doesnt state it is supposed to be dead forever, im assuming tis ok for me to mess with it just so i can use an old mod i loved) what would that entail?
i really just want the fighters from that mod

For the fighters, you could try just removing everything else from that mod. Depending on the amount of custom scripting involved with the fighters, that might just work.

question
how do i declare/reference vanilla music files as non-music sounds in sounds.json?
specifically so i can use it for beam loop sound
i tried copying vanilla declaration
but it works only if within the music category
and then the sound can't be used by a weapon, it crashes with null

Music is streamed from disk, while sound effects are loaded into memory in uncompressed form. Loading a music file into memory to be played back like an fx loop sound would be... extremely prohibitive, memory-wise.
Logged

presidentmattdamon

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7868 on: August 16, 2021, 02:21:26 PM »

is there a way to trigger the same variant update as a player removing/adding a hullmod? this would be considered an attempt to fix the issue where an OP cost reduction hullmod doesn't apply until the variant is updated through some kind of player interaction with the refit dialog, or through switching to and from another fleetmember in the refit dialog. the hullmod itself is added through a dialog as a perma-mod to the variant.
Logged

Timid

  • Admiral
  • *****
  • Posts: 595
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7869 on: August 18, 2021, 02:41:16 PM »

I'm working with rule.csv and I have two DialogOptionSelected with the same option ID.

What I thought how it worked was that if you have two of the same option ID, the rule.csv will fire at best one of the 50% of the time and the other 50% of the time as well, but I'm having a hard time getting a good 50%... Is there something more involved or am I just falling into the gambler's fallacy?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21292
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7870 on: August 18, 2021, 03:04:01 PM »

is there a way to trigger the same variant update as a player removing/adding a hullmod? this would be considered an attempt to fix the issue where an OP cost reduction hullmod doesn't apply until the variant is updated through some kind of player interaction with the refit dialog, or through switching to and from another fleetmember in the refit dialog. the hullmod itself is added through a dialog as a perma-mod to the variant.

Sorry for the delayed response! Hmm, I don't think so. In general, negative OP hullmods are basically busted.


I'm working with rule.csv and I have two DialogOptionSelected with the same option ID.

What I thought how it worked was that if you have two of the same option ID, the rule.csv will fire at best one of the 50% of the time and the other 50% of the time as well, but I'm having a hard time getting a good 50%... Is there something more involved or am I just falling into the gambler's fallacy?

It'll fire the rule with more matching conditions, so if one of them has more than just $option == <id>, then that might be it. Otherwise - if both of the rules have the same number of conditions and they all match - it should be 50%.
Logged

presidentmattdamon

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7871 on: August 18, 2021, 04:19:00 PM »

is there a way to trigger the same variant update as a player removing/adding a hullmod? this would be considered an attempt to fix the issue where an OP cost reduction hullmod doesn't apply until the variant is updated through some kind of player interaction with the refit dialog, or through switching to and from another fleetmember in the refit dialog. the hullmod itself is added through a dialog as a perma-mod to the variant.

Sorry for the delayed response! Hmm, I don't think so. In general, negative OP hullmods are basically busted.

this is one that uses the WeaponOPCostListener that was implemented, rather than one that is just a negative value in the .csv (which worked before 0.9.5 even if built in). is there no way to increase the OP that a ship has through some kind of code?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21292
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7872 on: August 18, 2021, 05:52:20 PM »

this is one that uses the WeaponOPCostListener that was implemented, rather than one that is just a negative value in the .csv (which worked before 0.9.5 even if built in). is there no way to increase the OP that a ship has through some kind of code?

Ah - from the WeaponOPCostModifier javadoc:
Quote
If multiple different ones are added to the same ship stats, they might have a hard time coordinating properly.
Should be used with care, and ideally only through built-in hullmods.

Hullmods reducing OP costs or modifying OP is not going to work well combined with them also being removable. There just aren't UI-level checks to prevent adding them, going over OP, and then removing them. There *might* be some workarounds, but I'm not familiar with them and I'd suspect they have some downsides.

And, right - there's no way to increase ship OP directly, no. You might consider a built-in / permanent hullmod that reduces weapon OP costs, for example, though.
Logged

presidentmattdamon

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7873 on: August 19, 2021, 11:53:32 AM »

And, right - there's no way to increase ship OP directly, no. You might consider a built-in / permanent hullmod that reduces weapon OP costs, for example, though.

the idea is to be able to install the OP cost modifier onto any ship in the game though. it still is installed using addPermaMod, but i'm assuming you mean through the .ship/.skin files, which is very out of scope for the mod
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21292
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7874 on: August 19, 2021, 11:54:20 AM »

I think with addPermaMod it would likely be ok? At least, not thinking of any issues right now.
Logged
Pages: 1 ... 523 524 [525] 526 527 ... 640