Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 280 281 [282] 283 284 ... 302

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13423
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4215 on: January 17, 2019, 05:41:00 AM »

well I do want to restrict the impact only to the player's fleet.
So i could do this: in an every frame script, I check the fleet members and their hullmods, if there are some, do something, else unmodify?

Yeah, this makes sense.

Why is the system as it is right now, anyway?
I realize most people don't have custom music mods but it's rather annoying when I am flying by a star system on my way across the galaxy and the music fades away from the hyperspace track that's playing, into a in-star-system track for 3 seconds then fades back into the hyper space one. This happens repeatedly while passing star systems on my way to the destination. As you imagine it's some what annoying.

I'll probably take a look at this at some point if there's time; there are reasons but they may or may not hold up. A bit off-topic for this thread, though :)
Logged

Originem

  • Purple Principle
  • Commander
  • ***
  • Posts: 247
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4216 on: January 20, 2019, 05:58:08 PM »

How to get damagetype by weaponspec?
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13423
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4217 on: January 20, 2019, 06:01:34 PM »

How to get damagetype by weaponspec?

Oh, oops - the method wasn't in the API. Added DamageType getDamageType() to WeaponSpecAPI.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 583
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4218 on: January 21, 2019, 03:16:42 AM »

So if I add stations in Industries.csv by pointing that entry to a new variant, then add the necessary path to econ\\aztlan.json in the replace array of mod_info, and put the new industry id for the new station in the replaced file, shouldn't it show up in the campaign?

It doesn't seem to replace the station at all.

Currently uploading an example mod to link. Should be done in an hour or so.

https://www.dropbox.com/sh/x4e2o82j21b3dpk/AAB58nMhE8qpmSPJi0UUC6C8a?dl=0

*Edit*

So I replace the Aztlan stations with custom Hegemony skinned variants in the example mod, and though in dev mode they show up in the variant editor just fine, the markets in Aztlan spawn the same stations they normally do.
« Last Edit: January 21, 2019, 03:24:50 AM by Morrokain »
Logged

Originem

  • Purple Principle
  • Commander
  • ***
  • Posts: 247
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4219 on: January 21, 2019, 04:14:02 AM »

Oh, oops - the method wasn't in the API. Added DamageType getDamageType() to WeaponSpecAPI.
... :-\
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13423
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4220 on: January 21, 2019, 05:13:21 AM »

So if I add stations in Industries.csv by pointing that entry to a new variant, then add the necessary path to econ\\aztlan.json in the replace array of mod_info, and put the new industry id for the new station in the replaced file, shouldn't it show up in the campaign?

It doesn't seem to replace the station at all.

Currently uploading an example mod to link. Should be done in an hour or so.

https://www.dropbox.com/sh/x4e2o82j21b3dpk/AAB58nMhE8qpmSPJi0UUC6C8a?dl=0

*Edit*

So I replace the Aztlan stations with custom Hegemony skinned variants in the example mod, and though in dev mode they show up in the variant editor just fine, the markets in Aztlan spawn the same stations they normally do.

Took a look! It works on my end due to the related fixes for how the "replace" section works. I think if you change it from \\aztlan.json to /aztlan.json it'll work on your end as well.

Oh, oops - the method wasn't in the API. Added DamageType getDamageType() to WeaponSpecAPI.
... :-\

Apologies :)
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 583
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4221 on: January 21, 2019, 08:20:06 AM »


Took a look! It works on my end due to the related fixes for how the "replace" section works. I think if you change it from \\aztlan.json to /aztlan.json it'll work on your end as well.


Yes that does work. To be specific, the rest of the path must still be delimited by "\\" but after "econ" it changes to "/" and that replaces the file.  :)
Logged

manictiger

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4222 on: January 21, 2019, 05:16:15 PM »

I'm at my wits end with this thing.  I'm trying to add a third weapon to my mod.  The first two were relatively straightforward, but this one-- I've tried everything, from reordering the names in alphabetical, to disabling the textured beam, etc.  Currently, this thing's almost a direct clone of the tactical laser and it still won't work.

Error:
Spoiler
6942 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - org.json.JSONException: JSONArray[3] not found.
org.json.JSONException: JSONArray[3] not found.
   at org.json.JSONArray.get(JSONArray.java:204)
   at org.json.JSONArray.getInt(JSONArray.java:265)
   at com.fs.starfarer.loading.D.Ö00000(Unknown Source)
   at com.fs.starfarer.loading.WeaponSpecLoader.Ò00000(Unknown Source)
   at com.fs.starfarer.loading.WeaponSpecLoader.Ò00000(Unknown Source)
   at com.fs.starfarer.loading.SpecStore.while(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Suspected file:
Spoiler
{
   "specClass":"beam",
   "id":"altca_electroplas",
   "type":"ENERGY",
   "size":"SMALL",
   #"collisionClass":"RAY",
   #"collisionClassByFighter":"RAY_FIGHTER",
   "turretSprite":"graphics/weapons/altca_electroplas_turret_base.png",
   "turretGlowSprite":"graphics/weapons/altca_electroplas_turret_glow.png",
   "hardpointSprite":"graphics/weapons/altca_electroplas_hardpoint_base.png",
   "hardpointGlowSprite":"graphics/weapons/altca_electroplas_hardpoint_glow.png",
   "turretOffsets":[15,0],
   "turretAngleOffsets":[0],
   "hardpointOffsets":[15,0],
   "hardpointAngleOffsets":[0],
   "fringeColor":[0,255,191,105],
   "coreColor":[0,255,255],
   "glowColor":[0,255,191,105],
   #"fringeColor":[128,0,255,105],
   #"coreColor":[191,0,25,155],
   #"glowColor":[191,0,255,105],
   #"darkCore":false,
   "width":13.0,
   "textureType":ROUGH,
   #"textureType":["graphics/fx/altca_electroplas_shell.png","graphics/fx/altca_electroplas_shell_fringe.png"],
   "textureScrollSpeed":72.0,
   "pixelsPerTexel":5.0,
   #"animationType":"GLOW_AND_FLASH",  # NONE, GLOW, MUZZLE_FLASH, SMOKE
   #"muzzleFlashSpec":{"length":54.0,   # only used if animationType = MUZZLE_FLASH
   #               "spread":20.0,
   #               "particleSizeMin":18.0,
   #               "particleSizeRange":24.0,
   #               "particleDuration":0.12,
   #               "particleCount":32,
   #               "particleColor":[64, 0, 255,215]},
   "pierceSet":[PROJECTILE_FF,PROJECTILE_NO_FF,PROJECTILE_FIGHTER,MISSILE_FF,MISSILE_NO_FF],
   "fireSoundOne":"altca_electroplas_fire",
   "fireSoundTwo":"altca_laser_loop",
}
[close]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13423
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4223 on: January 21, 2019, 05:57:45 PM »

"coreColor":[0,255,255],

Probably needs a 4th element there for the alpha.
Logged

manictiger

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4224 on: January 21, 2019, 06:26:21 PM »

"coreColor":[0,255,255],

Probably needs a 4th element there for the alpha.

Thanks.  That solved it.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1254
    • View Profile
    • Bitbucket Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4225 on: January 22, 2019, 02:01:44 AM »

What controls whether a bar event sticks around after the player interacts with it? For example, you can refuse the commodity delivery quest and the issuer will still be there in case you change your mind.

As far as I can tell my bar event code isn't doing anything differently, but leaving the conversation will remove the person from the bar list.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13423
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4226 on: January 22, 2019, 02:17:13 AM »

Calling this:

BarEventManager.getInstance().notifyWasInteractedWith(barEvent);

Will remove it from the list. It's "interacted" in the sense of "partook in what it has to offer" rather than just "took a look and backed out" sense.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1254
    • View Profile
    • Bitbucket Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4227 on: January 22, 2019, 02:55:50 AM »

Calling this:

BarEventManager.getInstance().notifyWasInteractedWith(barEvent);

Will remove it from the list. It's "interacted" in the sense of "partook in what it has to offer" rather than just "took a look and backed out" sense.

Ah, whoops. I did have a stray call to that method in the wrong dialog branch. At least it was something simple. :)

Just to double check: the BarEvent script instance will persist until it expires, right? I don't need to keep track of the person or quest flags in sector memory if they won't extend past this one event?
« Last Edit: January 22, 2019, 02:58:31 AM by LazyWizard »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 13423
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4228 on: January 22, 2019, 03:27:18 AM »

Yep, correct. It is however possible for the same BarEvent to be shown at another market, depending on how it's coded.

BaseBarEvent's shouldShowAtMarket(MarketAPI market) method makes it not do that, but in some cases it could be desirable.


The BaseGetCommodityBarEvent class has a regen() method that it calls to reinstantiate whatever it might need to in case the market changed, although I don't think it actually needs to - but there may be a subclass I'm not thinking of where it may indeed change markets.

Basically, the bar events are not inherently tied to a market, rather they decide whether they want to be shown at the current market the player is interacting with. I think all/most vanilla events - in addition to their custom market checks - also check "and was not previously shown at another market".
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 583
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4229 on: January 23, 2019, 09:10:14 PM »

When I make a subfaction of a faction like the lion guard or knights of ludd, I know I can distinguish their fleets through full control of doctrine like the lion guard does, or make changes to things like portraits or music and ignore composition.

1) What determines where and when the subfaction is spawned? Do I need to set the subfaction id on the market?

2) How are the two factions linked? Or are they? If I only override one fleetType, say "patrolLarge", will the other fleet types spawn normally? Or just that one type on that market if it has the "patrolhq" industry?
Logged
Pages: 1 ... 280 281 [282] 283 284 ... 302