As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Industrial Waste and Max Population

I thought I had it implemented correctly, with waste and cleanup process, but my game performed weirdly. After a few turns of no waste cleanup, my environment bar shot up to 100%. I debugged, and saw that while there are 90 waste on my 100 pop planet, it would require 45 BC to clean up. However, I only have 44.5 BC of "Actual Production" (after deducting expenses for fleet), resulting in 101% for environment bar.

So I fired up MoO 1 to see what happens when I don't clean up. And I found something strange:
Turn 1: 30 Factories, 50 Pop. It generates 34 waste! eek Shouldn't it have only generated 30 (1 waste per factory)? The production is 43 (56). So it'd require 17 BC to clean up. However, the eco bar is set to about 75%. This makes sense if it cleans up the previous turn's waste and current turn's waste (68 waste = 34 BC cleanup).

However, when I again set no cleanup, on next turn, it now have 55 waste, and a population growth of +1 overall (despite the size now being 45, and the pop increased to 51)? Assuming that it requires 15 BC to clean up current waste, and 27.5 for last turn's waste, it'd require 42.5 BC. With production of 44 (57), the Eco is nearly 100%, just one click from full bar. Again, makes sense despite the odd waste amount and pop growth.

Hitting turn with no cleanup, I now have 69 waste, 51 population, and 44 (57) production. Eco slider is set all the way to 100, and says WASTE. This makes sense, since 15 BC is required to clean up 30 factories, plus 35 BC, totalling 50 BC, while I only have 44 production.

Another turn, now it's at 79 waste, 50 population (finally lose 1 population), and 43 (56) production.

So it looks like my game actually got it right, the only difference is the odd number of waste production. I think this may be related to what you've found with factories automatically cleaning waste up.

To sum up:
Turn 1: 34 Waste (despite there only being 30 factories)
Turn 2: 55 Waste
Turn 3: 69 Waste
Turn 4: 79 Waste

It should have looked like this, according to OSG:
Turn 1: 30 Waste
Turn 2: 60 Waste
Turn 3: 90 Waste
Turn 4: 90 Waste
Dominus Galaxia, a Master of Orion inspired game I'm working on.
Reply

Hi guys,
I did not notice this thread until now, sorry for my late input.
Thanks Zeraan for finding this problem, this bug. It's a complete mess and I have very little idea what does it mean.

This may be
1) a remnant of an old code. that they forgot to put away.
2) a code that should have make an eco-crisis situation swing automatically towards less critical situation, base on Reduced waste tech_level
3) a code that should have make the polution (waste) a negative factor, self increasing (my tip).
It's hard to discern.


The code looks like this.
---------------------------------------------------------------------------
Part 1

Just before any other ecology is processed, this is counted:

(100 - (100 * waste) * [(worked_factories * RWnn) /10]
-------------------------------------------------------------------
100 * current_POP_max)


which is then added to the Planetary waste. Note that RWnn is 10 at the beginning of the game, with Industruial Waste Elimination (construction tech of lvl 45) it is reduced to 0.
The equation above may be simplified into:

1 - (waste * not_cleaned_up_factories) / current_POP_max

or (when planet reaches current_POP_max)

1 - (waste * RWnn/10 * RC)

As you can see, whenever waste > 0, the factor becomes negative, which in turn reduces waste. Should it have increased it? Something is clearly wrong, because if waste=0 or the player reaches Industrial waste elimination, the auto-cleaning of waste stops (which seems illogical). This is the first stage of auto-cleaning you have noticed, Zeraan.
The other stupid thing, however, is that when waste = 0, this auto-creates +1 waste on a planet.

--------------------------------------------------------
Part 2
If you thought the part 1 was mysterious, fasten your belt.

Surprisingly, the code repeats part 1, as if one autocleaning was not enough. The equation is counted, and is added AGAIN to the planetary waste. Hard to say, why, probably an oversight. But there is one notable difference: this time, the equation uses Robotics control level instead of Reduced Waste. Basically, the more factories the planet controls, the more pollution it cleans. (Note, that the effect is even stronger with Meklars!)
Simplified equation reads:

1 - (waste * RC * RC)

which is added to the planetary waste.


What is the impact of this code?
- with automatic setting of ECO bar, human user hardly ever notices the problem.
- this bug (or mess) makes bio-bombing a lot less attractive option. A biobombed planet can very quickly regain its clean status, while the original idea may have been to put the planet into an ecological catastrophe status, which is very expensive to clean up. That would explain the theme of biobombs being an abomination, in current game they look as innocent toys copmared to conventional bombs.
Reply

(February 18th, 2015, 18:38)kyrub Wrote: ---------------------------------------------------------------------------
Part 1

Just before any other ecology is processed, this is counted:

(100 - (100 * waste) * [(worked_factories * RWnn) /10]
-------------------------------------------------------------------
100 * current_POP_max)

What's RWnn exactly? Reduced Waste XX? Wouldn't it be 1.0 for 100% waste, .8 for 80%, and so forth? Maybe it was a typo and you didn't type the . for 1.0? What is the "waste" variable? Worked Factories? Or amount of cleanup per 1 BC? Or all factories?

Yeah, I can see that it quickly goes into negative.
Dominus Galaxia, a Master of Orion inspired game I'm working on.
Reply



Forum Jump: