ev0

[1.7.x] Hide Empty Tech Tree Nodes (for modded tech trees) v1.1.1

Recommended Posts

4 hours ago, Gordon Dry said:

When I use this ModuleManager:
https://github.com/net-lisias-kspu/ModuleManager

the tech tree is not
GameData\ModuleManager.TechTree

@Lisias

This is a side effect induced by my changes, it's not exactly related to this add-on (it's just the "screaming victim" as I use to say). I'm unsure if this is the right place to tell about it. :)

I'll give it a peek and try to propose a pull request with a 'generic' fix, so it would work with any mod that changes the TechTree, and not just Module Manager. I think this would be an improvement that would add value to this mod, instead of just making them change their work due my crazy ideas. :sticktongue:

(As a rule of thumb: if something used to work before you installed something of mine, and then stops to work after installing something of mine, it's probably my fault. ;) Poke me first, please.)

 

— EDIT --

Issue: https://github.com/Orthethac/HideEmptyTechTreeNodes/issues/2

Pull request: https://github.com/Orthethac/HideEmptyTechTreeNodes/pull/3

Edited by Lisias
added links to the solution

Share this post


Link to post
Share on other sites
10 hours ago, Lisias said:

Poke me first, please.

I can do that in a "2nd kind of" manner, the "1st kind of" manner is impossible because I cannot open an issue on your forks.

Share this post


Link to post
Share on other sites
1 hour ago, Gordon Dry said:

I can do that in a "2nd kind of" manner, the "1st kind of" manner is impossible because I cannot open an issue on your forks.

You have a point. I need to organize me better - I didn't expected having to properly maintain the Unofficial forks. :)

Share this post


Link to post
Share on other sites

@Gordon Dry @Lisias

I'll take a look. I see the pull request on GitHub so hopefully that makes the fix easy.

Edit: I just got a new desktop, so it looks like I'll be trying out KSP again a bit sooner than I expected ;) My old laptop couldn't really run the game since 1.2 or maybe pre 1.0!

Edited by ev0

Share this post


Link to post
Share on other sites

v1.0.5 - KSP v1.5.1 update

  • Recompiled for KSP v1.5.1

Just a simple recompile, nothing new. It seems to work with 1.5.1.

Bug for ETT users: You're probably going to see broken lines. It looks like Squad added new "v2.0" parts, but is still keeping the old versions in their Parts folders (e.g. see "probeCoreOcto2" and "probeCoreOcto2_v2" in Squad's Parts/Command folder). ETT has both the new and old parts listed in its mod. Since both part versions seem to be loaded by the game, my mod will "see" both and not fix the tech tree, but Squad hides the old parts and thus its tech node unless something else that isn't old is in there as well. @Probus can probably fix this by keeping the old and new parts in the same node, or deleting the old name from his tech tree.

Share this post


Link to post
Share on other sites

Sorry this is probably a silly question, but: how do I activate the "Fog of Tech"? Does this mod have a settings menu entry that I overlooked or a Toolbar button? I can't find anything clickable in the space center scene or inside the R&D building

Share this post


Link to post
Share on other sites
14 hours ago, avalancha said:

Sorry this is probably a silly question, but: how do I activate the "Fog of Tech"? Does this mod have a settings menu entry that I overlooked or a Toolbar button? I can't find anything clickable in the space center scene or inside the R&D building

It's in the settings menu (difficulty settings?) when you set up a new game, or when you press Esc and go to the settings in a current game. Hide Empty Tech Tree Nodes has its own settings tab.

Hopefully that feature still works. I forgot to check for 1.5.

Share this post


Link to post
Share on other sites

@ev0

I am wondering how hard the following would be:

  1. Add a hook into HETTN that basically does this:
    1. IF ParentNode contains "materialsScience*" or "electronics*"
      {
           Never remove node
      }
  2. Put that feature in that I can backport to a 1.3.1 release

Thanks!

Share this post


Link to post
Share on other sites
7 hours ago, pap1723 said:

@ev0

I am wondering how hard the following would be:

  1. Add a hook into HETTN that basically does this:
    1. IF ParentNode contains "materialsScience*" or "electronics*"
      {
           Never remove node
      }
  2. Put that feature in that I can backport to a 1.3.1 release

Thanks!

Hmm I think I can work something out. I'll put in a custom field in the research node modules that you can toggle to TRUE/FALSE with Module Manager if you never want to hide the node.

Your request is pretty specific, so I think the above is more flexible. In your case you'd just have to toggle the field in the correct nodes yourself via MM.

Curious as to why you want the empty nodes? For the science points?

Share this post


Link to post
Share on other sites

Yeah, I was being specific in order to try and best explain the specific use case. Your way is much more flexible and has much better long term use for more people than just us.

RURJcQ0.png

The area in red are representing Blue Skies Technology: https://www.wikiwand.com/en/Blue_skies_research
 

It essentially means there is materials and electronics research that are independent of specific applications, but are necessary for more advanced technologies. We have used them to essentially limit things so players cannot rush engines to the end of the tree.

Share this post


Link to post
Share on other sites

I feel bad for asking, but is this going to be updated to 1.6.1? I would really like to use it for the Historical Progression Tech Tree.

Share this post


Link to post
Share on other sites

@Taki117 Nice timing!:wink:

v1.1.0 - KSP v1.6.1 update

  • Recompiled for KSPv1.6.1
  • Added option to manually hide nodes (when enabled, this uses "hideEmpty" from RDNode modules. These can be edited with ModuleManager)
  • Added option to transfer science points from hidden nodes to their children/descendants

For those who want to use the manual hide option, here's an example MM script that will not hide the "Orbital Megastructure" node, even if it is empty. Do this AND enable the option "Use RDNode Settings" in the Difficulty Options.

@TechTree:FINAL // FINAL should only be used for user MM scripts, if ever!!!
{
	// Hide all empty nodes, initially
	@RDNode,*
	{
		@hideEmpty = True
	}

	// Don't hide Orbital Megastructures
	@RDNode:HAS[#id[orbitalMegastructures]]
	{
		@hideEmpty = False
	}
}

@pap1723 Kept you waiting, huh? Let me know if this works for your 1.3.1 game (I don't think the APIs have changed since then). I'll make a fork with a working one if it doesn't.

Edited by ev0
option usage clarification

Share this post


Link to post
Share on other sites

v1.1.1 - KSP v1.7.0 update

  • Updated .version file up to KSP v1.7.99. No other changes.

So, I've upgraded from a 720p (1080p?) laptop to a desktop with a 2k monitor and noticed that the physical size of the background of the tech tree is too small when I zoom out too far.  I tried to manipulate certain members of the current background (width, height, etc.) in my plugin's source code but wasn't able to get it working.  I also haven't been able to figure out the source image of this background, or how to change the source path to a different 2 or 4k image.  Anyone able to help on this?  Although, with a 2k monitor there's really no more need for me to zoom out further than the default 60% anymore...:P

Share this post


Link to post
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.