Item Search
     
BG-Wiki Search
Page 119 of 307 FirstFirst ... 69 109 117 118 119 120 121 129 169 ... LastLast
Results 2361 to 2380 of 6124
  1. #2361
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    Code:
        include('Mote-Include.lua')
        init_include()
    That shouldn't work with the code you posted above. When including you would need to assign it to a table, and then execute init_include from there:
    Code:
        t = include('Mote-Include.lua')
        t.init_include()
    Also, technically, if you want things to be initialized, you don't have to put them in any function. You can describe them in the global scope. Although it's usually good design to put it into a function and execute it when relevant. You could just put it outside of the get_sets function (and you should, really, unless the include file specifically deals with retrieving sets).

  2. #2362
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by Arcon
    That shouldn't work with the code you posted above. When including you would need to assign it to a table, and then execute init_include from there:
    Code:
        t = include('Mote-Include.lua')
        t.init_include()
    The include() function does a dofile() on the provided include file, taking the return value ("return _MoteInclude" at the end of my example structure), and adds all the contents of the table that was returned to the local user environment using rawset() and setfenv().

    So mine will return the _MoteInclude table, and take the contents of that table (all the defined functions) and add them directly to the scope of user_env, which means they are callable as if they were locally-defined functions (eg: init_include() doesn't require a parent table to be referenced). This is also what allows me to intercept the precast()/etc functions from within the include file.

    You're right, though, that I could call the initialization function from within the include by putting it at the global level, and not need a second function call after the include() call. Will see about tweaking that.

    ... Hmm. That makes things more difficult. With the way I have it set up, all the functions are defined and scoped before init_include() is ever called, so I can make use of all the local functions without any issue (including all user_functions, which I don't have access to at all before the get_sets() call). If I try to auto-initialize by putting init_include() at the global level of the include, that gets run before all the functions are defined. I also can't seem to get forward declarations to work nicely, which makes it non-runnable.

    Also, technically, if you want things to be initialized, you don't have to put them in any function. You can describe them in the global scope. Although it's usually good design to put it into a function and execute it when relevant. You could just put it outside of the get_sets function (and you should, really, unless the include file specifically deals with retrieving sets).
    Well, get_sets() is effectively the initialization function for the job script. It gets called once on load, and never again. There's nothing in the calling code that even requires that it do anything, or return anything; the sets table itself is defined by GearSwap when it makes the user_env variable. Plus it already has access to the broader user environment, which means being able to use things like add_to_chat() for debugging.

  3. #2363
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    I see, I didn't know include was implemented this way. That makes defining everything in a table and returning it kinda pointless, doesn't it?

    And the full user environment should be available all the time. The only things that aren't are variables that haven't been defined at that point yet. Forward declarations do work, although you probably need to make them global from within the include files. And with include being implemented as it is now, I have no idea how that would behave. In regular Lua it's definitely possible and pretty straightforward. The variable name simply must have been declared before, doesn't even need to be defined (just a x = nil or local x will do). We plan to make require work natively from within a user environment, and once we do that it should be possible to use the regular require function provided by Lua (or w/e it will be called in there).

  4. #2364
    Nidhogg
    Join Date
    Jul 2008
    Posts
    3,746
    BG Level
    7
    FFXIV Character
    Seraphus Highwynn
    FFXIV Server
    Gilgamesh
    FFXI Server
    Diabolos

    I deleted the cancel.ddl and redownloaded from the windower 4.1 launcher, still doesn't work. When I have sneak on and attempt to cast sneak on myself, it would in the past, cancel sneak before it finishes casting, same with Spectral Jig. Doesn't work when I unload/reload either.

  5. #2365
    Hydra
    Join Date
    Oct 2009
    Posts
    109
    BG Level
    3
    FFXI Server
    Bismarck

    Quote Originally Posted by Ophannus View Post
    I deleted the cancel.ddl and redownloaded from the windower 4.1 launcher, still doesn't work. When I have sneak on and attempt to cast sneak on myself, it would in the past, cancel sneak before it finishes casting, same with Spectral Jig. Doesn't work when I unload/reload either.
    I use the cancel plug in and I'm having the same problem. I haven't touched the settings in forever, and just recently it's started to not cancel the sneak in spectral jig.

  6. #2366
    The Syrup To Waffles's Waffle
    Join Date
    Jun 2007
    Posts
    5,045
    BG Level
    8
    FFXIV Character
    Cair Bear
    FFXIV Server
    Excalibur
    FFXI Server
    Fenrir

    There doesn't appear to be anything wrong with cancel's functionality. My best guess is that you have the addon and the plugin turned on for whatever reason.

  7. #2367
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    OK since i got help and it fixed my code i will simply post my code that works

    <if Spell="Sneak">
    <if BuffActive="Sneak" spelltargettype="Self">
    <action type="Equip" when="precast" set="FCEnhance" />
    <midcastdelay delay="1" />
    <cmd when="midcast">cancel 71</cmd>
    </if>
    <else>
    <action type="Equip" when="precast" set="FCEnhance" />
    </else>
    </if>

    Try that if it doesnt work i dunno what is wrong. i am currently using the addon version. Make sure you arent using both at once like cairthenn said.

  8. #2368
    Nidhogg
    Join Date
    Jul 2008
    Posts
    3,746
    BG Level
    7
    FFXIV Character
    Seraphus Highwynn
    FFXIV Server
    Gilgamesh
    FFXI Server
    Diabolos

    There's a cancel plugin and an add on? I wonder why there would need to be both? I've been using the Plugin(I guess it's been defunct) and just now got the addon and it works.

  9. #2369
    The Syrup To Waffles's Waffle
    Join Date
    Jun 2007
    Posts
    5,045
    BG Level
    8
    FFXIV Character
    Cair Bear
    FFXIV Server
    Excalibur
    FFXI Server
    Fenrir

    The plugin works fine...<.<

    There are both because the goal is to move away from plugins.

  10. #2370
    Relic Weapons
    Join Date
    Dec 2009
    Posts
    330
    BG Level
    4
    FFXI Server
    Carbuncle

    Things are still really crashy for me when I switch characters. Is there a way to temporarily disable all plugins at once? Or a way to prevent them from loading at all until I'm done with my daily login/mog garden stuff?

  11. #2371
    A gigantic waste of space
    Join Date
    Apr 2009
    Posts
    719
    BG Level
    5
    FFXIV Character
    Maurauc Baelfyr
    FFXIV Server
    Hyperion
    FFXI Server
    Valefor

    Quote Originally Posted by RalphTheDwarf View Post
    Things are still really crashy for me when I switch characters. Is there a way to temporarily disable all plugins at once? Or a way to prevent them from loading at all until I'm done with my daily login/mog garden stuff?
    unloadall in the console unloads everything, then you can do exec autoload/autoload.txt to reload them all.

  12. #2372
    Melee Summoner
    Join Date
    Feb 2009
    Posts
    30
    BG Level
    1

    Quote Originally Posted by Motenten View Post
    Byrth provided a general explanation a few pages back: http://www.bluegartr.com/threads/115...=1#post5985652

    To create an include file, make a new .lua file with the following structure:

    Code:
    local _MoteInclude = {}
    
    function _MoteInclude.init_include()
        -- do some initialization stuff
    end
    
    function _MoteInclude.my_other_function()
        -- do other stuff
    end
    
    return _MoteInclude
    The actual name of the table in the include (_MoteInclude, here) is up to you. Just make sure it's prefixed on any of the function names you use.

    Note that there is currently no standard initialization function. You have to call that on your own within your job script:

    Code:
        include('Mote-Include.lua')
        init_include()
    I do this from within the get_sets() function, which is the current name of the initialization function for the job files (subject to change, since it's not very descriptive).

    Most of -what- you can do is described in the Variables spreadsheet that's in the GearSwap directory when you activate the addon. However that doesn't really describe -how- to do things; it's largely assumed that you'll be skilled in scripting or programming of some kind, and that you can apply those logical concepts to the code itself. You'll also need to refer to external sources for Lua documentation (though the online Lua docs are pretty good).

    At some point a broader tutorial will be written. Right now is still the early bits of getting things working, which means even the people skilled in programming are having to poke around to see what it's capable of.
    I d/led the gearswap addon yesterday and then looked in a couple directories and found some instructions and examples, I actually got a sch one working from the examples. Thank you for taking the time to explain some of it, it was a big help.

  13. #2373
    Relic Weapons
    Join Date
    Dec 2009
    Posts
    330
    BG Level
    4
    FFXI Server
    Carbuncle

    Quote Originally Posted by Maurauc View Post
    unloadall in the console unloads everything, then you can do exec autoload/autoload.txt to reload them all.
    Thanks. Will give that a try tomorrow.

  14. #2374
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    Quote Originally Posted by RalphTheDwarf View Post
    Things are still really crashy for me when I switch characters. Is there a way to temporarily disable all plugins at once? Or a way to prevent them from loading at all until I'm done with my daily login/mog garden stuff?
    The plugin_manager addon is there to just do that.

  15. #2375
    The Syrup To Waffles's Waffle
    Join Date
    Jun 2007
    Posts
    5,045
    BG Level
    8
    FFXIV Character
    Cair Bear
    FFXIV Server
    Excalibur
    FFXI Server
    Fenrir

    Just a general note, since I've seen a bit of this --

    If you are still using the Development version of the launcher (and didn't switch to the regular when 4.1 went live), that version is going to be pulling changes that are much less stable. So, unless you're interested in testing (by all means!), you may want to switch back to the regular launcher.

  16. #2376
    Hydra
    Join Date
    Dec 2011
    Posts
    107
    BG Level
    3

    Quote Originally Posted by Trumpy View Post
    I havent tried silence addon for a couple days but before when it came out it indeed blocked all the equip messages, but instead showed 5-10 blank lines for like anything that happened. So i went back to the plugin which works fine for me.
    I have this exact problem whenever I try to use the addon version. The plugin version is working fine and properly blocking the messages without the blank lines.

  17. #2377
    Melee Summoner
    Join Date
    Feb 2009
    Posts
    30
    BG Level
    1

    Today I noticed that my in game macros with different piece of gear where being overridden by gearswap, my sublimation macro isn't working so I tried to input something like this for sublimation in the lua file:

    if buffactive.rapture then
    equip({head="Savant's Bonnet +2"})
    end
    if buffactive.sublimation then
    equip({head="Academic's Mortarboard"})
    end

    but it is still not working correctly, it wont recognize my Mortarboard, is this written correctly?

  18. #2378
    Relic Weapons
    Join Date
    Dec 2009
    Posts
    330
    BG Level
    4
    FFXI Server
    Carbuncle

    Unfortunately unloadall didn't solve my crashing problems, still crashing after a random number of logouts so guessing it's an addon not affected by that command that is causing this. And I have no idea if I'm using development version, most likely have whatever was available on the main page when I first heard about update. Will try to completely disable everything and try again tomorrow and see if that changes anything.

  19. #2379
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    You can type //list and //lua list to see what plugn/addons are on. Afew of us that crash when logging around mules seem to crash on the 4th mule usually. Sometimes i jsut unload blinkmenot spellcast autoexec and i dont crash. but i dont really use blinkmenot now that dressup is there.

    Today I was afk while at work and dressup shot this error up a few times (like 20 times and im not sure how frequently)...
    Dressup: lua error (runtime) - .../addons/dressup/helper_functions.lua:91: attempt to perform arithmetic on local 'num' (a function value)

    This happened on both characters standing outside moghouse in north sandy.

  20. #2380
    Season of the Siccness
    Join Date
    Feb 2012
    Posts
    719
    BG Level
    5
    FFXIV Character
    Sicc Ward
    FFXIV Server
    Faerie
    FFXI Server
    Sylph

    I haven't played in about 8 months but in that time I didn't touch any files or even really use this PC but when I logged in with Windower 4 (windows 7) the resolution is super wonky. Kind of hard to describe, everything seems to be pushed to the lower right corner and zoomed in onto my character. I can't see the chatlog or menus.

    I uninstalled/re-installed Windower, when that didn't work I uninstalled again, this time I deleted everything and started fresh. No luck.

    When I log in vanilla, everything is fine.

    The resolution in Windower defaulted to my current resolution that my comp defaulted to when I HDMI'd it to the TV so everything is perfectly proportioned, except in XI. I've tried the Super Sampling on/off which made no difference and I'm hesitant to mess with the resolution being that I just installed everything on another PC HDMI'd to a different TV and it all works great.

    I'm at a loss at this point because I've got it running fine on two laptops (one of them HDMI'd to a TV) and another PC HMDI'd to a TV but for some reason the comp/TV that I used for a huge duration over the years won't work.

    I thought by hooking up different setups I could find whats different but to no avail, everything is basically just working "plug n play" style.

    I can't help but think its something simple but I'm out of ideas. Hopefully I gave enough info and somebody can help out.

    Thanks.

Page 119 of 307 FirstFirst ... 69 109 117 118 119 120 121 129 169 ... LastLast

Similar Threads

  1. Service and Support
    By Ribeye in forum FFXI: Everything
    Replies: 8
    Last Post: 2009-10-17, 18:23
  2. Windows vista and FFXI problem
    By Takeno in forum FFXI: Everything
    Replies: 1
    Last Post: 2007-07-26, 13:36
  3. Windows Vista and Windower
    By divisortheory in forum FFXI: Everything
    Replies: 35
    Last Post: 2006-06-23, 04:19