Jump to content

Craft File Parser?


Red Shirt

Recommended Posts

This isn't a game play question or a plug in problem, so fingers crossed today I am finally posting in the correct place. Not placing any bets.

Short explanation - I need a parser program that will check the integrity of a craft file and show me where things go awry.

Long version - I went to load my Mun Base craft to work on it some more, but the menu said it now contained an invalid part. It worked fine yesterday. I looked to see if the part was available in the part tabs and it was not. I had trouble with this part once before. Early on it had an extra } at the end of the file that I had to fix. I opened the cfg to check today and it was fine. I made no changes. Loaded KSP again and the previously questioned part is now available. The Mun Base craft opened in the hangar, except several later added items are not there. Closed KSP, opened the craft file, and I can see the parts towards the bottom of the file. The craft file is long and will be a bear to try and spot an error - especially for someone with very little experience. I need some way to automate the process.

Help?

Link to comment
Share on other sites

I made a lua tool for parsing standalone .craft file, but i'm assuming the craft part of the save file structure would be the same.

While my tool isn't made for error checking (it's for swapping equivalent parts: mk2 short fuselage -> mk2 crew compartement. it allows me to do build transport, cargo and tanker variants of my spaceplanes very easily), It would probably be able to raise any simple error (ie. file syntax error)

Contact me if you haven't found anything better in a couple of days, and if command line invocation of such a tool isn't scaring you.

Link to comment
Share on other sites

A much better solution would be to fix what ever the hell is causing parts to disappear..

Are you using mods? If not it could be a problem with your hard drive.

i dont know- from his descriptions it seems to get extra parts and bit on the craft file each time he loads so i think it's a KSP originating problem

Link to comment
Share on other sites

i dont know- from his descriptions it seems to get extra parts and bit on the craft file each time he loads so i think it's a KSP originating problem

A re-install would fix this though. If not its a hardware issue. Even with the program he requested he will, at some point, have to address the cause of the issue.

Link to comment
Share on other sites

If my corporate *%$ proxy didn't suck for one day of the year at least, I would find that Hyperedit post... The hyperedit official has a link to download that takes you to a page that has, as far as I remember, other tools. One of them is a craft... hmm... parser, merger, fixer? Don't remember right now, but you might want to check that.

Link to comment
Share on other sites

If my corporate *%$ proxy didn't suck for one day of the year at least, I would find that Hyperedit post... The hyperedit official has a link to download that takes you to a page that has, as far as I remember, other tools. One of them is a craft... hmm... parser, merger, fixer? Don't remember right now, but you might want to check that.

I think the link you're looking for is here:

http://www.kerbaltek.com/craftkitchen

At the bottom of Kerbaltek (guys who maintain Hyperedit) Craft Kitchen there is a link to a Craft Fixer, but it's a pre-0.90 version (really old).

Link to comment
Share on other sites

Thanks all. I will check out craftkitchen. Today I removed the only mod I think might be messing with my parts (texture replacer), and I have rebuilt the base from scratch. I just finished and am taking a break but will see if that helped. I don't think it is a KSP problem. I am not even sure it is a cfg problem. I've counted the } to make sure I have one left for each right. Even if the nodes are backwards the parts should be there to use. Grasping at straws but is there any chance the mu file of very old parts can glitch? I don't have any idea how to open or recompile them if it is a problem.

Link to comment
Share on other sites

Well, removing texture replacer and rebuilding the base did not help But I see this in the cfg:

MODEL

{

model = z_thing/Parts/Structural/Crosswalk/TypeB_S

}

revised for 1.04, should this maybe read?:

MODEL

{

model = GameData/z_thing/Parts/Structural/Crosswalk/TypeB_S

}

What language are the cfg written in and how can I learn how they work?

Totally grasping at straws. Thanks for the help.

Link to comment
Share on other sites

At the bottom of the craftkitchen page is a repair craft option. I uploaded my base file and there were no errors found. Next I removed my part files for the crosswalk and went to Chaosratt's updated z_thing page and grabbed the revised crosswalk parts. My existing base loaded fine, but wait, there's more. I Built a simple craft. Saved. Exited completely out of KSP. On return the part is gone. Neither the new craft nor the old base can be loaded. Pretty sure now it is not me.

Link to comment
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.

×
×
  • Create New...