katateochi

[1.3.x-1.5.x] KerbalX Mod - upload to KerbalX direct from KSP

Recommended Posts

N1gvXeeh.jpg?1kxmod_icon_large_up.png
KerbalX Mod - In game integration with KerbalX.com

Download & Docs | KSP Support: [1.3.x, 1.4.x, 1.5.x]
Source | Bug Reporting | Licence: CC BY-NC-ND 4.0
Click the download link and select your KSP version and KerbalX will give you the relevant links
You need to install KXAPI for KerbalXMod to function

The KerbalX mod lets you upload and update your craft on KerbalX from within the game in a few clicks.  
It also enables downloading craft from any device and having them delivered to your game.

This mod is still supported, but has been replaced as the official KerbalX mod by Craft Manager
 

Download the mod and unpack the KerbalX folder from the zip into your GameData folder. Once installed when you start KSP there will be a KerbalX login window on the main menu screen.  Login using either your KerbalX username or email and your password.  Once you have logged in a KerbalX.key file will be saved to the root of your KSP install.  This contains a token which will be used in subsequent requests to the site and unless you log out or delete it, it will persist your login, so your don't have to login each time you start KSP. 

Uploading Craft

Spoiler

From either editor you can open the upload interface, select some pictures of your craft, set it's type and add action group info and then click Upload!
And that's it, your craft will be posted on KerbalX.

kxmod_upload.jpg     kxmod_upload_add_images.jpg

You can select pictures from your KSP screenshots folder and if you don't have any the image selector can take a screenshot of the current view.  Images will be uploaded along with the craft and then posted to imgur as anonymous uploads. That means they won't belong to any imgur account, but you can still delete them from imgur in the mod section of your settings on KerbalX

Updating Craft

Spoiler

If you load a craft that has the same name as one you've already uploaded then the interface will automatically switch to upload mode and select the matching craft on KerbalX.  You can use the drop down menu to change which craft is selected if needed. 
When you hit Update! which ever craft is selected will be updated with the craft file that's currently loaded in the editor. (so just make sure the right craft is selected)

kxmod_update.jpg

You can also switch back to upload mode, if you wanted to upload it as a new craft rather than updating an existing one. And similarly if you have a craft with a slightly different name to one on the site that you want to update, you can manually switch to upload mode and select the craft you want to update.

Downloading Craft

Spoiler

You can opt to switch on a feature called Deferred Downloads in your settings (under KX Mod).  When Deferred Downloads is on, when you click download on a craft it won't download right away, instead it will be added to your download queue.  When you next visit the space centre KSP the mod will check your download queue and show a list of the craft you've 'tagged' for download you can then fetch them.

This enables you to 'tag' craft for download from any device (ie your mobile) and while you're away from KSP.  Then when you return to play KSP the craft you've tagged for will be waiting for you to download.

kxmod_download_queue.jpg

You can also download your own craft and craft which you've previously downloaded (ie those in your downloads hangar).

Why can't you just download any craft?
In part because providing an in game interface that could let you browse and search for craft would be tricky, but primarily it is to prevent the mod and the site's API from being used as a way of scraping content from the site. 

 

This is my first mod, so there are bound to be some issues! Please report any problems here or to the github issues tracker. If you have any feature requests or suggestions post them here.
Known issues:

  • The upload interface will sometimes incorrectly report that a craft has unsaved changes - just hit save before uploading.

Planned Features:

  • enable upload of new pictures when updating a craft.
  • enable integration with your imgur account, so images will be uploaded to your own account.
  • reduce limits to number of pictures that can be uploaded (limit is there at present to prevent this slowing the site down).

 

Now...in accordance with the forum rules, I need to point out that this mod does make requests to KerbalX.com! Along with with whichever craft you are uploading it will send the pictures you've selected and a set of data about the craft's parts (used in the case of your craft using a mod which is not in the KerbalX knowledge base).  Apart from your username/email and password used in the initial login, no personally identifiable information is collected or transmitted. 

 

I want to say thanks to:
@swjr-swis for spending a lot of time helping me test the mod
@Val for just generally being awesome and helping with KerbalX
@Mycroft for picking up loads of spelling errers!
@TaranisElsu for providing some great example code for how to start building a mod.

 

Edited by katateochi
KSP 1.4.0 update

Share this post


Link to post
Share on other sites

That looks amazing and very useful for anyone who's interested in sharing craft! Congrats katateochi and thanks for the fantastic work you've been putting into KerbalX mate! Can't wait to try it out, great stuff!

Share this post


Link to post
Share on other sites

Strongly recommended for anyone that:

  • wants an easy minimal effort way to download other people's crafts from KerbalX to the game
  • wants to showcase/share the pride and joy of their own kerbal fleet
  • wants a quick and easy offsite backup of their hard-worked-on crafts, with easy recovery to different computers/KSP versions/installs
  • prefers minimal hassle at editing a craft web page, even on the awesome KerbalX website
  • is ok with running mods

It does what it says on the tin, and it does it well. Get it, run it, nao.

Share this post


Link to post
Share on other sites

Just released 0.1.1; just a couple of minor fixes.  I've also changed the licence to CC BY-NC-ND 4.0 as I think that's a better fit than the BSD 3-clause. Doesn't affect use of the mod just disallows derivatives to be distributed. 

Share this post


Link to post
Share on other sites

I just want to say one thing:

i love you in the least homosexual way possible.

 

 

I will install this and use the hell out of it.

Share this post


Link to post
Share on other sites

!!  Awesome

What are your thoughts on maintaining "downloaded" craft? Subscribing or syncing with updates from the authors, etc.?

Edited by Beetlecat

Share this post


Link to post
Share on other sites

Low priority feature request: make login pane on the intro screen hideable?

Share this post


Link to post
Share on other sites
On 28/10/2016 at 10:56 PM, Beetlecat said:

!!  Awesome

What are your thoughts on maintaining "downloaded" craft? Subscribing or syncing with updates from the authors, etc.?

Do you mean have craft that you've downloaded automatically update if the original uploader updates them on the site?  I hadn't envisaged adding something like that. The main issue with it would be what if you've downloaded a craft and made some changes to it. Then the original craft gets updated. It would then either overwrite your changes or the mod would need to maintain a record of craft you've downloaded and be able to determine if you have changed them. Which would get a bit fiddly to do in a reliable way. 

2 hours ago, fourfa said:

Low priority feature request: make login pane on the intro screen hideable?

I had wondered about that. But then how would you logout if you wanted to.  One way; have the option to hide the login window once you've logged in and then if you want to log out you'd need to delete the KerbalX.key file, then next time you start KSP the login window would appear again so you could log in.  I'm not sure how intuitive that would be though.

Share this post


Link to post
Share on other sites
2 hours ago, katateochi said:

But then how would you logout if you wanted to.

Add a toggle to the KSP Settings window? It's a New Thing of v1.2... :wink:

Share this post


Link to post
Share on other sites

The mod worked flawlessly! I didn't experience any issues, and just being able to pick screenshots straight off the folder and upload them quickly mesmerized me way more than it should have. Just two things though;

1. Have the instructions about uploading, updating and downloading craft integrated into the mod. Since the mod is pretty complex in terms of features, being able to access a "Help" dialogue would be helpful.

2. Have the ability to edit the description from the mod itself. As someone who often writes descriptions for his ships, I feel like it would be easier if it could be done from the game instead of having to visit the craft page.

Thanks!

Share this post


Link to post
Share on other sites
4 hours ago, swjr-swis said:

Add a toggle to the KSP Settings window? It's a New Thing of v1.2... :wink:

ah, I didn't know that. Do you have an API reference for doing that?

23 minutes ago, Columbia said:

Just two things though;

I was planning to add a help section so that will happen.

re the description. The description for the craft itself is read in when the craft is uploaded and now in 1.2 you can write much more in there.  But I know the interface for adding lots of text to that is a bit awkward. So what I was thinking was to add a larger text field (probably in a popup window) to make editing the inbuilt craft description easier. And that would get saved to the craft file so it stays with the craft for future reference and also those who download it get the description in game. 

34 minutes ago, Columbia said:

being able to pick screenshots straight off the folder and upload them quickly mesmerized me way more than it should have

awesome! :) 
Did you noticed the delayed image loading? I found that if it tried to load all the image thumbnails at once it would lag the interface quite badly, so it just loads the first 8 and then as you scroll down it loads the rest a row at a time.

I plan to make it so you can upload more than 3 and also I want to enable you to pick (and save) screenshots from a custom folder.  I always use Fraps to take screenshots so they don't end up in the KSP folder so I want that functionality for myself! 

Share this post


Link to post
Share on other sites
9 hours ago, katateochi said:

Do you mean have craft that you've downloaded automatically update if the original uploader updates them on the site?  I hadn't envisaged adding something like that. The main issue with it would be what if you've downloaded a craft and made some changes to it. Then the original craft gets updated. It would then either overwrite your changes or the mod would need to maintain a record of craft you've downloaded and be able to determine if you have changed them. Which would get a bit fiddly to do in a reliable way.

Yeah -- that's a totally interesting quandary. I was thinking mostly in the case of KerbalX downloads going into the stock crafts folders. This way, any modifications that I make are ported into that current save, rather than altering the primary craft. If a craft updates on KerbalX, I'd simply get a new version of that stock craft to play from.

I can see how the mod would need to interact from within the *current save*, rather than dumping things out to stock.

Share this post


Link to post
Share on other sites
7 hours ago, katateochi said:

ah, I didn't know that. Do you have an API reference for doing that?

There's a thread marked as 'answered' in the prerelease modding forum:

I may have misunderstood this. Apparently it's only for the Difficulty window in the in-game Settings. not sure if that would still be a workable place.

Share this post


Link to post
Share on other sites
18 minutes ago, luizopiloto said:

I think it's possible to use Imgur API to upload screenshots to user acc. instead of anonymous.

It will be possible to do that. I just need to understand that part of their API and provide an interface on the site to enable users to authorise KerbalX to upload to their account.  The images will still have to be uploaded to KerbalX first, and then passed on to imgur. Unfortunately I can't see a way of securely allowing the mod to upload direct to imgur which would take the load of KerbalX, but then the mod would have to contain imgur access tokens which becomes a problem. 
But yes, short answer is that feature is planned.

1 hour ago, swjr-swis said:

There's a thread marked as 'answered' in the prerelease modding forum:

nice, I shall have a look at that and see if it's doable. 

Share this post


Link to post
Share on other sites

This is a great idea! Keep up the good work.

Share this post


Link to post
Share on other sites

Minor update with a couple small new features - 0.1.2:

- On the image viewer there's now a button that will open a larger preview display of the images.  
- There's an interface for editing the craft description field.
- Added some feedback for when a craft is successfully updated.

Share this post


Link to post
Share on other sites

Got it downloaded and will be using it for my next craft project downloads, thanks again Katateochi for all your hard work!

Share this post


Link to post
Share on other sites

Would like to suggest a key bind for screenshots, as it is setup now there is no way to get images with the contents of what is inside fairings, etc. by using the mods interface.

Share this post


Link to post
Share on other sites
On 01/12/2016 at 10:10 PM, McyD said:

Would like to suggest a key bind for screenshots, as it is setup now there is no way to get images with the contents of what is inside fairings, etc. by using the mods interface.

You can use F1 (standard KSP screenshot key) to grab a screenshot which will end up in the same folder. The only thing is that using that won't autohide the KerbalX windows, but if you grab a your pics with F1 before opening the mod window then they'll appear in the image selector.  Not a perfect solution but as a workaround until I can add a shortcut key.

Share this post


Link to post
Share on other sites

not sure if this mod is still active, but I tried installing it on CKAN today, and it said it installed, but there are no menus or anything to allow me to log in or do anything else. Did I mess something up?

Share this post


Link to post
Share on other sites
4 hours ago, nascarlaser1 said:

not sure if this mod is still active, but I tried installing it on CKAN today, and it said it installed, but there are no menus or anything to allow me to log in or do anything else. Did I mess something up?

The mod is definitely active, but I (still) haven't gotten around to putting it on CKAN, something I really need to do!  Just grab it from here https://kerbalx.com/mod and unpack the zip into your GameData folder.  (The thing on CKAN is the KerbalX PartMapper tool, which someone else put onto CKAN and now there's a name conflict which I need to sort out).  

Share this post


Link to post
Share on other sites
15 hours ago, katateochi said:

The mod is definitely active, but I (still) haven't gotten around to putting it on CKAN, something I really need to do!  Just grab it from here https://kerbalx.com/mod and unpack the zip into your GameData folder.  (The thing on CKAN is the KerbalX PartMapper tool, which someone else put onto CKAN and now there's a name conflict which I need to sort out).  

oh. ok thxs

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.