Skip to content

Instantly share code, notes, and snippets.

View HB-Stratos's full-sized avatar

HB-Stratos

  • Germany
  • 19:49 (UTC +01:00)
View GitHub Profile
@HB-Stratos
HB-Stratos / postprocessor.py
Created July 2, 2024 00:36
A gcode post processor to increase the extra restart distance based on travel time. currently quite messy, and does not account for acceleration of the printherad
from dataclasses import dataclass
import dataclasses
from collections import namedtuple
import math
import re
#I apologize for the mess of camelcase and underscores
gcode_file_name = "Soldering Jig_0.2mm_LW-PLA_I3MEGA_1h37m.gcode"
gcode_file = open(gcode_file_name, "r")
@HB-Stratos
HB-Stratos / HowToModKsp.md
Last active August 15, 2024 19:24
A guide on how to set up Visual Studio for Kerbal Space Program mod development.

How to Mod KSP in 2024

I am not a mod developer, I am just starting out. I got a lot of help, and I'm writing this as a mental note for myself, as well as a hopefully correct guide for others who may want to start with KSP mod developement.

1. Installing Visual Studio Community 2022

image

2. Creating the Project

  • Create a new Project with the preset Class Library (.Net Framework). Make sure it is that exact name. It must be the exact one shown in the image, meant for dll creation with C#.
@HB-Stratos
HB-Stratos / HowToDecompileKsp.md
Last active November 6, 2024 12:57
A guide on how to decompile Kerbal Space Program for modding.

Decompiling KSP is technically against the Take2 EULA, but having the KSP Code to reference is an invaluable tool for modding. Hence it's been a bit of an open secret that modders decompile the game to help inform their mod writing. Sadly, nobody has ever fully captured how this is done, so this is what I intend to do here. If you wish to read the Take2 Eula before following this guide, you can find it here.

Notes on Legality

Preface: I am not a lawyer, this is not legal advice, etc. From the research I have done on the topic, I have been able to gather this:

In US and EU legislature it is legal to decompile any program regardless of license restrictions if the purpose of the decompilation is done to enable interoperability (ref1). In the case of KSP I would say this is not given as KSP does provide a public interfac