XML file, I will see new lines of code in the parts section showing that a new block was added to the file.Įxample 2: Additionally, If I change some text in the XML file then tab into SimplePlanes, nothing at all will have changed.
But as soon as I save my aircraft in the game, when I tab out to the. XML file that I have open, nothing at all will have changed. You will be doing this a lot so I suggest using the keyboard shortcut CTRL+S for save in Notepad++.Įxample 1: If I add a block to my build then tab out to the. Once it's saved, you must re-load it into the game. If you want to change your aircraft by writing or editing the code yourself, you must type in the edits in the. XML file, you must save your build in the game then the game writes all of the changes you made into the. In order to make the change take place in the. Then I tried usingįoreach (PartData part in .When you are in the SimplePlanes game editor and you make a change to your aircraft, the game program is writing lines of code into a temporary copy of the aircraft file that you have open. What do you think would be the best way to achieve that? I've tried to load each craft xml withĬraftXml = _flightState.LoadCraftXml (craftNode.NodeId) įoreach (XElement element in craftXml.Element ("Assembly").Elementīut when I launched a craft this craft xml wouldn't load ( image 1) I had to quit and resume the flight for it to work.
I've tried many different things and asked Nathan for some help but nothing really worked.
#Simpleplanes tutorial mod#
Hi for one of my mod project I need to get a list of all the parts in every craft in the flight scene to find wich crafts have a specific part. Let us know what exactly you need and we can see what we can do to help. Maybe, please ask! We would love to help, but we can't always predict what you may want or need. There is no API method/event to do what I want to do. The game does not currently support the Steam Workshop but it is something that we are considering. We recommend trying do most stuff via the ModApi namespace (may be more stable between updates), but if you want to do some advanced stuff, by all means, access whatever you need from wherever you need it. Because of this, there was no longer a technical need for a modding API separated out into its own assembly, however we were way too far down this path when these changes were made, so it's here to stay. To give modders as much control as possible while avoiding painful reflection-based code, we have included most of the game's assemblies in the mod tools package for use by modders. During the development of SR2, a few Unity updates really opened the doors and allowed us to take things to the next level (while also simplifying implementaion).
#Simpleplanes tutorial mods#
All interaction with the game was done via a few SimplePlanes mod tools assemblies and more advanced mods needed to use lots of reflection to access anything in the core game assembly. When we first started SimpleRockets 2, we started with the same modding framework we used in SimplePlanes. Mod Tutorial: Inspector Panels FAQ What is up with all these assemblies in the mod tools? Should I only use the ModApi namespace? You are still welcome to experiment with it, but just be aware that things may change in the future. With the planet builder on the horizon, we held off on planet related modding for now since we are not yet sure how planet builder related changes would impact things. The most notable thing we did not do for this release is planet modding. The goal is to continue to add additional support and features over time.
With the 0.7.2 release, official mod support is finally here! The initial release of mod support focused primarily on the core modding framework, part creation, and some UI related modding. It is a work in progress so please bear with us as we continue adding additional content and refine the page. This page is meant to be a resource for information about creating mods for SimpleRockets 2.