-
Posts
837 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Benjamin Kerman
-
I have some code below that loads cfg files, reads them, and then sets one value inside. private void LoadChangelogs() { Debug.Log("[KCL] Loading changelogs..."); ConfigNode[] changelogNodes = GameDatabase.Instance.GetConfigNodes("KERBALCHANGELOG"); //searches for any instances of files with a changelog node UrlDir.UrlConfig[] cfgDirs = GameDatabase.Instance.GetConfigs("KERBALCHANGELOG"); bool firstVersionNumber = true; foreach (UrlDir.UrlConfig cfgDir in cfgDirs)//loops through all of the files found { bool show = true; ConfigNode cln = cfgDir.config; cln.TryGetValue("showChangelog", ref show); if (!show) { continue; } string mod = cln.GetValue("modName"); string modChangelog = ""; List<string> version = new List<string>(); foreach(ConfigNode vn in cln.GetNodes("VERSION"))//adds version nodes to the string { if(!firstVersionNumber) { modChangelog += "\n"; } firstVersionNumber = false; version.Add(vn.GetValue("version")); modChangelog += (vn.GetValue("version") + ":\n"); foreach(string change in vn.GetValues("change")) { modChangelog += ("* " + change + "\n"); } } modChangelogs.Add(new Tuple<string, string, string>(mod, modChangelog, HighestVersion(version))); if (!cln.SetValue("showChangelog", false)) { Debug.Log("[KCL] Unable to set value 'showChangelog'."); } Debug.Log($"[KCL] {cfgDir.parent.fullPath}"); //Returns something like "C:/Users/BenjaminK/Desktop/KSP/1.5.1/GameData/CoolMod/Coolmodchangelog.cfg" cfgDir.config.Save(cfgDir.parent.fullPath); //Saves the file with the one field edited firstVersionNumber = true; } changesLoaded = true; } Unfortunately, this changes a nicely formatted changelog like the one described here into this. Any suggestions as to what I can do to fix this?
-
[1.8.x-1.9.x] Kerbal Changelog v1.3.0 (6.14.20)
Benjamin Kerman replied to Benjamin Kerman's topic in KSP1 Mod Releases
It should be distributed like ModuleManager, but I haven't implemented any versioning or multiple .dll restrictions yet. The .dll is self contained, so it can be open in the main folder as well, like Module Manager, but it would probably be better to have it in it's own folder for licence packaging and the like. Sure thing. I'll have that in the next release. -
Man that's a 0/10 for me, you must be new
-
jumping joyously. Evan P. Shmirtd, the __________________ man to walk the Earth.
-
9/10 pretty cool element there and you spelt it right I think
-
banned for having furry feet
-
Teenagers
-
How To Update Part Appearance?
Benjamin Kerman replied to Electrocutor's topic in KSP1 C# Plugin Development Help and Support
Maybe try checking out some of the code of Kerbal Crash System? It does part deformation and probably model changing as well. EDIT: Reading through the code, it looks like Enzo used https://github.com/EnzoMeertens/KerbalKrashSystem/blob/master/Source/KerbalKrashSystem/KerbalKrashSystem/KerbalKrashSystem.cs#L401 to change the shape of the part, and a similar function (called a couple lines above) to change the collider. -
Banned for not knowing those complicated words
-
Message to Squad to Retire Curseforge
Benjamin Kerman replied to Kroslev Kerman's topic in Kerbal Network
It seems unlikely to me that SQUAD would endorse SpaceDock without ensuring that SpaceDock is never going to do down as long as KSP is around and active (by providing funding and/or computer parts) because if you're going to have a mod hosting site, you're going to have a mod hosting site that is always up and fast, because otherwise it becomes another problem that they have to deal with (people complaining about the hosting site being down or slow and that it then is SQUAD's fault). I personally work out of GitHub and another private repo server, making releases there. It serves as an issue tracker and it's easy to use... -
Hey @damonvv, noticed a problem with your changelog files You need the KERBALCHANGELOG node around all the versions, and a bracket was missing :p Corrected one for 1.2.0.2 is here: https://pastebin.com/86f0U48L I haven't found a way of getting the nodes and values out without destroying the changelog formatting (removing the outer KERBALCHANGELOG node) in the process, and I'm looking for a solution to that... For now, you just have to make sure that everything's in a KERBALCHANGELOG { } node before a release and all the other standard cfg stuff
-
Doesn't look like it, however it is only up to KSP v.1.4.x, so feel free to use it on that version and try it on KSP 1.5.x, but don't bother the author about updates!
-
Maybe changing the animation from the flameout node in the massiveSRB part cfg? flameout { PREFAB_PARTICLE { prefabName = fx_exhaustSparks_flameout_2 transformName = fxPoint oneShot = true } AUDIO { channel = Ship clip = sound_explosion_low volume = 1.0 pitch = 2.0 loop = false } } to flameout { PREFAB_PARTICLE { prefabName = fx_smokeTrail_veryLarge transformName = fxPoint oneShot = true } AUDIO { channel = Ship clip = sound_explosion_low volume = 1.0 pitch = 2.0 loop = false } } Where the prefabName is changed to the original fx (or any other fx that you want)
-
[1.8.x-1.9.x] Kerbal Changelog v1.3.0 (6.14.20)
Benjamin Kerman replied to Benjamin Kerman's topic in KSP1 Mod Releases
Update! v.1.1.1 of Kerbal Changelog has been released Bug fixes * Fixed incorrect version displayed in title bar and runtime error associated with it See https://github.com/BenjaminCronin/KerbalChangeLog/ releases for the latest versions, built for KSP 1.4.x and KSP 1.5.x. -
Heya @Gaarst, got a new mod for you! Not quite sure where it should go, maybe in modders utilities or something?
-
[1.8.x-1.9.x] Kerbal Changelog v1.3.0 (6.14.20)
Benjamin Kerman replied to Benjamin Kerman's topic in KSP1 Mod Releases
Update! v.1.1 of Kerbal Changelog has been released Feature additions * Added a quick view page to see which mods have new changelogs to read (Suggested by linuxgurugamer) * Added the mod's latest version to the title bar (please see README.md for information on how to format the version string so that KCL will recognize it as a valid version and display in in the title bar) (Suggested by MrCarrot) See https://github.com/BenjaminCronin/KerbalChangeLog/releases for the latest versions, built for KSP 1.4.x and KSP 1.5.x. -
Wondering if this method is the right way to go about adding energy to a part, and if so, what units the argument double energy is in. If not, a pointer to some overlooked method of adding energy to parts is appreciated. EDIT: I have made a fool of myself. A simple google later and I have found this: EDIT 2: Turns out my original question still stands: What units is "energy" in in ModuleCoreHeat.AddEnergyToCore?