Jump to content

Making my first plugin, so I have a LOT of coding / API questions.


ialdabaoth

Recommended Posts

EDIT: I swear I was in the 'Plugin Development' forum when I posted this; can a mod move it please?

So, I have this great idea for a plugin, and I'm reasonably good at C#, but I've never worked in Unity before, and my googlefu is weak today.

My goal is to do the following:

1. Get the list of all parts

2. For each part, get the filesystem location of its part.cfg file

3. Maintain named lists of alternate Parts configuration sets, each of which is a seperate /Parts directory which ONLY contain alternate part.cfg files

4. Allow the user to select, delete, or create an alternate Parts configuration set.

When a new alternate Parts configuration set is created:

1. Create a new directory for that configuration set

2. For each part, get the filesystem location of its part.cfg file and copy it to an identical subdirectory within the new alternate Parts configuration set's directory.

When an alternate Parts configuration set is selected:

1. For each part, parse the alternate part.cfg file from the alternate Parts configuration set's directory, and replace that part's stats with what's in the alternate file.

Edited by ialdabaoth
Link to comment
Share on other sites

Not an ideal first project as Mu is working on a replacement for the system.

1. EditorPartList possible? I'm sure there is one somewhere but I'm not sure where.

2. That may be difficult. As the game currently loads everything at the start there's no guarantee it'll remember the folder name. I suppose you could make sure your part was loaded first and hook into the output log. You may not need to though, just use the part name for your new folders.

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...