DYJ Posted May 20, 2013 Share Posted May 20, 2013 (edited) LegacyLegacy parts go in KSP_OS/PartsLegacy plugins go in KSP_OS/PluginsNew fancy systemThe new fancy system gives each mod a folder inside GameData with a conventional structure inside, so:GameData/YourModFolder/Plugins GameData/YourModFolder/Parts GameData/YourModFolder/Otherstuff And so onPlugindata gets generated in the folder the plugin is in.Like this:dllFolder/PluginData/dllName/For the parser to find parts in the new system the .cfg needs a PART wrapper, like so:PART{normal .cfg stuff}Flag ImagesFlags should be a small graphic in .png format. It is recommended to use 256x160 as the image size, although it appears that larger images do load correctly. Users should make a subfolder in the Gamedata folder with your choice of name and put the flag image files inside that. Example:Gamedata/Flags/image.pngIt is probable that flags bundled with mods will load correctly because of this structure. rescaleFactor and attachnodesIt appears rescaleFactor no longer scales the position of attachnodes,it seems that setting the scale to 1 scales the nodes 1* rescaleFactor ie correctly.rescaleFactor = xscale = 1The devs are aware of this so it might be fixed soon.Other moderators: Feel free to edit this post as new info emerges.Everyone else: Post new/useful information in the thread and it'll eventually get added to the OP Edited May 23, 2013 by DYJ Link to comment Share on other sites More sharing options...
Kine Posted May 22, 2013 Share Posted May 22, 2013 Woot! No more Unit Tests Link to comment Share on other sites More sharing options...
lyndonguitar Posted May 22, 2013 Share Posted May 22, 2013 Can I manually put pre-.20 mods to the new mod folder for organization? or that new file structure has a different system and mods must be updated first? Link to comment Share on other sites More sharing options...
DYJ Posted May 22, 2013 Author Share Posted May 22, 2013 You should just need to add the PART{} wrapper and that should be it. Link to comment Share on other sites More sharing options...
EndlessWaves Posted May 22, 2013 Share Posted May 22, 2013 Fresh from #kspmodders:[22:48:21] <Taverius> Mu, how does overriding the .cfg of stock parts work in .20?[22:48:43] <+Mu> blog post on it coming in next day or so[22:48:56] <+Mu> but basically you need to use the @ symbol[22:49:11] <+Mu> @someValue = newValue[22:49:24] <+Mu> @someNode { // newnodedef }[22:49:48] <+Mu> the node thing is a lil odd tho[22:50:00] <+Mu> you need to tag the nodes with ids[22:50:14] <+Mu> MODULE (Engine00) { // enginemodule }[22:50:16] <+Mu> then[22:50:27] <+Mu> @Engine00 { }[22:50:38] <Taverius> so if the stock .cfg[22:50:45] <Taverius> (like all the squad ones ive seen)[22:50:48] <Taverius> doesnt number the node[22:50:53] <Taverius> then I can't override?[22:51:16] <careo> hehe. then you need to patch the stock config file first so you can avoid having to patch it for an override? [22:51:17] <+Mu> currently no, they're in need of redoing :$ Link to comment Share on other sites More sharing options...
Gaiabladegold Posted May 22, 2013 Share Posted May 22, 2013 I actually just dropped the old mod parts into the mod folder like in the older version, didn't even have to change the .cfg file at all, and it worked like a charm, most parts worked fine... The only exceptions were a few made with the part generator, their connector nodes went wonky, but otherwise great, even mechjeb worked by dropping it in the old way... Haystack and Crew manifest didn't work, though, not sure what happened there... Link to comment Share on other sites More sharing options...
EndlessWaves Posted May 22, 2013 Share Posted May 22, 2013 [23:02:19] <+Mu> also..... big change.....[23:02:41] <+Mu> if you're putting part configs in gamedata then they have to be surrounded with PART {} nodes[23:02:49] <+Mu> cuz gamedata doesnt know whats in there[23:02:54] <+Mu> but... you dont have to call them part.cfg[23:03:05] <+Mu> and you can put many configs in the same config file[23:03:11] <+Mu> parts, resources, internals, etc Link to comment Share on other sites More sharing options...
shadowsutekh Posted May 22, 2013 Share Posted May 22, 2013 http://forum.kerbalspaceprogram.com/showthread.php/30613-New-part-loading-system^ That should be helpful I hope. Link to comment Share on other sites More sharing options...
andisheht3 Posted May 22, 2013 Share Posted May 22, 2013 Is the Plugindata folder missing? Here's a screenshot of my directory: http://i.imgur.com/wNjYFdX.pngThere's not plugindata folder. Link to comment Share on other sites More sharing options...
DYJ Posted May 22, 2013 Author Share Posted May 22, 2013 Plugindata gets generated in the folder the plugin is in, you shouldn't have one from the start.Like this:dllFolder/Plugindata/dllName/ Link to comment Share on other sites More sharing options...
andisheht3 Posted May 22, 2013 Share Posted May 22, 2013 Ah ok, so what if I'm installing a legacy plugin, like mechjeb 2? Link to comment Share on other sites More sharing options...
ahappydude Posted May 22, 2013 Share Posted May 22, 2013 Cheers for all info dyj, was a bit confused at first haha ^^ Link to comment Share on other sites More sharing options...
Snjo Posted May 22, 2013 Share Posted May 22, 2013 Custom engine sounds don't play in the new system. What is the proper syntax now?It used to work with the lines:// --- Sound FX definition ---sound_fspropstart.wav = engagesound_fspropidle.wav = powersound_explosion_low = flameoutWhere the two first ones are now in the GameData\Firespitter\Sounds folder, and the last one is a stock sound.(The last one still works, obviously) Link to comment Share on other sites More sharing options...
Gaius Posted May 22, 2013 Share Posted May 22, 2013 Plugindata gets generated in the folder the plugin is in, you shouldn't have one from the start.Some mods come with a PluginData folder that needs to go somewhere from the start...While I'm here, may I direct attention here? I may have picked the wrong forum to ask that question, might have been better asked here. Link to comment Share on other sites More sharing options...
Fyrem Posted May 22, 2013 Share Posted May 22, 2013 Ah ok, so what if I'm installing a legacy plugin, like mechjeb 2?2.0.8 MJ is out, and is fully compatible with KSP 0.20 Link to comment Share on other sites More sharing options...
Gaius Posted May 22, 2013 Share Posted May 22, 2013 It appears rescaleFactor no longer scales the position of attachnodes, fixing this is as easy as adding a scale value matching the rescaleFactor like so:rescaleFactor = xscale = xMatching the rescaleFactor value actually doesn't work. For my parts I needed to set:scale = 1.0rescaleFactor = 1.25... in order to restore 0.19 behavior. Setting scale to 1.25 is what I tried first, but that actually moved the nodes well outside and away from the model. Link to comment Share on other sites More sharing options...
DYJ Posted May 23, 2013 Author Share Posted May 23, 2013 Yeah you are right, I updated the post. Link to comment Share on other sites More sharing options...
giltirn Posted May 23, 2013 Share Posted May 23, 2013 Gaius asked above, but its worth asking again: how do we deal with mods that come with their own PluginData folder containing misc config files? Link to comment Share on other sites More sharing options...
JDP Posted May 23, 2013 Share Posted May 23, 2013 Gaius asked above, but its worth asking again: how do we deal with mods that come with their own PluginData folder containing misc config files?the PluginData folder should be located within the same Plugins folder as the .dll. So it will be GameData/ModName/Plugins/PluginData. Link to comment Share on other sites More sharing options...
Fel Posted May 23, 2013 Share Posted May 23, 2013 The new folder structure makes it fairly easy to group SQUADS parts together, but othermods load parts based on their own name... would it cause any problems if I just put parts under squad's folder so I can have my neat groupings? Link to comment Share on other sites More sharing options...
Greys Posted May 23, 2013 Share Posted May 23, 2013 It's important to note that folder names are case sensitive; /GameData/YourMod/Flags works, Gamedata/YourMod/flags does not Link to comment Share on other sites More sharing options...
Frostiken Posted May 23, 2013 Share Posted May 23, 2013 I was told you could share one mesh / texture across multiple parts. I don't know if this was a feature that made it for 0.2 or was a future goal. Any info? My first order of business was rescaling the RGUs up by 1.45 and down by 0.45 so I had a circular probe-sized one and a mammoth one. I'd like to just use the same loaded mesh / texture as the normal RGUs since they're 8MB apiece. Link to comment Share on other sites More sharing options...
Aeshi Posted May 23, 2013 Share Posted May 23, 2013 (edited) Why the heck was all this re-formating necessary in the first place? as far as I can tell it's only reason to exist is to aggravate anyone who used mods. I've spent about an hour now trying to get all the mods I normally use to work, with no success whatsoever.Heck, if what you say is correct, and all Plugin-related files go in the "GameData" folder then, why is there a Plugin folder in the KSP folder? that's just deliberately misleading. Edited May 23, 2013 by Aeshi Link to comment Share on other sites More sharing options...
itchyDoggy Posted May 23, 2013 Share Posted May 23, 2013 What about Kethane, where do you put the PluginData? in plugins/PluginData/MMI_Kethane/ ? Link to comment Share on other sites More sharing options...
TaranisElsu Posted May 23, 2013 Share Posted May 23, 2013 The new way to make Part-less plugins is to use the KSPAddon attribute, like this:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using UnityEngine;[KSPAddon(KSPAddon.Startup.EditorAny, false)]public class Class1 : MonoBehaviour{ private float lastUpdate = 0; void Awake() { Debug.Log("TAC [" + this.GetInstanceID().ToString("X") + "][" + Time.time + "] Awake"); } void Update() { float delta = Time.time - lastUpdate; if (delta > 15) { Debug.Log("TAC [" + this.GetInstanceID().ToString("X") + "][" + Time.time + "] Update"); lastUpdate = Time.time; } }}This class will be loaded every time the scene is changed to the Editor, and Awake will be called. And it will be unloaded when the scene is changed to something else, but until then Update() will be called. Link to comment Share on other sites More sharing options...
Recommended Posts