Jump to content


Photo

Listing addons loaded in game chat?


    9 replies to this topic

    #1 Wildman

    Wildman

      Advanced Member

    • Members
    • PipPipPip
    • 72 posts

      Posted 24 January 2015 - 03:00 AM

      Hello,

      I know you can type "//list plugins" for a list of loaded plugins that show in game chat. But //list addons don't list addons, instead lists plugins again.

      I know you can type "//lua list addons" but it then puts the list in the console, and i have so many loaded I can't scroll up to see them all ? So I ask, is there a way to see loaded addons in game chat so that I can scroll up through them or a way to scroll up in console? Or could this be added to show in game chat. Thanks.



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 24 January 2015 - 07:37 AM

      This is a problem to me as well, I'll try to adjust it.



      #3 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 15 February 2015 - 10:46 AM

      For the record, the command is just "//list" and will only list plugins. Any arguments you pass to it after that are ignored. "//list plugins" is exactly the same as "//list" and so is "//list addons" or "//list chocolate".

       

      I adjusted it now so that "//lua list" will by default output to the chat log, while you can pass it a third argument "console" to output to the Windower console.



      #4 sdahlka

      sdahlka

        Advanced Member

      • Members
      • PipPipPip
      • 324 posts

        Posted 15 February 2015 - 11:41 AM

        this is along the same lines but not exactly the same

        is there a way to get a table or list of active addons/plugins loaded inside of lua??

        i.e.

        windower.addons.list()

        windower.plugins.list()



        #5 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 15 February 2015 - 04:25 PM

        It could be added for addons, but not easily for plugins. We've debated this in the past and can't find a good reason to expose an addon list like that to other addons, so we didn't do it yet. If you can give a good reason for why that should exist let us know, we may change our minds. One argument against that is that it would encourage addon coupling, which makes them generally not work well on their own. This is already a problem with certain addons that try to adjust to other addons being loaded, which brings a bunch of new problems to the table.



        #6 sdahlka

        sdahlka

          Advanced Member

        • Members
        • PipPipPip
        • 324 posts

          Posted 15 February 2015 - 09:46 PM

          for something like this

           

          It could be added for addons, but not easily for plugins. We've debated this in the past and can't find a good reason to expose an addon list like that to other addons, so we didn't do it yet. If you can give a good reason for why that should exist let us know, we may change our minds. One argument against that is that it would encourage addon coupling, which makes them generally not work well on their own. This is already a problem with certain addons that try to adjust to other addons being loaded, which brings a bunch of new problems to the table.

          it would be useful for gearswap and other addons like this

          in gearswap when loading specific addons/plugin during load of each job file(biggest reason)

          because if you use command lua reloadall or lua reload gearswap it will error if you have gearswap setup to load job specific addons/plugins

          if windower.addons.list():contains('<addon>') then
              windower.send_command("lua load <addon>")
          end
          if windower.plugins.list():contains('<plugin>') then
              windower.send_command("load <plugin>")
          end
           

          in addons

          to check and see if a plugin or addon is loaded that interferes with the addon being loaded(smallest reason)

          if windower.addons.list():contains('<addon>') then
              windower.send_command("lua unload <addon>")
          end
          if windower.plugins.list():contains('<plugin>') then
              windower.send_command("unload <plugin>")
          end
          

          or(most unlikely reason)

           

          if windower.addons.list():contains('<addon>') then
              print("<addon> already loaded")
          end
          if windower.plugins.list():contains('<plugin>') then
              print("<plugin> already loaded")
          end
           


          #7 Arcon

          Arcon

            Advanced Member

          • Windower Staff
          • 1189 posts
          • LocationMunich, Germany

          Posted 15 February 2015 - 10:03 PM

          That is more a reason against it than for it. You should not couple addon loading to GearSwap at all, and enabling one would encourage the other. It promotes sloppy design, because it ties the features of one addon to another, and without one the other won't work anymore. If GS breaks after an update, for example, all your other addons that you load through it won't work anymore. I know people are abusing GearSwap for that, but they shouldn't, and I see no reason to support them doing so.

           

          That said, you can still load/unload even if it's already loaded/unloaded, not like it will crash the game. It will just display an appropriate message. So even though this is a bad idea, adding such a list wouldn't make any difference to your examples, they would pretty much work as they currently do.



          #8 sdahlka

          sdahlka

            Advanced Member

          • Members
          • PipPipPip
          • 324 posts

            Posted 15 February 2015 - 10:23 PM

            That is more a reason against it than for it. You should not couple addon loading to GearSwap at all, and enabling one would encourage the other. It promotes sloppy design, because it ties the features of one addon to another, and without one the other won't work anymore. If GS breaks after an update, for example, all your other addons that you load through it won't work anymore. I know people are abusing GearSwap for that, but they shouldn't, and I see no reason to support them doing so.

             

            That said, you can still load/unload even if it's already loaded/unloaded, not like it will crash the game. It will just display an appropriate message. So even though this is a bad idea, adding such a list wouldn't make any difference to your examples, they would pretty much work as they currently do.

            actually the gearswap one i use when i change jobs so i dont have addons loaded for jobs that dont need them

            i.e.

            blu main/sub azuresets -- only needed for blu useless for all other jobs so it can be unloaded when not blu

            cor main/sub rolltracker-- only needed for cor useless for all other jobs so it can be unloaded when not cor

            there are more MobCompass,PetTP,autocontrol,etc. but all of these are only usefull for one or specific main/sub jobs

             

            but my main reason it to cut down on extraneous info in the command window i.e. errors that dont need to be shown just because the addon is already loaded but if you type it in to the command window it should tell you if its loaded with an error

             

            and i do know that it does not cause ffxi to crash but my second(smallest) reason if an addon has issues with an addon/plugin thats already loaded it can eather not load the new addon/plugin or unload the old addon/plugin(rare but does happen)

             

            if windower.addons.list():contains('<addon>') then
                print("<newaddon> can not be used because <addon> causes errors with <newaddon>")
                windower.send_command("lua unload <newaddon>")
                return
            end
             

            *also would work for plugins as new addons replace the old plugins



            #9 Arcon

            Arcon

              Advanced Member

            • Windower Staff
            • 1189 posts
            • LocationMunich, Germany

            Posted 16 February 2015 - 06:15 AM

            None of these addons need to be unloaded on other jobs, they won't slow your game down. They are designed with that in mind and only take effect when you're on the right job.

             

            The latter case you describe is precisely why it's a bad idea to couple addons. Addons not working right because of other addons being loaded is something that shouldn't happen. If it does, the addon was designed incorrectly. They should be modular by design and not depend on any of the rest of the game to work. Not having an option to check forces addon developers to design their addons so that it does work with others. Features that do nothing but cater to bad design decisions are not features I like to implement.



            #10 sdahlka

            sdahlka

              Advanced Member

            • Members
            • PipPipPip
            • 324 posts

              Posted 16 February 2015 - 03:41 PM

              None of these addons need to be unloaded on other jobs, they won't slow your game down. They are designed with that in mind and only take effect when you're on the right job.

               

              The latter case you describe is precisely why it's a bad idea to couple addons. Addons not working right because of other addons being loaded is something that shouldn't happen. If it does, the addon was designed incorrectly. They should be modular by design and not depend on any of the rest of the game to work. Not having an option to check forces addon developers to design their addons so that it does work with others. Features that do nothing but cater to bad design decisions are not features I like to implement.

              i understand






              1 user(s) are reading this topic

              0 members, 1 guests, 0 anonymous users