[TOOL A8-15] RimSearch (Updated 11.07.2016) - The Research Tree Graph Generator

Started by 1000101, April 08, 2015, 07:40:50 PM

Previous topic - Next topic

1000101

wth???  I didn't change anything to do with xml at all in this update.  That code is exactly the same as the earlier release.  What I did change was the export function which now is two-part (user editing and then bmp export).

I shall investigate and see if I can duplicate this.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

1000101

ok, mrofa, if you would be so kind as to try this version (attached to this specific post) and let me know the log results if it fails and just let me know in general if it works, that would be gre-e-e-e-e-at.

[attachment deleted due to age]
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Neal Raven

I always get "Could not locate game mods directory!" even though I placed the exe in the rimworld folder...
My rimworld folder is on dropbox though, could that have anything to do with it?

Here's my folder layout:
11/05/2015  11:13    <DIR>          .
11/05/2015  11:13    <DIR>          ..
06/05/2015  14:53    <DIR>          appdata
05/12/2014  21:17               673 Credits_FreeSounds.txt
11/05/2015  10:19    <DIR>          modpacks
11/05/2015  10:19    <DIR>          Mods
09/05/2015  02:02             1.451 psi-settings.cfg
05/12/2014  21:17               884 Readme_Modmaking.txt
22/04/2015  18:37             1.003 Readme_SaveFiles.txt
05/12/2014  21:17               290 Readme_Translations.txt
11/05/2015  01:40           257.024 RimSearch.exe
11/05/2015  11:13               202 RimSearch.log
23/04/2015  00:37        11.619.328 RimWorld785Win.exe
11/05/2015  07:54    <DIR>          RimWorld785Win_Data
23/04/2015  04:27        61.249.804 RimWorldAlpha10fWin.zip
23/04/2015  00:37    <DIR>          Source
10/05/2015  00:55           198.840 Stargate.xml
09/05/2015  02:30                69 StargateBackup.xml.bak
23/04/2015  00:37                18 Version.txt

1000101

Quote from: Neal Raven on May 11, 2015, 05:21:18 AMI always get "Could not locate game mods directory!" even though I placed the exe in the rimworld folder...

It's in the same place as RimWorldNNNWin.exe and can't find Mods\ in the same directory??? ie:

Some Directory Containing RimWorld\
+ Mods\
+ RimWorldNNNWin.exe
+ RimSearch.exe

If it can't find it that case, the runtime library for this compiler is borked.  I'm not doing anything strange to get the directory, just calling the runtime function to return the local directory structure filtered for the mods path, specifically:

Const As String ModsDir = "Mods"
If( Dir( ModsDir, fbDirectory ) = "" )Then
   '' Derp, not found :(
EndIf

Where fbDirectory is a library constant (bitwise flag) filtering file table attributes (ie, entries with only the directory bit set so, no files).  If that is failing then there is nothing I can do about the runtime library short of writing and submitting a patch but I would need to know what specifically caused the error which I can't reproduce locally (not that I want to write compiler patches).  Otherwise, it's switch tool chains (which I was going to do anyway, this was just originally a quick'n'dirty program).

Quote from: Neal Raven on May 11, 2015, 05:21:18 AMMy rimworld folder is on dropbox though, could that have anything to do with it?

Well, it might actually.  If I create a symlink to a directory located somewhere else, the runtime library is fooled because the Windows file system resolves the symlink and returns everything you'd expect as if the file/directory was local.  Using a 3rd party tool which emulates such behaviour, like dropbox, may interfere in that it's not a believable liar and my program correctly identifies it's not there.  That is the runtime may be using to low a level API to access the files and dropbox isn't "deep enough" to trap it.  But, since the runtime is the standard crt lib (c runtime library) which is installed with Windows, it should be smart enough to trap that.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Neal Raven

But it's not a symlink actually. The folders are just ordinary folders, besides being monitored by dropbox. Asking the directory flagbit should still return true, I'd guess. (The appdata folder in there is symlinked though (as in, it's the destination for the actual symlink in my appdata folder, so I can sync my savedata. But I don't think this should matter much here.)
I'll try again later today by turning the dropbox.exe off instead of just pausing the sync-process.

mrofa

All i do is clutter all around.

Neal Raven

Hmm, when I copied my folders to Temp and ran it there it didn't work either. But when I clean installed RW in my Temp, it did work on that one. So it's definetely something fishy going on in my proper installation files...

Edit: it's also not a symlink issue, as it was able to find my symlinked appdata folder as evidenced in the log:
RimSearch

Log Openned: 09:04:19 05-12-2015


Mod directory: Mods\

Building library...

Locating ModsConfig.xml...
   xml: C:\Users\[edited]\AppData\LocalLow\Ludeon Studios\RimWorld\Config\ModsConfig.xml...
Creating xml tree..

Mod: Core
   xml: Mods\Core\Defs\ResearchProjectDefs\ResearchProjects_Misc.xml...
Creating xml tree..
Importing xml...
   Imported
   xml: Mods\Core\Defs\ResearchProjectDefs\ResearchProjects_Ship.xml...
Creating xml tree..
Importing xml...
   Imported

Mod: EdBModOrder

Mod: EdBInterface

Mod: EdBPrepareCarefully

Mod: LessIncidentTrolling

Mod: Icons

Mod: GlitterTech

Mod: Apothecarius

Mod: ProjectArmory300

Mod: ERT 1.6- ResearchConsole

Mod: Clutter

Mod: Miscellaneous_HiRes

Mod: More Vanilla Turrets

Mod: Turret Collection

Mod: Turret Collection Overkill

Mod: Common

Mod: AutoHuntBeacon

Mod: VeinMiner

Mod: MoreHair

Mod: AnimuHair

Mod: MD2Base-6

Mod: MD2Droids-3

Mod: MD2Storage-3

Mod: MD2Fortifications-2

Mod: MD2Industry-5

Mod: MD2Manufacturing-9

Mod: MD2Power-3

Mod: ED-Core

Mod: ED-AutoLoader

Mod: ED-Plants24H

Mod: ED-DeepStrike

Mod: ED-Embrasures

Mod: ED-LaserDrill

Mod: ED-OmniGel

Mod: ED-PersonalNanoShields

Mod: ED-ReverseCycleCooler

Mod: ED-Shields

Mod: ED-Stargate

Mod: ED-Vent

Mod: M&Co. Common

Mod: M&Co. MMS

Mod: MedicineKitCrafting 1.3.5

Mod: Glassworks

Mod: FloorLights

Mod: CryptoHax

Mod: BionicReplacementsCrafting 1.0

Mod: Backstories-u2

Mod: Armor Crafting 1.0

Mod: AlphaMuffalo1.7

Mod: AdvancedLamps

Mod: MIRV Artillery 1.2.5

Mod: NeurotrainerCrafting 1.0

Mod: PowerSwitch

Mod: ReplacementOrganCrafting 1.0

Mod: RW_A2B-0.10.0

Mod: TilledSoil

Mod: Weapon Crafting 1.3.75

Mod: OmniStorage

Mod: OmniMedical

Mod: OmniLighting

Mod: OmniFactions

Mod: OmniJoy-Darts

Mod: NonLethals

Mod: M&Co. MiningHelmet

Mod: M&Co. AlertSpeaker

Mod: NanoFusionReactor

Scanning all research...
   Scanning for missing nodes...
   Building relationship tree...
   Calculating node depths...
   Adding bridges...
   Sorting nodes...
   Assigning node render placement...
   Done

Rendering Tree:

1000101

I'm glad it's working for people and reduce the amount if info logged to basics/errors.  Further, my local copy now also injects missing research prerequisites and makes them red for easy identification.

I'm also looking at getting it to tell more about the tech when hoving the mouse including, files which define it in mod order, highlighting the parent tree and directly opening the file(s) the tech is defined.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Sam_

Much better then the graphic I used for Glittertech which never saw the light of day.


1000101

Quote from: SamMuch better then the graphic I used for Glittertech which never saw the light of day.
heh, right now it's just vector graphics and a raster font.

I've done a small update on it because it suddenly crashed on my while working on my personal modpile (after integrating Fishing Industry I ran it again to give me the new tech and *BOOM*).

The crash actually had nothing to do with Fishing Industry, it had to do with the Community Core Library (WIP) which added a "hidden" tech (self-prerequisite) and *that* caused the crash (resolved tech level to -1, derp).  Now, it handles such techs (I down-extended the arrays from 0 to 99 to -1 to 99).  So, it can handle 101 levels of tech now, each level can have 100 techs in it, for a total of 10100 techs.  I can extend that if need be but I build a matrix array for faster placement instead of constantly re-iterating the tech tree, I can do a fast loop through the array.

While I had the source open and in front of me, I finally got around to the branch pruning too.  Now branches which could previously have been logically shared are.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Adamiks

It's really useful! Thanks E!

Research tree from my modpack.

Now i can see what i should fix without searching in tons of xmls!

1000101

Thanks, it's tech trees like that that I decided to make the program.  After trying to map out the tech tree in Paint Shop Pro by manually scanning xml for maybe half an hour I said, "f*ck this sh*t," and in an hour wrote v0.0.0.1 of the RimSearch tool.  Then the debugging and improvements.

Anyway, this saves me time when integrating mods into my personal modpile and figured it would be useful to others too.  I'm glad you find it useful and seeing as in less than 24 hours more than a couple people downloaded the latest update, others must find it useful too.

Next update:
+ More info when hovering the mouse over tech
    . Defining files in load order
    . Directly opening files
    . Things unlocked by tech
    . Research cost
    . Total tree-to-point research cost
+ Ability to scan Community Core Library (WIP) AdvancedResearchDefs
    . Things unlocked by Advanced Research (multi-tech)
    . Recipes unlocked by Advanced Research

Hopefully I will be able to get Community Core Library into a usable state for Alpha 11.  I've been using it in my modpile while working on it and I've refined quite a bit (removed some because it's just not feasible like all NPD and hopper related code) but it still needs work for a proper public release.

ETA for RimSearch and Community Core Library:
Second tuesday in Novebuly.  ;p
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

harpo99999

1000101, every time I run rimsearch on a w7 32bit  rimworld a10 with a LARGE pile of mods I get a crash on Apothecarius. attached is the output log from the last run, btw rimworld run with the modsconfig stack also attached

[attachment deleted due to age]

1000101

I took a look at Apothecarius and the only thing is that Soylent Green research doesn't have a prerequisites tag and that causes the crash.

My code actually tested but a compiler code generation error optimized it out.  Switched to a more robust means of checking and it doesn't crash anymore (in that particular situation).

OP updated with bug-fix.
Thanks for reporting.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

1000101

Why am I bumping this?  I don't know.  But I do know that I updated it after quashing a couple compiler related bugs (seriously, how does "If( ptr )Then..." not equate to "If( ptr <> NULL )Then..." I don't know but now I force the checks even though they should be implicit).

New info window, F5 reloading, tech highlighting, different bugs to crop up, it's got it all!  See OP for details!
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By