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)

Author Topic: Is it possible for mods to read .json files?  (Read 1799 times)

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
Is it possible for mods to read .json files?
« on: September 10, 2012, 12:56:06 PM »

I'm planning to make a station that breaks down weapons and ships to make new weapons and ships. I will need to make a list of items and what those items break down into. I don't like putting that data inside the script. I'd rather have it in a JSON file. Is that possible?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Is it possible for mods to read .json files?
« Reply #1 on: September 10, 2012, 01:08:56 PM »

No. Something I'd like to add to the API at some point, though.
Logged

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
Re: Is it possible for mods to read .json files?
« Reply #2 on: September 10, 2012, 01:15:56 PM »

We can add and read settings though can't we? Or would that be a horrible idea?  ;D
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Is it possible for mods to read .json files?
« Reply #3 on: September 10, 2012, 01:33:27 PM »

Well:

public interface SettingsAPI {
   public float getFloat(String key);
   public boolean getBoolean(String key);
}

That doesn't seem sufficient :)
Logged

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
Re: Is it possible for mods to read .json files?
« Reply #4 on: September 10, 2012, 01:36:50 PM »

oh yah... Well. I guess this should be moved to suggestions then. I guess  :-[
Logged