Jump to content

[0.90] Tweakable Parameters ( V4.1 Released 25 Dec 2014 )


HoneyFox

Recommended Posts

Do you reckon you could make it so that holding down the adjustment buttons makes the parameter decrease/increase at a particular rate? Right now it is tedious to change parameters by a large number of increments. Or perhaps a text box would work.

Yeah, a bit. I'll add two repeatButton so by holding down the buttons these value will change quickly. And by clicking the current two buttons you can adjust accurately.

Link to comment
Share on other sites

Does your plugin allow me to change the rescaleFactor?

Well.. unfortunately, though it can change the rescaleFactor value of the part, the part's actual size won't change. Perhaps it's read in loading phase and after that, any change on that won't affect anything.

Link to comment
Share on other sites

Well, it isn't a real disaster. I was just wondering if that parameter was included.

Other question, if a part is added twice, can each part have its own changes or does a change affect both?

All public numeric fields of part's class / part module's class will be found by using .NET reflection mechanism, so it is included.

Yes, each part instance has its own tweak values. This even applies to symmetric counterparts. (though i guess sometimes it would be a bit inconvenient, anyway...)

Link to comment
Share on other sites

  • 2 weeks later...

This plugin does not seem to work in 0.20.x, at least not for me. There is no Tweakable Parameter GUI in the VAB. There are no messages in the log that I can see relating to it.

Edit:

Never mind, I'm an idiot. RTFM and all that. I even had it working fine in 0.19.1.

Edited by ZRM
Link to comment
Share on other sites

  • 2 weeks later...
This plugin does not seem to work in 0.20.x, at least not for me. There is no Tweakable Parameter GUI in the VAB. There are no messages in the log that I can see relating to it.

Edit:

Never mind, I'm an idiot. RTFM and all that. I even had it working fine in 0.19.1.

Huh... I have a try and it works good in 0.20.x.

But looks like the infuser tool needs an update for the new part.cfg format. (and maybe also for the new Gamedata folder structure)

Link to comment
Share on other sites

Thanks for this plugin. It seems to work just fine on 0.2 however I'm having a little problem with the infuser. It works great for most things however when I try to pick the B9 parts folder, I'm not seeing every single part in the generated list. Could it have something to do with the fact that B9 parts folders have multiple cfgs, or am I doing something wrong?

Edited by Cpt. Kipard
Link to comment
Share on other sites

Thanks for this plugin. It seems to work just fine on 0.2 however I'm having a little problem with the infuser. It works great for most things however when I try to pick the B9 parts folder, I'm not seeing every single part in the generated list. Could it have something to do with the fact that B9 parts folders have multiple cfgs, or am I doing something wrong?

o_o Oops... that infuser always assumes to read the "part.cfg" file under a part folder. The B9 parts folder structure is different? I may need to download it and have a look.

Temporarily you can add:

MODULE
{
name = ModuleTweakableParam
useMultipleParameterLogic = true
}

into the config manually. I will put an update once i finish an analysis on the B9 part pack.

Link to comment
Share on other sites

This plugin does not seem to work in 0.20.x, at least not for me. There is no Tweakable Parameter GUI in the VAB. There are no messages in the log that I can see relating to it.

Edit:

Never mind, I'm an idiot. RTFM and all that. I even had it working fine in 0.19.1.

Huh... I have a try and it works good in 0.20.x.

But looks like the infuser tool needs an update for the new part.cfg format. (and maybe also for the new Gamedata folder structure)

Sorry for the confusion - My edit is meant to show that I got it to work, after a case of RTFM. Hence the "never mind".

Link to comment
Share on other sites

Great stuff, glad I could help. Also is it really necessary to access explorer in memory in order to choose a folder. I seems like you should be able to do it without that. Makes your infuser look kinda suspicious.

Alright... I've just written some new codes to change the logic of the infuser tool and got it uploaded.

It will now be able to get all cfg files in any sub-directory and will luckily filter out all cfg files that are not for part definition.

But still pay attention to the list because i don't know if i miss anything special...

Talking about the necessity of letting users to pick a folder... i really don't know how to get KSP folder automatically. There seems to be no registry entries of where your KSP is installed... And it will become even harder when you have multiple versions of KSP installed. (like myself :D) So i'd rather leave it to users to decide.

Link to comment
Share on other sites

Talking about the necessity of letting users to pick a folder... i really don't know how to get KSP folder automatically. There seems to be no registry entries of where your KSP is installed... And it will become even harder when you have multiple versions of KSP installed. (like myself :D) So i'd rather leave it to users to decide.

You didn't understand what I wrote. The infuser is making my firewall complain about direct memory access when I click to choose the folder. You should be able to program it in such a way that it doesn't need to access explorer.exe in memory, and still make it work the way it does, otherwise it just looks suspicious.

Link to comment
Share on other sites

You didn't understand what I wrote. The infuser is making my firewall complain about direct memory access when I click to choose the folder. You should be able to program it in such a way that it doesn't need to access explorer.exe in memory, and still make it work the way it does, otherwise it just looks suspicious.

wait, what? it's accessing explorer.exe in memory?

is it because i'm using the FolderBrowserDialog provided by the .NET framework and this control will utilize the system's built-in common-dialog via accessing explorer.exe?

Otherwise I may need to create a simple GUI to allow users to pick the folder. It will look quite simple (read as ugly) anyway. :P

Edited by HoneyFox
Link to comment
Share on other sites

Yeah there's always more than one way of doing things. I can't actually help you there because I've never used .NET. I'll say this though. Whatever technique you're using seems to degrade gracefully because blocking the memory access doesn't seem to break your program. That's the reason I'm saying there must actually be a way of getting the folder without being so intrusive.

Link to comment
Share on other sites

  • 2 months later...

I'm glad to inform you of the up-coming new version (TweakableParam v3).

It will be published soon. I'm still preparing the packaging + pushing source code to my GitHub, etc.

New features (Well, just one new feature I have to admit :P)

Add support to FloatCurve replacement.

Now you can replace these float curves (e.g. engines' Isp curve, solar panels' power output curve, etc.) by clicking the Replace Curve button in the "Add Parameters" window. The curve editing is still primitive though, you can add key+value pairs, and you can clear all entries.

Also, I've found out that the Sarbian's Module Manager Extension plugin works perfectly with my plugin.

The coming package will bring you with a small config file which will add the ModuleTweakbleParam to all your parts*. After that the Infuser Tool is no longer needed. :)

* Only when you have MME plugin installed. MME is not included in the v3 package. You can get that from the link above and install that .dll to KSP/GameData/ folder.

Edited by HoneyFox
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
Will this allow me to edit node attachments. I'm trying to tweak a part and where it attaches. It gets tiring going to back to cfg file try a setting and start up game again. If this mod doesn't do that, can someone point me to a mod that can do that, if there is one.

Thanks

No this plugin has no such capability and I don't know if there's existing plugin that supports this. sorry.

Talking about editing cfg and restarting game, you actually don't need to do that, you just need to use the debug menu, there's a "Reload All" button in the "Database" page, which can reload all cfg files when you are at space center, this will take tens of seconds to reload all assets but it's definitely faster than restarting the game.

Link to comment
Share on other sites

No this plugin has no such capability and I don't know if there's existing plugin that supports this. sorry.

Talking about editing cfg and restarting game, you actually don't need to do that, you just need to use the debug menu, there's a "Reload All" button in the "Database" page, which can reload all cfg files when you are at space center, this will take tens of seconds to reload all assets but it's definitely faster than restarting the game.

Does reloading the cfg files in this manner still break mods that use Module Manager?

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