Jump to content

KSPedia Creation Tutorial


DMagic

Recommended Posts

@Poodmund @jandcando and anyone else who is making KSPedia entries and who wasn't already pinged about this:

I added a big red warning to the first post about making sure you don't have squadcore listed as a dependency in your asset project.

If you use any files from the SquadCore asset bundle that was included with the Part Tools (this should be in your Unity Assets folder under SquadCore) then it will be listed as a dependency and will break KSP's asset loader when more than two such entries are installed.

If you want to use background images from the SquadCore folder you should first copy them to a different location within the Unity Assets folder, and manually import them (using the same method as described above; use 2D sprites and disable Mip Maps).

To check if squadcore is listed as a dependency you can go to the Unity Assets/XML folder and look for your *_kspedia.xml file (the prefix will be your asset bundle name). Open the file and look at the last section, if you see this line you will have problems:

<Dependencies>
    <Dependency>squadcore</Dependency>
  </Dependencies>

There should be nothing between the <Dependencies> brackets. Go back and make sure you aren't using any images or other files from the SquadCore folder.

Edited by DMagic
Link to comment
Share on other sites

Ah, @DMagic I found my issue. Stupidly I did not uncheck Mip map generation on the images which was obviously generating a lot more data than necessary. I also went through and ensured that the dimensions of all the image assets had Height and Widths divisible by 4 so that the .dds compression could occur.

Safe to say, 6.5mb has now reduced to 1.3mb. All seems good! :D 

Link to comment
Share on other sites

23 hours ago, Poodmund said:

I have tried both of these and it made minimal difference.

I have also tried this method. Used a Skybox image as a common asset and then added in all the texture elements separately for each panel and it got it down to 6mb for the 5 panels.

I think the compiler may just be badly optimised for image assets.

EDIT: Paging @TriggerAu for input regarding KSPedia asset bundle file size with respect to the pages that contain image-heavy content i.e. Planet pages?

 

All the pages in the stock KSPedia pages use shared background images  - so almost every page has about 80% transparency to keep the size down - the planet ones probably have the most data in their image layer - but as its only a portion of the screen at 2048x1536 and compressed they come in at a reasonable size. using that sort of method does get you good file sizes and fast loads

Sorry I couldn't say earlier about the screen height triggering the scrollbar for peeps and save some time. 

Link to comment
Share on other sites

On 5/4/2016 at 4:19 PM, DMagic said:

To check if squadcore is listed as a dependency you can go to the Unity Assets/XML folder and look for your *_kspedia.xml file (the prefix will be your asset bundle name). Open the file and look at the last section, if you see this line you will have problems:


<Dependencies>
    <Dependency>squadcore</Dependency>
  </Dependencies>

There should be nothing between the <Dependencies> brackets. Go back and make sure you aren't using any images or other files from the SquadCore folder.

I just wanted to make a little correction: the dependencies are listed under Unity Assets/XML/*_bundle.xml , not *_kspedia.xml.

Also I've updated my Delta-v Map according to your last post. Squadcore is no longer a dependency!

Edited by jandcando
Link to comment
Share on other sites

  • 2 weeks later...

I discovered another useful little habit to follow when creating entries with lots of text.

Every time you add a Text object you need to select the font, size, and color, and set the position and any hierarchy information. Instead of doing this you can simply save little Text object snippets as .prefab files. Just setup a Text object, then drag it into your project window to save it as a prefab; drag that back into a Panel to add it to your project.

YbE6iFM.png

I added this information to the first post, too.

Link to comment
Share on other sites

Hello to all! I just made my own version of dV map for KSPedia and I want to share it with you. I used the most recent version of dV map made by @Kowgan.

Spoiler

7XapiD6.png

You can download it here. Place it anywhere in Gamedata folder.

And I want to say "thank you" to @DMagic for his awesome tutorial, because with its help the process of making of this dV map was pretty simple even for me, who have used Unity for the very first time today.

Link to comment
Share on other sites

On 5/28/2016 at 3:56 PM, AlexSheFF said:

Hello to all! I just made my own version of dV map for KSPedia and I want to share it with you. I used the most recent version of dV map made by @Kowgan.

  Reveal hidden contents

7XapiD6.png

You can download it here. Place it anywhere in Gamedata folder.

And I want to say "thank you" to @DMagic for his awesome tutorial, because with its help the process of making of this dV map was pretty simple even for me, who have used Unity for the very first time today.

Awesome!  Can I request one done using the Outer Planets Mod version of the map?

Link to comment
Share on other sites

Can people start posting released KSPedia entries on the other KSPedia thread, it would be helpful:

I've already added links to all of the entries in this thread.

It will be easier to keep things organized there, and easier for people to find the links, since I don't want to add anything to the first post of this thread that isn't related to the tutorial itself.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

@DMagic Thanks for creating the KSPedia tutorial, it's definitely helped. Unfortunately I'm totally stuck. I can't seem to set the title screens or any screen for that matter. Here's what I have thus far:

UGfMCPV.png

Any ideas on what's wrong?

Currently I have a Template.Panel and a MOLE_Home prefab based on your tutorial, but none of them show up in the Title Screen dropdown.

Thanks for the help! :)

Edited by Angel-125
Link to comment
Share on other sites

10 minutes ago, Angel-125 said:

@DMagic Thanks for creating the KSPedia tutorial, it's definitely helped. Unfortunately I'm totally stuck. I can't seem to set the title screens or any screen for that matter. Here's what I have thus far:

<snip>

Any ideas on what's wrong?

Currently I have a Template.Panel and a MOLE_Home prefab based on your tutorial, but none of them show up in the Title Screen dropdown.

Thanks for the help! :)

Did you create a prefab of your screen and assign/create the asset bundle? If there are no prefabs assigned to the asset bundle you won't get anything.

See the prefab and when selected assetbundle is assigned bottom right.
9fJfOv3.png

EDIT: Ninja'd

Edited by JPLRepo
Link to comment
Share on other sites

2 minutes ago, DMagic said:

@Angel-125 Did you add the AssetBundle title to the prefab? The one from the drop down menu in the bottom of that dark grey window in the bottom left when you select the prefab.

 

1 minute ago, JPLRepo said:

Did you create a prefab of your screen and assign/create the asset bundle? If there are no prefabs assigned to the asset bundle you won't get anything.

See the prefab and when selected assetbundle is assigned bottom right.
 

Yup! Here's what it looks like:

WoObf4q.png

mole is the asset bundle.

Link to comment
Share on other sites

17 minutes ago, Angel-125 said:

 

Yup! Here's what it looks like:

<snip>

mole is the asset bundle.

 

 

pPbXuIU.png

I think you might have messed up your category creation. (Guessing)
What did you type in the Category/Subcategory fields at the bottom in the "New Category" section an click create?

Link to comment
Share on other sites

3 minutes ago, JPLRepo said:

I think you might have messed up your category creation. (Guessing)
What did you type in the Category/Subcategory fields at the bottom in the "New Category" section an click create?

for Category, I typed "mole" and for Subcategory I typed "science" without the quotes.

for Part Tools I have KSP 11_2.

Edited by Angel-125
Link to comment
Share on other sites

I've had some "strange" things happen to me as well. Like currently I can't seem to get it to compile updates into my package without having to recreate the whole asset bundle.
I've been discussing that with triggerau.
All I can suggest is scrap the bundle. Scrap the prefabs (you still have the objects).
Recreate the prefabs.
Delete the old assetbundle in the bottom right by clicking delete unused.
Recreat a new bundle - reassign the prefabs and try again.



 

Link to comment
Share on other sites

11 minutes ago, DMagic said:

It looks like you are missing the Database Screen script from your panel object.

Click "Add Component" and type database into the search window, Database Screen should show up.

Ahhh. missed that. Good pickup!
See my pic above you are missing the Database Screen (Script)

Edited by JPLRepo
Link to comment
Share on other sites

13 minutes ago, DMagic said:

It looks like you are missing the Database Screen script from your panel object.

Click "Add Component" and type database into the search window, Database Screen should show up.

D'Oh! Yup, that worked, now I can select the prefabs. :) Apparently I need an "AssetBundles" path though, hitting Build All isn't currently working. Almost there! :)

Edit: scratch that, found the assets compiler. :)

Edited by Angel-125
Link to comment
Share on other sites

1 minute ago, Angel-125 said:

D'Oh! Yup, that worked, now I can select the prefabs. :) Apparently I need an "AssetBundles" path though, hitting Build All isn't currently working. Almost there! :)

No use the Asset Compiler tool as per the tutorial. Not the "Build All''" button in the KSPedia Tool

 

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