Jump to content

[DEV HALTED][0.90] CIT NodeHelper [v1.1.4, 2015-01-01]


marce

Recommended Posts

Please read my post directly above yours.

:blush: erp don't know how I missed that.

Well that is quite unfortunate, alas I am merely a cfg wrangler and know how to do a little bit of 3D modeling, I did a little bit of C++ in high school but that is it, guess I will either figure something out or just do without the mod as I have been. It can't be that hard as it just needs to be compiled correct?

Link to comment
Share on other sites

:blush: erp don't know how I missed that.

Well that is quite unfortunate, alas I am merely a cfg wrangler and know how to do a little bit of 3D modeling, I did a little bit of C++ in high school but that is it, guess I will either figure something out or just do without the mod as I have been. It can't be that hard as it just needs to be compiled correct?

Yeah, just a few button clicks and not half as painfull as anything c++ related imho. However, you may consider updating your mods for 0.9 anyway so you would need the latest version?

But who am I to tell you what you should do, the joy of oss :wink:

Link to comment
Share on other sites

What result did your final test show?

Plus it would be nice if you could share your log, just in case.

Ah, well, that was a long time ago and I forgot all about returning here to report on my findings. Logs are rather unhelpful, since there's not a lot of messages being passed to it about the specific actions taken by NodeHelper.

Anyway, it turns out that NodeHelper was giving me some errant coordinates. I basically had to take the original position of the node reported by NodeHelper and calculate the difference with the new node coordinates (per-axis, and multiplied by -1 if the change was in the negative direction) and then apply that final difference to the original node position in the original part configuration. Only then did the node appear, once I reloaded all the data, in the correct position. I'm not completely convinced it was completely the fault of NodeHelper, otherwise I would have expected more people to report on the issue. I suspect that, which the parts themselves were not being scaled by any amount by TweakScale, the simple fact that TS was managing node positions, based on scale, could have affected their reported positions when NodeHelper recalled them. I also want to mention that a lot of stock parts were having issues with their node positions, and their scales as well (it might have been scale, rather than the nodes, but the parts I'm working on are not being scaled improperly so I suspect that node positioning was also buggy) so this could have been a problem with the base program.

The issue with the node orientation, from what I can gather, is not necessarily a breaking issue. the orientations are supposed to be numeric, ranging between -1 and 1. setting one of the coordinates to 1.25, as NodeHelper was so helpful in doing automatically when parsing the part data for the first time that play session, would result in nothing more than a little error when KSP tried to read the data. Either way, it would still orient to the closest valid numeric range... in this case 1. Still annoying, however, and in need of investigation. Note, however, I have yet to do a lot of testing in the new KSP version (0.90) due to all the plugin updating madness going on still as I type. NodeHelper is still an invaluable tool, but it has some quirks that need to be taken into account when using it alongside other plugins that modify node positions.

Link to comment
Share on other sites

Ah, well, that was a long time ago and I forgot all about returning here to report on my findings. Logs are rather unhelpful, since there's not a lot of messages being passed to it about the specific actions taken by NodeHelper.

Anyway, it turns out that NodeHelper was giving me some errant coordinates. I basically had to take the original position of the node reported by NodeHelper and calculate the difference with the new node coordinates (per-axis, and multiplied by -1 if the change was in the negative direction) and then apply that final difference to the original node position in the original part configuration. Only then did the node appear, once I reloaded all the data, in the correct position. I'm not completely convinced it was completely the fault of NodeHelper, otherwise I would have expected more people to report on the issue. I suspect that, which the parts themselves were not being scaled by any amount by TweakScale, the simple fact that TS was managing node positions, based on scale, could have affected their reported positions when NodeHelper recalled them. I also want to mention that a lot of stock parts were having issues with their node positions, and their scales as well (it might have been scale, rather than the nodes, but the parts I'm working on are not being scaled improperly so I suspect that node positioning was also buggy) so this could have been a problem with the base program.

The issue with the node orientation, from what I can gather, is not necessarily a breaking issue. the orientations are supposed to be numeric, ranging between -1 and 1. setting one of the coordinates to 1.25, as NodeHelper was so helpful in doing automatically when parsing the part data for the first time that play session, would result in nothing more than a little error when KSP tried to read the data. Either way, it would still orient to the closest valid numeric range... in this case 1. Still annoying, however, and in need of investigation. Note, however, I have yet to do a lot of testing in the new KSP version (0.90) due to all the plugin updating madness going on still as I type. NodeHelper is still an invaluable tool, but it has some quirks that need to be taken into account when using it alongside other plugins that modify node positions.

Hm, no idea where that would be coming from.

As I said elsewhere I'm very busy IRL so you are welcome to fix it and submit a PR since I won't be able to look at the problem for a while (read: months).

Link to comment
Share on other sites

I figured out why the config files aren't being written out.

If the part name has an underscore in it, NH fails to create the _NH file.

Interesting, I quickly looked through the code but didn't see the problem right away. If you can investigate further please send me a PR or blame the faulty loc :)

Link to comment
Share on other sites

My coding skills are _very_ rusty, but I'll take a look. ;)

- - - Updated - - -

Don't know enough about the code to make an educated guess (and I'm not set up for compiling/debugging), but I did narrow down the specific repro case.

If there is an underscore in the part name in the cfg file, it will fail. The filename itself, however, is allowed to have an underscore without issue.

i.e.

MW_Partname.cfg


PART{
name = MWPartname
}

Results in

MW_Partname_NH.cfg

But:


PART{
name = MW_Partname
}

Results in no file being written.

Link to comment
Share on other sites

My coding skills are _very_ rusty, but I'll take a look. ;)

- - - Updated - - -

Don't know enough about the code to make an educated guess (and I'm not set up for compiling/debugging), but I did narrow down the specific repro case.

If there is an underscore in the part name in the cfg file, it will fail. The filename itself, however, is allowed to have an underscore without issue.

i.e.

MW_Partname.cfg


PART{
name = MWPartname
}

Results in

MW_Partname_NH.cfg

But:


PART{
name = MW_Partname
}

Results in no file being written.

Thanks, I'll try to track it down.

Link to comment
Share on other sites

I was wondering about the no-file thing. I'd also be very curious if anyone else is experiencing the node positioning issues I was having? If not, then me digging through the code for the culprit may turn into a lesson in futility.

Link to comment
Share on other sites

The nodes aren't accurate. I already made a part and defined a top node with the position "0.0, 2.8, 0.0, 0.0, 1.0, 0.0".

But the when I activate the Node Helper it shows a node position of "0.0, 3.525, 0.0".

3325avl.png

I only installed this, BioMass and MM on KSP 32bit.

Link to comment
Share on other sites

The nodes aren't accurate. I already made a part and defined a top node with the position "0.0, 2.8, 0.0, 0.0, 1.0, 0.0".

But the when I activate the Node Helper it shows a node position of "0.0, 3.525, 0.0".

http://i58.tinypic.com/3325avl.png

I only installed this, BioMass and MM on KSP 32bit.

Maybe some scaling is going on?

As you can see I'm reading the properties KSP gives me, nothing else.

Link to comment
Share on other sites

I wonder if some sort of scale-fix could be implemented. When trying to implement TweakScale into the KerbalFoundries wheels, lo-fi had to implement a "tweakScaleCorrector" variable that could be set from the TweakScale exponential variable scaling system. In this way, both the visual appearance of the wheel and the settings in the plugin for the raycast collider height could be set dynamically in the editor. If the nodes are being modifies by the scale change in the game, then you'd think there'd be a way to detect this change and apply a fix when writing the config.

For the time being, if it's really the scale change that's affecting it, then we should be able to reverse the scale multiplier on the modified node locations to get the proper position to be applied in the config. Anyway, I don't have the coding experience to even try to make this happen... yet...

Link to comment
Share on other sites

I wonder if some sort of scale-fix could be implemented. When trying to implement TweakScale into the KerbalFoundries wheels, lo-fi had to implement a "tweakScaleCorrector" variable that could be set from the TweakScale exponential variable scaling system. In this way, both the visual appearance of the wheel and the settings in the plugin for the raycast collider height could be set dynamically in the editor. If the nodes are being modifies by the scale change in the game, then you'd think there'd be a way to detect this change and apply a fix when writing the config.

For the time being, if it's really the scale change that's affecting it, then we should be able to reverse the scale multiplier on the modified node locations to get the proper position to be applied in the config. Anyway, I don't have the coding experience to even try to make this happen... yet...

Maybe.

Everyone: I consider giving up on this if anyone wants to take over and add/fix the features requested. Please write me a PM if interested.

nothing to download... only to pay.

First, it is called a donate button, approved by the KSP forum mods and in accordance to the rules. You do not have to pay for my mods. Period.

Second, I got 2 donations in total so far, consider me not making any money. Actually I've not even put this on curse to make ad money.

And now I have a question: are you maybe blind? You misread "please donate" for "pay", you apparently haven't seen the big red notice on the page stating that there are problems I'm aware of and you also weren't able to read my post in the general thread.

So, because I don't want to be rude, I'll simply assume your screen reader messed up. Let's all hope it's the truth...

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...