Took me a while to realise. That isn't cheating, you are misunderstanding the code. What it means is that if the unit is trying to spend a negative amount of energy, it is actually adding energy. An example: the solar panels, which have a EnergyUse of -20. Trying to use -20 E, is the same as adding 20 E. That misunderstanding probably comes from the fact that you didn't noticed that:Argh wrote:......Code: Select all
bool CUnit::UseEnergy(float energy) { if(energy<0){ AddEnergy(-energy); return true; } gs->Team(team)->energyPull += energy; bool canUse=gs->Team(team)->UseEnergy(energy); if(canUse) energyUseI += energy; return canUse; }
Code: Select all
if(energy<0){
He has 994 metal because each demon spends 2500 M and, since there isn't 2500 M available, it isn't spending anything more. If you look at the demons, you will notice that they don't say "-2500 M" anymore. The problem is probably not economic, it is the fact that units will still operate when they can't use up the intended amounts of M/E.AF wrote:How come Argh has 994 metal in the bank despite a huge deficit in his expenditure in both screenshots? He should have gone into stall immediatly as soon as those demons where spawned, he shouldnt even be able to terraform the land to build an archer.
...
Portugal is in regression right now. It is spending more than it is gaining. Acorging to what you are saying and to what AF said, suposedly, Portugal would completely and uterly stall. Meaning that, even though it is still producing enough to suport health care (independently of spending more than that in other areas), that money could not be spent in critical areas of the country like health care...Argh wrote:...
As that last screenshot clearly shows, even when you should have a negative economy, incapable of doing anything- you can still build, at FULL SPEED. There is no slowdown. It doesn't stop. The costs aren't being calculated properly- you can spend on new stuff all you want.
...
You can still produce because you are still making resources and, since the demon only spends resources whenever there is 2500 in the bank, and the lord is still creating chunks of 200 and spending smaller chunks than 2500.
Try this, start with 1K res. Now build a SpireRook. It takes around 14 secs with the combined 1K in the bank + the lord's 200 income. Since the SpireRook spends 300 M/E, it's spending is much noticeable, it doesn't needs to wait for 2500 M/E to be in the bank before it spends. Now build Another SpireRook and notice how much longer it is taking because the older SpireRook is actually taking frequent bites at your pool of M/E.
The problem is probably not in the economy, is in the fact that units still operate when they can't drain res. A good start, would be to fix the fact that mobile units can't have succesfully EnergyUse (probably the reason why you are using negative EnergyMake). Then, make the units not be able to operate when they can't suck enough res.