Warehouse % Full Overview


New Member
Reaction score
I know there's a script out there for this already, but it wasn't working and I wasn't a huge fan of it anyway. This calculates how full the warehouse is of each village on the production overview screen and adds a column showing the %. It also highlights each row based on how full it is. To use it, all you do is run it once on the production overview screen. I'm intending this to be private.

  var table = $("#production_table");
  var warehouseColIndex = table.find("thead tr th:contains('Warehouse')").index();
  table.find("thead tr").children().eq(warehouseColIndex).after("<th>% Full</th>");
  table.find("tbody tr").each(function(){
    var resources = $(this).find("td:eq(3) span.res, td:eq(3) span.warn");
    var maxResource = "";
    var maxAmount = 0;
      var amountStr = $(this).text().replace(/\./g,"");
      var amount = parseInt(amountStr);
      if(amount > maxAmount){
        maxAmount = amount;
        maxResource = $(this).attr("class").split(" ")[1];
    var warehouseStr = $(this).find("td:eq("+(warehouseColIndex)+")").text().replace(/\./g,"");
    var warehouse = parseInt(warehouseStr);
    var percentage = Math.round((maxAmount/warehouse)*100);
    $(this).children().eq(warehouseColIndex).after("<td>"+percentage+"% "+maxResource+"</td>");
    var color;
    if(percentage >= 90){
      color = "#ff5555"; // red
    }else if(percentage >= 70){
      color = "#ff8c00"; // orange
    }else if(percentage >= 50){
      color = "#ffd700"; // yellow
      color = "#a8ff60"; // green
    $(this).children().css("background-color", color);


Staff member
Community Manager
Reaction score
All questions regarding scripts are dealt with here : https://forum.tribalwars.us/forumdisplay.php?f=32
All approved scripts are to be found here .

If the scripts that you are asking about are not on that list then they are probably not legal. Please check them to make sure they are still legal. and check to approve your scripts there also., once you gain approval screen shot the approval and send the screen shot to the ticket system so that we have proof that it was approved.