[Not a bug] 0.2.10 Beta exponational raise of crepers

Bugs that are actually features.
Post Reply
SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

[Not a bug] 0.2.10 Beta exponational raise of crepers

Post by SilverWarior »

Hi guys!
I'm not sure this is actually a bug or intended but when playing 2nd mision of Beta campaign the number of crepers that attack raises exponentially.
I fugerd this out after game become practically imposible after about 1hour and 40 minutes of gameplay (been losing even upto 5 gun turets out of 12 nearby placed turets per attack).
So I went to check "conrol.lua" file to see how the number of crepers per attack is being calculated.

This is the relevant code:

Code: Select all

glob.attackcount = glob.attackcount + glob.attackcountaddingspeed
    if game.getdifficulty() == defines.difficulty.easy then
      glob.attackcountaddingspeed = glob.attackcountaddingspeed + 0.5
    elseif game.getdifficulty() == defines.difficulty.normal then
      glob.attackcountaddingspeed = glob.attackcountaddingspeed + 1
    else
      glob.attackcountaddingspeed = glob.attackcountaddingspeed + 1.5
    end
As you see first line is used to determine the number of attacking crepers, It does so that it increases the current attackcount by attackcountaddingspeed. This is perfectly logical.
But when looking at next lines it seems that they were ment to controll the adding speed by defining the games diciculty settings. But the odd thing is that they are also increasing the current attackcontaddingspeed after every attack.
So when theese two aproaches are used together you get exponantial increase of number of attacking crepers.
Here is the graph that represents the increasing numbers of attacking creapers for first 50 attacks:
Image
So as you see after 50 attacks the number of creapers in an attack would already exceede 700. After 100 attacks the number of attacking crepers would already be way over 2000.

So I asume that the unles exponential inreasing rate of attacking crepers is intendet the code should look like this:

Code: Select all

glob.attackcount = glob.attackcount + glob.attackcountaddingspeed
    if game.getdifficulty() == defines.difficulty.easy then
      glob.attackcountaddingspeed = 0.5
    elseif game.getdifficulty() == defines.difficulty.normal then
      glob.attackcountaddingspeed = 1
    else
      glob.attackcountaddingspeed = 1.5
    end

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: 0.2.10 Beta mision exponational raise of crepers per att

Post by kovarex »

Hi,
the count of attack wave size is quadratic not exponential.
It makes sense, that the addition is increasing, as the players production is increasing as well (usually).
There is also another reason for this, the player is not supposed to play this level for very long time, the increasing power of creeper attacks should push him to invent the flying quickly.
Anyway, I believe, that it is possible to finish this level also by destroying the enemy (I might try it someday).

wrtlprnft
Fast Inserter
Fast Inserter
Posts: 155
Joined: Thu Feb 21, 2013 8:49 pm
Contact:

Re: 0.2.10 Beta mision exponational raise of crepers per att

Post by wrtlprnft »

Note that there's a cap on the number of attacking creepers, because the script can only order existing creepers around, and that number is limited by the number of creeper spawners, which is fixed. The maximum wave size can easily be held at bay by a couple of laser turrets.

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: 0.2.10 Beta mision exponational raise of crepers per att

Post by SilverWarior »

OK so it is intended to be like this way. The reason why I first thought this to be a bug is the fact that this is the only mision that uses this aproach in calculating the enemy vave size.
I gues I'll just restart the level and try again. But this time I'll try to start attacking the enemy sooner. I want to eradicate them compleetly before ending the mision. Yes I could have ended the mision a lot sooner by just reaserching flight which I'm currently avoiding to do.

As for laser turets, I'm afraid that currently my power supply network is not capable of powering them. Will have to improve in my next atempt.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: 0.2.10 Beta mision exponational raise of crepers per att

Post by MF- »

wrtlprnft wrote:Note that there's a cap on the number of attacking creepers, because the script can only order existing creepers around, and that number is limited by the number of creeper spawners, which is fixed. The maximum wave size can easily be held at bay by a couple of laser turrets.
Is this documented somewhere else than the lua script?
(Does removing spawners on freeplay affect attack size?)

wrtlprnft
Fast Inserter
Fast Inserter
Posts: 155
Joined: Thu Feb 21, 2013 8:49 pm
Contact:

Re: 0.2.10 Beta mision exponational raise of crepers per att

Post by wrtlprnft »

It's not documented as far as I know, but you can zoom out you can watch how it works and how at the start of an attack all creepers that hang around the spawners run towards you. The spawners immediately start creating new creepers, but those just hang around until you get too close or until the next attack.

Removing spawners on freeplay reduces the number of available creepers, but if you play on an infinite map you'll be creating new spawners as new areas of the map are generated.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: 0.2.10 Beta mision exponational raise of crepers per att

Post by MF- »

wrtlprnft wrote:Removing spawners on freeplay reduces the number of available creepers, but if you play on an infinite map you'll be creating new spawners as new areas of the map are generated.
Thanks for the reply
Aww... destroying spawners and exploring the map brings more creepers.

I though that there is a range limit. (Mostly because when I am off my base when the attack starts and I race back, they all come from my direction)

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [Not a bug] 0.2.10 Beta exponational raise of crepers

Post by SilverWarior »

MF- wrote:I though that there is a range limit. (Mostly because when I am off my base when the attack starts and I race back, they all come from my direction)
Currently default creeper AI is that when attack starts all of them rush towards you and only if the find another suitable target along the way they attack that target. That is how I was able to defend my base with only 12 gun turets all placed in one cluster. Everytime I ran toward my turets and becouse they were positioned between creper base and my base none of the creepers haven't even come near to my other structures and in 1h 40m they haven't even attacked any other structure than my turets.

Post Reply

Return to “Not a bug”