Jump to content

0.20 Addon format is playing tricks on me


Recommended Posts

Hi there.

I'm trying to upgrade my addon to the new 0.20 system. I have followed all advice I've found out there. Changed the file structure and added the PART{} wrapping to the config file. I have even downloaded a couple of working mods and compared my own to them. Everything seems to be exactly as it should.

The loading log in game tells me it cannot compile the folder because the model does not exist. It is there though, and referenced in the config file just as other mods and stock parts do. Any ideas?

The model.mu file is the same it was before 0.20 came along. Do I need to re-make it using the unity part tools?


[Error]: PartCompiler: Cannot clone model from 'TINDEngineShields/Parts/Structural/TINDengineShield3' directory as model does not exist

It does not contain any fancy stuff, it's just structural parts with no other functionality.

Here is the mod for reference. I would be very grateful if someone could take a look at it:

https://dl.dropboxusercontent.com/u/9554756/TINDEngineShields-0.20attempt.zip

Thanks!

Link to comment
Share on other sites

Well for starters your texture files are not actually PNG images, they don't have an extension. I opened the file as a PNG and it works, so maybe you just need to add the extension to them for that.

Aside from that though the only thing I can think of that could be wrong is the model.mu file is corrupted or didn't export properly. If its the exact same file as you used in 0.19, then I have no idea mate. :|

Edit: I will try loading the part and see.

Edit: Yeah I'm not seeing it in the editor. I can't see what's wrong mate. Try re-exporting one from Unity again?

Edited by Bluegobln
Link to comment
Share on other sites

Context is helpful, here are all of the messages relating to (one of) your parts:

Load(Model): TINDEngineShields/Parts/Structural/TINDengineShield3/model

File error:

Cannot be negative.

Parameter name: length

at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0

at A..ReadTextures (System.IO.BinaryReader br, UnityEngine.GameObject o) [0x00000] in <filename unknown>:0

at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0

at A.. (.UrlFile ) [0x00000] in <filename unknown>:0

Model load error in 'D:\Kerbal Space Program Development\GameData\TINDEngineShields\Parts\Structural\TINDengineShield3\model.mu'

...

Config(PART) TINDEngineShields/Parts/Structural/TINDengineShield3/part/TIND-engineShield3

...

PartLoader: Compiling Part 'TINDEngineShields/Parts/Structural/TINDengineShield3/part/TIND-engineShield3'

PartCompiler: Cannot clone model from 'TINDEngineShields/Parts/Structural/TINDengineShield3' directory as model does not exist

PartCompiler: Cannot compile model

PartCompiler: Cannot compile part

In this case the message you posted was meaningless, just happening because there was an error loading the model.

Given that error was in ReadTextures it may well be that the cause is your oddly extensionless textures (which are referenced the same way in the mu file), you may have hit a bug in the part tools that was corrected for the 0.20 release.

Link to comment
Share on other sites

Context is helpful, here are all of the messages relating to (one of) your parts:

Load(Model): TINDEngineShields/Parts/Structural/TINDengineShield3/model

File error:

Cannot be negative.

Parameter name: length

at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0

at A..ReadTextures (System.IO.BinaryReader br, UnityEngine.GameObject o) [0x00000] in <filename unknown>:0

at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0

at A.. (.UrlFile ) [0x00000] in <filename unknown>:0

Model load error in 'D:\Kerbal Space Program Development\GameData\TINDEngineShields\Parts\Structural\TINDengineShield3\model.mu'

...

Config(PART) TINDEngineShields/Parts/Structural/TINDengineShield3/part/TIND-engineShield3

...

PartLoader: Compiling Part 'TINDEngineShields/Parts/Structural/TINDengineShield3/part/TIND-engineShield3'

PartCompiler: Cannot clone model from 'TINDEngineShields/Parts/Structural/TINDengineShield3' directory as model does not exist

PartCompiler: Cannot compile model

PartCompiler: Cannot compile part

In this case the message you posted was meaningless, just happening because there was an error loading the model.

Given that error was in ReadTextures it may well be that the cause is your oddly extensionless textures (which are referenced the same way in the mu file), you may have hit a bug in the part tools that was corrected for the 0.20 release.

I probably did it quite messy and the new version has gotten less permissive. I'll re-export the model.

What did you do to get all those error messages? None of that appeared in my alt+f2 log.

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