linuxgurugamer / QuickMods

A plugin collection for Kerbal Space Program
http://forum.kerbalspaceprogram.com/index.php?/topic/85834-1
GNU General Public License v3.0
5 stars 8 forks source link

QuickSearch still is unreliable - KSP 1.8.1 #5

Open Gordon-Dry opened 4 years ago

Gordon-Dry commented 4 years ago

I just double- and cross-checked.

Example:

In R&D I search for "agena" and get this: Screen-2019-12-02_17-41-50

The tech tree node "Advanced Rocketry" is red, so should not contain Agena parts: Screen-2019-12-02_17-42-18

But it does: Screen-2019-12-02_17-41-58

Excerpt from the MM cache:

UrlConfig
{
    parentUrl = Bluedog_DB/Parts/Agena/bluedog_Agena_EquipmentRack.cfg
    PART
    {
        name = bluedog_Agena_EquipmentRack
        module = Part
        author = CobaltWolf
        rescaleFactor = 1.0
        scale = 1.0
        node_stack_top = 0.0, 0.35081, 0.0, 0.0, 1.0, 0.0, 1
        node_stack_bottom = 0.0, 0.35081, 0.0, 0.0, -1.0, 0.0, 1
        TechRequired = advRocketry
        entryCost = 5000
        cost = 255
        category = Control
        subcategory = 0
        title = Agena D Equipment Rack
        manufacturer = Lockheed
        description = Convert your Agena upper stage into a fully featured satellite bus with this equipment rack. It contains attitude control thrusters, monopropellant storage, and extra batteries. The sides of the truss section can also be fitted with solar panels, secondary engines, or even subsatellites, depending on the mission profile. Attach to the engine mount, and then place the engine inside.
        attachRules = 1,0,1,1,0
        mass = 0.04
        heatConductivity = 0.06
        skinInternalConductionMult = 4.0
        emissiveConstant = 0.8
        dragModelType = default
        maximum_drag = 0.2
        minimum_drag = 0.2
        angularDrag = 2
        crashTolerance = 7
        maxTemp = 2000
        bulkheadProfiles = size0
        tags = agena belle engine liquid engine rcs monopropellant mafuni 0.9375 9375 array bank charge convert e/c elect energ pack power volt watt
        techtag = agenaD
        stagingIcon = RCS_MODULE

...

I even checked all Agena parts for their tags - they all got "agena" inside the tags.

Well, Bluedog_DB is special, it got the "realistic rename" extra patch and every part got a dedicated variable for

which replace the original values by that patch later.

This specific part originally is called "Belle" instead of "Agena", in the title and in the description. But the tags already contain "agena".

So I guess that QuickSearch looks into part

but not into tags ...

Please make it also search inside the tags.

linuxgurugamer commented 4 years ago

I'll look into it, maybe this evening on my stream. I dont' know if you watch, but if you do and let me know, it will be an incentive to actually do it :-)

Gordon-Dry commented 4 years ago

And even more weird, QuickSearch does NOT search in the actual part definition nodes of MM cache - it did during game load as it seems and remembered "it was called different once, so now I cannot find it". Does it create a search database during game load? Before FINAL?

linuxgurugamer commented 4 years ago

As far as I know, it doesn't create a search db during the initial load, but again, I'll look into it this evening if I can

linuxgurugamer commented 4 years ago

It is working properly. Please read the instructions listed on Spacedock, which I've also just added to the forum OP. (also see below):

Click the QS button to bring up an options window.

What is the search extension?

By default, the search extension is enabled, and with it you can:

a and b are the search example, all the shortcut can be edited on the config file. At this time, you can only cumulate AND, OR, NOT, words begin/end/full, but not with others shortcut.

Gordon-Dry commented 4 years ago

Still.

A tech tree node that got parts with "titan" in the part name, the description and the tag, is highlighted red in R&D, no matter if I enter "titan" or "%titan" (without quotes).

As this mod is misleading me and does not help, I can remove it and do the manual search as before.

Gordon-Dry commented 4 years ago

The reason can only be that QuickSearch looks into the part configs, not into the resulting MM cache.

Gordon-Dry commented 4 years ago

Screen-2019-12-06_17-42-46

Gordon-Dry commented 4 years ago

Original config: GameData\Bluedog_DB\Parts\Titan\bluedog_Titan2_S1_Lower_Tank.cfg

    title = Prometheus-II-1960 Liquid Fuel Tank
    manufacturer = Bluedog Design Bureau
    description = 1.875m lower fuel tank for the Prometheus II and III first stage.
    real_title = Titan II-1960 Liquid Fuel Tank
    real_manufacturer = Martin Marietta
    real_description = 1.875m lower fuel tank for the Titan II and III first stage. 
...
    tags = ?sm68 titan prometheus II 2 III 3 fuel tank liquid first stage GLV IIIC 3C 

after patching the "real names patch" from Bluedog_DB, result in MM cache:

        title = Titan II-1960 Liquid Fuel Tank
        manufacturer = Martin Marietta
        description = 1.875m lower fuel tank for the Titan II and III first stage.
...
        tags = ?sm68 titan prometheus II 2 III 3 fuel tank liquid first stage GLV IIIC 3C

As you can see, the tags already include "titan" in the original config.

linuxgurugamer commented 4 years ago

Feel free to look at the code and tell me where it looks in the part files. It doesn't. And I don't' understand, you are looking for "titan", it's finding it. I also don't understand why you are dragging a patch into this. The patch has nothing to do with this mod, it's not distributed with it.

Gordon-Dry commented 4 years ago

I just wonder why it shows the R&D icon in red when it finds something. The whole UI does not make sense to me.

Gordon-Dry commented 4 years ago

And the part list on the right is not filtered in any way. So I have to look into green and red ones and then search there for mself. The convenience benefit is very low compared to just search manually.

linuxgurugamer commented 4 years ago

In R&D, green = researched. red = found by quicksearch as matching in some way

linuxgurugamer commented 4 years ago

Still.

A tech tree node that got parts with "titan" in the part name, the description and the tag, is highlighted red in R&D, no matter if I enter "titan" or "%titan" (without quotes).

As this mod is misleading me and does not help, I can remove it and do the manual search as before.

ok, so this is a problem. I'm reopening this so I can track it

linuxgurugamer commented 4 years ago

What I may do is add a window which would show what conditions matched and which parts had those matching conditions

Gordon-Dry commented 2 years ago

I just wanted to open an issue, but then I checked this old one and here it is:

QuickSearch does not search in TAGS. Please fix that. That's what tags are for.