Issues with extra building levels #156
Comments
Edited to remark that maybe there is a cap after all, just at 4 rather than 3, and that's causing the bug. Although levels above 4 work totally fine in stock (even with KCT installed but disabled) so that's why j'accuse. |
Hmm, I just made changes so that KCT didn't have assumptions about level caps and would work with custom barn kit correctly. Only the Presets should have any assumptions about levels. I may not get a chance to look through those logs for a little while, I've been rather busy lately with work. I really hate how KCT retroactively handles KSC upgrades. It might be time for me to try forcibly overwriting the stock upgrade buttons again. Last time I came to the conclusion I'd have to rewrite the whole right-click UI but I really just need to not have the upgrade events fire. |
If you just made 'em, we don't have 'em--we're on 1.2.2 and KCT 1.3.5.1. Might it be possible (pretty please! :) ) for you to backport those changes to 1.2.2? |
As for overriding the buttons--I can't remember if I made them nice and friendly public delegates, but if not JPL might. |
The 1.2.2 build is mostly up to date with the 1.3 one and I made those changes back in 1.2.2 originally. I'll have to do some playing around, maybe tomorrow. I'll let you know what I find and if I'm able to fix any of this. |
Thanks much! Looking at the log, looks like the upgrade to 5 actually takes the Pad down to 3 (!) and then it tries to go to 4 again but it's already at 4. It should be trivial to repro: Install CBK, add another two tiers of pad, and upgrade in game. I don't think it will need anything beyond that. But if you want you can just use our MM patch to CBK here since it won't depend on anything but MM itself. |
I've seen that sort of looping before in that same manner. It may be caching the wrong max level somehow, in which case it might be an easy fix. I'll test it out tomorrow and will keep you informed. That could explain why the pad restrictions are off as well. I don't know why they decided to use a float for the current level... |
I'll make a clean 1.2.2 in the morning and duplicate using NathanKell's suggestion. Poke me for any testing. |
Definitely hit it going from Tier 5 to 6 with R&D (visual, 4 to 5 when 0 indexed). I'll report back when I've got more, but figured I'd at least let you know I can definitely reproduce it. |
Floats. Floats are the reason. Specifically casting a float times an int to an int, resulting in it going 4.99999 to 4 instead of to 5. I'm rounding now, which I should have done before. Easy to backport to 1.2.2 but I need to look into the launchpad thing as well. Might be fixed with this change too. |
That is awesome! Thank you! :) |
Alright, I think I've got both things fixed. Rounding the level calculation means it shouldn't think it's level 4 when it's actually 5, and the editor checks were assuming 2 levels and aren't anymore. I also changed them so in the VAB you only get the warning if the vessel is bigger than your highest pad allows, but at rollout it compares against the current pad. I've already uploaded the 1.2.2 version to SpaceDock. I also set up automated builds for 1.2.2 backports here. If you get a chance to test and aren't seeing it anymore then please close this. Thanks! |
Wonderful! We're all trying it now! |
Thanks! |
Fixed for me! |
Looks great, worked with up to level 7 Pad and level 7 R&D center without problems that I can detect. |
Closing with many thanks! |
For the save-destroying update of RP-0 we've added way more building levels via CBK.
However, we've encountered two very serious issues.
Does KCT make assumptions about the number of tiers anywhere? How does it query limits? If it made assumptions I'd think only the first three mass limits would work and you couldn't upgrade buildings/the pad past that limit, but nope, upgrades....except it does look like there is a cap, it's just 4 rather than 3? Confusing.
Anyway, while the second issue is fairly serious, it's work-around-able by the honor system. It's the first issue that's the real show-stopper
The text was updated successfully, but these errors were encountered: