Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Hooman on April 15, 2009, 10:54:56 PM

Title: Food Stores Are Plentiful
Post by: Hooman on April 15, 2009, 10:54:56 PM
"Food Stores are Plentiful"

Yes, you hear it after you starve to death, but why? Why don't we hear this during normal game play? What exact conditions lead to this message, and what did the game creators intend with it? Or so Arklon asked me, and it is a rather curious question, so here are my findings.


if (totalFoodConsumption > totalFoodProduction)
  "Food Supply is Diminishing"
else if (((totalFoodProduction * 20) / 19) > totalFoodConsumption)  // This is silly
  "Food Supply is Growing"
else if ((foodStored + netFoodProduction) >= (totalPopulation * 15))
  "Food Stores are Plentiful"
end


Note that 20/19 is about 1.05, so you need to be slightly above the growing point to receive the "Food Supply is Growing" message.

Note that to reach the last if condition, we need the following combined condition to be true:
if !(totalFoodConsumption > totalFoodProduction)
if !(totalFoodProduction * 20/19 > totalFoodConsumption)
or more simply:
if (totalFoodProduction * 20/19 <= totalFoodConsumption <= totalFoodProduction)

So basically, (1.05p <= c <= p), which implies 1.05p <= p, which can only be true if p <= 0. This means you can only get the "Food Stores are Plentiful" message if production is 0 or negative. Now since we are talking total production, and not net production, it can never be negative. So, the message is only possible when production is 0. This also means that the first if statement will be chosen unless total food consuption is also 0, in which case you have no people.

So, now you know why you get the "Food stores are plentiful" message exactly when all your people have died off or starved to death.



Now, if the second condition was changed to something like: p > c * 20/19, then it might have made a little more sense. Patch time anyone?  :)
 
Title: Food Stores Are Plentiful
Post by: Sirbomber on April 16, 2009, 07:02:57 AM
Go for it.
Title: Food Stores Are Plentiful
Post by: Spikerocks101 on April 20, 2009, 02:53:13 PM
With all these corpses around, "Food Stores are Plentiful"
Title: Food Stores Are Plentiful
Post by: Sirbomber on April 20, 2009, 04:16:05 PM
Quote
With all these corpses around, "Food Stores are Plentiful"
"The people are starting to eat each other Commander!"

(Why can't I upload WAVs?)
Title: Food Stores Are Plentiful
Post by: evecolonycamander on May 20, 2010, 08:25:02 PM
i know this thread is old but isent that from OP1. when my brother first heard it he laffed(sorry spell check dosent know this one) so hard he lost his dinner.. any way the reason for .wav files not being up loadable is that same reason .exe files arnt allowed. "this file may contain viruses, or harm your computer"
Title: Food Stores Are Plentiful
Post by: CK9 on May 20, 2010, 09:29:17 PM
OP2, you hear it on the idle-demos
 
Title: Food Stores Are Plentiful
Post by: Simpsonboy77 on May 21, 2010, 10:46:28 PM
Quote
OP2, you hear it on the idle-demos
And if you starve to death.
Title: Food Stores Are Plentiful
Post by: CK9 on May 22, 2010, 10:45:58 AM
I thought you just hear "you have failed" if you starve to death...or are you talking about a rare case where it updates that message before running the lose condition check?
Title: Food Stores Are Plentiful
Post by: Flashy on May 22, 2010, 11:40:14 AM
Multiplayer levels don't have failure conditions, so in multiplayer, you can hear that.
Title: Food Stores Are Plentiful
Post by: evecolonycamander on May 23, 2010, 08:47:43 PM
Strange i never heard it outside of OP1
Title: Food Stores Are Plentiful
Post by: Sirbomber on May 23, 2010, 10:55:08 PM
We're talking about "Food stores are plentiful", not "The people are starting to eat each other Commander".  Look at the topic...
Title: Food Stores Are Plentiful
Post by: CK9 on May 24, 2010, 01:23:37 AM
hehe, it's all fun and games until your colonists begin eating eachother
Title: Food Stores Are Plentiful
Post by: Kayedon on May 24, 2010, 02:00:01 AM
Quote
Look at the topic...
Next you're going to expect the weather to follow your every command.