Jump to content

[WIP] ATC - Alternative Tree Configurator (released)


SirJodelstein

Recommended Posts

Yes, thanks!

My pleasure! BTW: Sorry that there are a couple of places the indentation seems messed up in ATCTreeDumper.cs. I only noticed that after committing my changes and didn't want to confuse things in you reviewing my changes by doing a second round. Apparently there was some dark recess of my editor that wasn't actually treating tabs as spaces and I've hopefully got that sorted now.

It is still practical, but a correct topological ordering is required for processing the anchors. My simple recursive search ignored the fact that some nodes have multiple parents. I'll fix that in the next commit.

Well, if I'm understanding you correctly, that would mean processing the tree from the start inwards basically in the unlock order to prevent such mishaps. Yeah, that could work, although I still sincerely doubt it will be able to cover all circumstances and that a manual override will still be a good thing.

One example from the BTSM tree:

FJVZxccl.png

Now, pretty much the entire tree is displaying the way I'd like after the changes I submitted, but you can still see with the highlighted node in the bottom right (Colonization) that the auto-assign rules are mangling the bottommost connection in a way that would require me to rearrange the tree to get them to "snap" properly.

And yes, I realize that the node description panel isn't reacting well to having 4 parent dependencies there either, but that's a separate issue I need to deal with ;)

I think this will inevitably be the problem with any kind of auto-assign. It may cover the majority of cases, but they'll always be a few fringe ones where things just aren't quite right and you'll want to be able to manually override it.

I'd like to get to work on those manual overrides right away actually, but I suspect if you're going to be working on the auto-assignment code, this might be the wrong time to do it given we'd be directly working on the same bit of code.

EDIT: NM, just noticed you've already checked in your changes. Will get to work on that right away then :)

Edited by FlowerChild
Link to comment
Share on other sites

I think this will inevitably be the problem with any kind of auto-assign. It may cover the majority of cases, but they'll always be a few fringe ones where things just aren't quite right and you'll want to be able to manually override it.

Yes, manual override should be possible, and i think its not too hard to implement, just create a list of nodes to skip during autoassignment (i.e. not call "setupAnchors" in Line 194.). Go for it :)

Link to comment
Share on other sites

Yes, manual override should be possible, and i think its not too hard to implement, just create a list of nodes to skip during autoassignment (i.e. not call "setupAnchors" in Line 194.). Go for it :)

Yup, that was the idea. Just didn't have time to get to it yesterday before checking in my changes :)

EDIT: And done...

5vMTOm5l.png

Syntax is as follows:


PARENT_NODE
{
name = node7_advancedMotors
parentSide = RIGHT
childSide = LEFT
}

The auto-assign is only overriden if BOTH values are specified.

Just going to run a couple of more tests to verify everything is cool before checking it in.

EDIT: BTW, OnGUI() and thus the keyboard shortcuts for debug output and tree reload seem to currently be dead code. Not sure if that was intended to disable them, but wanted to mention that in case it wasn't.

EDIT: All checked in. Unfortunately your auto-assign code still seems to be messing up on the stock tree though:

Ly66s2Pl.png

That seems to be occurring because survivability is the one exception node in the tree where it is closer horizontally than vertically due to the angle on which nodes at that level are presented. I get around this in BTSM by removing the angle, as all those nodes are of equal purchase cost in the mod.

This is rather unfortunate given this is one of the first things people will see upon installing the mod as is :)

I was tempted to add a manual override to it in StockTree.cfg, but that's a rather less than optimal solution given people editing the tree would have to know that assignment is there while editing, or would wind up getting some rather odd behavior out of the node.

Edited by FlowerChild
Link to comment
Share on other sites

@ Auto-assignment/Stock tree.

Man, thats really annoying. KSP cannot display an arrow properly if either the parentanchor is "BOTTOM" or the childAnchor is "TOP". Adjusted the code, now the stocktree displays properly. Also added warnings if a user-config uses one of these anchors.

@Keyboard shortcuts: Yes, they work, i've tested them (Strg+D for debug-dump and Strg+R for "reload tree")

Alright, time to wrap it all up and prepare the release post :-)

Link to comment
Share on other sites

Here we go, ATC is now officially released!

http://forum.kerbalspaceprogram.com/threads/93759-ATC-Alternative-Tree-Configurator

Discussion and feedback will continue in that thread, I'll have this one locked to prevent having to look in multiple locations.

Broke link.

http://forum.kerbalspaceprogram.com/threads/93759-ATC-Alternative-Tree-Configurator

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...