ManageBrickos - Identify opportunities for unused BRICKOS

fronobulax

Developer
Staff member
ManageBrickos 1.0.4

This script presents some information that might be useful when generating meat from BRICKOS.

Right now the output is nothing more than lines of data, sorted and filtered. The data elements are: Name of the item; Number of bricks to make the item; Number of eye bricks to make the item; Cost of buying bricks from mall and making item; Cost of buying item in the mall; Difference between those costs; That difference divided by the number of bricks; and Sales volume for the past week.

Code:
BRICKO sword 6 0 1050 2000 950 158.33333 6

The line above tells us that you make a BRICKO sword from 6 regular bricks and 0 eye bricks. You can buy the raw materials in the mall for 1050 meat or buy the finished item for 2000 meat. If you buy the bricks, make the item and then successfully sell it then you will make a potential profit of 950 meat or 158.3 meat per brick used. 6 BRICKO swords were sold in the last week.

The script prints out all of the items, sorted by raw profit, all of the items sorted by profit per brick used, and all of the items with a profit greater than 0 and a sales volume greater than or equal to 5, sorted by profit per brick.

There are several ways one might profit from this data with making and selling the item with the highest pure profit or the highest profit per brick. However if people adopt this script practical profitability may hinge on sale volume.

Three caveats: First since it uses KoLmafia's mall price data all prices are for the fifth lowest in the mall. Thus items might not actually be available or sell at the predicted price. Next, "per brick" calculations treat plain and eye bricks as of they are equivalent. That's probably good enough but not accurate. Finally all calculations assume that the desired number of bricks are available at the same price. That is unlikely so your actual results may be different if you buy bricks for a gargantuchicken.

1.0.0 05 APR 2012 - Initial Release.
1.0.2 07 APR 2012 - Skipped 1.0.1 because of operator error in posting in updating. Use HTML table to clean up displays.
1.0.4 12 APR 2012 - Converted to use CFStat.
 

Attachments

  • ManageBrickos.ash
    6.1 KB · Views: 58
Last edited:

slyz

Developer
It's good to know that grabbing the volume of sales from the Coldfront market is so easy!

Thanks.
 

xKiv

Active member
If you are grabbing volume of sales, you could also grab actual average trading price ...

I would also suggest pretty-printing the table as a HTML table (you have to print_html(the_entire_table_as_one_string), but the aligned column make for easier reading)
 

fronobulax

Developer
Staff member
It's good to know that grabbing the volume of sales from the Coldfront market is so easy!

Thanks.

I stole the code from ZapWizard by DESTROY ALL BACON. I'm running three scripts now that use it and a common file and I'm wondering about moving it into something that is standalone or petitioning Zarqon and asking for inclusion in zLib.

Suggestion about grabbing average price noted, but I would want to figure out how I would use it compared to mafia's mall and historical prices first. I'll think about it.

I tend to avoid HTML going to the gCLI because it makes using the session logs after the run a PITA but making the display a table solves some personal annoyances so I'm going to play with it. Thanks.
 

fronobulax

Developer
Staff member
1.0.2 - I just rewrote the display to use an HTML table. It's better but there is something weird going with the alignment within cells. Sometimes it is left justified but sometimes it is centered. Using the deprecated align attribute didn't make any difference so I pulled it. That I would like is the columns and the first column to be left justified and everything else to be right justified. Probably should learn to force to_float to only use two decimal places, too.
 
Top