Jump to content

Modder access to non-active vessels


Recommended Posts

I'm not exactly sure how to phrase this question, but I'm going to try my best.

What kind of code access will we have to the non-active vessels? Or how are non-active vessels handled differently in KSP2? The fact that colonies will be included in stock makes me think they would have to be handled differently than in the first game. Is this true?

The reason I ask is because, whenever Principia comes out for 2, I would like to start building systems to automate certain aspects of station-keeping, or in my most hubristically hopeful case, entire missions (e.g. for supply runs to colonies) that can run in the background.

END OF QUESTION, but for anyone wondering "Why?", the goal would be to be able to build much more sophisticated and intricate supply networks throughout the solar system, which is technically possible currently, but requires a level of micromangement that I do not enjoy doing.

Link to comment
Share on other sites

KSP2 should have automation for supply missions etc. built into it exactly for this sort of scenario- no need to babysit your colonies all the time while you’re off on an interstellar adventure, just set up the automated supply chains and let them do their thing.

Link to comment
Share on other sites

2 minutes ago, Waifu Art Thou Romeo said:

Do you mean "should" as in "ought to" or "I have reason to expect it will"?

Should as in the devs have said there will be automated background tasks to avoid the need to babysit every single aspect of your space program.

Link to comment
Share on other sites

Because KSP2 is meant to be multiplayer from the ground up, it will have to keep a lot more information loaded about inactive craft than KSP. 

Whether all this info will be exposed through an API is a good question, but even if it's not, I suspect it will be available. Say, you're handed a block of data containing orbital elements of the craft via an API block. If that's an object passed by reference, which tends to be the default in C#, and that block is part of the more general craft object, you can work out where in memory the data for the craft is and construct an object reference for use in the mod. That would involve some unsafe calls and maybe even some native code, but it shouldn't be too difficult to do. So if this is an obstacle, I'm sure people will write libraries that give you broader access.

Of course, when you access things in an underhanded way like this, there are limitations. A version change can break compatibility, and some under-the-hood streaming could result in segfaults or other errors. So you'd have to take extra care with these kinds of mods, but it's better than not having this data available at all, IMO.

Hopefully, there's just a good API to get you anything that's currently loaded at all, though. That would be way more convenient.

Link to comment
Share on other sites

×
×
  • Create New...