1
Vote

Food - Running out and no penalty

description

Not really a bug. I have accidently run out of food and its now at -1,705,266. However there is no penalty. We should add this. Say villagers begin to die off and if your still experiencing negative food income once they are all gone then troops begin to die off until your in a + food gain per turn. Hope I explained this correctly :)

comments

GameCharmer wrote Jan 25, 2010 at 8:52 PM

Yeah, that is something I have been tinkering with. There is no right way to remove units based on Cron that I can directly find, so I have been building some nifty functions to take care of things.

1.4.6 will contain a LOT of changes. 2 new tables, a new row to the quests table, and a pile of functions, and a couple of template edits. ;)

I also restructured the ACP.

Sshadow wrote Jan 26, 2010 at 4:43 AM

Ok great when you get a chance pass those template edits to me so if I decide to do any work on them before the release I won't have to redo my work. Also is there a way to stop that from going into the negatives if you haven't already?

GameCharmer wrote Jan 26, 2010 at 11:22 AM

If you set the database field to "Unsigned" it will no longer be able to have negative values. Whenever the game tries to set it as a negative, it will just return to 0.

The template change is in the quests page. For some reason, I can't get my cool mouse over effect to work, so I'm dumping the output to the title tag for now. :(

GameCharmer wrote Jan 26, 2010 at 4:34 PM

This is now implemented in 1.4.6

BE SURE TO SET ANY NEGATIVE VALUES TO 0 BEFORE UPDATING!!!


The loop that kills off excessive troops (starting at villagers and moving their way up) is VERY INTENSIVE!

If you start with -1,000,000 food, it will kill ALL of your active units, as it is meant to be ran each turn.

Once again, please PLEASE make sure you set any negative food amounts to 0 before proceeding. I actually blew my server for a half hour because the script execution time took WAY to long due to a user having around -6,000,000,000 food. :(

wrote Feb 1, 2013 at 10:35 PM