Close
Showing results 1 to 10 of 85

Hybrid View

  1. #1

  2. #2

    Default

    Quote Originally Posted by jak3676 View Post
    Have two instances of WoW with different graphics or config settings : woweconomy (reddit.com)
    [WoW] Console Variables for Video Settings (Shadowlands) (dual-boxing.com)

    I need to figure out some options for changing gfx settings on my followers - both of these approaches seem useful.
    This is some of what I'm fiddling with at the moment. I'm trying to create dynamic settings in a custom addon based on the different window resolutions created by ShiftWindow. The SetCVar commands seems to be what you are looking for. I've used it to set UI Scale, but I also added different Antia-Aliasing settings as an example.



    Folder: MyStuff

    File MyStuff.toc
    Code:
    ## Interface: 11305
    ## Title: MyStuff
    ## Version: v1.13 Classic
    ## Notes: Stuff
    myUI.lua
    myFunc.lua
    File MySettings.lua
    Code:
    local function SetPosition(frame, ...)
        if type(frame) == 'string' then
            UIPARENT_MANAGED_FRAME_POSITIONS[frame] = nil
            frame = _G[frame]
            message("text")
        end
        if type(frame) == 'table' and type(frame.IsObjectType) == 'function' and frame:IsObjectType('Frame') then
            local name = frame:GetName()
            if name then
                UIPARENT_MANAGED_FRAME_POSITIONS[name] = nil
            end
            frame:SetMovable(true)
            frame:SetUserPlaced(true)
            frame:SetDontSavePosition(true)
            frame:SetAttribute('ignoreFramePositionManager', true)
            frame.ignoreFramePositionManager = true
            if ... then
                frame:ClearAllPoints()
                frame:SetPoint(...)
            end
            frame:SetMovable(false)
        end
    end
    
    
    local function HorizontalBars()
        for i,v in ipairs{"Left","Right"} do for i = 2, 12
            do local n = "MultiBar"..v.."Button" local btn = _G[n..i] btn:ClearAllPoints()btn:SetPoint("LEFT", n..i - 1, "RIGHT", 6, 0)
            end
        end
    end
    
    
    SetCVar('useuiscale', 1)
    SetCVar('uiscale', 1)
    UIParent:SetScale(1)
    width = GetScreenWidth()
    height = GetScreenHeight()
    print("UI ", width, " ", height)
    
    -- 3440x1440
    if math.floor(width) == 1834 then
        print("3440x1440")
        -- FULLSCREEN SETTINGS
    end
    
    -- MULTIBOX MASTER
    if math.floor(width) == 1190 then
        print("MULTIBOX MASTER")
        
        -- ACTION BARS
        HorizontalBars()
        SetPosition(MultiBarLeftButton1, "BOTTOMLEFT", MultiBarBottomLeftButton1, "TOPLEFT", 0, 7)
        SetPosition(MultiBarRightButton1, "BOTTOMLEFT", MultiBarBottomRightButton1, "TOPLEFT", 0, 7)
        --SetPosition(StanceBarFrame, "CENTER", PlayerFrame, "CENTER", 0, -50)
        SetPosition(StanceBarFrame, "BOTTOMLEFT", MultiBarLeftButton1, "TOPLEFT", -235, 90)
        --SetPosition(PetActionButton1, "BOTTOMLEFT", MultiBarLeftButton1, "TOPLEFT", 0, 7)
        SetPosition(PetActionButton1, "BOTTOMLEFT", MultiBarLeftButton1, "TOPLEFT", -400, 100)
        
        -- CASTING BAR
        SetPosition(CastingBarFrame, "CENTER", WorldFrame, "CENTER", 0, -300)
        --CastingBarFrame.Border:Hide()
        --CastingBarFrame.Text:Hide()
        --CastingBarFrame.Flash:Hide()
        --CastingBarFrame:SetScale(0.7)
    
    
        -- PLAYER FRAME    
        SetPosition(PlayerFrame, "CENTER", WorldFrame, "CENTER", -200, -250)
        --SetPosition(rBFS_BuffDragFrame, "RIGHT", PlayerFrame, "LEFT", 0, 0)
        SetPosition(TemporaryEnchantFrame, "RIGHT", PlayerFrame, "LEFT", -2, -93)
        --PlayerFrameManaBarTextLeft:Hide()
        --PlayerFrameManaBarTextRight:SetScale(0.8)
        --PlayerFrameManaBarText:SetScale(0.8)
        --PlayerFrameHealthBarTextLeft:SetScale(0.8)
        --PlayerFrameHealthBarTextRight:SetScale(0.8)
        --PlayerFrameHealthBarText:SetScale(0.8)
    
    
        -- TARGET Frame
        SetPosition(TargetFrame, "CENTER", WorldFrame, "CENTER", 200, -250)
        SetPosition(TargetFrameToT, "BOTTOMLEFT", TargetFrame, "TOPRIGHT", -25, -25)
        TargetFrameToT:SetScale(1.3)    
    
    
        -- PARTY FRAME
        SetPosition(PartyMemberFrame1, "RIGHT", PlayerFrame, "LEFT", 0, 0)
        PartyMemberFrame1:SetScale(1.3)
        PartyMemberFrame2:SetScale(1.3)
        PartyMemberFrame3:SetScale(1.3)
        PartyMemberFrame4:SetScale(1.3)
    
    
        -- RAID Frame
        SetPosition(CompactRaidFrameContainer, "BOTTOM", MultiBarLeftButton12, "TOPRIGHT", 3, 7)
        CompactRaidFrameContainerBorderFrameBorderTop:Hide()
        CompactRaidFrameContainerBorderFrameBorderTopLeft:Hide()
        CompactRaidFrameContainerBorderFrameBorderTopRight:Hide()
        CompactRaidFrameContainerBorderFrameBorderLeft:Hide()
        CompactRaidFrameContainerBorderFrameBorderRight:Hide()
        CompactRaidFrameContainerBorderFrameBorderBottom:Hide()
        CompactRaidFrameContainerBorderFrameBorderBottomLeft:Hide()
        CompactRaidFrameContainerBorderFrameBorderBottomRight:Hide()
    
    
        -- UI SCALE
        SetCVar('useuiscale', 1)
        SetCVar('uiscale', 0.64999997615814)
        UIParent:SetScale(0.64999997615814)
    
    
        -- CONFIG
        SetCVar('MSAAQuality', "3,0")
        
    end
    
    
    -- MULTIBOX SLAVE
    if math.floor(width) == 1410 then
        print("MULTIBOX SLAVE")
        
        -- MENUBAR
        --SetPosition(MainMenuBar, "BOTTOMRIGHT", WorldFrame, "BOTTOMRIGHT", -120, 0)
        
        -- ACTION BARS
        HorizontalBars()
        SetPosition(MultiBarLeftButton1, "BOTTOMLEFT", MultiBarBottomLeftButton1, "TOPLEFT", 0, 7)
        SetPosition(MultiBarRightButton1, "BOTTOMLEFT", MultiBarBottomRightButton1, "TOPLEFT", 0, 7)
        SetPosition(PetActionButton1, "BOTTOMLEFT", MultiBarLeftButton1, "TOPLEFT", 0, 7)
        --SetPosition(StanceBarFrame, "CENTER", PlayerFrame, "CENTER", 0, -50)
        StanceBarFrame:SetScale(0.8)
        SetPosition(StanceBarFrame, "BOTTOMLEFT", MultiBarLeftButton1, "TOPLEFT", 0, 7)
        
        -- CASTING BAR
        SetPosition(CastingBarFrame, "CENTER", WorldFrame, "CENTER", 0, -300)
        --CastingBarFrame.Border:Hide()
        --CastingBarFrame.Text:Hide()
        --CastingBarFrame.Flash:Hide()
        --CastingBarFrame:SetScale(0.7)
        
        -- PLAYER FRAME    
        SetPosition(PlayerFrame, "CENTER", WorldFrame, "CENTER", -200, -140)
        --SetPosition(rBFS_BuffDragFrame, "RIGHT", PlayerFrame, "LEFT", 0, 0)
        SetPosition(TemporaryEnchantFrame, "RIGHT", PlayerFrame, "LEFT", -2, -93)
        
        -- TARGET FRAME
        SetPosition(TargetFrame, "CENTER", WorldFrame, "CENTER", 200, -140)
        SetPosition(TargetFrameToT, "LEFT", TargetFrame, "RIGHT", -20, -20)
        TargetFrameToT:SetScale(1.3)
        
        -- PARTY FRAME
        SetPosition(PartyMemberFrame1, "RIGHT", PlayerFrame, "LEFT", 0, 0)
        PartyMemberFrame1:SetScale(1.3)
        PartyMemberFrame2:SetScale(1.3)
        PartyMemberFrame3:SetScale(1.3)
        PartyMemberFrame4:SetScale(1.3)
        
        -- RAID FRAME (TOGGLE IN GAME: /click CompactRaidFrameManagerDisplayFrameLockedModeToggle)
        SetPosition(CompactRaidFrameContainer, "TOPLEFT", WorldFrame, "TOPLEFT", 0, 0)
        CompactRaidFrameContainer:SetScale(1.4)
        
        CompactRaidFrameContainerBorderFrameBorderTop:Hide()
        CompactRaidFrameContainerBorderFrameBorderTopLeft:Hide()
        CompactRaidFrameContainerBorderFrameBorderTopRight:Hide()
        CompactRaidFrameContainerBorderFrameBorderLeft:Hide()
        CompactRaidFrameContainerBorderFrameBorderRight:Hide()
        CompactRaidFrameContainerBorderFrameBorderBottom:Hide()
        CompactRaidFrameContainerBorderFrameBorderBottomLeft:Hide()
        CompactRaidFrameContainerBorderFrameBorderBottomRight:Hide()
        
        CompactRaidFrameManagerToggleButton:Hide()
        CompactRaidFrameManagerDisplayFrame:Hide()
        CompactRaidFrameManager:Hide()
        CompactRaidFrameManagerBg:Hide()
        CompactRaidFrameManagerBorderTopRight:Hide()
        CompactRaidFrameManagerBorderRight:Hide()
        CompactRaidFrameManagerBorderBottomRight:Hide()
        
        -- CHAT FRAME
        FCF_Tab_OnClick(ChatFrame3)
        
        -- UI SCALE
        SetCVar('useuiscale', 0)
        
        -- CONFIG
        SetCVar('MSAAQuality', "1,0")    
        
    end
    File myFunc.lua
    Code:
    hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", function()    for i = 1, BUFF_ACTUAL_DISPLAY do
            _G["BuffButton"..i]:ClearAllPoints()
    
    
            if i > 1 and mod(i, BUFFS_PER_ROW) == 1 then
                _G["BuffButton"..i]:SetPoint("TOP", _G["BuffButton"..(i-BUFFS_PER_ROW)], "BOTTOM", 0, -BUFF_ROW_SPACING)
            elseif i == 1 then
                -- USE THIS TO CHANGE POSITION OF BUFF FRAME (IN RELATION TO PLAYERFRAME)
                _G["BuffButton"..i]:SetPoint("TOPLEFT", PlayerFrame, 95, -75)
            else
                _G["BuffButton"..i]:SetPoint("TOPLEFT", _G["BuffButton"..i-1], 35, 0)
            end
        end
    end)
    
    
    hooksecurefunc("DebuffButton_UpdateAnchors", function (buttonName, index)
        local buff = _G[buttonName..index]
        local numBuffRows = math.floor(BUFF_ACTUAL_DISPLAY/9) + 1
    
    
        buff:ClearAllPoints()
        if index > 1 and mod(index, BUFFS_PER_ROW) == 1 then
            buff:SetPoint("TOP", _G[buttonName..(index-BUFFS_PER_ROW)], "BOTTOM", 0, -BUFF_ROW_SPACING)
        elseif index == 1 then
            -- USE THIS TO CHANGE POSITION OF DEBUFF FRAME (IN RELATION TO BUFFBUTTON1)
            buff:SetPoint("TOPLEFT", _G["BuffButton1"], 0, (60 + (numBuffRows * 45)))
        else
            buff:SetPoint("TOPLEFT", _G[buttonName..(index-1)], 35, 0)
        end
    end)
    
    
    -- Remove flashing PlayerFrame in rested area
    hooksecurefunc("PlayerFrame_UpdateStatus", function()
        if IsResting("player") then
            PlayerStatusTexture:Hide()
            PlayerRestGlow:Hide()
            PlayerStatusGlow:Hide()
        end
    end)
    Attached Images Attached Images  
    Last edited by Nodoby : 11-22-2020 at 05:15 PM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •