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 ... 228 229 [230] 231 232 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3435 on: July 15, 2017, 09:20:45 AM »

So... is there any current way to iterate through all of the JSONs in a given directory, both Vanilla and mods? 

Basically, I want to iterate through all of the .PROJ files, .WPN files and .SHIP files, in part because of some .WPN and .SHIP filenames not matching their internal string IDs, but mainly to do some work before the game loads, rather than gather data during operation.

I'm kind of stumped.

Off-hand, I don't *think* so, aside from looking through the filesystem directly.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3436 on: July 15, 2017, 09:27:47 AM »

Quote
I don't *think* so, aside from looking through the filesystem directly.
Right.  But aren't we unable to use File.IO?  I mean, if we can, I can probably query that-a-way, although I'd have additional problems with seeking the SS install directory on multiple OS's.  I'll look at that later today.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3437 on: July 15, 2017, 09:37:50 AM »

Ah, right, forgot about that.

There's also a bunch of "loadCSV" etc methods in SettingsAPI, depending on what you're doing they may be of use.
Logged

vagrant

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3438 on: July 16, 2017, 01:40:26 PM »

I'm not sure how to go about this but would a kind of movement only autopilot be possible? sort of the inverse of weapon autofire, where the ship moves like it would with the autopilot setting, but leaves weapon and shield control to the player, and isn't turned off by interaction.

There are times, especially when piloting a larger ship on my craptop, where I'm content with how the ai handles spacing and engagement distance, but I prefer to handle the shot timing of things (especially torpedoes and longer range ballistics) myself.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3439 on: July 16, 2017, 02:07:00 PM »

Absolutely, yes.  I might even make something like that for the next version of my AI.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Drokkath

  • Captain
  • ****
  • Posts: 281
  • Xenophilic Mutant Commando
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3440 on: July 16, 2017, 04:35:10 PM »

That AI thing seems interesting/useful, though personally I'm just usually overly OCD about focusing all my efforts only on my main ship manually from flying, gliding, aiming and shooting to pausing to switch weapon group and hit the opposition with ballistic, missile and energy weaponry along with ship-system usage and a lot of controlled gliding.

I suck at commanding a fleet, have gotten a lot of frigates and a few other ships in my fleet usually disabled or destroyed and sometimes because out of mere sudden sight of another ship and so my trigger-happy reflexes (which are many times faster than my main logical thinking processes, I am a slow and careful thinker but once primal instinct kicks in all bets are off) have gotten either ally ships or one of my own blasted apart or both by my own faulty tunnel vision where everything in front of me is a hostile entity needing to be exterminated.

In my current on-going playthrough I accidentally turned Independents hostile both towards me and to Metelson because I was still part of Metelson then with 100/100 reputation with them. I thought I was taking out yet another Luddic Church fleet out until mission debrief screen where I saw list of ships and what faction were they from, what an amusing face palm moment with a WTF face.

Moments like that make this game even more priceless, one bad choice and a sledgehammer curve-ball in the face. :D
« Last Edit: July 16, 2017, 04:50:47 PM by Drokkath »
Logged
For I dipt in to the future, far as my gazer eye could see; Saw the vision of the world, and all the wonder that would be.

DinoZavarski

  • Lieutenant
  • **
  • Posts: 79
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3441 on: July 17, 2017, 05:20:48 AM »

Is it possible to add slots in a .skin file? I tried to do it using weaponSlotChanges, however the game crashes without reasonable error message when slot name, not present in the .ship is used in .skin.
Logged
Me no know, me no understand, me just root...

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3442 on: July 17, 2017, 06:40:34 AM »

TrashMan: I can't say why the weapon would be failing to EMP nearby weapons/engines on a hull hit. But for good effectiveness in general against larger ships, it's probably easiest to give it an EMP arc effect like vanilla's Ion Cannon has, so it can disable far-away parts of the target.

DinoZavarski: AFAIK you can't add new slots and such (anything that has a specific position on the ship), only remove them.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3443 on: July 17, 2017, 09:57:15 AM »

I tried to implement a replacement for HyperspaceTerrainPlugin last night, but it doesn't work.  The new Plugin is referred to in terrains.json.  I saw in the API that the class is explicitly called in at least three places, rather than through the alias in Misc.java.  Any idea how I can get around that?  I had a fun idea about this but I e never messed with Terrain before :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3444 on: July 17, 2017, 10:00:32 AM »

"doesn't work" is perhaps not very informative :)

That said, I think if your plugin extends HyperspaceTerrainPlugin, that should take care of any problems - what I'm seeing is in StarSystemGenerator, it expects the hyper terrain plugin to be of that class.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3445 on: July 17, 2017, 10:07:24 AM »

Ah... I'll try it that way, might work.  I was implementing TiledTerrainPlugin.  Thanks!

And by "not working", I meant, "I saw no crashes, but no effect".
« Last Edit: July 17, 2017, 10:10:18 AM by xenoargh »
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3446 on: July 17, 2017, 03:36:59 PM »

Was wondering what stats are tied to ship sizes (destroyer, frigate, cruiser, capital) and if it would be non trivial to add more 'sizes'.
Ship size tags are used to determine OP costs and effects of many hullmods; they are also probably used for AI, and for the campaign logic to determine relative fleet strength and strategies and so on. I don't think it possible to add more sizes.

Is it possible to add slots in a .skin file? I tried to do it using weaponSlotChanges, however the game crashes without reasonable error message when slot name, not present in the .ship is used in .skin.
Negative, skins can only change/remove slots. But, you can add a slot that is completely hidden and built-in in the base hull, and then change it into a "regular"/used slot in the skin; it's something I've considered doing myself.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3447 on: July 19, 2017, 11:53:06 AM »

Soooo, I have a puzzler.

Is there a way to have a Weapon that:

1.  Is not visible in the Weapon Group UI...
2. ...but can take damage as normal?

It looks like the answer to this is no; I'm wondering if there's any way to use WeaponGroupAPI to remove them from that UI, maybe? 

Or at least relegate them to Group 5 automatically?

Sorry to bug you folks with something this obscure, but, well, I got my fake Engines to behave correctly, except for this QoL issue.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3448 on: July 19, 2017, 11:56:06 AM »

TrashMan: I can't say why the weapon would be failing to EMP nearby weapons/engines on a hull hit. But for good effectiveness in general against larger ships, it's probably easiest to give it an EMP arc effect like vanilla's Ion Cannon has, so it can disable far-away parts of the target.

I suspect EMP effect and explosion radius don't work together..which is strange. That's the only explanation I have, 500 radius for an explosion is a lot.
« Last Edit: July 22, 2017, 07:03:24 AM by TrashMan »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3449 on: July 19, 2017, 12:04:04 PM »

It looks like the answer to this is no; I'm wondering if there's any way to use WeaponGroupAPI to remove them from that UI, maybe?

Offhand, that seems like it'd work. That's what's used to remove critically-malfunctioning weapons.
Logged
Pages: 1 ... 228 229 [230] 231 232 ... 706