Jump to content

[WIP ]KSP part.cfg file writer script for unity


DSSP
 Share

Recommended Posts

First of all i'm a beginner modder.

I got fed up copy pasting a cfg file and rewrite it everytime i created a new addon part for ksp through unity.

That thought got me working on a custom editor script to fill in and write a config file.

Here's what i got working so far, imo it's basicly done but i like to have some opinions and suggestions from some fellow modders. :D

DSSPTools.rar

EditorPreview.PNG

Extract the DSSPTools folder somewhere in your Unity Assets.

Add the KSP_ConfigCreate script from assets to your GameObject just like you would with KSP PartTools.

This will add an editor to your inspector, fill in the form and press write and your configfile will be created.

Do with the scripts as you like. use it, change it.

All i ask is inform me of any good changes and/or suggestions ;).

Edit: Found a bug resulting the attach node not being written. FIXED: Link updated

Edit2: Forgot to write a bracket ending the PART{ code. FIXED: Link updated

Edited by DSSP
BugFix2
Link to comment
Share on other sites

  • 2 weeks later...
Wow my parts might actually have accurate descriptions and such now. Awesome.

Definitely not working correctly for me. What version of Unity are you using?

This is written with the latest unity 4 free version.

Link to comment
Share on other sites

Help it is not working it told me multi reading is not supported!

i assume you get this error ingame?

if so i updated the link to fix a missing bracket to end the PART { code.

i hope it works now.

Link to comment
Share on other sites

suggestions: add support for setting up modules like engines and wheels

This is possible in the custom parameters section at the bottom of the form.

It does assume you are able to write the complete module yourself in the textbox.

I will try and create a optionbox for some default wheel/engine values.

If anyone could help out with the required modules needed for engines/wheels and what are optional like gimbal effect etc.

I do not (yet) have such experience with KSP at this moment. nonetheless i will give this a try.

and add the ability to name nodes by the gameobject method instead of directly typing the coordinates (user chooses which method).

could you please elaborate this ?

Link to comment
Share on other sites

I know you can add modules in the custom form, I just mean it would be cool to not have to still go and look at examples of engine models from the stock .cfg files. This is great even without that though

About defining nodes with gameobjects:

http://forum.kerbalspaceprogram.com/showthread.php/36455-Partially-Solved-New-Node-System-Unable-to-get-it-working

Link to comment
Share on other sites

It can be even batter if you make a program like this but not need unity editor. it is like 833MB to download nad about that or less to have it on the computer.

a standalone configeditor wont be hard to make.

but in my opinion it misses the point of being usefull.

the sole purpose of having the editor in unity is that you could export the part.cfg file along with your ksp model.

but still if a standalone config editor is really needed by a lot of people i will create one.

Link to comment
Share on other sites

This is BRILLIANT!!!!! Does it support custom modules? Yes or no to that this is great. It all writes to the folder and I can copy and paste it to KSP. I can preview nodes (brilliant) and that saves me like 400,000 hours of the dreaded. Nope not quite. . . edit CFG click "Reload All" wait repeat. You sir deserve a medal.

Link to comment
Share on other sites

This is BRILLIANT!!!!! Does it support custom modules? Yes or no to that this is great. It all writes to the folder and I can copy and paste it to KSP. I can preview nodes (brilliant) and that saves me like 400,000 hours of the dreaded. Nope not quite. . . edit CFG click "Reload All" wait repeat. You sir deserve a medal.

Thank you for your kind response. :D

And yes this does support custom modules.

Im working on a more sophisticated plugin that would allow templates to be loaded and saved,

a choice for basic stacknodes and one for advanced stacknodes (as suggested by Nazari1382).

A future project would be to add support for props and internals.

Link to comment
Share on other sites

Another suggestion: make the cfg output the mesh name+location as the new format:

MODEL

{

model = modfoldername/Parts/partfoldername/meshname

}

(no file extension just meshname)

instead of the old format:

mesh = model.mu

The old format is not properly using named meshes when I have multiple models in a folder. There are actually even more parameters you could add to the model tag, info is in this post: http://forum.kerbalspaceprogram.com/showthread.php/34013-0-20-PartTools-GameDatabase-and-new-features

Edited by Nazari1382
Link to comment
Share on other sites

  • 1 year later...
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.

 Share

×
×
  • Create New...