Jump to content

[0.25] ATC - Alternative Tree Configurator [15.10. - V0.5.1]


SirJodelstein

Recommended Posts

ATC - Alternative Tree Configurator

This is a plugin to modify the tech tree. You can customize nodes (positions, descriptions, sciencecost, icons, etc) and node dependencies.

ZD07KIn.png

Also, it allows modification of the science-value factors and altitude thresholds for each celestial body.

Projects using ATC:

FAQ

Why?

Because its a TreeLoader alternative. One that does not use an online backend for file distribution, and does not have a "select tree" popup. Techtree-Modders can simply distribute a cfg-file with their release. Maybe one day it will become obsolete when/if Squad does something like this in stock, but for now I'd like to be able to mod the techtree without having to write code.

Where?

Get it on KerbalStuff.com!

or get it on Curseforge!

How?

ATC comes with a configfile for the stock tech tree. Each tech-node looks like this:


{
name = node3_generalConstruction
title = General Construction
description = New equipment to help out in keeping things stable, especially useful when the size of the spacecraft defies the current bounds of sanity.
icon = GENERALCONSTRUCTION
scienceCost = 45
anyParentUnlocks = True
hideIfNoparts = False
posX = -1469.98
posY = 1037.423
PARENT_NODE
{
name = node2_generalRocketry
}
PARENT_NODE
{
name = node2_stability
}
}
	TECH_NODE

You can modify that using the power of ModuleManager. This is a snippet of the cfg that produces the above image


{
@TECH_NODE[node3_scienceTech]
{
@posX = -1850
@posY = 1100
@title = Fancy Technology
@description = We should research this immediately. For SCIENCE!

!PARENT_NODE[*] { }
PARENT_NODE
{
name = node3_advRocketry
}
}
@TECH_TREE[stock]

Who?

ATC is made by me (SirJodelstein) with substantial input from FlowerChild, who is going to use this for his BTSM tree overhaul.

How do I add new nodes?

You cannot. Yet. For now, you have to stick to the 55 stock nodes. But honestly, thats already quite a lot of research configuration available

How do I assign parts to nodes?

Just like before, you can already do this without ATC. Use ModuleManager or direct cfg-editing to set the "TechRequired" property of a Part.

Does this work with TreeLoader configs?

No. But it should not bee to hard to write a converter for TreeLoader configs. I'm not going to provide one, though. If you build such a thing, let me know!

Is there an editor for this?

Well, any texteditor out there is. But there is no dedicated tool for these configfiles. Why don't you create one? I'll totally link it here and praise your name!

Is it possible to influence how the arrows are drawn?

Yes! By default, the arrow anchor positions are determined by the relative positioning of the nodes. If you dont like the result, you can override auto-anchoring like this


@PARENT_NODE[nodeX_foo]
{
parentSide = RIGHT
childSide = LEFT
}
		

Please be aware that KSP cannot draw arrows where parentSide is "BOTTOM" or childSide is "TOP". These arrows will not be visible on the R&D screen and you will get a warning in the debug log.

What about licensing and redistribution?

ATC is released under the MIT licencse. You can either link to this thread or you can directly redistribute it with your techtree project. If you include it directly, please add this to your forum post:

[NOPARSE]This project includes the "Alternative Tree Configurator" plugin to modify the tech tree. Details can be found in the ATC release post.

ATC includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin[/NOPARSE].

What else should I know about this?

Changelog:


* 0.4 initial release
- 0.4.1 bugfix science params not loaded
* 0.5 new "delete node" feature, ModuleManager update, fix exception if invalid parent node is specified
* 0.5.1 rebuild for .25, MiniAVC and ModuleManager update

Edited by SirJodelstein
changelog & title info
Link to comment
Share on other sites

Oh...should tell wavefunctionp!!

So.. trees from treeloader works?

*tells wavefunctionp*

No, as Sirjodelstein stated, treeloader techtrees are not compatible with this one - but if someone want to code it, a converter should be able to be created fairly easily. (If you use less than the 55 science nodes avaible in the stock system)

Does this work with TreeLoader configs?

No. But it should not bee to hard to write a converter for TreeLoader configs. I'm not going to provide one, though. If you build such a thing, let me know!

Edited by sgt_flyer
Link to comment
Share on other sites

So techy mods like NFP and KSPI could still make use of this if they brewed up a more or less original tech tree to free up enough nodes for their parts, but then combining with other mods would be messy. So what we need now is a tree that uses as few nodes as possible for the stock parts while still providing a sense of progression. basically common tree for the techy mods and the mods that would want to be used with them to build off of and stay relatively "compatible" with each other like how the stock tree is to them now but with the flavor tweaked to suit the mods.

Link to comment
Share on other sites

I'm still hoping that Squad will eventually either:

* add some more "empty" tech nodes to the stock tree (that seems to be like a really simple/low workload addition, devs please? Something like 50 more empty nodes?)

* or open up the part of the API that lets plugins add more nodes without going through extremely convoluted ways like r4m0n currently does it with TreeLoader.

@Combination of multiple trees: Well, ModuleManager makes something like this at least technically possible if the project maintainers coordinate their efforts.

Interesting times ahead. I'm currently creating my own complete Techtree reordering based on ATC.

Link to comment
Share on other sites

This looks a lot nicer to use than other options. Might start roughing out a re-arranged and compacted tree myself because really the stock one just seems needlessly stretched out. Will have to see if anyone wants to come to a consensus.

Link to comment
Share on other sites

This looks a lot nicer to use than other options. Might start roughing out a re-arranged and compacted tree myself because really the stock one just seems needlessly stretched out. Will have to see if anyone wants to come to a consensus.

I'm most definitely game for some consensus on this - been waiting for this mod patiently :)

Link to comment
Share on other sites

so, there's a "createNode" method in the codebase. Is that the method that generates a new tech tree node? I don't really know much about the innards of KSP, so figured I'd ask for a point of reference.

Having played around pretty extensively with the code base I'm pretty sure that's just some WIP code that SirJodelstein has in there. It's not functional at present.

Link to comment
Share on other sites

Having played around pretty extensively with the code base I'm pretty sure that's just some WIP code that SirJodelstein has in there. It's not functional at present.

kk... I'm having a battle with myself as to whether or not I should install visual studio express and try messing around with it... >.<

Link to comment
Share on other sites

Turns out there was a bug preventing body science changes to register, and it was entirely my fault :P

Sorry about that man. Just checked in a quick fix for it.

Just when i was wondering why my science results were strange :) Then i checked the code, found the error, and saw that you had already checked in the fix. No problem, I'll put up a new release tonight.

Also thinking about registering and putting this on KerbalStuff, that site has become really great over the last weeks/months.

@Ixonal: Sure, why not? But as FC said, thats old experimental and inactive code. It has not even been adjusted to the new techtree syntax yet.

Link to comment
Share on other sites

Just when i was wondering why my science results were strange :) Then i checked the code, found the error, and saw that you had already checked in the fix. No problem, I'll put up a new release tonight.

Also thinking about registering and putting this on KerbalStuff, that site has become really great over the last weeks/months.

@Ixonal: Sure, why not? But as FC said, thats old experimental and inactive code. It has not even been adjusted to the new techtree syntax yet.

Yeah, like I said, just messing around. As is, though, I know very little about KSP's infrastructure, so doubt I could contribute anything of any real value...

Link to comment
Share on other sites

hmmmm, no documentation comments in the ksp code.... what exactly is this notion of a "prefab"?

Edit: answered my own question. it's like a prototype in Javascript.

Edit 2: good lord, trying to determine what's going on without being able to attach to the debugger is hell

Edit 3: sooooo, why exactly can't new be used here? does Unity need to do something screwy with the nodes?

Edited by Ixonal
Link to comment
Share on other sites

hmmmm, no documentation comments in the ksp code.... what exactly is this notion of a "prefab"?

Edit 3: sooooo, why exactly can't new be used here? does Unity need to do something screwy with the nodes?

Yep Ixonal, thats what I was thinking as well when i tried to create new nodes. Good luck!

Oh, and I just uploaded this to KerbalStuff. Wooohoo!

Link to comment
Share on other sites

This looks a lot nicer to use than other options. Might start roughing out a re-arranged and compacted tree myself because really the stock one just seems needlessly stretched out. Will have to see if anyone wants to come to a consensus.

Christ on a pogo stick... yes.

Why docking technologies are so far into the standard tree I have no idea, nor why RCS is on another branch.

Looking forwards to seeing what can be done with this.

Link to comment
Share on other sites

Yep Ixonal, thats what I was thinking as well when i tried to create new nodes. Good luck!

Oh, and I just uploaded this to KerbalStuff. Wooohoo!

well, time to start throwin scat at a wall and see what sticks...

Edit: sometime tonight I'm going to go ahead and put in a pull request to add a factory class to generate RDNodes, so that the crazier code can be abstracted out of the main bulk of the code.

Edited by Ixonal
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...