DMagic

KSPedia Creation Tutorial

Recommended Posts

DMagic    2923

@The White Guardian Which version of Unity are you using?

As the post above yours suggests, Unity 5.4 isn't compatible with the Part Tools. Some changes were made to how Unity builds Asset Bundles which breaks the Part Tools. It's possible to create a simple script to generate the Asset Bundle, but I'm not sure if that will work correctly with KSPedia assets. It's probably best to stick with Unity 5.2 until Squad gives us new Part Tools.

Share this post


Link to post
Share on other sites
daniel l.    1229

But why though? That is my question. Couldn't it have just been a PNG or DDS file? This seems overcomplicated.

Share this post


Link to post
Share on other sites
JPLRepo    2789

New PartTools for Localization have been published today here.
NB: They can be used for 1.2.2 as well. They are compiled against Unity 5.4.0p4.

Share this post


Link to post
Share on other sites
JPLRepo    2789

Instructions for Localization support for KSPedia can be found here.
 

Share this post


Link to post
Share on other sites
Shymzo    0
Posted (edited)

Is it possible to somehow edit original KSPedia entries?

Edited by Shymzo

Share this post


Link to post
Share on other sites
theonegalen    312

@JPLRepo, I installed the new PartTools into a new Unity Project but there's no AssetCompiler or KSPedia tools anymore. How can I make KSPedia entries?

Share this post


Link to post
Share on other sites
JPLRepo    2789
36 minutes ago, theonegalen said:

@JPLRepo, I installed the new PartTools into a new Unity Project but there's no AssetCompiler or KSPedia tools anymore. How can I make KSPedia entries?

Yes they are in the zip. I just checked. Did you import the unity package as a custom package and ensure they are selected?

Share this post


Link to post
Share on other sites
theonegalen    312
Posted (edited)
52 minutes ago, JPLRepo said:

Yes they are in the zip. I just checked. Did you import the unity package as a custom package and ensure they are selected?

I updated Unity, and reinstalled PartTools, and now the tools show up in the editor, but the bundle isn't showing up in AssetBundles. I'm going to try to start from scratch again.

 

EDIT: Now my prefabs aren't even showing up in the KSPedia tool. Starting to get very very frustrated.

Edited by theonegalen

Share this post


Link to post
Share on other sites
12 hours ago, JPLRepo said:

Yes they are in the zip. I just checked. Did you import the unity package as a custom package and ensure they are selected?

My Windows install of Unity 5.4.0p4 is not importing the assets properly. It seems like KSPAssetCompiler and KSPAssets are not loading.

I did a fresh install of Unity 5.4.0p4 on my OS X machine with the same result. No asset compiler.

Share this post


Link to post
Share on other sites
theonegalen    312
Posted (edited)

@JPLRepo, I uninstalled Unity completely and reinstalled 5.4.0p4, and when I import the unity package now, not only are KSPAssetCompiler and KSPAssets not loading (although they are present in the plugins folder), I am getting NRE spam in my console whenever I open the project. And now, when I install the old PartTools to a completely new Project in this perfectly fresh install of Unity, I still get the same NRE spam, and the PartTools doesn't load. Is there something really obvious that I'm missing?
 

NullReferenceException: Object reference not set to an instance of an object
UrlDir+<get_AllConfigs>d__53.MoveNext ()
UrlDir+<GetConfigs>d__55.MoveNext ()
System.Collections.Generic.List`1[UrlDir+UrlConfig].AddEnumerable (IEnumerable`1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List`1[UrlDir+UrlConfig]..ctor (IEnumerable`1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
KSPPartTools.GameDatabase.GetConfigs (System.String typeName)
KSPPartTools.PartToolsWindow.DrawSpaces ()
KSPPartTools.PartToolsWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

I hate to turn this thread into a PartTools support thread. Is there a better place we can do this?

Edited by theonegalen

Share this post


Link to post
Share on other sites
JPLRepo    2789
On 5/31/2017 at 0:43 AM, theonegalen said:

@JPLRepo, I uninstalled Unity completely and reinstalled 5.4.0p4, and when I import the unity package now, not only are KSPAssetCompiler and KSPAssets not loading (although they are present in the plugins folder), I am getting NRE spam in my console whenever I open the project. And now, when I install the old PartTools to a completely new Project in this perfectly fresh install of Unity, I still get the same NRE spam, and the PartTools doesn't load. Is there something really obvious that I'm missing?
 


NullReferenceException: Object reference not set to an instance of an object
UrlDir+<get_AllConfigs>d__53.MoveNext ()
UrlDir+<GetConfigs>d__55.MoveNext ()
System.Collections.Generic.List`1[UrlDir+UrlConfig].AddEnumerable (IEnumerable`1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List`1[UrlDir+UrlConfig]..ctor (IEnumerable`1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
KSPPartTools.GameDatabase.GetConfigs (System.String typeName)
KSPPartTools.PartToolsWindow.DrawSpaces ()
KSPPartTools.PartToolsWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

I hate to turn this thread into a PartTools support thread. Is there a better place we can do this?

 

Share this post


Link to post
Share on other sites
DMagic    2923

@SuperNaturalCD Did you apply the changes to the prefab? The object you are editing and the prefab saved on the disk are two separate things, any changes made in the editor have to be applied to the prefab, either by dragging the object into the folder again, which will create a new prefab, or just click the "Apply" button in the top-right.

Share this post


Link to post
Share on other sites
linuxgurugamer    5561

Is this the most current set of instructions for creating new KSPedia pages?

Share this post


Link to post
Share on other sites
DMagic    2923

@linuxgurugamer All of this comes from Unity 5.2 and the 1.1 (?) Part Tools. 

With Unity 5.4 (the current version for KSP 1.2 and 1.3) you'll need the latest Part Tools (changes to Unity's Asset Builder methods prevent the old Part Tools from working in 5.4).

I haven't installed or tried to use the 5.4 Part Tools, but I'm not aware of any difference in how KSPedia entries are handled.

Share this post


Link to post
Share on other sites
Poodmund    782
On 8/20/2017 at 4:47 PM, DMagic said:

any changes made in the editor have to be applied to the prefab, either by dragging the object into the folder again, which will create a new prefab, or just click the "Apply" button in the top-right.

Every time I want to make changes I have been deleting the prefab in question, updating the Asset Compiler and KSPedia in the KSPAssets to basically rid the bundle of that prefab completely, then reassigning the new prefab into the asset bundle and then reupdating and reassigning all the categories and screens in the KSPedia tool. Its very long winded.

What and where is this Apply button you speak of?

Share this post


Link to post
Share on other sites
dboi88    1625
On 8/20/2017 at 4:47 PM, DMagic said:

@SuperNaturalCD Did you apply the changes to the prefab? The object you are editing and the prefab saved on the disk are two separate things, any changes made in the editor have to be applied to the prefab, either by dragging the object into the folder again, which will create a new prefab, or just click the "Apply" button in the top-right.

 

17 hours ago, Poodmund said:

Every time I want to make changes I have been deleting the prefab in question, updating the Asset Compiler and KSPedia in the KSPAssets to basically rid the bundle of that prefab completely, then reassigning the new prefab into the asset bundle and then reupdating and reassigning all the categories and screens in the KSPedia tool. Its very long winded.

What and where is this Apply button you speak of?

FML! i've also done that hundreds of times, i'd also like to know where this apply button is lol.

Share this post


Link to post
Share on other sites
DMagic    2923

In the first image of the tutorial you can see the Apply button in the top right of the Inspector window along the right.

For the button to be there you have to drag the object down to your Project folder, then select the object again from the Hierarchy window (the thing you dragged into the folder). Then when you change something you can press the Apply button to update the prefab.

Keep in mind that this does not update any actual text changes in the final KSPedia entry. I think this is mentioned briefly in the tutorial.The Part Tools reads the actual text from an XML file in your Unity project folder (I'm not sure about the exact name or location of the file). The only way to update the XML file without going through the whole process with setting up the KSPedia pages is to manually update the text in the XML file.

Applying the changes will affect everything else: images, image size, text box size, font size, style, etc... just not the actual text. The text changes are updated in the prefab (the file stored on disk, as opposed to the object in the Hierarchy window, which is stored somewhere in the scene file), just not in the xml file.

It's possible that this is fixed in the 5.4 Part Tools.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now