Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Ghoti on September 10, 2012, 12:56:06 PM

Title: Is it possible for mods to read .json files?
Post by: Ghoti 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?
Title: Re: Is it possible for mods to read .json files?
Post by: Alex on September 10, 2012, 01:08:56 PM
No. Something I'd like to add to the API at some point, though.
Title: Re: Is it possible for mods to read .json files?
Post by: Ghoti 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
Title: Re: Is it possible for mods to read .json files?
Post by: Alex 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 :)
Title: Re: Is it possible for mods to read .json files?
Post by: Ghoti on September 10, 2012, 01:36:50 PM
oh yah... Well. I guess this should be moved to suggestions then. I guess  :-[