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] 2 3

Author Topic: Mod Format Preview  (Read 73931 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Mod Format Preview
« on: May 14, 2011, 11:46:37 AM »

Update - working with version 0.35a

To get mods to work with the 0.35a preview release, add "gameVersion":"0.35a" to the descriptor. And actually make sure the mod works, too. The main issue is some stock ship variants have different ids now, and if your mod was using those, it'll need to be updated with the new ids.

Another issue is a bug with the CSV loader - it won't handle quotes correctly in the first row. - this is fixed in RC2, which is now out.

Overview

Mods can either modify existing entities (ships, weapons, missions, etc) or add entirely new ones.

The directory structure of a mod mirrors that of the game itself. In addition, each mod has a mod_info.json file at the top level which specifies its id, display name, version, and a brief description.

You can look at a mod as being a copy of the game, but containing only the parts that are different from the vanilla version.

Example Mods

Some simple mod examples to get you started:

  • Example 1: simple mod that adds one mission to the game.
  • Example 2: slightly more involved mod that adds a ship hull + variant, modifies a weapon, and adds a mission that uses the new ship. Behold my fearsome art skills on display as I boldly color-shift a sprite to create the Red Tempest. It's safe to say David was not involved in this.

Note on Adding Ships/Weapons/etc (Important!)

Anything your mod adds (a ship, a ship variant, a weapon, a mission, etc) has an id. Please use a prefix specific to your mod for these ids. For instance, in the 2nd example mod, you'll notice that the new ship's id is "ex2_red_tempest", with "ex2_" being the mod-specific prefix.

Also, put graphics your mod adds in a separate directory. If your mod name is "my_mod", you could put your ships under graphic/my_mod/ships, weapons under graphics/my_mod/weapons, etc.

If you don't do this, other mods and future versions of the game might have unintentional conflicts with your mod. That would be very, very bad.

Note: DO NOT put weapon and ship data files in a different directory. The game expects to find those under data/weapons and data/ships respectively, and these already have IDs to help tell apart. Multiple mods having the same filename for a weapon/ship is fine as long as the ids are different (see first point above).

Installing Mods

To install a mod, download it and unzip it into the "mods" directory. On Windows, it's in the installation directory. On Mac, it's right inside the application package - right-click on the application and select "Show Package Contents" to see it. On Linux, it's in the starfarer directory.

You can select which mod(s) you want to run with in the launcher.
« Last Edit: August 20, 2011, 11:53:34 AM by Alex »
Logged

mecharm

  • Ensign
  • *
  • Posts: 26
    • View Profile
Re: Mod Format Preview
« Reply #1 on: May 14, 2011, 11:50:34 AM »

Awesome, thank you! :)
Logged

SeaBee

  • Commander
  • ***
  • Posts: 142
  • The stars are ... alive and breathing
    • View Profile
Re: Mod Format Preview
« Reply #2 on: May 14, 2011, 02:55:36 PM »

Joyous! This is awesome. The mods for this game are going to be unbelievable.
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Mod Format Preview
« Reply #3 on: May 14, 2011, 04:24:57 PM »

Cool - now just to port everything over. Shouldn't be difficult at all to do.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Mod Format Preview
« Reply #4 on: May 15, 2011, 11:10:15 AM »

Joyous! This is awesome. The mods for this game are going to be unbelievable.

If stuff that's already been done is any indication, I'm inclined to agree :)

Cool - now just to port everything over. Shouldn't be difficult at all to do.

Speaking of that... seriously looking forward to actually being able to fly around in your ships!

Logged

BlacKcuD

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: Mod Format Preview
« Reply #5 on: May 18, 2011, 01:19:31 PM »

This is so awesome! I will create like the biggest capital ship ever :)
Logged

Apokus

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: Mod Format Preview
« Reply #6 on: May 19, 2011, 09:32:16 AM »

Woa, great news! :)
Good that i couldnt work on my little mod the last days (who the hell gets a flu while we have 25°C outside? -.-) ^^
Not thaaat much more to port into the new system this way :)

Btw, read about the
Quote
Improved spreadsheet loading code - should be able to handle CSV files saved with OpenOffice etc
... does that work with all versions (mean : UTF-8) or only the "normal" US/UK Settings @ open office? ^^
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Mod Format Preview
« Reply #7 on: May 19, 2011, 11:33:22 AM »

Btw, read about the
Quote
Improved spreadsheet loading code - should be able to handle CSV files saved with OpenOffice etc
... does that work with all versions (mean : UTF-8) or only the "normal" US/UK Settings @ open office? ^^

Just UTF-8, actually. If you use standard ascii stuff it won't matter much what you save it as (as long as you don't do something silly like UTF-16), but if you use any special characters make sure to save as UTF-8.

Edit: If you use any special characters, also expect it to not work. Most of the "standard" western ones (letters with accents etc) are supported by the fonts, but the vast majority of the UTF-8 set is not.
« Last Edit: May 19, 2011, 11:35:32 AM by Alex »
Logged

Apokus

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: Mod Format Preview
« Reply #8 on: May 19, 2011, 01:00:09 PM »

Unicode (UTF-8) is great :)
Logged

baxmau

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: Mod Format Preview
« Reply #9 on: May 19, 2011, 11:41:42 PM »

Alex: Do you have any plans to release the ship editor any time soon? I'm tempted to just write my own (thanks for JSON format btw :) )
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Mod Format Preview
« Reply #10 on: May 20, 2011, 09:05:59 AM »

Alex: Do you have any plans to release the ship editor any time soon? I'm tempted to just write my own (thanks for JSON format btw :) )

I think around the same time or a bit after 0.35a - the release which has the ship refit screen. Once that's in place, I'll feel comfortable that the ship file format won't need to change much, and we can release the editor and "officially" support ship modding.

Still need to tweak the editor, too - it has some UI quirks, and uses an intermediate file format (which it then exports into .ship files). I don't remember if there's any reason left for the intermediate format, might just take it out.
Logged

TheDeceit

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: Mod Format Preview
« Reply #11 on: May 30, 2011, 03:23:10 PM »

This sounds great, Alex.  Can't wait to give it a go.   :)
Logged

Hamster

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Mod Format Preview
« Reply #12 on: June 04, 2011, 05:03:33 PM »

Oh dear god this is incredible.

<3
Logged
HNNNDGH!

majormauser

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: Mod Format Preview
« Reply #13 on: June 10, 2011, 01:59:03 PM »

Mods already! I remember the days we had to wait for mods.

Thanks for 34! and especially the Mods addition that was a surprise and a gift.
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Mod Format Preview
« Reply #14 on: August 19, 2011, 08:33:43 PM »

Any specific notes on changes in .35a-pre?
Pages: [1] 2 3