Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: economy.json and starmap.json do not merge!!!  (Read 2888 times)

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
economy.json and starmap.json do not merge!!!
« on: October 23, 2014, 04:07:02 AM »

I've noticed that the economy.json and starmap.json files do not merge with mod files automatically. In order to get a sector to generate, a fresh json is needed for each file WITH the new mod additions. While not game-breaking or anything, wouldn't this prevent players from loading more than one mod at a time (unless they edited the files themselves)?

For instance, with starmap.json, you need this:
Code
{
"starSystemLocations":{
"rasht":[-5000,5000],
"askonia":[1000,4000],
"corvus":[8000,-1000],
"valhalla":[7000,6000],
"arcadia":[3000,-7000],
"magec":[-3000,-4000],
"eos":[-10000,-2000]
}
}

Instead of only this:
Code
{
"starSystemLocations":{
"rasht":[-5000,5000]
        }
}
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: economy.json and starmap.json do not merge!!!
« Reply #1 on: October 23, 2014, 05:04:21 AM »

I can confirm that it does indeed prevent having more than one faction: when I try loading two mods, both systems are created but only one of them have an economy. I can't interact with the second, and it won't spawn any fleets.

[EDIT] Further testing revealed that while it is necessary to include vanilla factions in those files to have the game start, the number of fleets is then doubled. I don't know if it is because two systems are spawned on top of each other or if it's just the economy file that get taken into account twice, but the sector sure is crowded now:
Spoiler
[close]
« Last Edit: October 23, 2014, 05:23:19 AM by Tartiflette »
Logged
 

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: economy.json and starmap.json do not merge!!!
« Reply #2 on: October 23, 2014, 10:53:38 AM »

Bump because I edited the vanilla economy.json and starmap.json to make both Scy and Shadowyard working together and the massive fleet spam is still there. I archived the economy and starmap file from both those mods, so the bug isn't linked to those files being used twice.
I'll make another thread for this specific bug...

[attachment deleted by admin]
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: economy.json and starmap.json do not merge!!!
« Reply #3 on: October 23, 2014, 11:32:44 AM »

Gah, you're right. Well, I'll be fixing *this*.

Could I get a copy of a mod from one of you to test with? Ideally one with the "how it should work" starmap/economy json files, i.e. not including the vanilla stuff.

Also: there's a workaround; you could create markets and hook them up to the economy via code in ModPlugin.onNewGameAfterEconomyLoad(). That's there to enable wholly-dynamic star system creation (which economy.json doesn't - if you don't know what the markets are beforehand, you can't very well write json for them), but could be used for known markets as well. Whether its worth trying to do that is up to you.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: economy.json and starmap.json do not merge!!!
« Reply #4 on: October 23, 2014, 11:49:24 AM »

Ok, should be fixed.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4688
    • View Profile
    • GitHub profile
Re: economy.json and starmap.json do not merge!!!
« Reply #5 on: July 12, 2015, 07:13:59 AM »

While starting a Nexerelin game in Corvus mode I noticed that the Neutrino Corporation mod causes all markets in the Corvus system to be created twice (including the one it adds).

Neutrino's economy.json:
Code: json
{
"version":2.0,

"initialStepsToRun":500,
"maxExoticUtilityAtRange":14000,
"defaultConnectionMult":1,
"defaultConnectionFlat":1,
"defaultTariff":0.3,

"starSystems":[
"coronaaustralis.json",
"corvus.json",
],
"map":"../starmap.json",
}

And its corvus.json:
Code: json
{
"starSystem":"corvus",
"markets":[
{
"entities":["neut_solar"], # Star powerplant
"faction":"neutrinocorp",
"size":2,
"startingConditions":[
"trade_center",
"orbital_station",
"outpost",
"population_2",
],
},
],
}
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: economy.json and starmap.json do not merge!!!
« Reply #6 on: July 12, 2015, 09:34:47 AM »

The Neutrino economy.json shouldn't have a corvus.json entry in it - removing that should fix it.
Logged