Spaceport Trading Company

Spaceport Trading Company

评价数不足
Modding for STC
由 digital-tectonics 制作
Unlock the Universe: Customizing Your Spaceport Trading Company Experience
Tired of the default trade routes and corporate grind? Ready to truly make Spaceport Trading Company your own?

Welcome, aspiring galactic entrepreneurs and master modders! This comprehensive guide is your essential toolkit for diving into the exciting world of modding Spaceport Trading Company. Whether you're looking to tweak a few values, introduce game-changing new features, or simply understand how the game ticks under the hood, you've come to the right place.
   
奖励
收藏
已收藏
取消收藏
Intro
The goal of this guide is to help captains explore the exciting world of modding Spaceport Trading Company.

This guide is in active development and as the game changes we making updates and adjustments.

What you'll find in this guide:

  • Getting Started: A beginner-friendly introduction to the tools and concepts you'll need, even if you've never modded a game before.
  • Essential Tools & Resources: Discover the must-have software and communities that will make your modding journey smoother.
  • Understanding Game Files: Learn how to navigate the game's directory, identify key files, and understand their functions.
  • Basic Modding Techniques: Step-by-step tutorials on common modifications, such as:
    - Changing cosmetic elements (textures, UI elements)
    - Adjusting economic parameters (prices, production rates, resource availability)
    - Modifying ship stats and cargo capacities
Starting Off

From the Main Menu you can access the Mods Popup.

From here you have a lot of information presented. The left has the list of Installed Mods, and allows you to browser the mod found on the Steam Workshop. The right side hosts a list of all the currently moddable files within the game and the data found within them.

Caution as reviewing this file will contain spoilers to some elements within the game.

At the bottom of the right side, there is a button "Select Local Mod". Clicking this allows you to drag / input the location of your mod and it will be added to the Installed Mod list.

Moddable Files
Files than can be changed:
With the release of 0.4.6.2 there is now a system within the game that allows you to see the name of the file and contents if it for data.
We are working to expand this to show previews of the images
Actions - Data Changing Options
Data Changing Options (Actions):
  • Add
  • AddTo
  • AddMany
  • Replace
  • ReplaceLimited
  • Remove
  • AddLanguage

Add
This instructs the mod system to add a new file to the data list.
Example Usage:
Adding a new star system.

AddTo
This instructs the mod system to add a single element to an existing file within the data list.
Example Usage:
Adding a single new ship.

AddMany
This instructs the mod system to add a collection of elements to an existing file within the data list.
Example Usage:
Adding a collection of new Market Items.

Replace
This instructs the mod system to switch out an element of an existing file within the data list with the element provided.
Example Usage:
Changing a moon for a different one.

ReplaceLimited
This instructs the mod system to modify the data of an element to an existing file within the data list.
Example Usage:
Changing the graphics of a location.

Remove
This instructs the mod system to remove data of an element to an existing file within the data list.
Example Usage:
Removing a ship type.

AddLanguage
This instructs the mod system to add a new translation to the game files.
Example Usage:
Klingon as a selectable language.
Example Mods
We have crafted a few modes to provide code and show off a few areas that are easily modded.

Example Mods:
  • Darkke - New Star System
  • Far Point as a Planet
  • Emerald - Market Item
  • Ruby - Market Item
  • New Main Menu Background
  • More Name Options
Sample Mod Code
Here are 3 sample Mod Code files to review.

Mod files are in either .json or .manifest file types.

More Names Mod Example
{ "manifest": { "id": "Daniel.More Names", "name": "More Names", "version": "0.0.1", "author": "Daniel", "description": "Adds more name options to the game." }, "actions": [ { "action": "AddMany", "addTo": "<names.json>/shipNameList", "manyToAdd": [ "Artemis", "Cerberus", "Citadel", "Corsair", "Daedalus", "Eclipse", "Horizon", "Intrepid", "Leviathan", "Minerva", "Nebula", "Nightingale", "Odyssey", "Orpheus", "Perseus", "Phoenix", "Prometheus", "Sagittarius", "Seraph", "Sovereign", "Stardust", "Thunderbolt", "Titan", "Valiant", "Valkyrie", "Vanguard", "Voyager", "Whirlwind", "Zephyr", "Zenith" ] } ] }

Darkke - New Star System Mod Example
{ "manifest": { "id": "Daniel.Darkke Star System", "name": "Darkke - New Star System", "version": "0.0.1", "author": "Daniel", "description": "Introducing a new star system: Darkke" }, "actions": [ { "action": "AddTo", "addTo": "<galaxy_map.json>/star_systems", "content": { "key": "Darkke", "data": { "name": "Darkke", "description": "", "galaxy_position": [512, 161], "display_graphic": { "graphic": "yellow star", "size": 0.6, } } } }, { "action": "Add", "target": "darkke_star_system.json", "content": { "display_data": { "name": "Darkke", "description": "", "galaxy_position": [512, 161], }, "locations": { "9002": { "id": 9002, "name": "Trade Point 41", "description": "", "type": { "type_name": "Satellite", "sub_type_name": "", "name": "satellite_4", "size": 0.70, "map_graphic": "satellite_4", "dock_graphics": [ "res://assets/bg/Green_Nebula_05-512x512.png", "", ] }, "position_x": 782, "position_y": -908, "faction": 5, "economy_type": { "type_name": "Manufacturing", "economy_level": 4, "technology_level": 4, "population_level": 3, "market_items": {}, "extra_items": ["Processor"], "taxes_collected": 0.0, }, "services": { "shipyard": { "level": 3, "hangars": { "internal": { "size_limit": "medium", "count": "64", "cost": { "upfront": 3750, "ongoing": 150 } }, "mooring": { "size_limit": "large", "count": "128", "cost": { "upfront": 3000, "ongoing": 100 } } }, }, "spaceport": { "level": 3, }, "plaza": { "bar": { "tender": { "name": "Bob", "portrait_id": 91, }, "level": 10, }, "barbershop": {}, }, "refuel": {}, }, "market_items": {}, "demand_items": {}, "contacts": {}, }, }, "star_data": [ { "id": 0, "name": "Darkke", "type": "Yellow", "graphic": "yellow star", "position_x": 0, "position_y": 0 } ], "warp_points": [ [787,-960], [430, 50], [-32, 756], [-328, 288], ], "stellar_entities": [ ] } } ] }

New Language Mod Example
{ "manifest": { "id": "Daniel.Klingon Language Pack", "name": "Klingon Language Pack", "author": "Daniel", "version": "1.0", "description": "Adds Klingon as a selectable language.", }, "actions": [ { "action": "AddLanguage", "code": "tlh", "name": "Klingon", "path": "../klingon.csv" } ] }
5 条留言
digital-tectonics  [作者] 11 月 15 日 上午 11:47 
@petera1289 Okay, thank you for the request. Let me add more information to this guide.
petera1289 11 月 15 日 上午 3:13 
perhaps add some of the really ** basic info ...
which files can be changed
where they are stored (path)
whether we need to put our work in a location eg typically \mod\{mod name}

and include sample data for each field within the examples eg I assume from the structure that adding (goods defined separately) to the market items field would look like:-
"market_items": {
TradeGood1,
TradeGood2},

unless for some reason my trade good name has a comma requiring [] to block the parsing
Leebee 7 月 26 日 上午 1:16 
That's good to hear that you're working on a ship mod - looking forwards to seeing it.
digital-tectonics  [作者] 7 月 25 日 下午 5:19 
Yes, I have been working on a ship mod to use as an example.
Leebee 7 月 18 日 上午 6:05 
Please can you add some info about how to create a new mod locally as well as how to add a new ship in the mod manifest?

Thanks!