How does Wow link files together using the toc file and their own `require` syntax? menu

User Tag List

Results 1 to 3 of 3
  1. #1
    GlittPrizes's Avatar Active Member CoreCoins Purchaser Authenticator enabled
    Reputation
    58
    Join Date
    Nov 2019
    Posts
    104
    Thanks G/R
    53/33
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How does Wow link files together using the toc file and their own `require` syntax?

    Wow Lua files can share a namespace with
    Code:
    local addonName, addonTable = ...
    But when I load files manually and register functions, I can call the registered functions, but the shared addonTable is broken when the lua files are manually loaded instead of through the Addon folder. So I can't call functions from sibling scripts.

    What functions in the client like FramescriptRegisterFunction and FramescriptRegisterTable can I look at to understand what goes on when the client load addons on reload and initially?

    As of now I have to make everything standalone when doing lua stuff which is painful. I tried loading an xml file with the Script Includes, but that didn't work.

    How does Wow link files together using the toc file and their own `require` syntax?
  2. #2
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GlittPrizes View Post
    Wow Lua files can share a namespace with
    Code:
    local addonName, addonTable = ...
    But when I load files manually and register functions, I can call the registered functions, but the shared addonTable is broken when the lua files are manually loaded instead of through the Addon folder. So I can't call functions from sibling scripts.

    What functions in the client like FramescriptRegisterFunction and FramescriptRegisterTable can I look at to understand what goes on when the client load addons on reload and initially?

    As of now I have to make everything standalone when doing lua stuff which is painful. I tried loading an xml file with the Script Includes, but that didn't work.
    Programming in Lua : 8 loadstring() loadfile()

  3. Thanks GlittPrizes (1 members gave Thanks to ChrisIsMe for this useful post)
  4. #3
    GlittPrizes's Avatar Active Member CoreCoins Purchaser Authenticator enabled
    Reputation
    58
    Join Date
    Nov 2019
    Posts
    104
    Thanks G/R
    53/33
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ChrisIsMe View Post
    Programming in Lua : 8 loadstring() loadfile()
    The issue now is that addon becomes tainted for the part that is put in Interface/Addons/ and I'm not sure how write to 0 for an already loaded addon. I also didn't realized I could declare global/shared variables by just not using the local keyword which will work for my purposes, so I reverted to manual loading.

    edit: shit I uploaded the wrong gif can a mod plz remove the revealing one?
    Attached Thumbnails Attached Thumbnails How does Wow link files together using the toc file and their own `require` syntax?-lua-gif   How does Wow link files together using the toc file and their own `require` syntax?-lua-gif  
    Last edited by GlittPrizes; 11-08-2020 at 11:52 AM. Reason: THE HAMMER

Similar Threads

  1. How does EBP work? Whats it used for?
    By Flushie in forum Programming
    Replies: 3
    Last Post: 12-28-2010, 07:20 AM
  2. [Question] How does WoW detect memory editing?
    By miLl3niUm in forum WoW Memory Editing
    Replies: 1
    Last Post: 06-13-2009, 07:34 AM
  3. Basic Introduction to the structure of WoW's files and hexediting
    By schlumpf in forum WoW ME Tools & Guides
    Replies: 11
    Last Post: 04-12-2008, 12:47 PM
  4. How does wow's anti cheat engine work?
    By Netzgeist in forum World of Warcraft General
    Replies: 4
    Last Post: 01-08-2008, 09:15 AM
All times are GMT -5. The time now is 05:14 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search