Lets start this with a link to a video using which I learned how to do this https://youtube.com/watch?v=HUbEhuzHur8 made by WadeStar. This video also has his mod frame for creating a star system. I do not know how to use Java so I will explain how to create your own star system for those like myself via copy/paste+logic)

First of all I have to point out that changing starsector core system scripts will not work. If you change them nothing will happen, I tried. To insert anything into them you need to use override commands and as I said I do not know how to use Java. But they are still a good reference as to the structure of the star systems, if you find something you like in the core system you can go to (\Starsector\starsector-core\data\scripts\world)

1.png

and find the system you liked, then open it and look at its structure, there are a lot of features in core worlds that are not there in outer sector generator with custom rings/planet graphics and so on which you can try to copy into your own star system.

To create the star system you will need to use the star system mod frame mentioned above, it will have a lot of explanations in itself and the video will also explain a lot and in easy to understand form. Here I will explain the rest that I have struggled with when creating my own star system:

2.png

* First thing you see in the plugin file is this wall of text, please note that WadeStar's tutorial is for version 0.8 so I wasn't sure if all of things needed were there. I you can freely add lines your system lacks from starsector core as they are up to date. Or use one from my mod:

https://github.com/toranet2/ColonyStar

3.png

*If you change the name of the plugin file you have to change it here too(Here it is ColonyStarPlugin). If you dont the game will crash on starting up the game and log files wont tell you why.

*This here creates your star

	PlanetAPI star[star id, this is what planets orbit] = system.initStar(
		"laputa", [name of the star]
		"star_yellow", [type of the star]
		700, [size of the star in pixels]
		-7500, [x axis location in hyperspace]
		-4500, [y axis location in hyperspace]
		500); [radius corona extends from the edge of the star]

You can change [star] the id to anything you want but make shure that all other planets orbit what you changed it to.

*Down here is all you need to create a planet in your system

PlanetAPI stream = system.addPlanet("stream"[ID], star[What it orbits], "Stream"[Name you will see in game], "gas_giant"[Planet type], 230[Starring angle of the orbit], 350[Size in pixels, 5000[Orbit Radius], 150[Number of ingame days to complete orbit]);

You will need to remove everything in [ ] for it to work. All other lines of code are added on top of it. Without them it will be just a frame for a planet, unless you use fix all empty planets mod it wont have any market conditions like a lot of core worlds. It will also have a generic description and skin depending on its planet type.

*Down here is creating a market for any planet. It has to be there for terran worlds to be habitable and for gas giants to have dence atmosphere.

		MarketAPI stream_market = Global.getFactory().createMarket("stream_market", stream.getName(), 0);
		stream_market.setPlanetConditionMarketOnly(true);
		stream_market.addCondition(Conditions.VERY_HOT);
		stream_market.addCondition(Conditions.DENSE_ATMOSPHERE);
		stream_market.addCondition(Conditions.EXTREME_WEATHER);
		stream_market.addCondition(Conditions.HIGH_GRAVITY);
		stream_market.addCondition(Conditions.VOLATILES_PLENTIFUL);
		stream_market.setPrimaryEntity(stream);
		stream.setMarket(stream_market);

What you have to note is that you have to make sure that you put correct ID's everywhere or it will get messed up. For example if you put wrong id:

		stream_market.setPrimaryEntity(HERE);

then when you try to colonize the planet, you will survey it just fine, you will see its awesome conditions with all ultrarich and all, you can salvage its vast ruins all good but when you try to colonize it SUDDENLY you get resources for that taken but the colony wont be created.That is the same for everything here, you have to be very careful or you will have a lot of crashes and bugs.

*Down here you can find all market conditions, although as I understood some are placeholders Alex plans to return back to the game later:

F:\Games\Starsector 0.9\Starsector\starsector-core\data\campaign\market_conditions

You can open it in something like wordpad too.

*This here is used to create nav_buoy/comm_relay/sensor_array/inactive_gate(note that for the gate faction has to be null)

	SectorEntityToken buoy = system.addCustomEntity("laputa_buoy"[id],
			 "Laputa Buoy",[name]
			 "nav_buoy",[token type]
			 "neutral");[faction]
	buoy.setCircularOrbitPointingDown(star, 40, 2000, 70);

List of all entities you can spawn this way:

Starsector\starsector-core\data\config\custom_entities

*Also note that [StarSystemGenerator.addOrbitingEntities( ] will add not only planets but also rings, asteroid fields and so on so dont be afraid to set it to numbers of 10+ when using OLD seting due to most of it beying said rings and debris. YOUNG setting has much higher planet to debris ratio.

*Another note is that hyperspace storms wont be automaticly cleared from the location of the system. I am yet to find script lines to do that so you either dont mind that they ended up in hyper storm or look for suitable location without them.

Community content is available under CC-BY-SA unless otherwise noted.