Jiraiyah Posted October 2, 2016 Share Posted October 2, 2016 Thought this may help, take a look, in this picture, first I remove the default Tweak scale module, that part works ok, then I add my own tweak scale with the type defined and on the left side, that is what i see, first of all, it's on default type without ability to change it in GUI, second, using the right button i set it to 2, not only the slider won't update, also the part is not changing it's scale, also, even if I use the slider in the GUI, still the part is not respecting the value at all Link to comment Share on other sites More sharing options...
Jiraiyah Posted October 2, 2016 Share Posted October 2, 2016 Ok, tested the tweak scale on fresh install and it works, but now i can't figure what could interfere with it, thought to send a log file here and ask for help, there should be a mod interfering with this mod, someone plese help me, i am totally new to tracking bugs in ksp https://www.dropbox.com/s/r9a9l91ktxxcbmb/output_log.zip?dl=0 thanks Link to comment Share on other sites More sharing options...
pellinor Posted October 2, 2016 Author Share Posted October 2, 2016 3 hours ago, Jiraiyah said: Ok, tested the tweak scale on fresh install and it works, but now i can't figure what could interfere with it, thought to send a log file here and ask for help, there should be a mod interfering with this mod, someone plese help me, i am totally new to tracking bugs in ksp https://www.dropbox.com/s/r9a9l91ktxxcbmb/output_log.zip?dl=0 thanks A good start is to search for "exception" in the logfile (and there are many of them). These are problems that could cause collateral damage elsewhere. First thing I would try is to test without the mods mentioned in the exceptions (like partAngleDisplay). I didn't see any TweakScale related problem in the log. Link to comment Share on other sites More sharing options...
Jiraiyah Posted October 3, 2016 Share Posted October 3, 2016 (edited) Well, I narrowed down the problem to Auto load mod, something is happening when the game is launched and a game instance is loaded normally that Auto Load mod is bypassing, I sent an issue message to it's developer's repo and he said he will look into it, but i never thought something like this would happen between the time ksp main menu shows up and when the user loads a game! here is the link to the issue post : https://github.com/allista/AutoLoadGame/issues/4 Edited October 3, 2016 by Jiraiyah Link to comment Share on other sites More sharing options...
pellinor Posted October 7, 2016 Author Share Posted October 7, 2016 (edited) Dev updates * update MM * two new stock parts * messing with crewCapacity scaling (currently turned off because of problems) [edit:] * antenna scaling (range not tested yet) (a large antenna is worth the same weight/cost in smaller combined antennas of the same type) Edited October 7, 2016 by pellinor Link to comment Share on other sites More sharing options...
Fonz Posted October 8, 2016 Share Posted October 8, 2016 Is this 1.2 Compatible? Link to comment Share on other sites More sharing options...
Tex_NL Posted October 8, 2016 Share Posted October 8, 2016 (edited) 35 minutes ago, Fonz said: Is this 1.2 Compatible? Without testing, who knows? Install. Test. Does it work? - Yes: Hooray - No: Too bad. Delete. Edited October 8, 2016 by Tex_NL Link to comment Share on other sites More sharing options...
xD-FireStriker Posted October 9, 2016 Share Posted October 9, 2016 (edited) 13 hours ago, Fonz said: Is this 1.2 Compatible? I believe it has been complied to work on 1.2 before the mm was updated, I am unsure if it has been modified scene the release of the 1.2pre mm dll. I have installed it and to my knowledge it works but it errors on start up, expect bugs but it works fonz. 12 hours ago, Tex_NL said: Without testing, who knows? Install. Test. Does it work? - Yes: Hooray - No: Too bad. Delete. Tex its nice to see if someone as installed it and tested it, but yes you do test it to see if it works. i like to ask and also test so i have the answer if some one asks if no one know the answer Edit: 3 posts up says he has updated it with the mm patch so it will mostly work better than my version but still espect bugs [Make sure you use dev not the 1.1 release] Edited October 9, 2016 by xD-FireStriker Link to comment Share on other sites More sharing options...
pellinor Posted October 11, 2016 Author Share Posted October 11, 2016 dev update: * compile against KSP 1.2 * ModuleManager 2.7.1 Link to comment Share on other sites More sharing options...
xD-FireStriker Posted October 12, 2016 Share Posted October 12, 2016 Thanks for the quick dev update to 1.2 full release. Keep up the good work I can't play ksp with out tweak scale, good luck on geting a full release out of tweak scale FireStriker xD Link to comment Share on other sites More sharing options...
pellinor Posted October 12, 2016 Author Share Posted October 12, 2016 (edited) @Shadowmage since the prerelease forum is locked, let's continue the discussion about changing crewCapacity here. Are you adding of removing seats with respect to the prefab? You can probably get away with only handling one of those situations. I tested your code and the call on onEditorShipModified, this is what I found: Spoiler // code for reference private void updateCrewCapacity(int capacity) { MonoBehaviour.print("Setting crew capacity to: " + capacity + " current: " + part.CrewCapacity); part.CrewCapacity = capacity; if (!HighLogic.LoadedSceneIsEditor) { return; }//only run the following block in the editor; it updates the crew-assignment GUI if (EditorLogic.fetch.editorScreen == EditorScreen.Crew) { EditorLogic.fetch.SelectPanelParts(); } VesselCrewManifest vcm = ShipConstruction.ShipManifest; if (vcm == null) { return; } PartCrewManifest pcm = vcm.GetPartCrewManifest(part.craftID); if (pcm == null) { return; } int len = pcm.partCrew.Length; for (int i = 0; i < len; i++) { pcm.RemoveCrewFromSeat(i); } pcm.partCrew = new string[capacity]; //have to init the array to blank strings or it will null-ref on a stock method for (int i = 0; i < capacity; i++) { pcm.partCrew[i] = ""; } } private void onEditorVesselModified(ShipConstruct ship) { //this could all be optimized, cleaned up, handled better... but mostly working if (inflated && part.CrewCapacity == inflatedCrew) { return; } else if (!inflated && part.CrewCapacity == deflatedCrew) { return; } MonoBehaviour.print("Updating crew capacity from editor vessel modified event"); updateCrewCapacity(inflated ? inflatedCrew : deflatedCrew); } == extra seats == * start with mk1 pod * add seats (in my case 1->4) * fill those seats with kerbals * try to attach a new pod => editor breaks: IndexOutOfRangeException: Array index is out of range. at (wrapper stelemref) object:stelemref (object,intptr,object) at VesselCrewManifest.UpdatePartManifest (UInt32 id, .PartCrewManifest referencePCM) [0x00000] in <filename unknown>:0 at VesselCrewManifest.UpdateCrewForVessel (.ConfigNode vesselNode, System.Func`2 persistFilter) [0x00000] in <filename unknown>:0 at EditorLogic.RefreshCrewAssignment (.ConfigNode craftNode, System.Func`2 persistFilter) [0x00000] in <filename unknown>:0 at EditorLogic.<SetupFSM>m__8C () [0x00000] in <filename unknown>:0 at KerbalFSM.RunEvent (.KFSMEvent evt) [0x00000] in <filename unknown>:0 at KerbalFSM.updateFSM (KFSMUpdateMode mode) [0x00000] in <filename unknown>:0 at KerbalFSM.UpdateFSM () [0x00000] in <filename unknown>:0 at EditorLogic.Update () [0x00000] in <filename unknown>:0 ** The same happens if I try to launch with a filled extra seat. Did this work for you? ** When saving and launching directly from the pad, extra seats are ignored ** F5/F9 works (filled extra seats stay filled) For TweakScale it might be a viable compromise if extra seats are available in flight but not in the editor or at launch. == removed seats == * start with mk1 pod * remove seat * add another pod => seat has returned Any further change will fix things, for example changing fuel amount in a tank. This is a bit annoying but would work as long as any reappeared seats are cleared when launching from the editor (or saving the vessel). ** When launching a saved vessel directly from the pad, I can assign kerbals to removed seats. This seems to fail silently (still it is a source of confusion and might lead to problems with other mods that mess with the launch of a ship). Edited October 12, 2016 by pellinor Link to comment Share on other sites More sharing options...
Shadowmage Posted October 12, 2016 Share Posted October 12, 2016 @pellinor For my purposes I'm reducing the number of seats compared to the prefab. So the prefab contains the maximum seats that will ever be present, with the currently available seats being determined by the module stats. Yes, I could see how there would be problems if trying to expand the number of seats compared to the prefab (due to the stock code relying on prefab crew capacity rather than actual instance of the part). I actually had a thought on this the other night. What if you Module-Manager patched all of the pods/crewed parts that had the TweakScale module in them to have a much higher crew capacity in the prefab, and limited this down to the 'current' value through the plugin code? So you might patch the mk1 pod to have say 8 max crew, but this gets reset/limited down to 1 for a normal scale part, while still allowing for 2-8 crew for larger scaled sizes. Hmm.. regarding the launching from the space-center scene -- that might be a problem that cannot be solved; I don't think that those GUIs ever initialize the parts at any point, so the module code never has a chance to run, and thus those GUIs will always use the values derived from the prefab. My only thoughts on that would be to somehow query for whenever that GUI is open/opened and hack its internals a bit; not a clean or elegant solution, but about all that I can think of. I'll be taking another pass at this stuff this weekend. Sadly I don't get much good development time during the week anymore (or rather the time that I have, I do not have access to KSP to test stuff, can only do blind development...). Link to comment Share on other sites More sharing options...
pellinor Posted October 12, 2016 Author Share Posted October 12, 2016 1 hour ago, Shadowmage said: What if you Module-Manager patched all of the pods/crewed parts that had the TweakScale module in them to have a much higher crew capacity That would open quite a whole can of worms with its side effects, many of which also affect unscaled parts. I consider scaling of crewed parts a pretty exotic use of TweakScale, so it is quite important that glitches and side effects are limited to scaled parts. Most likely I'll also make the scaling of seats opt-in instead of doing it by default. Link to comment Share on other sites More sharing options...
Shadowmage Posted October 12, 2016 Share Posted October 12, 2016 (edited) 46 minutes ago, pellinor said: That would open quite a whole can of worms with its side effects, many of which also affect unscaled parts. I consider scaling of crewed parts a pretty exotic use of TweakScale, so it is quite important that glitches and side effects are limited to scaled parts. Most likely I'll also make the scaling of seats opt-in instead of doing it by default. True enough; was merely an idea Sure would be nice if the stock code didn't rely on the -prefab- part for the crew capacity information. Though that may well require a substantial overhaul to the stock crew-handling code. I'm honestly a bit surprised that RoverDude didn't fix up that end of the code for his MKS inflatables. Anyhow, I'll be playing around with this code a bit more over the weekend and will see if I can come up with any solutions to the 'too many crew for the prefab' problems. Edit: Took a peek at RoverDude's crew capacity code. https://github.com/BobPalmer/UmbraSpaceIndustries/blob/master/USITools/USITools/USIAnimation.cs Apparently it doesn't support in-editor manipulation of crew capacity, and initializes parts to have zero capacity in the prefab/config ( https://github.com/BobPalmer/MKS/blob/master/FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/Parts/Tundra_HabRing.cfg ). Hmm..... sadly nothing helpful there. Edited October 12, 2016 by Shadowmage Link to comment Share on other sites More sharing options...
pellinor Posted October 12, 2016 Author Share Posted October 12, 2016 Dev update: * fix scaling of input/outputResources (e.g. consumption of reaction wheels) Link to comment Share on other sites More sharing options...
pellinor Posted October 12, 2016 Author Share Posted October 12, 2016 Could someone proficient with antennas test if scaled antennas work? A large antenna should be as strong as the same weight in smaller combined antennas of the same type. My suspicion is that the scaling will work for the antenna of the active vessel but not for unloaded relays. Link to comment Share on other sites More sharing options...
pellinor Posted October 12, 2016 Author Share Posted October 12, 2016 There was an issue with flipped IVAs that I could not reproduce yet (it seems to need more than a direct launch and scaled cockpit): https://github.com/pellinor0/TweakScale/issues/38 Has someone seen that yet in the 1.2 dev version? @nebuchadnezzar maybe? (since you reported the issue) Link to comment Share on other sites More sharing options...
nebuchadnezzar Posted October 13, 2016 Share Posted October 13, 2016 @pellinor I haven't seen this issue when playing with the latest dev version in 1.2. I launched from the VAB/SPH and the Runway/Launch Pad, with normal pods and tweakscaled pods, without issue. Link to comment Share on other sites More sharing options...
pellinor Posted October 13, 2016 Author Share Posted October 13, 2016 Dev update: * Finally a solution for wheel colliders. I was darn close to dumping those wheels for good. * Fix wheelMotor ec consumption (torque still unscaled) Link to comment Share on other sites More sharing options...
pellinor Posted October 15, 2016 Author Share Posted October 15, 2016 Dev update: * CrewCapacity: has a configurable exponent now (not sure if it will be set by default) * CrewCapacity: additional seats are only available in flight (hidden in the editor) * scaling support for FloatCurve (for wheelTorque) and int (for CrewCapacity) * removed a few log messages * removed empty cfg files Link to comment Share on other sites More sharing options...
pellinor Posted October 15, 2016 Author Share Posted October 15, 2016 Dev update: * antenna: refresh range display and tweak exponent (so that downscaled antennas are a bit less overpowered) Obviously unloaded relays use their unscaled range. Changing that would probably require making the range field persistent, so fixing it is out of my reach. Link to comment Share on other sites More sharing options...
pellinor Posted October 17, 2016 Author Share Posted October 17, 2016 (edited) Dev update: * fix for node positions reverting when cloning a part (thanks @jrodriguez for the report) Edited October 17, 2016 by pellinor Link to comment Share on other sites More sharing options...
pellinor Posted October 19, 2016 Author Share Posted October 19, 2016 Dev update: * exponent for groundHeightOffset (fixes landing gears clipping the runway at launch) Link to comment Share on other sites More sharing options...
FreeThinker Posted October 21, 2016 Share Posted October 21, 2016 (edited) @pellinor I hope you can create a new stable version soon, the current revert to VAB node bugs are just aweful Edited October 21, 2016 by FreeThinker Link to comment Share on other sites More sharing options...
pellinor Posted October 24, 2016 Author Share Posted October 24, 2016 Dev update: * remove obsolete exponent * remove patches for relay antennas since scaling of their main function does not work (which is relaying signals when the antenna is part of an unloaded vessel) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now