Code Monkey home page Code Monkey logo

sfs-mod's Introduction

SFS Mod Template

This is a simple mod skeleton to stat making mods in Spacefligth Simulator

Note: If you don't know about programming, c# language and Unity. Please first go learn about it.

Getting Started

First of all, you need to get Visual Studio Community, you can download it from this Link. When it is installing it will ask you to install workspaces, you need to install .Net Desktop Development, you also need to install .NET Framework 4.8 SDK in the Individual Components tab.

Note: Here there is an official Visual Studio installation guide

Next, you need to go to the Spaceflight Simulator Game\Spaceflight Simulator_Data\Managed folder and copy the following list of files to the Dependencies folder in this project:

  • 0Harmony.dll
  • Assembly-CSharp.dll
  • Newtonsoft.Json.dll
  • UniTask.dll
  • UnityEngine.CoreModule.dll
  • UnityEngine.dll
  • UnityEngine.UI.dll
  • UnityEngine.UIElementsModule.dll
  • UnityEngine.UIModule.dll

Finally, you need to create a copy of env.props.example and name it env.props. Inside the file you need to change the ModsFolder variable to the path where you have your mods folder. This is used to automatically start your game when you compile the Mod. Now you can double click on SFSMod.sln and Visual Studio will open the project and if everything is ok and there are no errors you can hit Run to start the game with your mod

Note: If you want to change the project name to the name of your mod, change "SFSMod" in every file name, folder name and text in this project.

How to start hacking

Once you have the project installed and can run it in-game, you can start making your mod. You will need a handy tool called dnSpy, this tool is used to view the game code in Assembly-CSharp.dll (all SFS functionality is in this file). You can download dnSpy at this link. To use it, you just need to open Assembly-CSharp.dll and dnspy will start reading the file and show you all the game code. The game code is useful to see how the game works and to see where you need to tweak to add your mods.

Modifications are done by Harmony patch, so you don't need to modify Assembly-CSharp.dll to add your modification. to learn about Harmony at this link.

The entry point (first thing to load into your mod) is the MyMod.cs file, you can start writing your code here. I added comments to guide you and links that can help you. If you have questions about something, you can write about it in the Discussions tab in this repository or go to SFS dicord server and write in modding channel.

sfs-mod's People

Contributors

dani0105 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

0xnim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.