Search the Community

Showing results for tags 'confignode'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • The Daily Kerbal
  • Kerbal Space Program 2
    • KSP 2 Discussion
  • General KSP
    • KSP Discussion
    • Suggestions & Development Discussion
    • Challenges & Mission ideas
    • The Spacecraft Exchange
    • KSP Fan Works
  • Gameplay and Technical Support
    • Gameplay Questions and Tutorials
    • Technical Support (PC, unmodded installs)
    • Technical Support (PC, modded installs)
    • Technical Support (PlayStation 4, XBox One)
  • Add-ons
    • Add-on Discussions
    • Add-on Releases
    • Add-on Development
  • Community
    • Welcome Aboard
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
  • Making History Expansion
    • Making History Missions
    • Making History Discussion
    • Making History Support
  • Breaking Ground Expansion
    • Breaking Ground Discussion
    • Breaking Ground Support
  • International
    • International
  • KerbalEDU Forums
    • KerbalEDU
    • KerbalEDU Website

Categories

  • Developer Articles

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


Location


Interests

Found 4 results

  1. Hello everyone, Whitecat again! Another issue hindering my progress has popped up lately; I am saving values to a config node for example: ConfigNode newVessel = new ConfigNode("VESSEL") newVessel.AddValue("SMA", vessel.orbitDriver.orbit.semiMajorAxis); Upon saving the node to a file, a rounded version of the actual semiMajorAxis is saved, this happens regardless of adding .ToString() or .ToString("F3") etc. For example, rounding to 6643460 To check I printed the semi major axis in the debug log and the actual value was displayed; print(Vessel.orbitDriver.orbit.semiMajorAxis) With the actual value being 6643459.62314, Can anyone explain this and provide some work around? My Orbital Decay mod requires precise values and for some reason the ConfigNode system wants to round values. - This seems to be a recent issue, I cannot remember the same thing occurring before KSP 1.0.4. Thanks, Whitecat106
  2. Can anybody explain to me, how to copy a config node from one module to another. I'm creating an engine switching plugin, where I need to copy an effect node from my module into the engine module. MODULE { name = mymodule EFFECTS // <---- SOURCE --> { SOMEEFFECT { .... = .... .... = .... } } } Now copy that into the engine module, replacing the entire effect node in there PART { name = SOMEENGINE MODULE { name = moduleengineFX ... = ... (referencing some effects) } EFFECTS <-- TARGET --> { SOMEEFFECT { .... = .... .... = .... } } }
  3. I'm trying to manipulate with AirIntakes, and I need to change the values in the module "ModuleResourceIntake". I have created a new module for IntakeSwitch which have my new values I wish to inject into the "ModuleResourceIntake". I think confignode is the way to go, but I just can't figure out, how the manipulate with specific value/nodes in a specific module. I've tried to outline the structure of a part and my new module. In GTI_IntakeSwitch under resourceNames I have the list of alternative resource I at runtime want to be able to inject into the module ModuleResourceIntake. Node structure PART { name = XXX MODULE { name = ModuleResourceIntake resourceName = IntakeAir checkForOxygen = true ###other values### } MODULE { name = GTI_IntakeSwitch resourceNames = IntakeAir, IntakeAtm ###other target values### } RESOURCE { name = IntakeAir amount = 2 maxAmount = 2 } } I would really like to understand: How do I control which node i work in. Replace a node How to change a value in a node How to read a specific value How the get the changes to take effect So basically how the confignode construct works. I have searched around a lot, but it is just not coming to together for me. I have a node replacement working, but that kind of copy paste, and I don't undertand to inner working of it, otherwise I would guess I had figured this out by now.
  4. Alright, KSP 1.1 has broken a lot of code, one of them is that the ConfigNode class is suddenly made private. Now how are we supposed to config our parts?