2 items

File information

Last updated

Original upload

Created by

Peasly Wellbott

Uploaded by

PeaslyWellbott

Virus scan

Safe to use

42 comments

  1. PeaslyWellbott
    PeaslyWellbott
    • premium
    • 100 kudos
    Locked
    Sticky
    Cannot completely remove the glowing effect on some specific items, notably Dung and Bushes, since those are being triggered somewhere else that I can't find.
  2. Burkenwald
    Burkenwald
    • member
    • 4 kudos
    Hey, i poked around your script and figured out how to fix a couple of problems with it. Here are my suggestions on how to improve this mod. Unfortunately, all of the text i want to send doesn't fit in one comment, so i'll continue in replies.

    1. I've found a way to properly remove scoutfly glow from the problematic objects like dung piles and bushes (or "brushes"). The "emitMesh" method that's responsible for the glow actually takes a boolean as an argument, and setting that argument to "false" removes the scoutfly glow effect properly. Here is the part of your v1.0.2 script that i changed to fix the problem:

    sdk.hook(sdk.find_type_definition("app.cInteractGuideInsectController"):get_method("emitMesh(System.Boolean)"),
    function(args)
    if config.hideInteractiveGlow then
    --return sdk.PreHookResult.SKIP_ORIGINAL ------remove this line
    args[3] = false ------new line
    end
    end,
    function(retval)
    return retval;
    end
    )

    However, specifically on dungpiles, even this method doesn't remove the effect completely - the green glow will only go away once you approach the dung pile (i think dungpiles are just broken like that, because even in vanilla game they will glow before you get anywhere close to them). I'm not sure how to properly solve this issue, but after some experimentation i came up with this hook that seems to do the job:

    ---------trying to remove the early glow on dung piles
    sdk.hook(sdk.find_type_definition("app.InteractController"):get_method("start()"),
    function(args)
    local return_val = sdk.PreHookResult.CALL_ORIGINAL
    if config.hideInteractiveGlow then
    local this_obj = sdk.to_managed_object(args[2])
    local game_obj = this_obj:call("get_Owner")
    --Checking if this object is a dung pile
    if game_obj:call("get_Name()") == "Gm000_132_00" then
    local insect_contr_obj = this_obj:call("get_GuideInsectController")
    --IDK what the numbers 1069547520 and 5361998234 mean, but it seems
    --that even if you fetch wrong numbers here, it doesn't break anything
    insect_contr_obj:call(
    "initEffectController(via.GameObject, System.Single, System.Single)",
    sdk.to_ptr(game_obj), sdk.to_ptr(1069547520), sdk.to_ptr(5361998234)
    )
    end
    end
    return return_val
    end,
    function(retval)
    return retval;
    end
    )

    So basically, as soon as a dungpile is loaded, we force the early initialization of the scoutfly effect controller for that dungpile by calling the "initEffectController" method, which also calls the "emitMesh" method i modified eralier. However, for some reason this also breaks the scoutfly trail effect for the dung piles (the effect just never appears). So, to counteract THIS issue, i devised another new hook:

    ---------preserving scoutfly route effect on dungpiles
    sdk.hook(sdk.find_type_definition("app.cInteractGuideInsectController"):get_method("initEffectController(via.GameObject, System.Single, System.Single)"),
    function(args)
    if config.hideInteractiveGlow then
    local this_obj = sdk.to_managed_object(args[2])
    --Checking if this object is a dung pile
    local game_obj = this_obj._Owner
    if game_obj ~= nil and game_obj:call("get_Name()") == "Gm000_132_00" then
    --Somehow, setting this to false repairs the scoutfly trail effect
    this_obj._IsInitizalizeEnd = false
    end
    end
    end,
    function(retval)
    return retval;
    end
    )

    Kind of a hacky solution, but at least it allows to eliminate the scoutfly glow on dungpiles without affecting other scoutfly effects, and i don't know of a better way of doing that.
    Edit: actually, the glow seems to still appear whenever the dungpile is created by a monster... Ugh, i think i might just give up on that one.

    ↓ All of the text doesn't fit in one comment, so i'll continue in replies ↓
    1. Burkenwald
      Burkenwald
      • member
      • 4 kudos
      2. I've found a way to properly remove the red scoutfly glow on wounds without removing the weak spot telegraphs that use the same effect (for example, there is a weakspot inside of Balahara's mouth that uses the same effect as normal wounds, which is called "GUIDE_INSECT_FOCUS_HIGHLIGHT_WEAK"). I dislike the scoutfly effects on wounds, but i think being able to see the weakspots is too useful to just get rid of them, so i came up with a way to remove these effects separately. If you implement these, you could add new options to disable different weakpoint effects:

      • To remove normal and tempered wound scoutfly effects without touching weak spots, you can just intercept the method "app.cEnemyLoopEffectHighlight.playEffect_RawScar()", like this:
      -------new hook for regular wounds
      sdk.hook(sdk.find_type_definition("app.cEnemyLoopEffectHighlight"):get_method("playEffect_RawScar"),
      function(args)
      if config.hideMonsterWoundGlow then
      return sdk.PreHookResult.SKIP_ORIGINAL
      end
      end,
      function(retval)
      return retval;
      end
      )

      • Then, if you also want to remove scoutfly effects for wounds that appear during mounting, you will need to hook the method "app.cEnemyLoopEffectRideHighlight.playEffect_RawScarFinish()" the same way.

      • And to remove the weakspot scoutfly effects, you can hook the method "app.cEnemyLoopEffectHighlight.playEffect_WeakPoint()" also the same way.

      3. Also, i've seen some people asking to remove the red scoutfly trail that appears when a monster is a about to hit you with a deadly attack. And while i didn't find the method that triggers it, i've found the ID for that effect: internally the effect is called "PL_SYSTEM_ATTACK_DETECT" (and the ID value in current version of the game is 34865423).
    2. Burkenwald
      Burkenwald
      • member
      • 4 kudos
      4.1. And another thing (although i guess it's not a big deal): i think there is a way to address effect IDs in the code without using raw numbers. I noticed that when updating from v1.0.1 to v1.0.2 you had to change some the IDs for wound effects in your script. To future proof your code, it might be better to refer to the effects by their names, because we have access to the ingame dictionary that accociates all of the effect IDs with their names. Here is how i implemented this:
      local effect_ids_cmn_managed_obj = sdk.create_instance("app.EffectID_Common.ID")
      --------setting up a dictionary for the IDs we'll want to use later in the code
      --------(this is needed because for some reason grabbing the IDs straight from effect_ids_cmn_managed_obj doesn't always work)
      local effect_ids = {
         --scoutfly cage on a hunter's belt
         hunter_cage = effect_ids_cmn_managed_obj.PL_SYSTEM_GUIDE_INSECT_CAGE, 
         --red scoutfly line that indicates a deadly attack
         scoutfly_red_line_telegraph = effect_ids_cmn_managed_obj.PL_SYSTEM_ATTACK_DETECT, 
      }

      4.2. And after doing that, you could also change your implementation of the hook for the method "app.cEffectController.playEffectLoopCore(...)" which takes those IDs in. In version 1.0.2 of your mod you do from 2 to 4 checks every time the method is called, and you could reduce it to 1 (at least for the sake of better code readability). To do that, you would just need to bind some of the values of your config to values in another dictionary that would pair each effect ID with a flag that disables/enables this effect:
      local effect_removal_flags = {
         [effect_ids.hunter_cage] = config.hideHunterCageGlow,
         [effect_ids.scoutfly_red_line_telegraph] = config.hideMonsterWoundGlow,
      }

      --------changing the implementation a bit (now we'll be just removing all of the effects that are marked with "true" in the effect_removal_flags dictionary)
      sdk.hook(sdk.find_type_definition("app.cEffectController"):get_method("playEffectLoopCore(System.UInt32, app.EffectID_Common.ID, System.UInt64, via.GameObject, app.cEffectOverwriteParams, via.GameObject)"),
      function(args)
         -----------removing the old implementation
         -- if sdk.to_int64(args[4]) == 34865424 and config.hideHunterCageGlow then
         --    args[4] = 0
         -- elseif woundGlowIds[sdk.to_int64(args[4])] and config.hideMonsterWoundGlow then
         --    args[4] = 0
         -- end
         ---------new and clean if-check
         if effect_removal_flags[sdk.to_int64(args[4])] then
            args[4] = 0
         end
      end,
      function(retval)
         return retval;
      end
      )

      re.on_draw_ui(function()
         
         ...
         
         if drawOptionsWindow then
                 if imgui.begin_window("Suppressed Scoutflies Options##Suppressed_Scoutflies", true, 64) then
               
               ...
               
               imgui.text("Other Scoutfly effects:")
               changed, value = imgui.checkbox("Suppress Hunter's Scoutfly Cage Glow##Suppressed_Scoutflies", config.hideHunterCageGlow)
               if changed then
                  doWrite = true
                  config.hideHunterCageGlow = value
                  --------integrating config edits with the new effect dictionary
                  effect_removal_flags[effect_ids.hunter_cage] = value
               end
               
               ...
               
            end
         end
      end)

      5. And another very minor thing: as of v1.0.2 your script wasn't able to rewrite the "version" field of a pre-existing config file. This is a pretty easy fix, you can just add a couple of lines to the section of the code where you handle config loading:
      if json ~= nil then
         file = json.load_file(configPath)
         if file ~= nil then
            if file.version ~= config.version then -------added handling of version mismatch
               file.version = config.version
            end
            config = file
         else
             json.dump_file(configPath, config)
         end
      end

      P.S. Haha, this text ended up being pretty long, sorry if it's too much. You're doing a god's job with this mod, and i just really want to help to make the mod even better.
      Here's a link to a full working script file with all of my changes applied (in case you want to see how it all fits together): https://drive.google.com/file/d/1IrTZUP3Nr8FQhxSAxlilg7hAFWCdwkso/view?usp=sharing
      I marked all the changes from the original v1.0.2 script with comments that have many dash symbols before them, like this: "-----comment". Also, i haven't modified config fields, i'll leave it up to you if you feel like updating your mod.
  3. timarrow
    timarrow
    • supporter
    • 0 kudos
    Hey man, first of all great mod, was one of the first things I searched for.

    Since you already know about the Suppress Environmental Object Glow not working on dung and bushes, i have another request that might interest others as well. I think the one thing I actually do not want the scoutflies to be suppressed on is monster tracks. They were annoying in world but they are very scarce here and give you a nice bonus. First I thought it might be cool to actaully have to look out for them, but most of the time I only stumpled upon them because my B Promt said i could collect tracks. They are actually too subtle without the scoutflies. Might be cool to leave them on in the configs.
  4. JayCarver
    JayCarver
    • member
    • 1 kudos
    Hey PeaslyWellbott I updated the interface to make it all nicelike.
    Hope you approve ! 



    [Link to Github Gist]
  5. joehue
    joehue
    • member
    • 0 kudos
    this is rad
    would it be possible to get rid of the danger alert when ur fighting the monster and the scout flies just become a big red line
    its like the same thing as when u use lurepods, so i dont know if it even is scoutflies

    another weird annoying thing capcom added for some weird reason
  6. Connins
    Connins
    • member
    • 0 kudos
    Mainly bought the pc version for this mod. MHworld spent 500 hours in ps4 version of that game and always wanted to be able to disable scoutflies. 
    1. JayCarver
      JayCarver
      • member
      • 1 kudos
      I completely understand.
  7. KimRonin
    KimRonin
    • member
    • 0 kudos
    After TU1 stoped working option for just Wound glow. Both here and in "Persistent Buff Glow Removal"
  8. Broadings
    Broadings
    • member
    • 0 kudos
    Thanks for the mod!
    Is there an option to turn on or increase the intensity of Monster Tracks (eg: Doshaguma's fur on the floor)?
  9. Lokidragon7
    Lokidragon7
    • member
    • 2 kudos
    Is it possible to remove the scoutfly red warning glow when you're about to get hit by a strong move? im not sure if its part of the same category but worth asking.
  10. Vindveil
    Vindveil
    • member
    • 1 kudos
    Scoutfly Glow on Dung is still visible for some reason.

    When you enter Brushes, the glow is active for a second before going again.
    1. Zielgan
      Zielgan
      • supporter
      • 2 kudos
      Same situation on my end.
    2. Zeoplez
      Zeoplez
      • member
      • 0 kudos
      Same for me. Have not noticed anything else yet.
    3. TobioftheAkatsuki
      TobioftheAkatsuki
      • member
      • 0 kudos
      Honestly, as long as the bushes only glow if I walk into it, that's still a significant improvement over every bush in the same zip code as me being irradiated.
  11. SotiCoto
    SotiCoto
    • premium
    • 14 kudos
    Is "True" Hidden or is "False" Hidden?