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: Editing the simulator list  (Read 1797 times)

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Editing the simulator list
« on: July 03, 2015, 12:30:06 PM »

Hopefully this is a quick and easy one.

So, I slapped together a new and improved simulator list (vanilla ships organized by tech, more frigates and fighters, added Thunders, Herons, Falcons etc.) and ran into a problem, which is that I can either tack the new list on the end of the old list (which sort of defeats the purpose of having a more organized simulator list), or I can replace it completely... which removes mod ships from the list. Is there a better way to do this?
Logged

dd_dent

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Editing the simulator list
« Reply #1 on: July 03, 2015, 03:16:42 PM »

the replace clause in the [/b]mod_info.json[/b] controls either merging or replacing files (described below).

"replace":["data/missions/mission_list.csv"],
Optional.

Certain files - such as the mission list, weapon/ship data, sounds, etc - are merged as they're loaded. For example, the core game has a set of missions, and two other mods add a few missions each. The game will merge these files together prior to loading the merged files. This allows multiple mods to coexist, but sometimes - especially for total conversions - this is not desirable.

Adding a file to the "replace" list will ensure that the mod's copy of the file will be used as-is, instead of being merged with the core file. In the above example, the mod is saying that the missions specified in its mission_list.csv should be the only ones loaded, instead of being added to the core set of missions.

Graphics, sound, and .java files are automatically replaced and don't need to be specified here.

Mods that aren't total conversions probably shouldn't use this parameter, as they're unlikely to be compatible with other mods as a result.

I don't understand what you mean by "a better way"?
Could you elaborate?
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Editing the simulator list
« Reply #2 on: July 03, 2015, 03:18:06 PM »

Not by using the data files as far as I know. If you're comfortable with Java you could do it through code (and even include mod ships and sort them automatically), but of course that's significantly more complicated.

Edit: if you're only replacing vanilla data, you could just give users instructions to back up the sim_opponents.csv in starsector-core and replace it with your version.
« Last Edit: July 03, 2015, 03:49:20 PM by LazyWizard »
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Editing the simulator list
« Reply #3 on: July 04, 2015, 10:36:29 AM »

Yeah, just vanilla data, and that's what I thought. I'll put the Java version on my to-do list.
Logged