Jump to content

[WIP] Infernal Robotics - Next


Rudolf Meier

Recommended Posts

5 minutes ago, Rudolf Meier said:

ok, I know what it is... it seems that TweakScale is also scaling the size of the AttachNode... and if this size is >= 2, KSP doesn't use 1 but 3 joints between parts... you're right with > 1.5... this rounds up to 2 and then we have too many joints

either we need to talk to @pelinor (I think he's developing this, right?) or... we should never scale a moving part > 1.5

and by the way... I wasn't able to make TweakScale ignoring the "mass" when scaling... no idea if my cfg was wrong or if that's another problem with TweakScale? ... (but I guess it's my config...)

TweakScale always changes mass when scaling, you have to override it via TWEAKSCALEEXPONENTS (which can override on a per-part basis, or per-scaletype, or whatever). This is why I originally included TWEAKSCALEEXPONENTS stuff in the alternate configs, so the mass would change to an exponent of 2.4 or 2.5 (or whatever) when scaling. Maybe the IR plugin shouldn't handle mass or something?

Dunno anything about the nodes at all, but it may be possible to make them not scale up (also through TWEAKSCALEEXPONENTS, I think) with part size.

If the node size doesn't scale up, will it create weak joints? or does KJR already take care of that?

Edited by AccidentalDisassembly
Link to comment
Share on other sites

1 minute ago, AccidentalDisassembly said:

TweakScale always changes mass when scaling, you have to override it via TWEAKSCALEEXPONENTS (which can override on a per-part basis, or per-scaletype, or whatever). Dunno anything about the nodes at all, but it may be possible to make them not scale up (also through TWEAKSCALEEXPONENTS, I think) with part size.

If the node size doesn't scale up, will it create weak joints? or does KJR already take care of that?

yeah... but my config file seems not to work... no idea what I didn't do correctly... maybe because I mixed 2 modes or... whatever...

um... KJR does normally take care of it, but in this case not, because it does ignore IR part... it needs to ignore them... otherwise we cannot move the joints... but, our joints are already pretty strong... but just 1 and not multiple... so I guess, you're right... it may work when the node size is not scaled

 

Link to comment
Share on other sites

27 minutes ago, Rudolf Meier said:

yeah... but my config file seems not to work... no idea what I didn't do correctly... maybe because I mixed 2 modes or... whatever...

um... KJR does normally take care of it, but in this case not, because it does ignore IR part... it needs to ignore them... otherwise we cannot move the joints... but, our joints are already pretty strong... but just 1 and not multiple... so I guess, you're right... it may work when the node size is not scaled

 

What configs are you using? This would really be a lot easier on GitHub or something, I could just PR in the changes, now that I sort of (not really) learned how to do PRs =)

In any case, this is what's needed - anything inside a SCALETYPE overrides TweakScale's normal behavior, and then if you want to get REAL particular, you can define another TWEAKSCALEEXPONENTS inside a single part's TweakScale module, and it will override the SCALETYPE's behavior.

Below is an example, but it has to be done for every SCALETYPE where it's appropriate, and the IR plugin needs to be changed so that including such a TWEAKSCALEEXPONENTS won't wreck scaling (which it does right now):

SCALETYPE
{
    name = Rework_Telescopic
    freeScale = false
    scaleFactors = 	0.157490, 	0.198425,	0.25, 	0.314980, 	0.396850, 	0.5, 	0.629961, 	0.793701, 	1.0, 	1.259921, 	5
    scaleNames = 	Tiny, 		Small -, 	Small, 	Small +, 	Medium -, 	Medium, Medium +, 	Large -, 	Large, 	Large +,	MegaTest
    defaultScale = 1.0
	TWEAKSCALEEXPONENTS	{ mass = 2.4 }
}

EDIT: I tried messing with attachNodes {} values, which can be seen in TweakScale's ScaleExponents.cfg, and which I think control a node's size. However, what I did didn't work. I think only @pellinor  can tell us how to do this.

What did not work:

TWEAKSCALEEXPONENTS
	{ 
		mass = 2.4 
		attachNodes
    		{
        	breakingForce = 0 //I have no idea if this will work, it was 2
        	breakingTorque = 0 //I have no idea what this will do, it was 2
    		}
	}

Variants I tried included putting name = Part inside the TWEAKSCALEEXPONENTS and values of -1 for the breakingForce and torque.

However, it seems to be the case that this did not work because ANY additional TWEAKSCALEEXPONENTS{} included in a scaletype applied to an IR part will break scaling functionality for the part... something in how the IR plugin is taking control of mass scaling (or whatever)?

Edited by AccidentalDisassembly
Link to comment
Share on other sites

Sorry to bother you, but is there a way to make my rover(other version IR) show up with your version? Im getting the missing parts deal with the vessel.

It took me a long time to build that guy :-)

Edited by viperwolf
Link to comment
Share on other sites

3 minutes ago, viperwolf said:

Sorry to bother you, but is there a way to make my rover(other version IR) show up with your version? Im getting the missing parts deal with the vessel.

It took me a long time to build that guy :-)

Not at the moment unless you want to do some manual config editing. Dunno why (probably so that two versions could exist alongside each other??), but the part names of every IR robotic part have had _v3 appended:

name = IR_Pivotron_Sixty (old part)

name = IR_Pivotron_Sixty_v3 (new part)

This breaks crafts, but if you take out the _v3, your craft would maybe work, dunno.

Link to comment
Share on other sites

4 minutes ago, AccidentalDisassembly said:

Not at the moment unless you want to do some manual config editing. Dunno why (probably so that two versions could exist alongside each other??), but the part names of every IR robotic part have had _v3 appended:

name = IR_Pivotron_Sixty (old part)

name = IR_Pivotron_Sixty_v3 (new part)

This breaks crafts, but if you take out the _v3, your craft would maybe work, dunno.

your probably right, thank you

Edited by viperwolf
Link to comment
Share on other sites

45 minutes ago, AccidentalDisassembly said:

Not at the moment unless you want to do some manual config editing. Dunno why (probably so that two versions could exist alongside each other??), but the part names of every IR robotic part have had _v3 appended:

Yes, that's the idea. Those parts are pretty different and also the values they store/load. Without a converter it's not possible to convert one into another... and I don't know if that can be done easily. ... I will try it, but I didn't start that project yet.

Link to comment
Share on other sites

3 minutes ago, Rudolf Meier said:

Yes, that's the idea. Those parts are pretty different and also the values they store/load. Without a converter it's not possible to convert one into another... and I don't know if that can be done easily. ... I will try it, but I didn't start that project yet.

really its nothing to worry about, Im just one person. Im attempting to modify the name as suggested, to just the parts on rover itself. Not sure if it will work

Link to comment
Share on other sites

1 hour ago, AccidentalDisassembly said:

What configs are you using? This would really be a lot easier on GitHub or something, I could just PR in the changes, now that I sort of (not really) learned how to do PRs =)

I did only a quick test... I tryed to build something for "ModuleIRservo_v3" like there is for "ModuleIRservo" in one file... but that was just a 2 minutes action... I think this needs a little bit more time.

What I know ... it is the "size" value of the attachNode that is interesting...

Just now, viperwolf said:

really its nothing to worry about, Im just one person. Im attempting to modify the name as suggested, to just the parts on rover itself. Not sure if it will work

no... unfortunatelly it won't... in case you turn them into the default position, then... maybe you can figure out the values you need to set... but... all those values like "correction_0", "correction_1" and stuff like that... that would need some thinking on how to set them correctly...

Link to comment
Share on other sites

Just now, Rudolf Meier said:

I did only a quick test... I tryed to build something for "ModuleIRservo_v3" like there is for "ModuleIRservo" in one file... but that was just a 2 minutes action... I think this needs a little bit more time.

What I know ... it is the "size" value of the attachNode that is interesting...

Huh, dunno how TS handles the size value... Is there a way to get IR to handle the multiple joints that get created at size 2 nodes? Wonder why on earth that even happens.. also wonder if KSP creates even more joints if the node size is 3, or 4, or 5...

Link to comment
Share on other sites

14 minutes ago, Rudolf Meier said:

I did only a quick test... I tryed to build something for "ModuleIRservo_v3" like there is for "ModuleIRservo" in one file... but that was just a 2 minutes action... I think this needs a little bit more time.

What I know ... it is the "size" value of the attachNode that is interesting...

no... unfortunatelly it won't... in case you turn them into the default position, then... maybe you can figure out the values you need to set... but... all those values like "correction_0", "correction_1" and stuff like that... that would need some thinking on how to set them correctly...

Your right, it did not work. maybe once your finished and combine, someone can right a code to convert existing craft. Im not sure it would be worth it though.

Link to comment
Share on other sites

On 12.3.2018 at 1:55 AM, Rudolf Meier said:

new version is out... and this one should be a good one!

all that might need a little tweaking is the values in the cfg files... for stronger joints, modify those values... I don't know if we did choose them correctly, but there is a good chance, that the code is ok now...

Edit: I did test it, the joint strength seems to be ok for me (according to first tests with just one extendatron) ... but I see, there's sometimes a problem with the gui (too many buttons show up and the category doubled in the VAB... once...)

well lets hope that the joint strenght can handle atleast 6 moving parts since my mech legs usually contains about 6 servos in one leg, could add 2 more if i want to add strafing, but but more about the joint strength, how about weight stress? since i am planning on building MGS5 Sahelanthropus next and it will be huge, or i may just go for it with a welding mod and force the weight down, also there is that transforming issue since Sahelanthropus needs to be able to take REX form and Humanoid Form so there is quite much planning to do

Link to comment
Share on other sites

11 hours ago, AccidentalDisassembly said:

Is there a way to get IR to handle the multiple joints that get created at size 2 nodes? Wonder why on earth that even happens.. also wonder if KSP creates even more joints if the node size is 3, or 4, or 5...

I'm not sure if that makes sense... we could try to add this, but... would only be needed for scaled parts. So... maybe doing the scaling differently might be easier.

And nope... KSP build 1 joint if size is < 2 and 3 if it's >= 2 ... (I never speculate, I'm always getting this information from its code :wink:)

 

11 hours ago, viperwolf said:

Your right, it did not work. maybe once your finished and combine, someone can right a code to convert existing craft. Im not sure it would be worth it though.

If you want to convert a craft in the VAB, it might be possible... I will look into that this evening...

Link to comment
Share on other sites

18 hours ago, AccidentalDisassembly said:

... TWEAKSCALEEXPONENTS ...

What did work was to keep the attachNode size at 1... but I cannot make TweakScale ignore the "mass"... that's not a big problem, because all IR does is scaling it the same way TweakScale does now... but I think for future releases of TweakScale that could be something to fix...

anyway... I'm now uploading the new IR which you can scale even to huge sizes

Link to comment
Share on other sites

17 hours ago, viperwolf said:

Your right, it did not work. maybe once your finished and combine, someone can right a code to convert existing craft. Im not sure it would be worth it though.

I did it for a single rotatron... the idea is this

part = IR.bla_123456789 -> part = IR.bla.v3_123456789

in the MODULE part containing name = MuMechToggle

name = ModuleIRServo_v3
isEnable = <isEnabled>
swap = False
position = <rotation or translation>
correction_0 = 0
correction_1 = 0
force = 0
presetsS = <presetPositionsSerialized>
servoName = <servoName>
groupName = <groupName>
isLocked = <isMotionLock>
isInverted = <invertAxis>
zeroNormal = <see cfg file and scale correctly when translational -> linear, don't scale for rotational>
zeroInvert = <see cfg file and scale correctly when translational -> linear, don't scale for rotational>
defaultPosition = <defaultPosition or scale correctly when translational and too high>
hasPositionLimit = <limitTweakableFlag>
minPositionLimit = <rotateMin or translateMin>
maxPositionLimit = <rotateMax or translateMax>
torqueLimit = <torqueMax>
accelerationLimit = <accelTweak>
speedLimit = <speedTweak>
jointSpring = Infinity
jointDamping = 0
hasSpring = False
factorTorque = <see cfg file>
factorSpeed = <see cfg file>
factorAcceleration = <see cfg file>
scaleMass = 1 <or see cfg file>
scaleElectricChargeRequired = 2 <or see cfg file>
forwardKey = <forwardKey>
reverseKey = <reverseKey>
stagingEnabled = <stagingEnabled>

remove all ACTIONS or wait for the next IR... then those ACTIONS work again

I don't know if that's working always or if I missed something... and, I don't know what it takes to convert a "reversed" attached part with a new IR part... and of course, this is only tested once and only with a "craft" (1 part :P) inside the VAB

Edited by Rudolf Meier
Link to comment
Share on other sites

Can we get more detail what value to increase for stronger joints ? I mean, what I should try to increase first, do I need to increase all ow those or just one ? Also, searching for varibale name with notepad++ also found same variable name within DLL file. Would IR plugin respect increased value in config file or it is some hardcoded limit within DLL ?

        factorTorque = 20
		maxTorque = 30
		torqueLimit = 30

I need stronger joints on downscaled parts. Mostly "small+" size parts for my wing folding mechanizm. I tried to recreate similar craft with old IR plugin, to have something comparable.
It seems that IR next plugin already have much stronger joints.

But, what I aiming for is that provided wing mechanizm can hold without too much issues (bending joints) 9t fuel tank. That much weight mimics about 1t wing mass that is around 9g acceleration. Or is there a way to make stronger joints on downscaled parts while leaving mass scaling as it is ? I can't figure out what I need ot change in tweakscale configs for this.

Link to comment
Share on other sites

38 minutes ago, kcs123 said:

It seems that IR next plugin already have much stronger joints.

:) now that sounds good... as starting point...

38 minutes ago, kcs123 said:

Can we get more detail what value to increase for stronger joints ? I mean, what I should try to increase first, do I need to increase all ow those or just one ? Also, searching for varibale name with notepad++ also found same variable name within DLL file. Would IR plugin respect increased value in config file or it is some hardcoded limit within DLL ?

sure... ok, so for the mass... mass scaling is done using the tweakscale.cfg file (because it always overwrites everything comming from a module... I think that's a bug... but anyway, not a problem for us... that's why we still have the "mass = 1" in those files)

The other strengths involved... that's (for motorized joints) only the torque. Torque is used to specify the "maximumForce" of a JointDrive and it's "torqueLimit * factorTorque" ... the scaling does lower the "maxTorque" value of a joint

the idea of the "factorTorque" is, that you don't have huge values in the gui... nothing more... the "maxTorque" is simply an upper limit for the "torqueLimit" value which is ... the strength of the joint/motor... but the "breakForce" and stuff like that is infinite already... I guess you don't talk about those anyway

so... making it stronger means, you need more torque... currently this is scaling linearly... maybe we should go to another scale? ... (it is done internally, but I learned, you can overwrite this with the TweakScale.cfg files) ... maybe you find a better solution for those scaling factors

all number by the way i comming from the cfg files, nothing is hard coded, except things that are done in a way that it's compatible with KSP... like e.g. setting the breakforce of the joints

 

Edited by Rudolf Meier
Link to comment
Share on other sites

22 minutes ago, Rudolf Meier said:

The other strengths involved... that's (for motorized joints) only the torque. Torque is used to specify the "maximumForce" of a JointDrive and it's "torqueLimit * factorTorque" ... the scaling does lower the "maxTorque" value of a joint

the idea of the "factorTorque" is, that you don't have huge values in the gui... nothing more... the "maxTorque" is simply an upper limit for the "torqueLimit" value which is ... the strength of the joint/motor... but the "breakForce" and stuff like that is infinite already... I guess you don't talk about those anyway

Thanks for the info. In other words, for higher joint strength I need to increase those two:

		maxTorque = 30
		torqueLimit = 30

Either, in each file or trough MM patch. Leaving factorTorque as it is, to still have somehow scaled strenght between various part sizes.

No, I don't need super strong unbreakable joints. What I seek for is to have strong enough joints on scaled down parts to be able to hide whole complex mechanizm within hull parts for aestetic reasons. In the past I was successful with this kind of stuff with regular sized parts, now I was greedy and want to have better craft, in both aestetic and functional area.

Detecting what values works right or "right enough" is first attempt to detect would we need different scale fators on this or just increase everything on normal parts without exceeding game limits.

I was experimenting with other part buttons in flight as well. Like engaging limits and locking. "Locking" seems to do job just nice, preventing movement when it is turned on.
Engage limits on the other hand, with one orange fuel tank hanging on normal sized extendratron caused joints on extendratron to strech out. Pressing on disengage have invited Kraken and broken FAR spaming a lot of NaNs in log. Also, flight scene jumped from runway to outher part of Kerbol SOI :)

I have saved full log in separate folder waiting for upload if necessary, but for quick info I found lot's of this in log:

Look rotation viewing vector is zero
 
(Filename:  Line: 82)

[FAR] NaN Prediction Section Error: Inputs: AtmDen: NaN Mach: NaN Re: NaN Kn: NaN skin: NaN vel: (NaN, NaN, NaN)
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Let me know if you need full log on this. I will try to reporoduce everything if necessary, but I'm runing out of time for this evening, so I don't know if I will be able to upload it today.

7 minutes ago, Rudolf Meier said:

I should upload the code... I know... I'm working on that...

No worries, you are doing quite a heck of a job. Just with some bits of more info more people will be able to involve in testing and ironing everythig out, to be less broken plugin for official release as much as possible.

Link to comment
Share on other sites

30 minutes ago, kcs123 said:

Detecting what values works right or "right enough" is first attempt to detect would we need different scale fators on this or just increase everything on normal parts without exceeding game limits.

The default sized Extendatrons can now hold about 60 t... I think this value is a good one, but... maybe we should use it for a smaller scale. Could be that the forces are right, but the scales too high? Maybe we should change the factorTorque for all joints to 60 ? (making the "Medium" parts holding 60 t?) ... but still I'm not sure about the linear scaling of that

Edited by Rudolf Meier
Link to comment
Share on other sites

I have increased torqueLimit to 300 in atempt to strength out whole craft to get what I seek for. And latest experiment revealed that I was looking at wrong direction. Joints on IR moving parts seems to be quite strong, but whole craft still feels like spaghetti tree. Reason ? Most probably beacause I used small strutural parts (tubes/truss) that have too weak joints :)

I will need to recreate whole thing with normal structural parts, to see how strong it is and then repeat everything with smaller parts. Well, back to drawing board.

Yes, "small+" or "medium" parts should be capable to hold 60t. Might not be realistic compared to real life representation, but have to keep in mind that this is game and crafts used in KSP will be pushed to limits under high g acceleration. Probably lot more than 10-15g. So, 6t of weight can quickly become 60t under 10g of acceleration.

Movable wing part on test craft I created have ~0.350 t (or 350 kg) and I still can't make it fly properly. Joints still tends to bend, but seems to be structural part joint on structural-IR part pair that is culprit for issue.

Edited by kcs123
noticed typo in measured units
Link to comment
Share on other sites

15 minutes ago, kcs123 said:

Movable wing part on test craft I created have ~0.350 kg and I still can't make it fly properly. Joints still tends to bend, but seems to be structural part joint on structural-IR part pair that is culprit for issue.

And with IR parts you are splitting the group of parts in 2 for KJR... and it can only connect/reinforce parts within a group of parts. The official KJR doesn't build groups, but only uses 1 group... the one with the root part in... all other parts are completely ignored and not reinforced... with this one you can never build stable wings ... but with the new one I hope there is a way. ... maybe you need to add more parts to your wings... e.g. hidden tanks or something that can act as anchor?

try to add a heavy part directly after the IR joint and attach the wings to that

Edited by Rudolf Meier
Link to comment
Share on other sites

5 minutes ago, Rudolf Meier said:

... maybe you need to add more parts to your wings... e.g. hidden tanks or something that can act as anchor?

that or doing it in Kerbal way with moar struts :)

Whole idea with that frame is to have something to attach struts on. For now, connection between tubes and wings is quite strong, it no longer happens that those pieces of structural parts become visible outside of wing mesh. However, I need to strenght out connection between tube part and IR movable part but there is no much room for struts to place without compromising movability of mechanizm where it is intended to be possible to move.

I will figure out eventually how to strength out whole thing. Perhaps I would need to remove some pivotrons and go with less rotation to get stronger structure.
Maybe I could either edit config files for those smaller structural parts or write MM patch to strength out joints of them. Have yet to research possible options.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...