Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.3 #55

Open
wants to merge 17 commits into
base: 1.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 8 additions & 56 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,19 @@
<name>Research Tree</name>
<author>Fluffy</author>
<url>https://ludeon.com/forums/index.php?topic=16120</url>
<description>A better research tree.
<description>This is a unofficial update of Fluffy's Research Tree to make it work with Rimworld 1.3 and beyond. Will get removed upon Fluffy's request or when the original mod gets updated.
My fork of this mod:
https://github.com/Zemogiter/ResearchTree/tree/1.3
Original mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=1266570759

&lt;size=24&gt;Features&lt;/size&gt;

automatically generated to maximize readability*.
shows research projects, buildings, plants and recipes unlocked by each research project.
projects can be queued, and colonists will automatically start the next project when the current research project completes.
search functionality to quickly find research projects.

&lt;size=24&gt;FAQ&lt;/size&gt;
&lt;i&gt;Can I add/remove this from an existing save?&lt;/i&gt;
You can add it to existing saves without problems. Removing this mod will lead to some errors when loading, but these should not affect gameplay - and will go away after saving.

&lt;i&gt;Why is research X in position Y?&lt;/i&gt;
Honestly, I have no idea. The placement of projects (nodes) is automated to minimize the number of crossings between dependancies (edges), and reduce the total length of these edges. There are many possible scenarios in which this can lead to placements that may appear non-optimal. Sometimes they really are non-optimal, sometimes they just appear to be so. See also the &lt;i&gt;technical&lt;/i&gt; section below for more information.

&lt;i&gt;Can I use this with mod X&lt;/i&gt;
Most likely, yes. Added researches and their requirements are automatically parsed and the tree layout will be updated accordingly. ResearchPal implements a lot of the same functionality as this mod, and the research queue will likely not work correctly if both mods are loaded.

&lt;i&gt;This looks very similar to ResearchPal&lt;/i&gt;
Yep. ResearchPal is based on a legacy version of this mod that was kept up-to-date by SkyArkAngel in the HCSK modpack. I haven’t worked on this mod in a long time, but I recently had some spare time and decided to give it another go. Feel free to use whichever you like better (ResearchPal has an entirely different layout algorithm). You can run both mods side by side to check out the different tree layouts, but be aware that the research queue will not work correctly if both mods are loaded.

&lt;size=24&gt;Known Issues&lt;/size&gt;

Layouts are not perfect, if you have experience with graph layouts - please do feel free to look at the source code, and/or implement a Sugiyama layout algorithm for me that runs in C# .NET 3.5 (Mono 2.0).

&lt;size=24&gt;Technical&lt;/size&gt;
So how does this all work?

Creating an optimal layout is a known problem in the area of &lt;i&gt;Graph Theory&lt;/i&gt;. There’s serious mathematicians who’ve spent years of their live trying to figure out this problem, and numerous solutions exist. The group of solutions most relevant to our research tree (a &lt;i&gt;directed acyclic graph&lt;/i&gt;, or &lt;i&gt;DAG&lt;/i&gt;) is that derived from Sugiyama’s work. Generally speaking, these algorithms have four steps;


layering (set the &lt;i&gt;x&lt;/i&gt; coordinates of nodes, enforcing that follow-up research is always at a higher x position than any of its prerequisites, this is a fairly straightforward heuristic)
crossing reduction (set the &lt;i&gt;y&lt;/i&gt; coordinates of nodes such that there is a minimal amount of intersections of connections between nodes)
edge length reduction (set the &lt;i&gt;y&lt;/i&gt; coordinates of nodes such that the length of connections between nodes is minimal)
horizontal alignment (set the &lt;i&gt;y&lt;/i&gt; coordinates of nodes such that the connections between nodes are straight as much as possible)

The final step is the hardest, but also the most important to create a visually pleasing tree. Sadly, I’ve been unable to implement two of the most well known algorithms for this purpose;


Brandes, U., &amp; Köpf, B. (2001, September). Fast and simple horizontal coordinate assignment.
Eiglsperger M., Siebenhaller M., Kaufmann M. (2005) An Efficient Implementation of Sugiyama’s Algorithm for Layered Graph Drawing.
Luckily, the crossing reduction and edge length reduction steps partially achieve the goals of the final step. The final graph is not as pretty as it could be, but it’s still pretty good - in most scenarios.

&lt;size=24&gt;Contributors&lt;/size&gt;

Templarr: Russian translation
Suh. Junmin: Korean translation
rw-chaos: German translation
53N4: Spanish translation
Silverside: Fix UI scaling bug for vertical text
shiuanyue: Chinese (traditional) translation
notfood: Implement techprint requirements
HanYaodong: Add simplified Chinese translation

&lt;size=24&gt;Version&lt;/size&gt;
This is version 3.17.534, for RimWorld 1.1.2654.
Please give me feedback on how to further improve this mod.

</description>
<supportedVersions>
<li>1.1</li>
<li>1.3</li>
<li>1.4</li>
</supportedVersions>
<packageId>fluffy.researchtree</packageId>
<modDependencies>
Expand Down
1 change: 1 addition & 0 deletions About/PublishedFileId.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2608058938
Binary file added Assemblies/0Harmony.dll
Binary file not shown.
Loading