Jump to content

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


ev0

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
Link to comment
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. :)

Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

  • 3 weeks later...

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

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

Link to comment
Share on other sites

  • 3 weeks later...

@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!

Link to comment
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?

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

Link to comment
Share on other sites

  • 1 month later...

@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
Link to comment
Share on other sites

  • 3 months later...

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

Link to comment
Share on other sites

  • 5 months later...

UnKerballedStart by @SpinkAkron add these cool empty tech nodes with Tech level number for the convenience,
but hide-empty-tech-tree-nodes (obviously) hides them. Can something be done there for exclude them from being hidden ?

xoUFSWD.png

 

Edited by flart
Link to comment
Share on other sites

1 hour ago, flart said:

UnKerballedStart by @SpinkAkron add these cool empty tech nodes with Tech level number for the convenience,
but hide-empty-tech-tree-nodes (obviously) hides them. Can something be done there for exclude them from being hidden ?

Look two posts above yours. There is the solution :wink:

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

hey so i installed this mod (game data where the game data is where u put other mods) but it doesn't show up in the difficulty settings like other mods do, where do i put the "source" file? also i assume the file with ignore in it you ignore right? im sorry if this is ultra noob iv always used ckan but then darn empty nodes are driving my ocd up the wall lol. i assume im just not properly placing this source file

Link to comment
Share on other sites

2 hours ago, Sabizos said:

 i assume im just not properly placing this source file

Sounds like you're grabbing the file from Github... Use the SpaceDock link instead. The one you're grabbing from Github has extra stuff in it that you dont need/want... ie the source folder...

Inside your /GameData/ folder, you should just end up with a /HideEmptytechTreenodes/ folder, which has four subfolders, and only one file in each sub-folder.

Link to comment
Share on other sites

Another approach could be if there was a way to add a money or reputation reward to the empty nodes then the play balance against gaining higher tier tech too quickly and making tech trees more adaptable to individual play styles could be achieved.  A transition from hiding empty nodes to making empty nodes useful.  Variant tech trees would adapt to whatever mod mix is applied and the science points used to unlock the part-less node  could be rewarded in money and reputation in the form of "Research Advances", "New research theory" or "New Engineering design concepts".  If a mod is later added that fills that node then the "Make empty node useful" effect is not applied.

Edited by jpkerman
Link to comment
Share on other sites

3 hours ago, Stone Blue said:

Sounds like you're grabbing the file from Github... Use the SpaceDock link instead. The one you're grabbing from Github has extra stuff in it that you dont need/want... ie the source folder...

Inside your /GameData/ folder, you should just end up with a /HideEmptytechTreenodes/ folder, which has four subfolders, and only one file in each sub-folder.

You were right it was the github so i downloaded the other one and still no change, i'm running 8.1 of KSP just as the update said i should

here are the images of what the file looks like as well as all my mods(the image url thing wont accept them? do you guys only allow a certain site? i just googled "how to upload image urls" and picked the first page so if u guys require/prefer a certain style plz let me know

anyways if anyone can see anything wrong with my setup id appreciate it if you could let me know, thank you for you time.

-sab

 pic 1 

https://ibb.co/k08x6p2

pic 2

https://ibb.co/rHgJ9gg

pic 3

https://ibb.co/C5r2vRC

Link to comment
Share on other sites

5 hours ago, jpkerman said:

Another approach could be if there was a way to add a money or reputation reward to the empty nodes then the play balance against gaining higher tier tech too quickly and making tech trees more adaptable to individual play styles could be achieved.  A transition from hiding empty nodes to making empty nodes useful.  Variant tech trees would adapt to whatever mod mix is applied and the science points used to unlock the part-less node  could be rewarded in money and reputation in the form of "Research Advances", "New research theory" or "New Engineering design concepts".  If a mod is later added that fills that node then the "Make empty node useful" effect is not applied.

Hmmm I think unlocking money or reputation points is out of the scope of this mod. I wouldn't know the appropriate amount to give when you unlock the node. I also wouldn't know how to get it to work, code-wise, since I don't have experience with the money and reputation parts of the game.

A while ago I added an option to transfer science points from hidden nodes to unhidden nodes, if you are worried about unlocking nodes too quickly.

You could also take advantage of the vanilla game's Part Upgrades feature to make existing parts get better specs when you unlock a node. I think Interstellar Extended uses Part Upgrades, if you want to make your own and are looking for an example. I don't know how it works though. It might just need an MM script.

Link to comment
Share on other sites

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