Jump to content

Razchek

Members
  • Posts

    267
  • Joined

  • Last visited

Everything posted by Razchek

  1. What I did was make each door a seperate mesh and then rotate each one on the appropriate axis in the correct direction. When I make doors, I usually scale the doors down by 0.01~ depending on the mesh to give it the 'receding' appearance before it slides to it's open position. Did you need a tutorial on animation? The emissive one is a good starter.
  2. I first tested it with a plugin, the method parameter is not used in-game. -snip- The method field determines how the physics will handle the connected part relative to the joint, I think. FIXED_JOINT, // Standard stacking attachment HINGE_JOINT, // Standard surface attachment LOCKED_JOINT, MERGED_PHYSICS, NO_PHYSICS, NONE
  3. Physics.gravity changes by a division of 100~ when the button is clicked if that helps. At least on Kerbin. Before: [Log]: Gravity changed: -2.608566, 0.01757533, 9.454472 After: [Log]: Gravity changed: -0.02608566, 0.0001757532, 0.09454471 Keep a variable of the previous gravity value and monitor it at whatever interval you choose, then when the factor decreases spontaneously by roughly 100.0f you most likely will have the event of the button press. This value will of course spontaneously change when the scene changes (doubtful by such a large amount). The value also changes slowly during normal flight sessions. Build a plugin to test it out? Try this (for debug purposes only): [KSPAddon(KSPAddon.Startup.Flight, false)] public class GravityCheck : MonoBehaviour { private static Vector3 _gravPrev; public void Update() { if (_gravPrev != Physics.gravity) { _gravPrev = Physics.gravity; Debug.Log(string.Format("Gravity changed: {0}, {1}, {2}", _gravPrev.x, _gravPrev.y, _gravPrev.z)); } } That should work
  4. Loop it in Unity, click on the animation file you created and change the wrapping mode to "loop" and you should be good. There may be a better way to animate the generator but at the moment I don't know it. I've only made a couple of parts - I'm a software developer by trade, modelling and animating is a fun hobby though.
  5. Yeah. They will always be the smallest node size at the moment. Which is fine, as it doesn't seem to actually affect the joints - not to the point where I would notice at least.
  6. The text I highlighted in red above are node sizes, they can only be whole numbers; 0, 1 & 2 afaik. Hope that helps.
  7. Make sure the transform is a child of the part-tools gameobject and that the transform has the blue arrow (Z) pointing down away from the attach point. I.e. Down if you place it at the top of a model. Don't expect the new nodes to work properly yet though, there are other problems with the nodes it seems. For one, both size & method fields are not used. Size is always 0, method is always FIXED_JOINT.
  8. EndlessWaves is right, you can access their state through the CheatOptions class. public class CheatOptions { public static bool AllowPartClipping; public static bool InfiniteEVAFuel; public static bool InfiniteFuel; public static bool InfiniteRCS; public static bool NoCrashDamage; public static bool PauseOnVesselUnpack; public static bool UnbreakableJoints; }
  9. That shouldn't be a problem. What exactly is your animation doing now in KSP? Does it play at least once when you toggle it, or not at all?
  10. To get the attachment nodes to work you must place them in your config like so: NODE { name = top // attach / srfAttach may not work, you will probably need HINGE_JOINT for them to work. transform = topTransform // Or whatever your transform name is. size = 1 // Will always be 0 until fixed. Choices should be: 0, 1, 2 method = FIXED_JOINT // Will remain FIXED_JOINT until fixed. } Original post suggests: ATTACH { name = top transformName = topTransform } Size and Method are not being respected, so they will just be place-holders until it's fixed in the AttachNode class. Place the transform (empty game object) in unity so that the blue arrow is facing away from the point you want to attach to. I.e. Have the blue arrow facing down if the node is at the top of your model so that you can stack objects on top of your object.
  11. I decided to take another whack at it and figured it out.. Construct your 'attachment' nodes like this: NODE { name = top transform = topTransform // Or whatever your transform name is. } Size and Method are not being respected, so they will just be place-holders until it's fixed in the AttachNode class. --edit Should have edited previous post, sorry.
  12. Maybe you're doing something wrong with your animation? Or perhaps the model name? I used the default scene in blender (a cube) and imported it into Unity, I then assigned an existing texture and material using the KSP/Emissive/Diffuse shader. I set the emissive color and left the alpha at 1. I animated the alpha value and looped it between 1 and 0, imported the part and used the above config (changing the needed variables) and it worked as expected. PART { name = square module = Part author = N.C.R. mesh = emissiveTest.mu scale = 1 rescaleFactor = 1 node_stack_top = 0.0, 1, 0.0, 0.0, 1.0, 0.0, 1 node_stack_bottom = 0.0, -1, 0.0, 0.0, 1.0, 0.0, 1 //node_stack_Stern = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1 cost = 1300 category = Utility subcategory = 0 title = N.C.R. C.O.R.E. manufacturer = Ionic Protonic Electronics description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades. attachRules = 1,1,1,0,0 // --- standard part parameters --- mass = 0.08 dragModelType = default maximum_drag = 0.2 minimum_drag = 0.2 angularDrag = 2 crashTolerance = 7 maxTemp = 3000 MODULE { name = ModuleGenerator isAlwaysActive = true OUTPUT_RESOURCE { name = ElectricCharge rate = 0.75 } OUTPUT_RESOURCE { name = LiquidFuel rate = 20 } OUTPUT_RESOURCE { name = Oxidizer rate = 20 } { name = ElectricCharge rate = 20 } } MODULE { name = ModuleAnimateGeneric animationName = TestEmissive isOneShot = true } } Video Unity object setup: Edit: After the picture, I clicked the animation in the project files and changed wrap mode to loop, before exporting using the part tools script.
  13. http://forum.kerbalspaceprogram.com/showthread.php/34013-0-20-PartTools-GameDatabase-and-new-features Read thoroughly. Might take a few moments to get the gist of the new procedure.
  14. In my opinion, the sooner the better - so that you can make sure the mod works with the latest update.
  15. I didn't realize you were using an older version of KSP. I learnt emissive animation originally from this tutorial and have not played around with the ModuleGenerator class yet. Well looking at the ModuleGenerator class, there is no animation fields to initialize or store your animation, and I believe the heatProduction field is specific to AtmosphericEngine, LiquidEngine, LiquidFuelEngine, ModuleEngines & SolidRocket classes - so you shouldn't use it I guess. The generator resources only accesses these from the part config: string name; float rate; With all that said (it may be different back in your version of KSP), try: //PART { // needed for 0.20 name = N.C.R. C.O.R.E. module = Part author = NovaSilisko mesh = model.mu scale = 1 rescaleFactor = 1 node_stack_top = 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 1 node_stack_bottom = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1 cost = 1300 category = Utility subcategory = 0 title = C.O.R.E. manufacturer = New California Rocketary skunkworks description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades. attachRules = 1,0,1,1,0 // --- standard part parameters --- mass = 0.175 dragModelType = default maximum_drag = 0.2 minimum_drag = 0.2 angularDrag = 2 crashTolerance = 7 maxTemp = 3000 MODULE { name = ModuleGenerator isAlwaysActive = true OUTPUT_RESOURCE { name = LiquidFuel rate = 20 } OUTPUT_RESOURCE { name = Oxidizer rate = 20 } INPUT_RESOURCE { name = ElectricCharge rate = 20 } } MODULE { name = ModuleAnimateGeneric animationName = NAC animSwitch = true // should default the animation to active, make sure your animation loops. // isOneShot = true // incase the above line doesn't work - this (when toggled) will set the animation to active and will remove the stop button. } //} // closing parenthesis for PART{.., needed in 0.20
  16. Cool. Well, regardless I've updated the plugin so you do not need the dummy part. Same link. There are a few things in the original code I would change now that I've had a look through KSP's Assembly-CSharp classes. But never-the-less, the plugin works as it is. DynamicWarp (partless)
  17. Ah, that would make sense. Alright I'll figure it out and fix it up. It seems like someone is already working with the EdTools mod. I did read a couple of posts on the thread and it seems like there are some bugs, I might have a look later and suggest some fixes.
  18. Pretty nifty. Updated the part you needed. DynamicWarp
  19. Here ya go. It will provide an invisible part under the utilities tab in the VAB/SPH. Attach that somewhere on the ships you wish to be able to 'DynamicWarp' with. I have not used this mod before so I don't know how it was originally. I tidied up the code (no functional changes, just micro-optimization on a couple of lines) and made a new part and config to match for 0.20. Don't do what I did and while on the launch pad/runway, put time acceleration to max (100,000x) then DW it up to the max as well. May cause a seizure o.O.
  20. This should work: MODULE { name = ModuleAnimateGeneric animationName = NAC //isOneShot = true } I haven't tried using a module inside another module scope yet, so if it doesn't work try moving it to after the closing parentheses of the ModuleGenerator.
  21. [RESOLVED] Sort-of. The nodes themselves are broken. Construct your attach nodes as follows: NODE { name = top transform = myTransform size = 1 // this is not used - ksp bug. method = FIXED_JOINT // this is not used - ksp bug. } Make sure the transform is a child of the part-tools game object and that the transform has the blue arrow (Z) pointing down away from the attach point. I.e. Down if you place it at the top of a model. ---- Resolved, the post below is the original post ---- I've been playing around with the new attach method but have yet to get the node in-game. Commenting out the old attach code and trying the new stuff is not working. // --- node definitions --- // definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z //node_stack_top = 0.0, 0.5, 0.0, 0.0, 1.0, 0.0, 2 //node_stack_bottom = 0.0, -0.5, 0.0, 0.0, 1.0, 0.0, 2 ATTACH { name = top transformName = topNodeTransform } The hierarchy in Unity: PartTools Object |- myPartModel |-- myPartMeshes |-- ... |- topNodeTransform I've also tried making the transform a child of the mesh: PartTools Object |- myPartModel |-- myPartMeshes |-- ... |-- topNodeTransform The empty GameObject that I'm using for the transform has been tried with all axis facing 'up' (and of course positioned at the top of the model). I've tried tagging the transform on a couple of different layers with no luck. Anyone else had any success?
×
×
  • Create New...