Fractal Softworks Forum

Starsector => Mods => Modding Resources => Topic started by: Alex on January 30, 2012, 08:56:29 AM

Title: Modding Tools & Resources
Post by: Alex on January 30, 2012, 08:56:29 AM
Ship/Variant Editors

Community Mod Tools

Scripting
Starfarer uses the Janino (http://docs.codehaus.org/display/JANINO/Home) compiler for all scripting. Check the above link for a list of what subset of Java functionality it supports.

Code Libraries

Tutorials and References

Assets

Recommended Programs
Title: Re: Modding Tools & Resources
Post by: medikohl on February 23, 2012, 08:21:17 PM
sprites for public use.
http://fractalsoftworks.com/forum/index.php?topic=1131.0
Title: Re: Modding Tools & Resources
Post by: icepick37 on February 25, 2012, 01:50:24 PM
If you use openoffice or libreoffice, here's how to set up when opening csv files. It will save them correctly afterwards as well.

Also make sure to set the formatting on the cells you are editing to number. Easiest fix is (if you want ALL the numbers to show up as numbers and not dates or something else) to click on the rectangle in the upper right of the cells (or ctrl+a, or edit->Select_Alll). Then you right-click and select "Format Cells..." (should be second entry), and make sure Number is selected in the right-most column, General in the second, and then click okay.

Also: notepad++, libreoffice, and Gimp are all awesome and free fyi

[attachment deleted by admin]
Title: Re: Modding Tools & Resources
Post by: Psiyon on February 29, 2012, 06:38:55 PM
I'd just like to throw these here:

Turning your 3D models into sprites tutorial: http://fractalsoftworks.com/forum/index.php?topic=654.0

Free assets: http://fractalsoftworks.com/forum/index.php?topic=347.0
Title: Re: Modding Tools & Resources
Post by: Trylobot on March 20, 2012, 11:27:37 AM
My ship editor has finally reached v1.0 and feature-completeness. It's still in the same thread as before.
Title: Re: Modding Tools & Resources
Post by: Alex on March 20, 2012, 12:41:00 PM
My ship editor has finally reached v1.0 and feature-completeness. It's still in the same thread as before.

Updated. Looks great!

Did have a question - how does one edit weapon slot data? Do you just have to type the values in, or can you click somewhere to cycle them or some such?
Title: Re: Modding Tools & Resources
Post by: Upgradecap on March 20, 2012, 12:44:14 PM
My ship editor has finally reached v1.0 and feature-completeness. It's still in the same thread as before.

Updated. Looks great!

Did have a question - how does one edit weapon slot data? Do you just have to type the values in, or can you click somewhere to cycle them or some such?
I figured you type the weapon id's yourself, since i didn't find a clue as to how to set the weapon id. Or is there a other way?
Title: Re: Modding Tools & Resources
Post by: Trylobot on March 20, 2012, 12:53:06 PM
how does one edit weapon slot data?
I figured you type the weapon id's yourself, since i didn't find a clue as to how to set the weapon id. Or is there a other way?

Switch to Weapons mode with [W], and press [T]. At that point you're editing the weapon instance that happened to be nearest to your cursor when you pressed [T].

Also, I know it's intimidating with all the keyboard shortcuts and so on, but my main goal with this tool was precision.
Title: Re: Modding Tools & Resources
Post by: Alex on March 20, 2012, 12:55:10 PM
Ah, got it. I think what confused me was the lack of some kind of cursor to indicate text entry.
Title: Re: Modding Tools & Resources
Post by: Upgradecap on March 20, 2012, 01:15:43 PM
how does one edit weapon slot data?
I figured you type the weapon id's yourself, since i didn't find a clue as to how to set the weapon id. Or is there a other way?

Switch to Weapons mode with [W], and press [T]. At that point you're editing the weapon instance that happened to be nearest to your cursor when you pressed [T].

Also, I know it's intimidating with all the keyboard shortcuts and so on, but my main goal with this tool was precision.
Wait, i was talking about setting the weapon itself, is it possible?
Title: Re: Modding Tools & Resources
Post by: Trylobot on March 20, 2012, 01:29:23 PM
This editor doesn't produce *.variant files at all, because they are trivial and do not require graphical aid or reference
Title: Re: Modding Tools & Resources
Post by: Trylobot on March 21, 2012, 06:22:29 PM
Another good resource, I'm told (and it does look promising), for spriting is the "Battleships Forever Editor"

Download: http://www.wyrdysm.com/bfdownload.php (http://www.wyrdysm.com/bfdownload.php)
Manual: http://www.wyrdysm.com/phpBB3/viewtopic.php?t=3494 (http://www.wyrdysm.com/phpBB3/viewtopic.php?t=3494)
Title: Re: Modding Tools & Resources
Post by: K-64 on April 02, 2012, 03:26:04 PM
I don't suppose someone could say what a decent spreadsheet application would be for getting ship data and all that sorted out. I know that I have found using OpenOffice is like pulling teeth since it likes to chuck the formatting of everything to whack. It might also help other people that keep getting the "id" not found thing, as I believe that's the cause of the problem 9 times out of 10.

Admittedly, it's only really the wing data and weapon data that I'm having annoyances with now thanks to the ship editors that are out there
Title: Re: Modding Tools & Resources
Post by: icepick37 on April 02, 2012, 03:58:26 PM
I explained earlier in the thread how to make OpenOffice play nice. : )
Title: Re: Modding Tools & Resources
Post by: K-64 on April 02, 2012, 04:54:29 PM
I er... you edited that in! ;D

Apologies for my incompetence. Thought I had read through everything here, shows what I know ;P
Title: Re: Modding Tools & Resources
Post by: Uomoz on April 29, 2012, 08:56:21 AM
Ships balance Suite from keptin needs to be added here imho: http://fractalsoftworks.com/forum/index.php?topic=2382.0
Title: Re: Modding Tools & Resources
Post by: Psiyon on May 07, 2012, 12:04:49 PM
Ugh, I keep forgetting to add my hardcore kitbashing tutorial: http://www.youtube.com/watch?v=8Wr3O4yPxZg

There.
Title: Re: Modding Tools & Resources
Post by: Avan on June 02, 2012, 12:58:26 PM
Tutorial I wrote up for my latest art style/workflow:
http://fractalsoftworks.com/forum/index.php?topic=22.msg42735#msg42735
Title: Re: Modding Tools & Resources
Post by: Upgradecap on June 11, 2012, 11:24:24 AM
I'll just have to say this, the openoffice doesn't play nicley with me at all with the configuration previously mentioned. Whenever i try to type 0.8 (for E.G shield values) It always registers it as 2008-08-08. Anyone got a clue as to why it does this? :/
Title: Re: Modding Tools & Resources
Post by: bluntfang on July 31, 2012, 05:03:57 PM
Is there an idiots guide to starfarer modding anywhere? I have modded games like Morrowind, Medieval Total War, and the like, but for the life of me I can't see much I can change outside the spreadsheets.
Title: Re: Modding Tools & Resources
Post by: Psiyon on July 31, 2012, 07:07:33 PM
Is there an idiots guide to starfarer modding anywhere? I have modded games like Morrowind, Medieval Total War, and the like, but for the life of me I can't see much I can change outside the spreadsheets.
This page might be of help: http://starfarer.thegamewiki.com/wiki/Modding
Title: Re: Modding Tools & Resources
Post by: Alex on July 31, 2012, 07:11:40 PM
Is there an idiots guide to starfarer modding anywhere? I have modded games like Morrowind, Medieval Total War, and the like, but for the life of me I can't see much I can change outside the spreadsheets.
This page might be of help: http://starfarer.thegamewiki.com/wiki/Modding

Oh, nice! Added it to the OP.
Title: Re: Modding Tools & Resources
Post by: icepick37 on August 01, 2012, 12:15:18 PM
I'll just have to say this, the openoffice doesn't play nicley with me at all with the configuration previously mentioned. Whenever i try to type 0.8 (for E.G shield values) It always registers it as 2008-08-08. Anyone got a clue as to why it does this? :/

That's the formatting...  Hrm...  I can update my post to show how to avoid that problem.
Title: Re: Modding Tools & Resources
Post by: K-64 on August 08, 2012, 06:37:47 PM
Just had a thought while looking back at this thread (http://fractalsoftworks.com/forum/index.php?topic=3723.0), and seeing that some of the more "basic" modding tools weren't here. Now when I say basic I don't mean that they aren't powerful or anything, quite the opposite really. I'm meaning the things that aren't specifically designed for Starfarer. They may be used by a large number of folks already, but I think it's still good practise to have them there, just so that anyone who doesn't have them can have their job done a hell of a lot easier

Paint.NET (http://www.getpaint.net/): Very useful tool for spriting work, what with the layering, effects and various tools at the user's disposal.
OpenOffice (http://www.openoffice.org/): I find it essential for the .csv files, although that might just be me only really able to read large amounts of data when it's in a clear structured layout
NOTE: OpenOffice will need separators set like this to work properly
Spoiler
(https://dl.dropbox.com/u/15428102/separators.png)
[close]
Notepad++ (http://notepad-plus-plus.org/): Makes coding all those .java files much easier, with syntax recognition and colouring. Finding bugs relating to forgotten commas or brackets is simplicity itself

I'm not sure if these have been discussed in the thread, but it might be worthwhile to chuck them in the OP, just to give starting modders that little leg-up on the ladder
Title: Re: Modding Tools & Resources
Post by: Griffinhart on August 08, 2012, 06:57:35 PM
For those of you who don't want to install Open/LibreOffice, Google Docs supports .csv.

-- Griffinhart
Title: Re: Modding Tools & Resources
Post by: LazyWizard on August 11, 2012, 04:33:31 PM
Would it be possible to get these (http://fractalsoftworks.com/forum/index.php?topic=3174.msg45983) two (http://fractalsoftworks.com/forum/index.php?topic=3173.msg45967) tutorials added to the list?

Also, the break/continue bug is fixed in the latest Starfarer update, so the "Scripting" section should be updated. :)
Title: Re: Modding Tools & Resources
Post by: mendonca on August 13, 2012, 12:41:35 AM
Would it be possible to get these (http://fractalsoftworks.com/forum/index.php?topic=3174.msg45983) two (http://fractalsoftworks.com/forum/index.php?topic=3173.msg45967) tutorials added to the list?

Sorted  :)
Title: Re: Modding Tools & Resources
Post by: Nekora on November 01, 2012, 01:28:08 AM
Anyone know where i can get information on WPN files?
Title: Re: Modding Tools & Resources
Post by: mendonca on November 01, 2012, 04:23:29 AM
Anyone know where i can get information on WPN files?

Hmmm ... not sure there have been that many threads or detailed discussions on these particularly.

I think the general strategy people take when making a new weapon is 'copy the nearest one; look at other ones that do what you want and experiment until it works ...'

I found a few threads with a bit more info (none that could be called 'tutorials' though):

http://fractalsoftworks.com/forum/index.php?topic=3244.msg47841#msg47841

http://fractalsoftworks.com/forum/index.php?topic=4343.msg67569#msg67569

http://fractalsoftworks.com/forum/index.php?topic=928.msg9024#msg9024

Feel free to start your own thread, if you have any specific issues you are coming across that the more experienced weapon modders can help you with.
Title: Re: Modding Tools & Resources
Post by: Arakash on June 23, 2014, 06:29:16 AM
This is a very old thread and i dont want to be accused of necroing threads, but i feel i am justified in commenting on it as it is a sticky.

The Wiki link provided on modding on the first page is no longer functioning.
Title: Re: Modding Tools & Resources
Post by: ValkyriaL on June 23, 2014, 06:44:35 AM
Its a sticky thread so it's never really "old" :)
Title: Re: Modding Tools & Resources
Post by: Delta7 on July 29, 2015, 01:22:09 PM
not sure where to post this... ill just leave it here and hope someone who knows what they're doing finds it.

built in weapons are not supported by trylobot's ship editor, as such i thought i'd put together a quick tutorial on it so maybe any newcomers arent as hopelessly confused as i was at first.

basically, plop a bit of text in there saying "builtInWeapons": followed by the weapon system id in between a set of "", followed by the type of weapon. when you're finished it should look something like this: "builtInWeapons": {  "WS 001": "tpc", "WS 002": "tpc" },
that bit of text will set the weapon systems with the id 1 and 2 to be designated as built in thermal pulse cannons.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
if you're lazy (or terrified of screwing something up)
-copy and paste the example bit into the ship file
-change the "WS 001" to be whatever weapon slot number you want it to be, and do this with all the slots you want to designate as built in weapons
-change the part that says "tpc" to whatever weapon type you want to be built into that slot
-the list of vanilla weapons can be found in: "\Starsector\Fractal Softworks\Starsector\starsector-core\data\weapons"
Title: Re: Modding Tools & Resources
Post by: Lcu on July 30, 2015, 02:20:57 AM
I don't remember it messing up built in weapons. It worked just fine when i made a built in weapon (a long time ago. I might not remember that it actually went wrong or not).
Title: Re: Modding Tools & Resources
Post by: Tartiflette on July 30, 2015, 02:30:33 AM
I don't remember it messing up built in weapons. It worked just fine when i made a built in weapon (a long time ago. I might not remember that it actually went wrong or not).
Nothing, it works perfectly fine.
Title: Re: Modding Tools & Resources
Post by: Garmine on December 08, 2015, 09:51:02 AM
(Shouldn't TwigLib be added to the first post? :))
Title: Re: Modding Tools & Resources
Post by: TrashMan on December 22, 2015, 12:47:22 PM
Why does the link to Variant extractor lead to Eclipse tutorial?
Title: Re: Modding Tools & Resources
Post by: King Alfonzo on July 05, 2016, 06:18:09 PM
Not sure if necroing, but this (http://fractalsoftworks.com/starfarer.api/) is useful if you're modding starsector - it's a library of all the APIs used in the game. If I had known this existed I wouldn't have asked about any of the commands to change ship stats in hullmods.
Title: Re: Modding Tools & Resources
Post by: Tartiflette on July 05, 2016, 11:11:49 PM
It is one of the pinned topics in the Documentation section (http://fractalsoftworks.com/forum/index.php?board=10.0).
Title: Re: Modding Tools & Resources
Post by: Ragni on May 29, 2017, 09:28:45 AM
in the OP, this URL is decayed:
"Modding wiki - lots of good information in one place" ( http://starfarer.thegamewiki.com/wiki/Modding )

Is this the correct url now?:
http://starsector.wikia.com/wiki/Modding
Title: Re: Modding Tools & Resources
Post by: bananana on August 13, 2017, 09:45:33 PM
maybe this http://fractalsoftworks.com/forum/index.php?topic=11817.0 should be added here? it's important and hard to find.
Title: Re: Modding Tools & Resources
Post by: Vayra on January 11, 2019, 12:10:02 PM
Any chance I can get this added to the list, and maybe moved to this subforum? http://fractalsoftworks.com/forum/index.php?topic=14905.0  ;D
Title: Re: Modding Tools & Resources
Post by: Üstad on April 22, 2020, 09:44:01 AM
There might be guide or tool for it but I didnt see any resource on how to edit hullmods. Any help?

Also will AI automatically use newly created hullmods?
Title: Re: Modding Tools & Resources
Post by: SafariJohn on April 26, 2020, 06:55:39 AM
A hullmod is a java file extending BaseHullMod, an icon, and a line in hull_mods.csv. Then you can teach it to a faction by putting the hullmod's ids in the faction's known hullmods list. New fleets can generate with the hullmod immediately.
Title: Re: Modding Tools & Resources
Post by: Üstad on April 27, 2020, 11:18:18 AM
A hullmod is a java file extending BaseHullMod, an icon, and a line in hull_mods.csv. Then you can teach it to a faction by putting the hullmod's ids in the faction's known hullmods list. New fleets can generate with the hullmod immediately.
I changed some already existing hullmods that was in "Starsector\starsector-core\data\hullmods" folder and they seemed work just fine. Homewer when I changed the ones in starfarer.api.zip folder, the game does not recognizes the changes I made. I changed how efficiency overhoul, auxillary tanks work but I couldn't make them work.
Title: Re: Modding Tools & Resources
Post by: AxleMC131 on April 27, 2020, 10:19:24 PM
I changed some already existing hullmods that was in "Starsector\starsector-core\data\hullmods" folder and they seemed work just fine. Homewer when I changed the ones in starfarer.api.zip folder, the game does not recognizes the changes I made. I changed how efficiency overhoul, auxillary tanks work but I couldn't make them work.

The API is a mirror of the game's source code, which exists purely for player/modder reference. The game doesn't read the API as it already has all those files compiled inside its source code, which is why editing them doesn't change anything.
Title: Re: Modding Tools & Resources
Post by: Üstad on April 29, 2020, 03:42:41 PM
I changed some already existing hullmods that was in "Starsector\starsector-core\data\hullmods" folder and they seemed work just fine. Homewer when I changed the ones in starfarer.api.zip folder, the game does not recognizes the changes I made. I changed how efficiency overhoul, auxillary tanks work but I couldn't make them work.

The API is a mirror of the game's source code, which exists purely for player/modder reference. The game doesn't read the API as it already has all those files compiled inside its source code, which is why editing them doesn't change anything.
Thanks you for your interest. Well I couldn't found the logistical hullmods in the normal hullmod folder, is there any way to work on them?
Title: Re: Modding Tools & Resources
Post by: AxleMC131 on April 29, 2020, 10:19:45 PM
Thanks you for your interest. Well I couldn't found the logistical hullmods in the normal hullmod folder, is there any way to work on them?

Unfortunately, because those scripts are compiled in the source code, they can't be edited. (I would also advise against editing any vanilla files.) For such scripts, the proper course of action is to create a mini-mod with its own custom versions of those scripts, and set to overwrite the vanilla files.

I should also mention that this thread is supposed to be a compendium of general modding resources rather than direct advice or help, so if you have further questions for setting this up I suggest you create a new thread or post the questions in the Misc Modding Questions (http://fractalsoftworks.com/forum/index.php?topic=5061.0) thread.
Title: Re: Modding Tools & Resources
Post by: rpek32 on April 09, 2021, 06:10:50 PM
Is it possible to make localization to another language via mod?
Title: Re: Modding Tools & Resources
Post by: unobtrusiveSpacefarer on June 28, 2021, 10:10:25 AM
Hi everyone.

I have an idea for a new industry but I have absolutely no experience modding or programming in Java. Is there a resource specifically about industries anywhere?
Title: Re: Modding Tools & Resources
Post by: Wispborne on July 23, 2021, 07:52:42 PM
I'd like to suggest a guide that I wrote on the wiki, Intro to Programming.

https://starsector.fandom.com/wiki/Intro_to_Programming

Contents
    1 What is programming?
    2 Java or Kotlin
    3 Learning to Program
        3.1 Java
        3.2 Kotlin
    4 Compiled .jar vs Janino
    5 Getting Set Up (IDEs)
        5.1 Choosing an IDE
        5.2 Setting up an IDE
            5.2.1 IntelliJ
            5.2.2 NetBeans
            5.2.3 Eclipse
            5.2.4 VS Code
    6 Mod Templates


edit: On second thought, never mind. I'll just add it here: https://starsector.fandom.com/wiki/Modding#Tutorials
I hadn't noticed that that was linked on the first post.
Title: Re: Modding Tools & Resources
Post by: Jackundor on April 10, 2022, 01:47:04 PM
Ok, can anyone bloody explain me how to use the pixel mass counter? i know that you have to edit the .bat with notepad++ or something like that but if the folder path to your file has a folder with blank spaces it doesn't work