Jump to content

magico13

Members
  • Posts

    2,953
  • Joined

  • Last visited

Everything posted by magico13

  1. It should still be in the download, but it's also available here: https://github.com/magico13/KCT/blob/master/GameData/KerbalConstructionTime/KCT Guide.pdf Keep in mind that it hasn't been updated in a while. Simulations aren't in the dev versions for 1.2.2. The part inventory was also split off into a separate mod called ScrapYard. If you're still on KSP 1.1.3 then things will be closer to the guide.
  2. Somehow the launchpad is getting set to level -2, which might be part of the reason. I'll keep looking into it but I'm working on something else right at the moment. Unfortunately the tool I usually use for reading these logs can't read this one for some reason, which is making parsing through it much more difficult
  3. Do you mean KCT in this? KCT isn't involved at all with what we're talking about. I was just saying that I could try to add support for TestFlight like I did for KCT's simulations, within KRASH since you don't have time and I've done it before. KRASH is the simulation mod that KCT recommends, so it's only fair that I occasionally try to contribute to it. I'm not sure when I'll get a chance to get to it (maybe tonight). I'll submit a PR if I get a chance to do it. Edit: It's not quite good enough for a PR yet, but this works. I'm not 100% sure where to put things so they make sense. This just adds a toggle to the launch site UI that enables or disables TestFlight failures for all the parts on the active vessel for that flight. https://github.com/magico13/KRASH/commit/a81a5f6c92b65b0da3243dff9039029c314aec6f
  4. I can maybe do it and submit a PR, but I might not get to it for a bit. At the very least I can do the basic "disable failures" that KCT had.
  5. The latest beta release adds a few new changes. The first is a new event called OnSYTrackerUpdated that is fired when the part tracker has a new build tracked. It also passes the list of updated InventoryParts, but you still have to request the new values yourself. The other changes focus on the "Override Funds" option. Firstly, it should be available even in modes other than career. Additionally, with it active it should cause the current cost of the ship to appear as what you would actually pay overall (ie, a mk1pod costs 600 but only costs 12 when pulled from the inventory and has full monoprop). Note that the way the overriding of funds works right now, you have to pay full price first and then you're refunded later, so if you're low on funds it might be a bit misleading. And finally, you can now sell/discard parts by applying the inventory, then grabbing the stack of parts you want to sell and clicking on the ScrapYard icon. It'll prompt you to check that you're sure you want to sell them, and the message also confirms the number of inventory parts in the stack and the total amount of funds you'll get for selling them. (Example, if you have a stack of 3 mk1pods and two of them are from the inventory, then trying to sell them will list that there are two inventory parts and a total sale price of 1176 funds). That method of selling things still kinda sucks, but that's just because you can't see everything in the inventory yet and choose things that way. I'm going to be starting on that UI this week.
  6. @severedsolo the build doesn't get added until the OnVesselRollout event is fired, which probably happens after Start. If I fire an event when a build happens, would that work for you? I should probably be firing one for that anyway.
  7. Yeah, right now (especially with KCT and StageRecovery) it's best to grab the latest versions. The MagiCore shipped with ScrapYard should almost always be the latest one so that's usually safe. If you're using the last release of StageRecovery it just won't do anything with ScrapYard, which is also safe, but if you've got a dev build you'll want to make sure you keep it up to date since the ScrapYard API has had a few breaking changes. Once ScrapYard is fully released I am going to try to not make any breaking changes, so you can always wait until then (but that might be a month from now depending on what I try to get done before "release"). As for existing saves, it should be ok to add onto an existing save, but make backups whenever you update just in case. Edit: Posted 0.9.3.48, which should have the new changes for the part tracker and a new icon that I made from some stuff I found at flaticon.com (totally stole that idea from @severedsolo). It's a crane picking up a rocket, which is better than some text, but I'll happily accept a different one
  8. There was a period of time where I couldn't post anything using my phone because it copied in a bunch of text+quotes that I was completely unable to delete. It magically went away one day, but yeah, I almost only use mobile for reading anymore... Feel free to grab the latest dev build and try that out, it should do what you want. I'll get an actual beta up tonight most likely. I think you've got the wrong magic man tagged up there (actually not the first time that's happened) The overall scope of what you're suggesting is outside of this mod, but there's no reason another mod couldn't build off of ScrapYard to provide that functionality (I'd recommend that mod require Kerbal Konstructs or KSC Switcher along with ScrapYard. That way you can launch from the island runway or wherever). In fact, with the way ScrapYard is setup, someone who references it directly can already create an entirely separate inventory and not have to do much, if any, work. The only limitations are that you can't currently override ScrapYard's listener for vessel recovery, but that should be easy enough for me to make an option, and you'd have to handle processing (and saving info to the save file) manually since you can't go through the simplified ScrapYard methods that do everything for you. Although there are intermediate methods for working with the inventory/part tracker/saving data that are still really simple to use, so it really wouldn't be tough using the existing infrastructure. It's a cool idea that should already be mostly supported by ScrapYard, but someone else will probably have to do it since I likely won't have time. If someone does want to try doing that, let me know and I can provide some pointers (I also have experience working with Kerbal Konstructs and KSC Switcher).
  9. Here's the requirements, outlined in the first post. Basically, it acts like parachutes and can be used in combination with parachutes. It doesn't reduce the loss from distance, it can only be used to reduce speed.
  10. You went from the Main Menu to flight without stopping through the Space Center, which could cause problems with initialization. But your main problem is that you have KCT installed twice. Remove the following file: C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\KerbalConstructionTime\plugins\KerbalConstructionTime_ksp1.2_3.dll
  11. Correct. There's "builds" and "uses". Builds go up by one for any number of copies on a craft while uses count every copy individually. For instance, a "ship" comprised of 20 of the same fuel tank only counts as 1 "build" of that fuel tank, but 20 "uses" of it. That's already how it works, but it dosen't differentiate between new builds versus parts taken from the inventory. Instead I will provide all three variants of "builds" and "uses": new/fresh instances of the part, reused/inventoried instances of the part, and total instances of the part. Take that ship consisting of 20 of the same fuel tank. Say 7 of them were pulled out of the inventory but the other 13 are new, and that previously a single ship containing 7 fuel tanks was launched and recovered (to get us those 7 pulled out of the inventory). Before this build: Total (builds/uses): 1/7 New (builds/uses): 1/7 Inventoried (builds/uses): 0/0 After building the 20 part blob of fuel tanks: Total (builds/uses): 2/27 New (builds/uses): 2/20 Inventoried (builds/uses): 1/7 Note that the total number of uses is the sum of the new uses and inventoried uses, but the total number of builds is not just the sum of new+inventoried, which is why I have to provide all three options separately. Sound good? Your plan sounds great to me and is probably something I'll add to my own save. I like how TestFlight takes actual flight experience into play, but I also pretty much play stock (vs RO) and like simple things over realism sometimes. Yours will probably meet match my desires pretty well Edit: there's a new build on the build server (#46) but I haven't fully tested it and I'm too tired to do a real beta release. It adds some cool stuff. MagiCore theoretically supports strings using "seq" and "sneq" for equality and inequality. It also lets you use "true" and "false" instead of 1 and 0 (they're just replaced by 1 and 0 internally). Example: "if( [myVar] seq testing ? true : false)" would theoretically check if that value of myVar was equal to the string "testing" (sneq would check if they're different). If the same, it returns "true" which is mapped to 1. If different then it returns "false" or 0. The absolute latest MagiCore should also trim the left and right side of that comparison so that whitespace won't affect it, but the one in the build is one build older and doesn't have that. Also, the part tracker stuff was updated. It had some bugs, I think I squashed them, but it might still have a few hiccups. It'll try to convert the old stuff over, but only the "buildsTotal" and "usesTotal" will carry over. You might just want to reset the whole part tracker by deleting everything.
  12. This is my first real foray into PartModules as well, I typically only write plugins that just listen to events/run during Update and forcibly inject themselves into Squad's stuff in ways they aren't supposed to But, if all of your modules follow a typical naming scheme then you can use the fact that the "name" field of the module template supports Regex. So assuming you have BaseFailureModule, EngineFailureModule, FuelTankFailureModule, etc you could set "name" to something like "name = .*FailureModule" which would match all of those, then have a requirement of "requirement = if([hasFailed] == "true" ? 1 : 0)" (once I make MagiCore work with strings that is...). That would work without you having to do anything special on your side. I should probably also let requirement = true/false natively instead of using numbers (it was easier since I already had MagiCore handling numbers), in which case you could just replace all that with "requirement = [hasFailed]". You are correct that the part tracker tracks all builds and uses of a part. I should be able to very easily add in something that only tracks new builds and new uses, so then you could get new builds/uses and all builds/uses. Since the "build" tracker only counts once per build for any number of copies of a part, it'd be incremented if you had any new copies on the craft, but the number of "reused" builds should be counted too if you have any copied of a part from the inventory. I'll probably break it out into all three possibilities then: - Total builds/uses of a part - New builds/uses of a part - Inventoried builds/uses of a part It looks like you're requiring a hard dependency on ScrapYard. Is that what you want to do, or do you want it to work without ScrapYard as well? If you want a soft dependency, let me know and I can help you with that. You can find the times recovered on the module without any access to the ModuleSYPartTracker class itself if you go through the ConfigNode. Also, I recommend not using ints for determining chance of something happening. The standard is to use a random number between 0 and 1, where 1 means 100% and 0 means 0%. So if something has a 50% chance of failure, just do "if (r.NextDouble() < 0.5) { FAIL } else { NOT FAIL }"
  13. Do you have an existing module and does it have a clear status of "broken"? If so, you should be able to avoid all of this and just add a "requirement" to the forbidden template so that it only triggers in the broken case, although that may be dependent on me getting the string comparisons set up in MagiCore. If you do have an existing module I'd love to see examples of the "regular" and "broken" cases, if they exist.
  14. Nothing has really changed since April 27th except some added stuff to use ScrapYard. If you're using ScrapYard, try removing that and seeing what happens. I'll try to experiment with it tonight.
  15. I typically only need 2 to 4 parachutes for what I would consider a standard SRB (a single mid-size SRB, the "Thumper"). But I also highly recommend RealChute since you can easily drop that down to 2 parachutes. Use the helper in the editor to get estimates of the recovery percentage. If you end up adding a bunch of chutes you'll run into the issue that you'll actually lose money compared to if you just let the SRB be destroyed. For example, an empty "Thumper" costs 358 funds per the wiki. The radial chute costs 400 each. If you only get 90% back with 10 chutes, that's (358+10x400) = 4358 total value but you only get back 3922 funds, meaning you lose 436 funds overall, which is noticeably more than the cost of the SRB on its own. SRBs are super cheap.
  16. ScrapYard and StageRecovery serve two completely different purposes, so you should keep both. ScrapYard is just like KCT's old part inventory (but better) and just lets you reduce build times and such. StageRecovery recovers funds for stages that you drop and the dev builds of StageRecovery work with ScrapYard so that stages recovered this way will be added to the inventory as well. Keep both, they serve different purposes! Edit: @severedsolo please try the latest version. There were a few things that combined to make it so forbidden templates weren't matching correctly. I think I got those taken care of, so things should be kept out of the inventory properly now. Note that I've got some plans to get string comparisons into MagiCore's math parser soon, I just haven't gotten a chance to implement it yet. It might be limited to if statements and I'm trying to decide if I should create new operators specifically for checking string equality, or if I should always test string equality before I test numerical equality. The former is simpler and less error prone, but the latter is a bit more general since you can check both as needed and seems cleaner from a user perspective. Hopefully I can get to that tomorrow, I've got a big landscaping project going on right now because we've had water enter our house due to our poorly set up yard, and as a result we've got to regrade part of the yard, get a wall repaired, and replace 300 square feet of flooring (we could just replace a corner of carpeting, but we didn't like the carpet anyway). So that's where my daylight hours after work are being spent lately
  17. @fallout2077 I'll take a look at that tonight. What happens if you remove ScrapYard? I updated the ScrapYard API a bit but haven't updated it in KCT yet, so that could be causing failures. It was supposed to be a non-breaking change, but with how I call the methods with reflection it's possible that it temporarily broke some stuff. If that's the reason then the fix will be very simple. I might even be able to fix it through Github, so let me try that really quick. Edit: Try KCT build #25 and see if it's still doing it.
  18. After it's not in Beta anymore I'll put it on CKAN. I'll also have it on SpaceDock then, but while in Beta it's staying on GitHub. It does have AVC support if your concern is just knowing when there are updates.
  19. Hmm, I'll have to try that out when I get home tonight. With the EVA, I don't believe its the only module (in fact, I know the ModuleSYPartTracker is on there too). You can see that it sets a "DoNotStore" flag if it encounters any forbidden modules here and then if that's set it doesn't get added to the inventory here. The part blacklist also just sets the DoNotStore flag if the part name is on the list. Unfortunately at work I can't even read through the log file, so I'll have to get back to you later tonight.
  20. New beta build. Adds a few different things so read the changelog below, especially if you've played with module templates. The TL;DR version is that you can blacklist parts by name, the blacklist and module templates (regular and forbidden) should now support module manager (hopefully) and also just adding in a regular .cfg file to your mod folder, and there were a few additions to the API+wrapper. Remember, still beta and mostly untested. If anyone tries adding to the blacklist or the templates through module manager or just a regular .cfg file (and not by editing the default ones) please let me know how that goes! v0.9.1.41 (2017-05-09) Added several methods to the API for interacting with individual parts and the inventory. Tried to broaden the API a bit: takes IEnumerables and returns ILists instead of requiring List for both. Changed MODULE_TEMPLATE to SY_MODULE_TEMPLATE and FORBIDDEN_TEMPLATE to SY_FORBIDDEN_TEMPLATE Added part blacklist that takes a part name (exact, no Regex) and prevents storing the part if it's on the list EVA kerbals are no longer added to the inventory per the blacklist. Templates and Blacklist are referenced via the GameDatabase, meaning they should support Module Manager but at the very least you could create your own .cfg files in your own directory and have them be added (MM should allow changing existing ones though). Template file (and blacklist) now lives in /ScrapYard instead of /ScrapYard/PluginData so it can be loaded.
  21. I need to update the API to add a method to add/remove individual parts since right now the API primarily deals with Lists of parts (I should also probably swap that over to IEnumerable), but if you're working with a hard dependency you can use RemovePart (or FindPart) on ScrapYard.Instance.TheInventory (https://github.com/magico13/ScrapYard/blob/master/ScrapYard/PartInventory.cs#L127). You can use a FORBIDDEN_TEMPLATE (https://github.com/magico13/ScrapYard/blob/master/GameData/ScrapYard/PluginData/ModuleTemplates.cfg#L29) [crap, I might have not updated that file in source control, that should say EVAKerbal or KerbalEVA, I have it right locally] to prevent a part from being put into the inventory, but without Module Manager support up and running yet you have to add that template to the ModuleTemplates.cfg file manually. If you have a module that's got a clearly defined "broken" state, you can set up a FORBIDDEN_TEMPLATE that matches that state (you can also have a regular MODULE_TEMPLATE that matches the regular state). Please feel free to post the module on this thread so 1) I can help and 2) I can see what kinds of things people will be putting through the code.
  22. A "like" part is tracked by part name (mk1pod for instance) only, excluding any other modules. It's set up in a generic way so you could create a new tracker using a different level of "strictness", but you'd have to increment it yourself. Right now the player interaction isn't that detailed and they don't decide which parts to use. In the future the player will be able to select individual parts out of the inventory and see which modules are saved and their values, in which case it will be very detailed. Refurbishment isn't really a thing right now, but if you created another module and marked it to be tracked then it will persist through the part's lifetime. You may decide not to use the built in TimesRecovered but might instead create your own, for instance.
  23. Simulations were removed from KCT (it's been deprecated for about a year). Simulations now require KRASH:
  24. You want to reset how they were spent? There's the "Reset Upgrades" button but it normally requires two points. You can alter the UpgradeResetFormula to just cost 0 upgrades if you want (so you can reset them for free), or edit the save file to set any "Item = x" and "Upgrade = x" to zero within the KerbalConstructionTimeData node. Basically anywhere it mentions upgrades within that node, just set it to zero. I can also do it really quickly if you upload your save file.
  25. Not surprised that KCT got a bit messed up since there was a breaking MagiCore change not too long ago, but it shouldn't have permanently broken the save data... Did you purchase any points before your data was lost? If not, it should have returned to the correct amount since that's just based on the tech tree. If you did purchase some then there are a few ways you could get around that (ideally if you remember how many you bought). Two options: 1) Open the save file, search for "PurchasedUpgrades" (without quotes) and change the two numbers "Item = 0" to how ever many upgrades you purchased. I think it's funds for the first one and science for the second but I don't entirely remember. Or option 2) open up the KCT settings in game (if you've changed any settings make sure you either save it as a new Preset or backup the KCT_Settings.cfg file in the save folder) and change the UpgradeScienceFormula and/or the UpgradeFundsFormula and just set them to "0" (again, no quotes). You can then just purchase upgrades for free. When you're done with that, go back into the settings and choose the Default Preset again, or whichever Preset you were using (or put the KCT_Settings.cfg backup back in your save file). If you need any help let me know, but it's probably better suited for the KCT thread I guess this serves as a warning. If you're gonna use KCT with ScrapYard, please make sure you're updated to the latest version of the KCT dev builds! Things break otherwise!
×
×
  • Create New...