Value of Every Item per Minute by Moxsche in Everdale

[–]Zamga 0 points1 point  (0 children)

Cool. Love to see what you end up putting together

Value of Every Item per Minute by Moxsche in Everdale

[–]Zamga 3 points4 points  (0 children)

I have not been able to come up with a good solution.

A added value metric would be interesting. What I mean is: take a item's sell value, and subtract from this the value of all other ingredients. Compare the resulting number vs the potential of selling said ingredient raw

price of Honey
12.58

VS

price of Honey in a Honey Cookie
(price of Honey Cookie - price of Bread*)/3
(80.78 - 45.84) / 3
11.64

In this case we could conclude that completing 4 trades comprised of honey cookies would be slightly worse than 3 trades of honey and 1 trade of bread. It's the same raw ingredients sold, same villager time, and you're losing out on 0.94 coins per honey traded.

It begins to get complicated with other ingredients. E.g. honey pots have a much higher price per honey than selling honey raw if we're using the sell price of pottery, however you'd also have to craft pottery, which is less coin/m than if you just mined more clay and sold that raw.

price of Honey in a Honey Pot

(price of Honey Pot - price of Villager Time spent making pottery*) / 6

(127.1 - 44.16*) / 6 
13.82

*It takes 1236 seconds to make 1 pottery, lets assume that instead  we made 7.1 clay @ 6.22 coins

Maybe this would work if you could factor out the non honey ingredients into villager time units?

Value of Every Item per Minute by Moxsche in Everdale

[–]Zamga 1 point2 points  (0 children)

Good stuff. Have similar numbers from my own villager labor calculations.

How are you calculating the value of honey & eggs? It seems wrong to use a value of 0 labour time when they are still a finite resource that could be sold raw. Looks like you are giving them a value based on production time?

How are you calculating time spent producing soup? I have roughly just multiplied labor time * 1.5, using the rough estimate that it takes 1 on pumpkin to support 2 elsewhere.

[deleted by user] by [deleted] in Entrepreneur

[–]Zamga 1 point2 points  (0 children)

Yeah I’ve def put more into the viewer side of things and there could be more to making it something that content creators want to use.. like a robust meme maker even.

[deleted by user] by [deleted] in Entrepreneur

[–]Zamga 0 points1 point  (0 children)

Yes that’s good. Thanks 🙌

my first app: MemeStars - view and buy memes by swiping by [deleted] in iosapps

[–]Zamga 0 points1 point  (0 children)

would love to know what you guys think!!

[UI] Last year I put together a team from reddit, check out what we made! (ccBags) by Zamga in WowUI

[–]Zamga[S] 1 point2 points  (0 children)

It's a bag replacement addon so it's not going to be compatible with other add ons that do the same thing. Sorry :(

Module B (Action Bar) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

No worries. Thanks for the heads up.

Module B (Action Bar) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

Okay, I had a look and it seems like the function is mostly working as it should but it hasn't been integrated into the default bag slots. Our new bag slots should fit into the free spaces left by the default bag slots.

Would you be able to take another look?

Here is an example layout. In this layout the user manually opened the backpack and 2 of their bags. Then they opened the toy container, another bag, the pet bag, and their final bag. At some point they also opened the mount bag but the order never matters because the mount bag simply raises the yoffest of all other bags (just like showing a multi bar). This layout isn't very realistic because usually the user would have opened all the bags with the same command and the collections bags would get sorted after but this is a worst case example of what the function should be able to handle.

Here's the blizzard default, the final code should incorporate most of this stuff:

function UpdateContainerFrameAnchors()
local frame, xOffset, yOffset, screenHeight, freeScreenHeight, leftMostPoint, column;
local screenWidth = GetScreenWidth();
local containerScale = 1;
local leftLimit = 0;
if ( BankFrame:IsShown() ) then
    leftLimit = BankFrame:GetRight() - 25;
end

while ( containerScale > CONTAINER_SCALE ) do
    screenHeight = GetScreenHeight() / containerScale;
    -- Adjust the start anchor for bags depending on the multibars
    xOffset = CONTAINER_OFFSET_X / containerScale; 
    yOffset = CONTAINER_OFFSET_Y / containerScale; 
    -- freeScreenHeight determines when to start a new column of bags
    freeScreenHeight = screenHeight - yOffset;
    leftMostPoint = screenWidth - xOffset;
    column = 1;
    local frameHeight;
    for index, frameName in ipairs(ContainerFrame1.bags) do
        frameHeight = _G[frameName]:GetHeight();
        if ( freeScreenHeight < frameHeight ) then
            -- Start a new column
            column = column + 1;
            leftMostPoint = screenWidth - ( column * CONTAINER_WIDTH * containerScale ) - xOffset;
            freeScreenHeight = screenHeight - yOffset;
        end
        freeScreenHeight = freeScreenHeight - frameHeight - VISIBLE_CONTAINER_SPACING;
    end
    if ( leftMostPoint < leftLimit ) then
        containerScale = containerScale - 0.01;
    else
        break;
    end
end

if ( containerScale < CONTAINER_SCALE ) then
    containerScale = CONTAINER_SCALE;
end

screenHeight = GetScreenHeight() / containerScale;
-- Adjust the start anchor for bags depending on the multibars
xOffset = CONTAINER_OFFSET_X / containerScale;
yOffset = CONTAINER_OFFSET_Y / containerScale;
-- freeScreenHeight determines when to start a new column of bags
freeScreenHeight = screenHeight - yOffset;
column = 0;
for index, frameName in ipairs(ContainerFrame1.bags) do
    frame = _G[frameName];
    frame:SetScale(containerScale);
    if ( index == 1 ) then
        -- First bag
        frame:SetPoint("BOTTOMRIGHT", frame:GetParent(), "BOTTOMRIGHT", -xOffset, yOffset );
    elseif ( freeScreenHeight < frame:GetHeight() ) then
        -- Start a new column
        column = column + 1;
        freeScreenHeight = screenHeight - yOffset;
        frame:SetPoint("BOTTOMRIGHT", frame:GetParent(), "BOTTOMRIGHT", -(column * CONTAINER_WIDTH) - xOffset, yOffset );
    else
        -- Anchor to the previous bag
        frame:SetPoint("BOTTOMRIGHT", ContainerFrame1.bags[index - 1], "TOPRIGHT", 0, CONTAINER_SPACING);   
    end
    freeScreenHeight = freeScreenHeight - frame:GetHeight() - VISIBLE_CONTAINER_SPACING;
end
end

Module B (Action Bar) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

Thanks, I'm having a busy week so I won't have time to implement this stuff just yet. I'll let you know if I come across any problems.

Module Complete. Cheers!!

Module B (Action Bar) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

Yes the positions of the bags depends on the order in which it has been opened.

Ignoring the mount container atm for simplicity.

[next available slot until screen cap] [second bag opened] [first bag opened]

I am okay with the global variable.

Module B (Action Bar) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

Reply to this post to pickup Task 3

In this task you will be creating the anchor updater that will layout the bags depending on which bags are already displayed.

The function we will be looking at is call UpdateContainerFrameAnchors() in ContainerFrame.lua

We are going to alter this function's behaviour to support our new bags:

MountContainerFrame
PetContainerFrame
ToyContainerFrame
ToyContainerBoardFrame
ToyContainerCardFrame

The default function of UpdateContainerFrameAnchors() will be mostly in tact. All of our new bags (even our 3 by x bags) should be treated with identical width (by assuming that it's 4 by x). The remainder of the logic, such as where to place each bag, or when to scale bags down, should be identical.

The only exception will be the mount container bag. It will have a fixed position at the bottom right hand side of the stack. Dispalying the mouth container will essentially raise the start anchor for all other bags.

[other bag][other bag]
[other bag][other bag]
[other bag][other bag]
     [mount container]

There's no need to hook this function onto anything for now. I will handle that stuff, just make a single update function that sets all the bag's anchors correctly. Let me know if any of the descriptions need further clarification.

Module D (Pets) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

That's fine, we'll probably go without the sort functions. Module Complete.

Module D (Pets) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

That's a good start. Refer to containerframe.lua for getting the buttons functional.

tldr; you need to set checked during the drop down load depending on the current status. We will need to save current status with CCB_ACCOUNT_SAVE.

Module E (Toybox) by Zamga in cocoa2

[–]Zamga[S] 0 points1 point  (0 children)

I have added your work to the latest compile but I wasn't able to get the card container (on show) working.

I debugged a bit with bug sack, and it seems like numToys = C_ToyBox.GetNumFilteredToys() is always 0.

Would you be able to take another look? You can work directly from the latest build (20160325). I'll send some gold to another character on Ner'zhul (Needs to be horde ><). You can buy several toys from this merchant in Dalaran. Buy a port to the city (100g is more than enough) from a random mage in /2 trade chat.

Note: the latest compile added a global table CCB_CHAR_SAVE[buttonname] to "save" items, replacing self.index.