Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Ladean on June 05, 2019, 10:40:59 PM

Title: I want to make ships, were do i start?
Post by: Ladean on June 05, 2019, 10:40:59 PM
I want t add ships to the independent, custom ships.

how do i make the sprites, then fill them with weapon placements and all other things you need to get a working ship in starsector.

I know little to nothing about codeing but im willing to learn.

My goal is to have a few custom combat ships spawning in the independent markets in Nexerelin.
Title: Re: I want to make ships, were do i start?
Post by: TrashMan on June 06, 2019, 12:33:45 AM
1. actually make the ship sprites (Paint, Photoshop or whatever program). Use vanilla ships for size referrence

2. Get the ship editor (in the modding subforum). Once you load your sprite into it, you can define boundig boxes, collision spheres, engines, weapons, etc.. and create the hull files with it. You can also do that manually, but it's a pain in the ass.
Note that mount sizes and type you will probably have to edit by hand.

3. Once that is done you need a variant (an equipped hull). The editor can also make variant, and they can also be made easily by hand. Again, simply looking at any vanilla file will tell you all you need to know.

4. That variant needs to be named in ship_roles file (in the world/faction folder) for the game to use it

5. That hull needs to be specified in the .faction file as a ship the faction knows/uses

DONE.
Title: Re: I want to make ships, were do i start?
Post by: Thaago on June 06, 2019, 09:22:56 AM
http://fractalsoftworks.com/forum/index.php?topic=14905.0

:D
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 06, 2019, 10:49:31 PM
okay so i made a sprite, i got the mod_info.json thing done...

however i ran into something as i was following the tutorial...
 I cant view the ship data of anything but my own thing and its not combined with the data.

{   Column 02
  bounds": [
    -68.5,
    -21.5,
    -60.5,
    -27.5,
    -17,
    -39.5,
    5,
    -39,
    53.5,
    -27.5,
    71.5,
    -8.5,
    71.5,
    8.5,
    53.5,
    27.5,
    5,
    39,
    -17,
    39.5,
    -60.5,
    27.5,
    -68.5,
    21.5
  ],
  "builtInWings": [],
  "center": [
    42,
    79.5
  ],
  "collisionRadius": 96.5,
  "engineSlots": [
    {
      "angle": 180,
      "contrailSize": 55,
      "length": 69.5,
      "location": [
        -68,
        -0.5
      ],
      "style": "LOW_TECH   
      width": 55
    }
  ],
  "height": 160,
  "hullId": "gigagates_gigiagate   
  hullName": "Gigagate\r   
  hullSize": "CRUISER   
  shieldCenter": [
    0,
    -0
  ],
  "shieldRadius": 82.5,
  "spriteName": "graphics/ships/gigagates_gigagate.png.png   
  style": "LOW_TECH   
  viewOffset": 0,
  "weaponSlots": [
    {
      "angle": 90,
      "arc": 195,
      "id": "WS0001   
      locations": [
        -6.5,
        23
      ],
      "mount": "TURRET   
      size": "MEDIUM   
      type": "BALLISTIC   
    }   
    {   
      angle": -90,
      "arc": 195,
      "id": "WS0002   
      locations": [
        -6.5,
        -23
      ],
      "mount": "TURRET   
      size": "MEDIUM   
      type": "BALLISTIC   
    }   
    {   
      angle": -180,
      "arc": 173,
      "id": "WS0006   
      locations": [
        -15.5,
        -0
      ],
      "mount": "TURRET   
      size": "SMALL   
      type": "UNIVERSAL   
    }   
    {   
      angle": -45,
      "arc": 90,
      "id": "WS0003   
      locations": [
        5,
        -6.5
      ],
      "mount": "HIDDEN   
      size": "SMALL   
      type": "MISSILE   
    }   
    {   
      angle": 45,
      "arc": 93,
      "id": "WS0004   
      locations": [
        5,
        6.5
      ],
      "mount": "HIDDEN   
      size": "SMALL   
      type": "MISSILE   
    }   
    {   
      angle": 180,
      "arc": 265,
      "id": "WS0007   
      locations": [
        -40.5,
        -0
      ],
      "mount": "TURRET   
      size": "SMALL   
      type": "BALLISTIC   
    }   
    {   
      angle": 0,
      "arc": 277,
      "id": "WS0008   
      locations": [
        37.5,
        -0
      ],
      "mount": "TURRET   
      size": "SMALL   
      type": "BALLISTIC   
    }   
  ]   
  width": 84
}   


then i have this.

designation   tech/manufacturer   system id   fleet pts   hitpoints   armor rating   max flux   8/6/5/4%   flux dissipation   ordnance points   fighter bays   max speed   acceleration   deceleration   max turn rate   turn acceleration   mass   shield type   defense id   shield arc   shield upkeep   shield efficiency   phase cost   phase upkeep   min crew   max crew   cargo   fuel   fuel/ly   range   max burn   base value   cr %/day   CR to deploy   peak CR sec   CR loss/sec   supplies/rec   supplies/mo   hints   tags   rarity   breakProb   minPieces   maxPieces   number
gigagate      LAD.C0      test   100   7500   2500   2500      250   100      60   10   10   10   10   2500   OMNI      30   1   1         30   60   30   60   3   150   5   200000   4   10   600   0.25   10   10         0.35   0.5   2   2   

dont know how to format that here, but i have everything the tutorial said i needed to have. it then seys i could spawn it in, but i can and it always seys its not there. what do i do? 0-0

[attachment deleted by admin]
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 06, 2019, 11:54:04 PM
however i ran into something as i was following the tutorial...
 I cant view the ship data of anything but my own thing and its not combined with the data.

dont know how to format that here, but i have everything the tutorial said i needed to have. it then seys i could spawn it in, but i can and it always seys its not there. what do i do? 0-0


Could you clarify?
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 12:18:08 AM
sorry for the typo's..

I cant spawn the ship by console commands, it will say it dose not exist.

when i go to view the file all i can get is the big part of the code and not the ship data, is the ship data and ship file not ment to be together or is there something up.

anouther way to explain this, the two code walls i have posted are two different files yet when i go to any other ship all i get is just the top codeing and not the ship data.

i dont understand how the ship maker just puts the top code into a file and save the ship_data away form the ship file
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 12:31:59 AM
Could you post a picture of your .ship file and your ship_data.csv?


Edit: Nevermind, just the csv. Thankfully i'm just idly kitbashing ships so I have plenty of time to help you.  ;D
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 12:35:24 AM
Could you post a picture of your .ship file and your ship_data.csv?
will do, but the code walls are those files
Title: Re: I want to make ships, were do i start?
Post by: TrashMan on June 07, 2019, 12:39:04 AM
  "spriteName": "graphics/ships/gigagates_gigagate.png.png   

missing " at the end?

Actually, it seems you have a lot of similar errors. Did you generate this file with shipedit?
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 12:42:54 AM
  "spriteName": "graphics/ships/gigagates_gigagate.png.png   

missing " at the end?

Actually, it seems you have a lot of similar errors. Did you generate this file with shipedit?
yes i did, i could not not get a example sheet from any other file becasue the top code wall would be the only thing that shows up when i open any other file.

so wait, your not supposed to use the ship editor to give the stats?
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 12:52:28 AM
I'm pretty sure you shouldn't since the ship editor is a bit outdated.


Try using Hull Mode only.
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 12:58:51 AM
I'm pretty sure you shouldn't since the ship editor is a bit outdated.


Try using Hull Mode only.
okay i deleted everything, i have my ship sprite were it should be and i have my ship set up in the editor its named "Gigagate MK1"

ship.hullid     gigagates_gigagate
ship.hullname    Gigagate MK1
ship.hullsize     cruiser  and its a lowtech.

now were do i save it to

Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 01:04:12 AM
"Mod_Name"->"Data"->"Hulls"


Also, I made a ship file out of your sprite (Just remove the ".txt"). So you can fall back to this if your version still doesn't work.  :)

[attachment deleted by admin]
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 01:05:13 AM
"Mod_Name"->"Data"->"Hulls"
alright now my main beef, how do i get it to have stats?
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 01:18:25 AM
Go to


Starsector->starsector-core->Hulls


then copy it to your mod's "hulls" folder. Open it, then delete the lines 2 until 172. After that, open up the original ship_data file and copy the line with the "Falcon" (or any cruiser sized ship) and paste it to line 2 of your mod's ship_data file for reference. Change the falcon to your hull id and change all the values to whatever you see fit.


Also, take care not to accidentally replace anything in the starsector-core's ship_data.
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 01:21:20 AM
Go to


Starsector->starsector-core->Hulls


then copy it to your mod's "hulls" folder. Open it, then delete the lines 2 until 172. After that, open up the original ship_data file and copy the line with the "Falcon" (or any cruiser sized ship) and paste it to line 2 of your mod's ship_data file for reference. Change the falcon to your hull id and change all the values to whatever you see fit.


Also, take care not to accidentally replace anything in the starsector-core's ship_data.
do you mean starsectorcore>data>hulls?
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 01:26:18 AM
okay whoa, i already have a hull file, i dont understand anything your saying to do... sorry this is my first time doing this
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 01:28:36 AM
No worries. I learned how to mod ships from just reverse engineering everything.  :P


Wait up. Lemme just attach a file of what your ship_data.csv and data file should look like.
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 01:32:24 AM
No worries. I learned how to mod ships from just reverse engineering everything.  :P


Wait up. Lemme just attach a file of what your ship_data.csv and data file should look like.
thanks man, the problem i have is that i dont get the stats of the ships, i just get the top part of what i posted the first time
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 01:40:19 AM
Attempt number two.  ::)
Apparently I can't attach .csv files. Just delete the .txt extension from the ship_data file and it should work.

[attachment deleted by admin]
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 01:50:33 AM
im useing rons editor, i see no txt thing anywere..

{   Column 02
  bounds": [
    53,
    27.5,
    70.5,
    10.5,
    70.5,
    -10.5,
    53,
    -27.5,
    -8,
    -40.5,
    -70,
    -22,
    -70,
    22,
    -8,
    40.5
  ],
  "builtInWings": [],
  "center": [
    42,
    80.5
  ],
  "collisionRadius": 105,
  "engineSlots": [
    {
      "angle": 180,
      "contrailSize": 63,
      "length": 67.5,
      "location": [
        -70,
        -0.5
      ],
      "style": "LOW_TECH   
      width": 63
    }
  ],
  "height": 160,
  "hullId": "gigagates_gigagate   
  hullName": "Gigagate MK1   
  hullSize": "CRUISER   
  shieldCenter": [
    -0.5,
    0
  ],
  "shieldRadius": 87.5,
  "spriteName": "graphics/ships/gigagates_gigagate.png   
  style": "LOW_TECH   
  viewOffset": 0,
  "weaponSlots": [
    {
      "angle": 90,
      "arc": 189,
      "id": "WS0001   
      locations": [
        -7.5,
        23
      ],
      "mount": "TURRET   
      size": "MEDIUM   
      type": "BALLISTIC   
    }   
    {   
      angle": -90,
      "arc": 188,
      "id": "WS0002   
      locations": [
        -7.5,
        -23
      ],
      "mount": "TURRET   
      size": "MEDIUM   
      type": "BALLISTIC   
    }   
    {   
      angle": 45,
      "arc": 90,
      "id": "WS0003   
      locations": [
        4,
        6.5
      ],
      "mount": "HIDDEN   
      size": "SMALL   
      type": "MISSILE   
    }   
    {   
      angle": -45,
      "arc": 90,
      "id": "WS0004   
      locations": [
        4,
        -6.5
      ],
      "mount": "HIDDEN   
      size": "SMALL   
      type": "MISSILE   
    }   
    {   
      angle": 180,
      "arc": 183,
      "id": "WS0005   
      locations": [
        -16.5,
        -0
      ],
      "mount": "TURRET   
      size": "SMALL   
      type": "UNIVERSAL   
    }   
    {   
      angle": 180,
      "arc": 264,
      "id": "WS0006   
      locations": [
        -41.5,
        -0
      ],
      "mount": "TURRET   
      size": "SMALL   
      type": "BALLISTIC   
    }   
    {   
      angle": 0,
      "arc": 275,
      "id": "WS0007   
      locations": [
        36.5,
        -0
      ],
      "mount": "TURRET   
      size": "SMALL   
      type": "BALLISTIC   
    }   
  ]   
  width": 84
}   

this what i see when i open the file, do i add something here?
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 01:53:24 AM
this is the atles

{   Column 02
    bounds": [
        271,
        10,
        249,
        59,
        221,
        64,
        218,
        70,
        23,
        71,
        16,
        61,
        -14,
        73,
        -16,
        87,
        -39,
        85,
        -42,
        60,
        -54,
        53,
        -81,
        58,
        -99,
        37,
        -103,
        0,
        -100,
        -37,
        -82,
        -57,
        -53,
        -52,
        -43,
        -60,
        -40,
        -81,
        -15,
        -86,
        -14,
        -69,
        18,
        -60,
        22,
        -70,
        219,
        -71,
        222,
        -62,
        249,
        -58,
        271,
        -7,
        265,
        1
    ],
    "builtInMods": ["civgrade"],
    "center": [
        99,
        108
    ],
    "collisionRadius": 330,
    "engineSlots": [
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 32,
            "location": [
                -99,
                44
            ],
            "style": "MIDLINE   
            width": 8
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 48,
            "location": [
                -101,
                33
            ],
            "style": "MIDLINE   
            width": 12
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 48,
            "location": [
                -104,
                17
            ],
            "style": "MIDLINE   
            width": 12
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 96,
            "location": [
                -104,
                0
            ],
            "style": "MIDLINE   
            width": 24
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 48,
            "location": [
                -104,
                -17
            ],
            "style": "MIDLINE   
            width": 12
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 48,
            "location": [
                -101,
                -32
            ],
            "style": "MIDLINE   
            width": 12
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 32,
            "location": [
                -99,
                -44
            ],
            "style": "MIDLINE   
            width": 8
        }
    ],
    "height": 400,
    "hullId": "atlas   
    hullName": "Atlas   
    hullSize": "CAPITAL_SHIP   
    shieldCenter": [
        84,
        0
    ],
    "shieldRadius": 230,
    "spriteName": "graphics/ships/atlas_af.png   
    style": "MIDLINE   
    viewOffset": 0,
    "weaponSlots": [
        {
            "angle": 100,
            "arc": 210,
            "id": "WS 001   
            locations": [
                -27,
                78
            ],
            "mount": "TURRET   
            size": "SMALL   
            type": "BALLISTIC   
        }   
        {   
            angle": 260,
            "arc": 210,
            "id": "WS 002   
            locations": [
                -27,
                -78
            ],
            "mount": "TURRET   
            size": "SMALL   
            type": "BALLISTIC   
        }   
        {   
            angle": 0,
            "arc": 210,
            "id": "WS 003   
            locations": [
                241,
                0
            ],
            "mount": "TURRET   
            size": "SMALL   
            type": "BALLISTIC   
        }   
        {   
            angle": 0,
            "arc": 5,
            "id": "WS 005   
            locations": [
                265,
                0
            ],
            "mount": "HIDDEN   
            size": "SMALL   
            type": "SYSTEM   
        }   
        {   
            angle": 140,
            "arc": 5,
            "id": "WS 006   
            locations": [
                -88,
                54
            ],
            "mount": "HIDDEN   
            size": "SMALL   
            type": "SYSTEM   
        }   
        {   
            angle": 220,
            "arc": 5,
            "id": "WS 007   
            locations": [
                -88,
                -54
            ],
            "mount": "HIDDEN   
            size": "SMALL   
            type": "SYSTEM   
        }   
    ]   
    width": 200
}   
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 01:58:48 AM
For some reason, everything you paste lacks a few quotation marks and commas. If you miss a single one of those, your game will crash instantly.


Try using the ship file below. it should be named gigantes.gigante.ship but I had to add the ".txt" to make the forum accept it. After you download it, remove the .txt extension and move it to your mod's data file.


As for the ship_data.csv.txt rename the file to ship_data.csv

[attachment deleted by admin]
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 02:10:40 AM
okay i did it now i have two files with the same name but one has the .ship thing "yours" on the end of it, i did not have to delete the TXT thing though, it disappeared when i clicked and draged it into the folder
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 02:16:05 AM
I'm pretty sure you have file extensions hidden. The one I made won't be read by the game unless it's a ship file. Type "file settings" in the start menu, press the view tab, and uncheck "hide file extensions"


Edit: Nevermind that ^ . Just download this file from dropbox, then extract the "hulls" file. Replace your current "Hulls" file will the one you just downloaded.


Alright this should be the right one now.
https://www.dropbox.com/s/rc52xgrg5tzxvz3/hulls.zip?dl=0 (https://www.dropbox.com/s/rc52xgrg5tzxvz3/hulls.zip?dl=0)
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 02:22:53 AM
I'm pretty sure you have file extensions hidden. The one I made won't be read by the game unless it's a ship file. Type "file settings" in the start menu, press the view tab, and uncheck "hide file extensions"
im running on windows 10, all i get is "change temporary internet files" and im useing crome
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 02:30:46 AM
Nevermind that. Just replace your hulls file with the one in dropbox.
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 02:31:45 AM
alright done, the shipdata file still seys its a rons editor type, is that okay?
Title: Re: I want to make ships, were do i start?
Post by: Oblivion on June 07, 2019, 02:33:16 AM
Yup i'm pretty sure it should be. Now that's done, you can start starsector and check if your ship's there via console commands.


Edit: Whoops one more thing. The ship id's different from the one in ship_data. You're gonna have to fix that  :P
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 02:34:28 AM
Yup i'm pretty sure it should be. Now that's done, you can start starsector and check if your ship's there via console commands.


Edit: Whoops one more thing. The ship id's different from the one in ship_data. You're gonna have to fix that  :P
will do, might have deleted half of the core files for the game... just gonna redownload it...lol
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 02:45:09 AM
oooookayyy, now every time i start it crashs and seys NULL

or it seys it missing some random thing
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 02:54:41 AM
okay after some troballll shooting i found i left the jar file on the out side of the hull foulder, i got rid of that and it works fine now, but it still wont show up, the ship, also am i doing the commaned right?

"Addship gigagates_gigagate 1"
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 03:39:07 AM
never mind, i cant do this..

i just did something and i dont know what, but i clicked something and all the mod_info.json files just went ti being "mod_info" and yet somehow still work for the other mods as they show but mine dose not anymore,t his crap is just insane, yall can take that sprite i guess.

unless anyone wants a sprites or is need of a guy who can make good ones i would not mine helping with that.
Title: Re: I want to make ships, were do i start?
Post by: Thaago on June 07, 2019, 09:58:17 AM
You have problems where your file extensions are being changed, which ruins stuff. You need to be able to see the full file name, rather than the version with no extensions that for some reason windows thinks is better:

https://www.thewindowsclub.com/show-file-extensions-in-windows

It also sounds like for some reason your various files are regularly getting corrupted (missing ", etc). What programs are you using to edit them? Notepad++ is my preferred editor for .ship files and things like that.
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 10:05:44 AM
was useing rons editor and notepad++

alright i did that and i see them now, so do i download that guys file and stuff, its still crashing is to why im asking
Title: Re: I want to make ships, were do i start?
Post by: Thaago on June 07, 2019, 10:17:25 AM
Hmmm... I've never used Ron's Editor but I've heard good things, and Notepad++ is the go to around here. I really do recommend turning file extensions on though, as the game does care what they are.

Taking the very first steps in modding is quite difficult because there are about 7 different things that all need to be perfect, and small errors in configuration can really screw things up. If you want help in real time, check out the discord; there is a channel devoted to modding and the people there are very helpful (and the author of the tutorial Vayra is usually online).
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 10:24:24 AM
will do, buy for now then i guess that guys file is worng then if its crashing.
Title: Re: I want to make ships, were do i start?
Post by: Ladean on June 07, 2019, 10:31:21 AM
how do i join this discord thing, i seen i came in as a guest but i already have a discord profile...


never mined i got it