Nils277

Members
  • Content count

    1153
  • Joined

  • Last visited

Community Reputation

1351 Excellent

About Nils277

  • Rank
    Sr. Base and Rover Engineer

Profile Information

  • Location Fishing on the shores of Duna

Recent Profile Visitors

6894 profile views
  1. @JPLRepo Thanks for the hint to your mod using this update script. I have to use NodeUtil.GetPartNodeName(node, loadContext) to get the name of the part. Also it seems i need to add nodeName = NodeUtil.GetPartNodeName(node, loadContext); to the OnTest() method. With this changes the Script is able to replace parts of crafts (loadContext == LoadContext.Craft) that are loaded. Unfortunately it still does not work for the SFS files. I changed the script is to have: [UpgradeModule(LoadContext.SFS | LoadContext.Craft, sfsNodeUrl = "GAME/FLIGHTSTATE/VESSEL/PART", craftNodeUrl = "PART")] so one already gets the nodes for the config nodes for the parts in the OnTest and OnUpgrade methods. Judging from the log file nothing goes wrong and the logs clearly state that the names of the parts were changed but no changes seem to be applied or saved.
  2. Hi, has anyone experience with the UpgradeScript from the SaveUpgradePipeline? I want to replace one part in a save or craft file with another part of the same dimension and properties and therefore try to use the following script: using System; using SaveUpgradePipeline; using UnityEngine; namespace PlanetarySurfaceStructures { [UpgradeModule(LoadContext.SFS | LoadContext.Craft, sfsNodeUrl = "GAME/FLIGHTSTATE", craftNodeUrl = "PART")] public class StorageUpgrader : UpgradeScript { ///FLIGHTSTATE/VESSEL/PART" //visible name of the upgrader public override string Name { get { return "Upgrader 2.0.0"; } } //description for the upgrade process public override string Description { get { return "Upgraded to BLA"; } } //check the maximal version protected override bool CheckMaxVersion(Version v) { return true;// v <= TargetVersion; } //get the earliest version that can be upgraded public override Version EarliestCompatibleVersion { get { return new Version(1, 0, 4); } } //get the target version of the save file public override Version TargetVersion { get { return new Version(1, 3, 1); } } //test the save file for upgrades public override TestResult OnTest(ConfigNode node, LoadContext loadContext, ref string nodeName) { //when the parts of a craft should be checked if (loadContext == LoadContext.Craft) { Debug.Log("[STORAGEUPGRADE] OnTest - Craft"); string[] values = node.GetValues(); return checkPart(node, loadContext); } //when the savefile should be updated else if (loadContext == LoadContext.SFS) { Debug.Log("[STORAGEUPGRADE] OnTest - SFS"); //iterate over all vessels in the savefile ConfigNode[] vessels = node.GetNodes("VESSEL"); for (int i = 0; i < vessels.Length; i++) { //iterate of all parts in the vessel ConfigNode[] parts = vessels[i].GetNodes("PART"); for (int j = 0; j < parts.Length; j++) { if (checkPart(parts[j], loadContext) == TestResult.Upgradeable) { Debug.Log("[STORAGEUPGRADE] OnTest - Vessel \"" + vessels[i].GetValue("name") + "\" needs to be upgraded"); return TestResult.Upgradeable; } } } } Debug.Log("[STORAGEUPGRADE] OnTest - Save file is up to date"); return TestResult.Pass; } //upgrade the save file public override void OnUpgrade(ConfigNode node, LoadContext loadContext) { //when the part of a craft should be upgraded if (loadContext == LoadContext.Craft) { upgradePart(node, loadContext); } else if (loadContext == LoadContext.SFS) { Debug.Log("[STORAGEUPGRADE] OnUpgrade - SFS"); //string partName = node.GetValue("name"); //iterate over all vessels in the savefile ConfigNode[] vessels = node.GetNodes("VESSEL"); for (int i = 0; i < vessels.Length; i++) { //iterate of all parts in the vessel ConfigNode[] parts = vessels[i].GetNodes("PART"); for (int j = 0; j < parts.Length; j++) { upgradePart(parts[j], loadContext); } } } } //Check of the parts has to be upgraded private TestResult checkPart(ConfigNode part, LoadContext loadContext) { string partName = part.GetValue("name"); switch (partName) { case "KKAOSS.RCS.Tank": return TestResult.Upgradeable; } return TestResult.Pass; } //Upgrade the part private void upgradePart(ConfigNode part, LoadContext loadContext) { string partName = part.GetValue("name"); switch (partName) { case "KKAOSS.RCS.Tank": Debug.Log("[STORAGEUPGRADE] upgrade Part:" + partName); part.SetValue("name", "KKAOSS.Switchable.Tank"); part.AddValue("testValue", "BLA"); break; } } } } Judging from the debug information from the logs, all works as intended. First it is checked if something has to be upgraded (OnTest). This is the case an therefore the upgrade is done (onUpgrade). After the update the OnTest method is run again to check if everything is okay. [LOG 22:14:01.028] [STORAGEUPGRADE] OnTest - SFS [LOG 22:14:01.029] [STORAGEUPGRADE] OnTest - Vessel "Untitled Space Craft" needs to be upgraded [LOG 22:14:01.037] [STORAGEUPGRADE] OnTest - SFS [LOG 22:14:01.037] [STORAGEUPGRADE] OnTest - Vessel "Untitled Space Craft" needs to be upgraded [LOG 22:14:01.038] [STORAGEUPGRADE] OnUpgrade - SFS [LOG 22:14:01.039] [STORAGEUPGRADE] upgrade Part:KKAOSS.RCS.Tank [LOG 22:14:01.039] [STORAGEUPGRADE] upgrade Part:KKAOSS.RCS.Tank [LOG 22:14:01.040] [STORAGEUPGRADE] OnTest - SFS [LOG 22:14:01.040] [STORAGEUPGRADE] OnTest - Save file is up to date The thing is, although it seems to work on the paper (in the log) there are no changes made at all. Neither in the loaded game nor in the SFS file. Even the test value i added via AddValue("testValue, "BLA") to the node does not appear anywhere in the savefile. It was stated that with this upgrade pipeline you don't have to take care of file operations and so on and one simply needs to change the config nodes. Am i completely missing something here?
  3. Addon Localization Home

    Did anyone who has a mod that has one or more translations ever encountered a bug where for some users the texts appear in the wrong language? I had this once for FUR and one time for KPBS. In KPBS the whole game was in english, but the translations from KPBS were in russian, although it seems to work for everyone else. Deleting all other translation files other than the en-us one solved the problem but it acutally only solved the symptoms. I still don't know what was causing this in the first place. Did anyone else encounter such a behavior and if yes, what is causing it?
  4. It seems the whole thing with the Parttools, Unity and TextMesh Pro is getting more complicated... I wanted to update to Unity 5.4.0p4 and use the new PartTools. As soon as i install both, the PartTools and and TextMesh Pro, the whole Editor freezes. This can also not be resolved by adding the patch-script posted above (i removed the 'using ReeperCommon.Logging' line) When i want to restart unity i get to the window which allows me to select the project. But when i choose any project that has Parttools and TMP, the Editor won't show up at all. The log of the editor shows that it fails while loading TMP so i guess another update of TMP broke the above script as well as the parttools? Here's the log of the editor: Editor.log Maybe @JPLRepo has an idea what is happening or how it can be resolved?
  5. That is weird. It should be in english when KSP is in english. Can you take a look into the 'GameData/PlanetaryBaseInc/Localization' folder? There should be the files 'en-us.cfg','ru.cfg','es-es.cfg' and 'ch-zn.cfg' Are all files there? Can you provide the KSP.log file? (it os in the same folder as the KSP executable) Maybe i can find im there why KSP chooses the wrong language. You could try to delete all files except the 'en-us.cfg' this should solve the problem.
  6. There won't be any conflicts. I have added a patch that changes the parts to use the mechanics of NFE if it is installed. So when you have NFE all will work with the NFE mechanics. Hmm, that might be the case. Will have to try that out
  7. Guess Who Will Reply Next?

    You are lucky @Rafael acevedo
  8. @Fengist i'm kinda stuck at the moment with adding this ability to the plugin. The problem i have is, that the shader used for the texts is an unlit shader, which means that i will look pretty bad on parts when they are in the dark because their text will always be glowing. I tried applying a standard shader from KSP to it but this does not work because TextMeshPro needs some special shaders to work. And unfortunatele the only shaders for TMP that are available in KSP are the unlit ones.... Do you have achieved something while experimenting with the texts that allows the text to be shaded?
  9. Yeah...thinking of it i probably should have added a new page for KSPedia to explain how the mechanic works
  10. For the transfer, i tried to make the mechanics quite similar to the one of NFE. This means, you have to right click on the part you want to transfer fuel from and select either "transfer enriched uranium" or "transfer depleted fuel" When this is clicked, the part of the vessel the fuel will be transfered to will be highlighted in blue. You can switch between the possible parts with "next target" or "prev. target" in the right click menu. When the part you want to transfer fuel to is selected you can click on "start transfer". When you either click "stop transfer" or close the right click menu, then the transfer will be stopped. The transfer is also limited at certain points: Like in NFE you need a level 1 engineer on board to transfer the enriched uranium and a level 3 engineer on board to transfer depleted fuel. Also the part that wants to transfer fuel must not have an active converter running to be allowed to transfer fuel. So all in all it is pretty similar to the mechanics of NFE. Except that NFE also consideres the heat of the part. I don't know how it is done in MKS though....my guess would be that is has to be done in EVA with a kerbal that is an engineer, right?
  11. TAC-LS Calculator

    @MisterX552 Planetary Base System has a spreadsheet in the OP of it which shows the configurations needed to create a self sustaining base for 6 Kerbals: TAC-LS Spreadsheet It is separated into different configurations for different conditions on other planets. On some planets, a self-sustaining base is not possible. There are some other mechanics that need to be considered when calculating the needed converter etc. Some converter only work until one output resouce is filled up to 90% giving higher priority to other filters that need the same resource but have a more important output.
  12. What's the craziest mission you've ever pulled off?

    Definitely my first swimming base on Laythe. I build a very huge rocked in orbit that was able to deliver all parts needed for it in one go. I called it "Big Bertha": The payload consisted of four swimming platforms, one small plane and a swimming platform with solar-sails. The plane was there to transfer kerbals from the swimming base to isles of Laythe and back. On the isle was a rocket that was able to bring back 3 Kerbals to Kerbin if needed. The five pieces and the plane were dropped one after the other into laythes waters with the help of four big parachutes per platform and additional thursters to further reduce speed. When landed i adjusted and connected the parts via docking ports and RCS thrusters (the ones that use LFO) The final landed base looked like this: The main platform had a science lab, tower, living quarters and a ladder to climb up if a kerbal fell into the water. On the left you can see the landing platform for the plane. The platform and the base were not connected to prevent disasters should the plane crash. It took some practice but landing on the platform with the help of parachutes was quite possible. Unfortunately the base has been eaten by the Kraken because KSP did have a bug back then that teleported the landing platform to the ground of the sea when the base came into physics distance(or was loaded) while the plane was landed on the platform. The platform subsequently speeded up and crashed into the other part, destroying the whole base in the process.
  13. Update to 1.0.4 ~Keep driving~ Changelog: Download:
  14. Wait you have a book about the elements in the regolith of other planets? Last thing i can recall about the regolith from mars is that it contained high amounts of either an element or molecule that was highly toxic to most of lifeforms from earth...It was either a heavy metal or some toxic substance that is a byproduct from the chemical industry on earth...