Fractal Softworks Forum
February 19, 2019, 02:14:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Starsector 0.9a is out! (11/16/18); In-dev patch notes for 0.9.1a (01/31/19)
 
   Home   Help Search Login Register  
Pages: 1 ... 280 281 [282] 283 284 ... 290
  Print  
Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 667885 times)
Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #4215 on: January 16, 2019, 09:41:00 PM »

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 Smiley
Logged
Originem
Commander
***
Posts: 224


Dancing like a boss.


View Profile
« Reply #4216 on: January 20, 2019, 09:58:08 AM »

How to get damagetype by weaponspec?
Logged

My mods


Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #4217 on: January 20, 2019, 10:01:34 AM »

How to get damagetype by weaponspec?

Oh, oops - the method wasn't in the API. Added DamageType getDamageType() to WeaponSpecAPI.
Logged
Morrokain
Admiral
*****
Posts: 545


Megalith Dreadnought - Archean Order


View Profile
« Reply #4218 on: January 20, 2019, 07:16:42 PM »

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 20, 2019, 07:24:50 PM by Morrokain » Logged
Originem
Commander
***
Posts: 224


Dancing like a boss.


View Profile
« Reply #4219 on: January 20, 2019, 08:14:02 PM »

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

My mods


Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #4220 on: January 20, 2019, 09:13:21 PM »

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.
... Undecided

Apologies Smiley
Logged
Morrokain
Admiral
*****
Posts: 545


Megalith Dreadnought - Archean Order


View Profile
« Reply #4221 on: January 21, 2019, 12: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.  Smiley
Logged
manictiger
Ensign
*
Posts: 12


View Profile
« Reply #4222 on: January 21, 2019, 09:16:15 AM »

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:
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)

Suspected file:
{
   "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",
}
Logged
Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #4223 on: January 21, 2019, 09:57:45 AM »

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

Probably needs a 4th element there for the alpha.
Logged
manictiger
Ensign
*
Posts: 12


View Profile
« Reply #4224 on: January 21, 2019, 10:26:21 AM »

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

Probably needs a 4th element there for the alpha.

Thanks.  That solved it.
Logged
LazyWizard
Global Moderator
Admiral
*****
Posts: 1242



View Profile WWW
« Reply #4225 on: January 21, 2019, 06:01:44 PM »

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: 13166


View Profile
« Reply #4226 on: January 21, 2019, 06:17:13 PM »

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: 1242



View Profile WWW
« Reply #4227 on: January 21, 2019, 06:55:50 PM »

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. Smiley

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 21, 2019, 06:58:31 PM by LazyWizard » Logged

Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #4228 on: January 21, 2019, 07:27:18 PM »

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: 545


Megalith Dreadnought - Archean Order


View Profile
« Reply #4229 on: January 23, 2019, 01: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 ... 290
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!