Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 536 537 [538] 539 540 ... 710

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

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8055 on: October 18, 2021, 09:48:53 AM »

Music is streamed from disk, and sfx are preloaded.
Yeah how does sound.json know when to distinguish the difference?

Do they have to be within that "music" category or is of how they're formatted? I see

Code
"music_campaign":[
{"file":"miscallenous_corvus_campaign_music.ogg","source":"sounds/music/music.bin","volume":0.6},
],
vs
Code
 	"disintegrator_fire":[
{"file":"sounds/sfx_wpn_energy/disintegrator_fire_01.ogg","pitch":1,"volume":0.7},
],
So I'm assuming either the way they're formatted determines how one is streamed from the disk or preloaded.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8056 on: October 18, 2021, 09:52:33 AM »

It's that but also the method that's used for playback assumes it's one or the other. E.G. when you call playMusic() it'll stream from disk (and look for the id in the music section), but it also has some other consequences (such as replacing the current music), etc.
Logged

RustyCabbage

  • Captain
  • ****
  • Posts: 347
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8057 on: October 20, 2021, 06:16:40 AM »

Is there a way to define suppressed hullmods in a .variant file? Trying something like

"suppressedMods": ["high_maintenance"],

on a Hyperion doesn't alter the variant, but I can't find any examples of suppressedMods being used anywhere.

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8058 on: October 20, 2021, 06:34:28 AM »

Is it possible for a colony to be mobile?  I mean fully functioning colony with all the bells and whistles.

I understand you would likely run into issues with trade fleets etc; is this even possible in the game engine though?
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

SafariJohn

  • Admiral
  • *****
  • Posts: 3023
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8059 on: October 20, 2021, 07:16:00 AM »

Yes. I think it can't go into hyperspace, though.
Logged

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8060 on: October 20, 2021, 07:23:06 AM »

What makes you say that?  I have seen static colonies be implemented in hyperspace.  Is it because without a certain level of "know where it is" the trade fleets etc cant find it?
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

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8061 on: October 20, 2021, 08:21:34 AM »

Because (from what I've seen of Prism Freeport), a colony in hyperspace is a massive source of lag. Probably something to do with patrol fleets.

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8062 on: October 20, 2021, 08:29:02 AM »

So it IS theoretically possible to have a mobile colony?

The idea of having a mobile space station intrigues me; being able to leave it wherever you need to and head out with a high burn elite task force just sounds fun to me.
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

theDragn

  • Captain
  • ****
  • Posts: 307
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8063 on: October 20, 2021, 10:16:22 PM »

I've got a weird issue: I have a civilianized tanker and freighter and need them to spawn in a faction's markets in appropriate numbers. I've got them in default_ship_roles.json and the faction knows the ships, but the tanker spawns at an absurd rate- all but two or three of the civilian ship market's ships are the tanker, and the freighter won't spawn at all. However, this only applies to the civilian market- they show up in the correct number and proportion for military and black markets. Both ships have the relevant CIVILIAN and TANKER or FREIGHTER hints in ship_data.csv.

the ship ID's in question are apex_spectrum_civcargo, apex_spectrum_civfuel (the variants are apex_spectrum_hauler and apex_spectrum_tanker, respectively).

the relevant bits of default_ship_roles.json:
Spoiler
   "tankerMedium":{
      "apex_spectrum_tanker":5
   },
   "freighterMedium":{
      "apex_spectrum_hauler":5
   },
[close]

Edit: On further inspection, this appears to be an issue with role weighting somehow. Giving the faction access to base_bp produces a more reasonable ship distribution, but still does not spawn the cargo ship in the market. Presumably something to do with how the civilain market plugin is handling ship selection when the faction doesn't have a civilian ship in each role?
« Last Edit: October 20, 2021, 11:49:39 PM by theDragn »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8064 on: October 21, 2021, 09:45:58 AM »

Is there a way to define suppressed hullmods in a .variant file? Trying something like

"suppressedMods": ["high_maintenance"],

on a Hyperion doesn't alter the variant, but I can't find any examples of suppressedMods being used anywhere.

Hmm - "suppressedMods" should work - but looking into it, apparently that wasn't being loaded properly. Fixed this up!


Spoiler
I've got a weird issue: I have a civilianized tanker and freighter and need them to spawn in a faction's markets in appropriate numbers. I've got them in default_ship_roles.json and the faction knows the ships, but the tanker spawns at an absurd rate- all but two or three of the civilian ship market's ships are the tanker, and the freighter won't spawn at all. However, this only applies to the civilian market- they show up in the correct number and proportion for military and black markets. Both ships have the relevant CIVILIAN and TANKER or FREIGHTER hints in ship_data.csv.

the ship ID's in question are apex_spectrum_civcargo, apex_spectrum_civfuel (the variants are apex_spectrum_hauler and apex_spectrum_tanker, respectively).

the relevant bits of default_ship_roles.json:
Spoiler
   "tankerMedium":{
      "apex_spectrum_tanker":5
   },
   "freighterMedium":{
      "apex_spectrum_hauler":5
   },
[close]

Edit: On further inspection, this appears to be an issue with role weighting somehow. Giving the faction access to base_bp produces a more reasonable ship distribution, but still does not spawn the cargo ship in the market. Presumably something to do with how the civilain market plugin is handling ship selection when the faction doesn't have a civilian ship in each role?
[close]

I'm not sure what the problem might be; I'd suggest stepping through OpenMarketPlugin.updateCargoPrePlayerInteraction() with a debugger to see what's doing on. All the code that generates this stuff should be in mod-land, aside from IIRC the bit that grabs probabilities out of the .faction - but even then, you should be able to see what the problem is based on what that's returning, if that happens to be the culprit.
Logged

theDragn

  • Captain
  • ****
  • Posts: 307
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8065 on: October 21, 2021, 03:30:43 PM »

I'm not sure what the problem might be; I'd suggest stepping through OpenMarketPlugin.updateCargoPrePlayerInteraction() with a debugger to see what's doing on. All the code that generates this stuff should be in mod-land, aside from IIRC the bit that grabs probabilities out of the .faction - but even then, you should be able to see what the problem is based on what that's returning, if that happens to be the culprit.

I think the issue is with how it's adding tankers- adding the tankers last (instead of adding them along with everything else) appears to be replacing other ships, though I'm unsure how, or why it's not happening in vanilla. Regardless, managed to fix it with a custom market plugin that just pretends to be the open market.

Histidine

  • Admiral
  • *****
  • Posts: 4688
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8066 on: October 23, 2021, 02:14:27 AM »

Is it me or is the casualty reduction mult from Ground Operations skill not registering in the player's mutable fleet stats, somehow? Only the effectiveness modifier is applying.

(tested with no non-library, non-utility mods)

Code: java
runcode 
Console.showMessage("Planetary operations power mult is " + Global.getSector().getPlayerFleet().getStats().getDynamic().getMod(Stats.PLANETARY_OPERATIONS_MOD).computeEffective(1));
Console.showMessage("Planetary operations casualties mult is " + Global.getSector().getPlayerFleet().getStats().getDynamic().getMod(Stats.PLANETARY_OPERATIONS_CASUALTIES_MULT).computeEffective(1));
104614 [Thread-3] INFO  org.lazywizard.console.Console  - Planetary operations power mult is 2.0
104615 [Thread-3] INFO  org.lazywizard.console.Console  - Planetary operations casualties mult is 1.0

Marine XP bonuses seem to be having the same problem.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8067 on: October 23, 2021, 07:41:25 AM »

I think it's an issue with your using getMod() instead of getStat(). Stuff ending with _MULT should use getStat() (which assumes a base value of 1, always), stuff ending with _MOD uses getMod(). Main point is that where it uses the value needs to be consistent with how the value is modified, in this case by the skill. The naming convention for the Stats.XXXX names is just to try to help keep it straight.

Probably not something I'd do the same way if I had a second go at it since it's easy to mix up which one a value in question is using and I've done it myself, but, ah well.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4688
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8068 on: October 24, 2021, 02:58:57 AM »

Ah, thanks, that was it exactly.

New question: Is it possible (and desirable) to make a hub mission transition from one stage to another from code? Rather than the seemingly roundabout way of calling  e.g. connectWithGlobalFlag at start and then setting that flag in order to progress.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8069 on: October 24, 2021, 08:18:24 AM »

New question: Is it possible (and desirable) to make a hub mission transition from one stage to another from code? Rather than the seemingly roundabout way of calling  e.g. connectWithGlobalFlag at start and then setting that flag in order to progress.

Yes! See BlueprintIntel for an example. I *think* both the "dialog" and "memoryMap" parameters can be null, but that'll also depend on your implementation (if any) of endSuccessImpl/endFailureImpl and possibly I didn't see a case where they're used when looking through it just now.

Code
public void reportAboutToShowLootToPlayer(CargoAPI loot, InteractionDialogAPI dialog) {
for (CargoStackAPI stack : loot.getStacksCopy()) {
if (item.equals(stack.getData())) {
Global.getSector().getListenerManager().removeListener(this);
setCurrentStage(Stage.COMPLETED, dialog, dialog.getPlugin().getMemoryMap());
break;
}
}
}

connectWithGlobalFlag() and similar are mostly there for when the transitions are initiated from rules, though they can be handy in some other cases, too.
Logged
Pages: 1 ... 536 537 [538] 539 540 ... 710