Without burning temperature
Range 4-8
| Wood | CC Yield |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 1 |
| 12 | 1 |
| 13 | 1 |
| 14 | 1 |
| 15 | 1 |
| 16 | 2 |
| 17 | 2 |
| 18 | 2 |
| 19 | 2 |
| 20 | 2 |
| 21 | 2 |
| 22 | 3 |
| 23 | 3 |
| 24 | 3 |
| 25 | 3 |
| 26 | 3 |
| 27 | 3 |
| 28 | 3 |
| 29 | 4 |
| 30 | 4 |
| 31 | 4 |
| 32 | 4 |
| 33 | 4 |
| 34 | 4 |
| 35 | 4 |
| 36 | 4 |
| 37 | 5 |
This prove the 4-8 range theory.
Now let's put burning temp at 13 and simulate a fire with 105 wood as notyfied in bonfires page "Doing the first type of this method I accidently added all of my wood half way in, 105 peices, I ended up with 3 charcoal. More experimentation is needed to determine why."
| Tick | Temp | Wood | cc |
| 0 | 0 | 105 | 0 |
| 1 | 1 | 104 | 0 |
| 2 | 2 | 102 | 0 |
| 3 | 3 | 99 | 0 |
| 4 | 4 | 95 | 0 |
| 5 | 5 | 90 | 1 |
| 6 | 6 | 84 | 1 |
| 7 | 7 | 77 | 2 |
| 8 | 8 | 69 | 2 |
| 9 | 9 | 60 | 2 |
| 10 | 10 | 50 | 2 |
| 11 | 11 | 39 | 2 |
| 12 | 12 | 27 | 2 |
| 13 | 13 | 14 | 2 |
| 14 | 14 | 0 | 1 |
| 15 | 13 | 0 | 1 |
| 16 | 12 | 0 | 1 |
| 17 | 11 | 0 | 1 |
| 18 | 10 | 0 | 1 |
| 19 | 9 | 0 | 1 |
| 20 | 8 | 0 | 1 |
| 21 | 7 | 0 | 2 |
| 22 | 6 | 0 | 2 |
| 23 | 5 | 0 | 3 |
| 24 | 4 | 0 | 3 |
| 25 | 3 | 0 | 3 |
| 26 | 2 | 0 | 3 |
| 27 | 1 | 0 | 3 |
We end with 3 cc just as stated.
If I set burning temp to 12 or 14 we get 2 or 4 cc for this 105 wood BF, so burning temp is 13.
{
////////
//VARS//
////////
//bonfire vars var $Temp = 0; //temperature of BF
////////////// //stock vars// ////////////// var $WoodStock = 0; //wood left in BF var $WoodBeforeTick = 0; //Wood left before tick var $PapyStock = 0; //Papyrus stock in BF var $carrotStock = 0; //Carrot stock in BF var $garlicStock = 0; //Garlic stock in BF var $limestoneStock = 0; //Limestone stockin BF
var $waterStock = 0; //water in BF
var $ccStock = 0; //cc stock in BF var $ashStock = 0; //Ash stock in BF var $limeStock = 0; //Lime stock in BF
/////////////////////////// //production temperatures// /////////////////////////// var $ccProdLow = 4; //cc production low temperature var $ccProdHigh = 8; //cc produciton high temperature
var $PapyAshLow = 5; //Papyrus Ash production low temperature var $PapyAshHigh = 10; //Papyrus Ash production high temperature
var $carrotAshLow = 15; //Carrot Ash production low temperature var $carrotAshHigh = 24; //Carrot Ash production high temperature
var $garlicAshLow = 10; //Garlic Ash production low temperature var $garlicAshHigh = 11; //Garlic Ash production high temperature
var $limeProdLow1 = 2; //Lime production low temperature (low prod range) var $limeProdHigh1 = 6; //Lime production high temperature (low prod range)
var $limeProdLow2 = 7; //Lime production low temperature (high prod range) var $limeProdHigh2 = 9 //Lime production high temperature (high prod range)
//////////////////////// //burning temperatures// //////////////////////// var $ccBurn = 13; //cc burning temperature
/**
* Bonfire::Bonfire()
* Constructor
*
* @param $wood => number of initial wood in BF
* @param $limestone => number of initial limestone in BF
* @param $papyrus => number of initial papyrus in BF
* @param $carrot => number of initial carrot in BF
* @param $garlic => number of initial garlic in BF
*
* @return nothing
*/
function Bonfire($wood=0, $limestone=0, $papyrus=0, $carrot=0, $garlic=0)
{
$this->WoodStock = $wood;
$this->PapyStock = $papyrus;
$this->carrotStock = $carrot;
$this->garlicStock = $garlic;
$this->limestoneStock = $limestone;
}
/**
* Bonfire::Tick()
* simulates a BF tick
*
* @param $wood => number of wood added
* @param $limestone => number of limestone added
* @param $papyrus => number of papyrus added
* @param $carrot => number of carrot added
* @param $garlic => number of garlic added
* @param $water => number of water added
*
* @return BF state
*/
function Tick($wood=0, $limestone=0, $papyrus=0, $carrot=0, $garlic=0, $water = 0)
{
//Remember how much wood there was before temp calculation
$this->WoodBeforeTick = $this->WoodStock;
//Temp calculation if ($this->WoodStock > 0) $this->Temp++; else $this->Temp--;
if ($this->waterStock > 0) $this->Temp -= $this->waterStock;
if ($this->Temp < 0) $this->Temp = 0;
///////////////////// //YIELDS ADJUSTMENT// ///////////////////// $this->ccYield(); $this->ashYield(); $this->limeYield();
////////////////////// //STOCKS ADJUSTMENTS// ////////////////////// //Wood stock (such a great party :D) $this->WoodStock -= $this->Temp; //wood minus current temp
if ($this->WoodStock < 0) //if down under 0 then stock is 0 $this->WoodStock = 0;
$this->PapyStock--; //reduce papy stock by 1 if ($this->PapyStock < 0) //if down under 0 then stock is 0 $this->PapyStock = 0;
$this->carrotStock -= 8; //reduce carrot stock by 8 if ($this->carrotStock < 0) //if down under 0 then stock is 0 $this->carrotStock = 0;
$this->garlicStock -= 6; //reduce garlic stock by 6 if ($this->garlicStock < 0) //if down under 0 then stock is 0 $this->garlicStock = 0;
$this->limestoneStock -= 6; //reduce limestone stock by 1 if ($this->limestoneStock < 0) //if down under 0 then stock is 0 $this->limestoneStock = 0;
$this->WoodStock += $wood; //add this tick's wood addition $this->PapyStock += $papyrus; //add this tick's papyrus addition $this->carrotStock += $carrot; //add this tick's carrot addition $this->garlicStock += $garlic; //add this tick's garlic addition $this->limestoneStock += $limestone; //add this tick's limestone addition $this->waterStock += $water; //add this tick's water addition
//return BF state, false if off, true if lit if ($this->Temp == 0) return false; else return true; }
////////////////////// //YIELDS CALCULATORS// //////////////////////
/**
* Bonfire::ccYield()
* calculate cc Stock in BF
*
* @return nothing
*/
function ccYield()
{
//if we are in good temperature range
if ($this->Temp >= $this->ccProdLow && $this->Temp <= $this->ccProdHigh)
{
$this->ccStock += 0.5; //then add 0.5 cc
}
//if over cc burning temp if ($this->Temp >= $this->ccBurn) $this->ccStock -= 0.5; //then burn 0.5 cc if ($this->ccStock < 0) $this->ccStock = 0; }
/**
* Bonfire::ashYield()
* calculate Ash production
*
* @return nothing
*/
function ashYield()
{
//if we are in papyrus burning temperature range
if ($this->Temp >= $this->PapyAshLow && $this->Temp <= $this->PapyAshHigh)
if($this->PapyStock >= 0) //and if there is papyrus in the bonfire
$this->ashStock += 0.45; //then add 0.45 cc
//if we are in carrot burning temperature range if ($this->Temp >= $this->carrotAshLow && $this->Temp <= $this->carrotAshHigh) if($this->carrotStock >= 8) //and if there is carrot in the bonfire $this->ashStock += 1.5; //then add 1.5 cc
//if we are in garlic burning temperature range if ($this->Temp >= $this->garlicAshLow && $this->Temp <= $this->garlicAshHigh) if($this->garlicStock >= 6) //and if there is garlic in the bonfire $this->ashStock += 1.5; //then add 1.5 cc }
/**
* Bonfire::limeYield()
* calculate Lime production
*
* @return nothing
*/
function limeYield()
{
//if there is limestone in BF
if ($this->limestoneStock > 0)
{
//if in low prod range
if ($this->Temp >= $this->$limeProdLow1 && $this->Temp <= $this->$limeProdLow1)
$this->limeStock += 0.1; //then yield 0.1 Lime
//if in high prod range
if ($this->Temp >= $this->$limeProdLow2 && $this->Temp <= $this->$limeProdLow2)
$this->limeStock += 0.7; //then yield 0.7 lime
}
}
///////////// //BF STATE // /////////////
/**
* Bonfire::getValues()
* return every current values of BF
*
* @return associative array with current values of BF
* wood => wood stock
* papyrus => papyrus stock
* carrot => carrot stock
* garlid => garlic stock
* limestone => Limestone stock
*
* temps => temperature of BF
*
* cc => charcoal stock
* ash => Ash stock
* lime => Lime stock
*/
function getValues()
{
//create an associative array with every values of BF
$Values = array();
//initial products values $Values['wood'] = $this->WoodStock; $Values['papyrus'] = $this->PapyStock; $Values['carrot'] = $this->carrotStock; $Values['garlic'] = $this->garlicStock; $Values['limestone'] = $this->limestoneStock;
//temperature $Values['temp'] = $this->Temp;
//productions values $Values['cc'] = floor($this->ccStock); $Values['ash'] = floor($this->ashStock); $Values['lime'] = floor($this->limeStock);
//return the array return $Values; }
}