Shadowmage Posted December 21, 2017 Author Share Posted December 21, 2017 Ahh, the fun of strong encapsulation.... This is (part of) the public interface of the (partially rewritten) 'ModelModule' -- the collection of code that handles the positioning and scaling of models, texture set and recoloring handling, and the in-editor model selection bits (model selection, texture selection, etc). Lots of generic boilerplate stuff. Pretty boring. Makes for code that is more pleasant to use (for the developer), faster to develop with, and if done properly leaves fewer possibilities for mistakes ( = fewer bugs, and easier to track down). But then once in awhile, you get into the actual fun(ctional) bits of the code: (nothing special, just one of the random model setup related methods... this method takes an input model from the GameDatabase, keeps any transforms specified in the model definition config, examines for and also keeps the parents of the desired transforms, and finally destroys any transforms that were not kept) If you ever wondered how much 'fun' programming is... ^^^ that is about it it. Lots of writing, lots of structure, and lots of waiting on KSP to start up so you can test changes. Quote Link to comment Share on other sites More sharing options...
Jimbodiah Posted December 22, 2017 Share Posted December 22, 2017 I do programming of different sorts (motion control), but find it quite enjoyable actually. Especially since my code makes real world machinery do stuff Quote Link to comment Share on other sites More sharing options...
Akira_R Posted December 22, 2017 Share Posted December 22, 2017 (edited) I find coding to be quite enjoyable as a hobby, I write some basic Python and MatLab, I learned C++ back in the stone age when I was in high school, but have pretty much forgotten everything syntax wise about it, the main thing I held onto is the thought/problem-solving process when writing/de-bugging, and general design theory. Have wanted to take the plunge into C# for a while now so that I could help contribute to mods but just haven't gotten around to it. I like it because it gives my ADD addled brain something to chew on, it thoroughly enjoys the problem solving process. Edited December 22, 2017 by Akira_R Quote Link to comment Share on other sites More sharing options...
Jimbodiah Posted December 22, 2017 Share Posted December 22, 2017 (edited) You means lots of coffee and loads of swearing? Spoiler Edited December 22, 2017 by Jimbodiah Quote Link to comment Share on other sites More sharing options...
RaiderMan Posted December 22, 2017 Share Posted December 22, 2017 sounds about the same for us model makers and fliers...I've been fighting the tantares soyuz stack all morning. wondering if the sstu partset has an equivalent.. Quote Link to comment Share on other sites More sharing options...
Nightside Posted December 22, 2017 Share Posted December 22, 2017 (edited) @RaiderMan, yes to both Soyuz spacecraft and launcher, the Soyuz stuff is among my favorite parts of this mod. The spacecraft bits are called SC-A. For the launcher use MFT-A with Soyuz caps and MFT-D tanks for boosters. SSTU uses real names for engines, so a quick trip to Wikipedia can help you find those. Edited December 22, 2017 by Nightside Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted December 22, 2017 Author Share Posted December 22, 2017 4 hours ago, Akira_R said: the main thing I held onto is the thought/problem-solving process when writing/de-bugging, Those are the important bits, as they transfer well to nearly all other languages. Flow control (if/for/while), and boolean operations (&& / ||) are probably the most vital bits to understanding programming. Past that it is mostly just language syntax and special features. 46 minutes ago, Nightside said: SSTU uses real names for engines, so a quick trip to Wikipedia can help you find those. @RaiderMan Use an MFT-A for the central core, sized at 1.4375m diameter (set to 1.25m and then use the slider to adjust), and select the 'Soyuz' nose adapter (4 variants available if I remember correctly). Engine is RD-108A for the central core (if the fuel tank is sized correctly, the mount should line up very precisely with the fuel tank diameter). The radial boosters should use the MFT-D tank (has integrated decouplers for surface attached use), and the RD-107A engines. 3 hours ago, Jimbodiah said: You means lots of coffee and loads of swearing? Yep, sometimes more of one than the other. The precise mixture varies from day to day. 20 hours ago, Jimbodiah said: I do programming of different sorts (motion control), but find it quite enjoyable actually. Nice; I've had a little bit of experience at that -- programming servo controls for RC use (complex scratch-built RC aircraft). I'm guessing yours is probably more robotics or automation oriented though. Same stuff with KSP, only the results are less real-world physical. Still very neat the first time you program something and see it actually work in-game. General Development News: Progress is coming along nicely on work for the ModelDefinition / ModelModule systems rewrite. Just got the code back to a state where there are no more compiler errors, so I might be able to start working on adapting configs and doing some actual testing -- making sure the existing part-module still function, and that all of their configs have been adapted correctly (ModularEngineCluster, solar panels, ISDC). The new 'SSTUModularPart' code is still only about halfway done, but with all the back-end support worked out, the rest of the work on it should go a lot faster/smoother. Going to be a slew of new features coming with this code update. The basic system that handles how engine layouts position the engine models is being brought over to the rest of the model-definition system -- so any use of a 'model definition' will consist of the definition to use, and the layout data to use for it (default layout is a single model positioned at origin). This is mostly so that things like RCS and solar panels can have 'built in' support for different layouts... but it might also be adapted for other uses -- e.g. multiple ascent-tank layout options on the LC pod parts, or multiple engine layout options on the ISDC, or multiple landing strut layouts on a fuel tank (rigid, no suspension). Still (slowly) working on geometry for the landing legs. Have the first set mostly worked out (light legs), and some early WIP geometry for another set (heavy legs for paneled tanks). Still going to be at least a few weeks before there is anything usable on them. Mostly I'm finding it difficult to create realistic looking (and functioning) legs that are generic enough to be used for more than one fuel tank. Really not easy; stock models simply ignored all of that, which is why you have the single-piston leg setups that exist in stock (that in real life would suffer from all sorts of stability problems due to lack of lateral bracing). I've got some good concept stuff from @tater and @Jimbodiah already, and I would welcome anyone else to drop by the thread and submit ideas/concepts -- https://github.com/shadowmage45/SSTULabs/issues/652 Quote Link to comment Share on other sites More sharing options...
tater Posted December 22, 2017 Share Posted December 22, 2017 Yeah, the single stick legs look odd compared to RL solutions. I think you have chosen well with the light legs in terms of embracing some clipping, and that can play out with other choices as well (or something like the "backplate" on the docking ports?) Quote Link to comment Share on other sites More sharing options...
Agustin Posted December 24, 2017 Share Posted December 24, 2017 (edited) Engines are not done yet, right? or is there something wrong with my install? I mean the pbr shaders.. There are some with no textures it seems.... like boring grey. Mounts do have textures but not the engines themselves at least in my install. example: merlin 1A Edited December 24, 2017 by Agustin Quote Link to comment Share on other sites More sharing options...
Jimbodiah Posted December 24, 2017 Share Posted December 24, 2017 yep, only F1 and J1 have PBR shaders IIRC. Quote Link to comment Share on other sites More sharing options...
tater Posted December 24, 2017 Share Posted December 24, 2017 1 hour ago, Agustin said: Engines are not done yet, right? or is there something wrong with my install? I mean the pbr shaders.. There are some with no textures it seems.... like boring grey. Mounts do have textures but not the engines themselves at least in my install. example: merlin 1A Sounds like an install problem. I’ll check at some point later for you. Assuming you mean no textures at all. Quote Link to comment Share on other sites More sharing options...
Agustin Posted December 24, 2017 Share Posted December 24, 2017 the model is there. There isn't any textures, and colors and metallics aren't there. Yeah, I think only F1 and J1 are complete. Quote Link to comment Share on other sites More sharing options...
tater Posted December 24, 2017 Share Posted December 24, 2017 What does your game data folder look like? Quote Link to comment Share on other sites More sharing options...
Agustin Posted December 24, 2017 Share Posted December 24, 2017 (edited) Just now, tater said: What does your game data folder look like? Inside Textures Unlimited Stock I have thee 3 files: TU_PorkjetStock TU_PartOverhauls TU_VenStockRevamp I think the file DefaultShaderAssignments-Engines - PBR is only patching the F1 and J2, and also there the textures of example merlin 1 in SSTU PBR assets folder... I just created some totally grey png's there and added some CFG and then the engines have reflections (although I can't make any changes) like this: Spoiler KSP_MODEL_SHADER { name = SSTU/Assets/SC-ENG-Merlin-1A model = SSTU/Assets/SC-ENG-Merlin-1A TEXTURE { shader = SSTU/PBR/Metallic texture = _MainTex, SSTU-PBR/Assets/SC-ENG-Merlin-DIFF texture = _BumpMap, SSTU-PBR/Assets/SC-ENG-Merlin-NRM texture = _MetallicGlossMap, SSTU-PBR/Assets/SC-ENG-Merlin-MET texture = _AOMap, SSTU-PBR/Assets/SC-ENG-Merlin-AO } } and added the totaally grey textures in the SSTU-PBR/assets folder to test (i am not modder or anything) Edited December 24, 2017 by Agustin Quote Link to comment Share on other sites More sharing options...
Jimbodiah Posted December 24, 2017 Share Posted December 24, 2017 A screenshot might help. I know the merlins don't have a lot of detail to begin with. Quote Link to comment Share on other sites More sharing options...
Agustin Posted December 24, 2017 Share Posted December 24, 2017 Just now, Jimbodiah said: A screenshot might help. I know the merlins don't have a lot of detail to begin with. Some of these have better textures, but not recoloring and metallic properties, and some other seem to have no textures at all. The upper one is the one that I added the patch to make it mettalic, but it looks too homogeneous... Quote Link to comment Share on other sites More sharing options...
tater Posted December 24, 2017 Share Posted December 24, 2017 All the engines are not set up for recoloring yet, just the mounts. Quote Link to comment Share on other sites More sharing options...
Agustin Posted December 24, 2017 Share Posted December 24, 2017 (edited) Just now, tater said: All the engines are not set up for recoloring yet, just the mounts. okay, but they haven't any metallic either, is that okay, or is it something wrong in my install? Edited December 24, 2017 by Agustin Quote Link to comment Share on other sites More sharing options...
Jimbodiah Posted December 25, 2017 Share Posted December 25, 2017 No, only the F1 and J1 have gotten PBR textures, but are fixed and not recolorable except for the mount. There is nothing wrong with your install. Quote Link to comment Share on other sites More sharing options...
Delta_6 Posted December 26, 2017 Share Posted December 26, 2017 What the BLEEPING BLEEP is the SSTU Reflection probe, why the BLEEP is it destroying my craft and how the BLEEPING BLEEP do I disable it? Quote Link to comment Share on other sites More sharing options...
Agustin Posted December 26, 2017 Share Posted December 26, 2017 44 minutes ago, Delta_6 said: What the BLEEPING BLEEP is the SSTU Reflection probe, why the BLEEP is it destroying my craft and how the BLEEPING BLEEP do I disable it? provide more information. specs, performance during playing the game (see how much ram are you using). image of your gamedata folder as well as a link to your ksp.log file maybe someone can help you but you have to provide something. Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted December 26, 2017 Author Share Posted December 26, 2017 9 hours ago, Delta_6 said: What the BLEEPING BLEEP is the SSTU Reflection probe, why the BLEEP is it destroying my craft and how the BLEEPING BLEEP do I disable it? Try updating your TexturesUnlimited -- there were some issues in the early versions that could cause explosions on decoupling. Otherwise, going to need more info -- logs, screenshots, you know... the usual stuff that should be posted with each and every support request. Quote Link to comment Share on other sites More sharing options...
Nightside Posted December 26, 2017 Share Posted December 26, 2017 12 hours ago, Delta_6 said: What the BLEEPING BLEEP is the SSTU Reflection probe, why the BLEEP is it destroying my craft and how the BLEEPING BLEEP do I disable it? I can’t tell if you are just complaining or if you actually have a question. The reflection probe is part of the PBR system that makes reflections possible. I believe you can get rid of it by not installing the PBR pack, is that right @Shadowmage? Quote Link to comment Share on other sites More sharing options...
Sudragon Posted December 29, 2017 Share Posted December 29, 2017 (edited) Could i get a sanity check on this? Code for Xenon gas into SSTU tanks SSTU_FUELTYPE:NEEDS[Bluedog_DB] { name = XenonGas RESOURCE { resource = XenonGas ratio = 1 } } SSTU_RESOURCEVOLUME:NEEDS[Bluedog_DB] { name = XenonGas volume = 0.003049 } @PART[SSTU-SC-TANK-MFT-A|SSTU-SC-TANK-MFT-S|SSTU-SC-TANK-MFT-R|SSTU-SC-TANK-MFT-LV|SSTU-SC-TANK-MUS|SSTU-SC-TANK-MFT-D]:NEEDS[Bluedog_DB] { @MODULE[SSTUVolumeContainer] { @CONTAINER,0 { resource = XenonGas } } } Edited December 29, 2017 by Sudragon Quote Link to comment Share on other sites More sharing options...
Jimbodiah Posted December 29, 2017 Share Posted December 29, 2017 (edited) Xenon already has it's volume defined in SSTU, so no need to add it again. Also xenon does not "needs bdb" as it is a stock fuel type and has already been defined in the base sstu install. I take it you are trying to add the sstu container to BDB parts? All you need to do is add the SSTU_VolumeContainer module to the BDB part like so: MODULE { name = SSTUVolumeContainer volume = 1000 baseContainerIndex = 0 subtractMass = false subtractCost = false enableContainerEdit = true enableFuelTypeChange = true CONTAINER { name = Battery percent = 100 tankageVolume = 0 tankageMass = 0 ecHasCost = false defaultModifier = standard defaultResources = ElectricCharge,1 resource = LiquidFuel resource = LqdHydrogen resource = Oxidizer resource = MonoPropellant resource = Aerozine50 resource = NTO resource = ElectricCharge resource = RocketParts resource = Ore resource = XenonGas modifier = standard } } Check my patches for examples, as I've already added the VolumeContainer to the BDB Aardvark part. Edited December 29, 2017 by Jimbodiah Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.