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 ... 202 203 [204] 205 206 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3045 on: February 17, 2017, 09:42:19 PM »

What you want to do is set the shield color gradually - keep track of how long it's been shifting vs how long you want the color shift to take, and use that to interpolate from the original color to the new color.

Important note: you don't want to save this state in a member variable in the effect class, because there's only one of those created, so that value would be shared among all ships with that hullmod. What you want is to store this value in the map returned by Global.getCombatEngine().getCustomData(); key it off something like the ship's ID.
Logged

Peace_Destroyer

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3046 on: March 03, 2017, 03:47:39 PM »

I keep getting an error and a crash that it can't find my custom weapon sound
Quote
46052 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.float] with id [sounds/gr/fx/grweapons/g3bosslaser1.ogg] not found
java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.float] with id [sounds/gr/fx/grweapons/g3bosslaser1.ogg] not found

That's the directory and the file, I've saved it as a mono .ogg in Audacity. Is something wrong with my file structure or my .wpn file? Or something else?

Here's the wpn file, it was generated via the ship editor:

 
Spoiler
{
  "animationType": "GLOW",
  "barrelMode": "ALTERNATING",
  "glowColor": [0,100,153,75],
  "hardpointAngleOffsets":
  • ,

  "hardpointOffsets": [9.5,0],
  "hardpointSprite": "graphics/gr/weapons/bigcore_blaster.png",
  "id": "bc_blaster",
  "projectileSpecId": "bcblaster_shot",
  "size": "SMALL",
  "specClass": "projectile",
  "textureType": ROUGH,
  "turretAngleOffsets":
  • ,

  "turretGunSprite": "graphics/gr/weapons/bigcore_blaster.png",
  "turretOffsets": [6,0],
  "turretSprite": "graphics/gr/weapons/bigcore_blaster.png",
  "fireSoundOne":"sounds/gr/fx/grweapons/g3bosslaser1.ogg",
  "type": "ENERGY"
}
[close]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3047 on: March 03, 2017, 04:08:58 PM »

fireSoundOne refers to a sound id defined in data/config/sounds.json.
Logged

Peace_Destroyer

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3048 on: March 03, 2017, 05:21:36 PM »

fireSoundOne refers to a sound id defined in data/config/sounds.json.

Thanks a lot, I would have never figured that out on my own.
Logged

whatdoesthisbuttondo

  • Lieutenant
  • **
  • Posts: 90
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3049 on: March 04, 2017, 05:22:42 AM »

Is it possible (or will it be with the upcoming 0.8 release) to have properly working phase carriers?

I've searched the forums and only found a very old post saying that the carriers apparently service fighters even if phased out,
which is not what I want.

At the time, iirc Alex said that it was considered a feature. If that still holds true, is there maybe a way to work around this by
code?
Logged

MShadowy

  • Admiral
  • *****
  • Posts: 911
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3050 on: March 04, 2017, 02:32:53 PM »

Speaking of carriers, I've got a future ship planned that I've been meaning to ask a question in regards to; namely, is some means possible to separate out flight decks so that some are used for landing and other for launch?  My current hypothetical is using empty built-in weapons slots and an attached plugin script that looks for those particular slots and pops the fighters out of them (in a BSG catapult kinda way) instead of the landing pads.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3051 on: March 04, 2017, 09:12:18 PM »

Is it possible (or will it be with the upcoming 0.8 release) to have properly working phase carriers?

I've searched the forums and only found a very old post saying that the carriers apparently service fighters even if phased out,
which is not what I want.

At the time, iirc Alex said that it was considered a feature. If that still holds true, is there maybe a way to work around this by
code?

Still true on all counts, yeah. Sorry :)

*Technically* this is probably possible for a mod to work around by writing fully custom fighter AI, but that's massive overkill in terms of effort.

Speaking of carriers, I've got a future ship planned that I've been meaning to ask a question in regards to; namely, is some means possible to separate out flight decks so that some are used for landing and other for launch?  My current hypothetical is using empty built-in weapons slots and an attached plugin script that looks for those particular slots and pops the fighters out of them (in a BSG catapult kinda way) instead of the landing pads.

Possibly with a script that force-sets the location of a fighter to where you want it to be, as it's landing?
Logged

cjuicy

  • Captain
  • ****
  • Posts: 353
  • Figuring out how the hell to wear heels (She/it)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3052 on: March 04, 2017, 10:36:03 PM »

I can see Fallout style Laser Gatlings cleaving through destroyers like a hundred thousand-degree knives slicing into a stick of butter. Overkill inbound.
Logged
It's been a long time, but I still love ya!

- Pfp done by Sleepyfish!

whatdoesthisbuttondo

  • Lieutenant
  • **
  • Posts: 90
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3053 on: March 06, 2017, 03:35:04 AM »

Is it possible to leave out some elements in the .faction file?

My faction doesn't have capital ships, so I'd like to leave out combatCapital for instance, and
set combatLarge to a really low figure.

So far I've tried to set their preferrence really really low, and fill it with the next best size (cruiser),
but that appears to have them dump tons of cruisers in the market (maybe they dump what they
don't need themselves?).

I remember there was a post explaining the .faction file, but I couldn't find it again for the life of me...
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 #3054 on: March 08, 2017, 10:05:34 AM »

I quit trying to figure it out by myself:

I want a simple flavor text in a market that span two entities ora_poincare and ora_devaney, the former being the main one and the id of the market (checked in dev mode by dumping the memory)

I'm using the simplest rule possible:

flavorTextMarketDevaney,TradePanelFlavorText,"$market.id == ora_poincare score:1000","AddText""A whole load of flavor text.""textGrayColor",,,

And yet the text is the default vanilla one. In the meantime I'm using that exact same rule with another id for a single entity market and it work flawlessly.
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3055 on: March 08, 2017, 10:13:08 AM »

Is it possible to leave out some elements in the .faction file?

My faction doesn't have capital ships, so I'd like to leave out combatCapital for instance, and
set combatLarge to a really low figure.

So far I've tried to set their preferrence really really low, and fill it with the next best size (cruiser),
but that appears to have them dump tons of cruisers in the market (maybe they dump what they
don't need themselves?).

I remember there was a post explaining the .faction file, but I couldn't find it again for the life of me...

Set "minPointsForCombatCapital" really high in the doctrine, (say, 100+) and then set "capital" to a low value compared to the other stuff. But, hmm - it probably will result in quite a few cruisers, since it tries to add a capital if there isn't one, adds some cruisers instead, and then tries again in another month. You could set the "fallback" for combatCapital to be combatMedium or combatSmall instead of combatLarge - that should net smaller ships than cruisers.

I quit trying to figure it out by myself:

I want a simple flavor text in a market that span two entities ora_poincare and ora_devaney, the former being the main one and the id of the market (checked in dev mode by dumping the memory)

I'm using the simplest rule possible:

flavorTextMarketDevaney,TradePanelFlavorText,"$market.id == ora_poincare score:1000","AddText""A whole load of flavor text.""textGrayColor",,,

And yet the text is the default vanilla one. In the meantime I'm using that exact same rule with another id for a single entity market and it work flawlessly.

Just FYI, there's detailed logging about which conditions for which rules fail, which rules have the highest scores, and which rules are ultimately picked, so that should generally be helpful in a case like this.

As for this, though, I think the issue is the rule id - flavorTextMarketDevaney, which I'm guessing is a duplicate of a rule that you've got for the other market - so only one of the rules actually gets loaded.

Edit: I don't remember exactly why, but it was non-trivial to make the game detect this is going on. Have run into it myself, it can be pretty confounding. Let me take another look, though. But in any case, looking at the logs should help with situations like this.
« Last Edit: March 08, 2017, 10:14:58 AM by Alex »
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 #3056 on: March 08, 2017, 10:28:07 AM »

The rule name is unique, I just didn't changed it after finding out ora_poincare was used for the market id instead of ora_devaney.

Anyway found the solution actually: the documentation says that the rules are automatically reloaded in dev mode at every new Dialog interaction? Turns out that it is not the case anymore. I was docking and undocking but it didn't updated the rules.
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3057 on: March 08, 2017, 10:32:44 AM »

The rule name is unique, I just didn't changed it after finding out ora_poincare was used for the market id instead of ora_devaney.

Anyway found the solution actually: the documentation says that the rules are automatically reloaded in dev mode at every new Dialog interaction? Turns out that it is not the case anymore. I was docking and undocking but it didn't updated the rules.

Ah, ok, gotcha.

The auto-reload only works on the core rules.csv, not on modded ones - sorry about the confusion! Or, rather, it only triggers a reload if the core rules.csv is touched, but it'll reload everything if it is, including modded rules.
Logged

Takion Kasukedo

  • Admiral
  • *****
  • Posts: 504
  • No longer drinking (Alcohol that is)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3058 on: March 11, 2017, 06:55:52 AM »

Is there a specific way for projectiles to be unaffected by ship velocity?

And how can you tie a maneuverability system to right-click?
Logged
Is now able to cook a decent Creamy Salmon Pasta, amok other things.

Still loves purple. Still not skilled enough to make a mod that doesn't get that one damn error.

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3059 on: March 11, 2017, 11:33:18 AM »

And how can you tie a maneuverability system to right-click?
I know that you need to use a custom version of Phasing but sadly that is all I know
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too
Pages: 1 ... 202 203 [204] 205 206 ... 706