Cursed Questions
Re: Cursed Questions
Could anyone explain to me what the class you select at the start of the game does exactly? i chose miner and i cant figure out if it has given me something special or a new ability or something :S
Re: Cursed Questions
It gives you x2 xp in the according skill, mining for you. I chose crafter, but explorer sounds great too, mining is not worth IMO, because once you get the cursed tool to high levels you can grind it faster than any other skillbuc01 wrote:Could anyone explain to me what the class you select at the start of the game does exactly? i chose miner and i cant figure out if it has given me something special or a new ability or something :S
Re: Cursed Questions
That is correct however in this version of mod the generator is a bit weak. 1st body will generate about 25kW. It is not linear so each body added will generate a bit more but still IMO it's not worth it (at least in this version).Tim2162286 wrote: *Edit I found your post where you explained the generators function, it just runs off the extra bodies.
That said, he already stated that generator in new ver is buffed. For now it's roughly x 1.5 but who knows.. maybe it will be even more.
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
Not only is it weak until you compleatly fill it (very expensive), it does not seem to reliably work for me.Qcor wrote:That is correct however in this version of mod the generator is a bit weak. 1st body will generate about 25kW. It is not linear so each body added will generate a bit more but still IMO it's not worth it (at least in this version).Tim2162286 wrote: *Edit I found your post where you explained the generators function, it just runs off the extra bodies.
That said, he already stated that generator in new ver is buffed. For now it's roughly x 1.5 but who knows.. maybe it will be even more.
Re: Cursed Questions
now that you mentioned it I took a closer look and it appears that you're right.
It generates HALF of what it supposed to generate according to the formula. To be more precise it operates at full capacity but only half of the time... as in it goes for like 3sec then it's idle for next 3sec etc etc
Strange..
It generates HALF of what it supposed to generate according to the formula. To be more precise it operates at full capacity but only half of the time... as in it goes for like 3sec then it's idle for next 3sec etc etc
Strange..
Last edited by Qcor on Mon Jun 15, 2015 9:57 pm, edited 1 time in total.
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
I can get the generator to run continuously, but only at about 1/5 power if i connect it to my main power system, and only if i have more energy production than consumption.
I don't know why it does that, i have used other mods that also use the accumulator entity type as a generator and they work perfectly.
I don't know why it does that, i have used other mods that also use the accumulator entity type as a generator and they work perfectly.
Re: Cursed Questions
yeah.. it's broken for sure.
I think I localized the cause.. trying to fix it now. If I succeed I'll post the code you need to replace.
Not sure how it will go... 0 experience in this strange lua stuff![Sad :(](./images/smilies/icon_e_sad.gif)
I think I localized the cause.. trying to fix it now. If I succeed I'll post the code you need to replace.
Not sure how it will go... 0 experience in this strange lua stuff
![Sad :(](./images/smilies/icon_e_sad.gif)
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
thanks, i have some programing experience, so if you tell me where you think the problem is i can try and look at it as well.
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
Definitly found the issue, it is in lines 34-35, commenting them out gives constant output, but doesn't increase like it should when the generator levels, will works some more on it.
using this code causes the generator to output a constant 300 kw regardless of generator level (this is lines 30-35)
*Edit- after more testing, the issue appears to be that the generator only outputs at its maximum, but is limited to generating about 260 kW. the reason it doesn't work continuously is that it fills its buffer up, then compleatly discharges it at its output rate. not sure how to modify that maximum charge rate though.
Code: Select all
local output_flow_limit = math.floor(0.1 * (i - 1)^2 + (i - 1) * 25 + 25)
if i == datos.maxgenerator then
output_flow_limit = math.floor(0.25 * (i - 1)^2 + (i - 1) * 25 + 25)
end
--generator.energy_source.output_flow_limit = output_flow_limit .. "kW"
--generator.energy_source.buffer_capacity = output_flow_limit * 60 * 5 .. "kW"
*Edit- after more testing, the issue appears to be that the generator only outputs at its maximum, but is limited to generating about 260 kW. the reason it doesn't work continuously is that it fills its buffer up, then compleatly discharges it at its output rate. not sure how to modify that maximum charge rate though.
Re: Cursed Questions
well.. yes and no
Yes, this is a PART of a problem.. and NO, it's not the solution.
The problem is that generator has an internal buffer. Every 300 ticks it is filled. To be precise it's energy is being set to a specific number.
All would be cool but this number is too small to keep it running for whole 300 ticks.
If that was all then the fix would be rly easy.
For last 3 hours I was experimenting with this and it just blows my mind... Basically I changed it so that:
1) the buffer is of size X
2) each tick the buffer energy is set to X
3) buffer can be emptied at a max rate of X/tick
And that still causes some strange fluctuations.. WHY ?? because.. logic..
No idea how sth so straight forward could fail but well.. I started to learn about it 3h ago so maybe I'm just a noob.
Anyway.. I changed it again and it mostly works. It's power output is as should be and it's constant. Only downside is that one of power production meters shows good value and the other shows bad one.
Example: my generator is lvl 19 so it, in theory, generates max of 507KW. The power meter in top left shows 507.. and the second one shows 580![Shocked :shock:](./images/smilies/icon_eek.gif)
top one is right, and the other shows more because I made the buffer twice the size and set the buffer energy to 2*X instead of X. It rly shouldn't matter because max output was and still is = 507.. so rly no idea.. some strange logic.
Just replace files attached and all should work properly...
[edit]
It LOOKS like the top indicator shows how much energy was actually provided to the network while the second one shows how much was "added"/produced inside all generators... am I right ?
It just boggles my mind... some1 pls explain that to me:
So lets say I have a generator producing 50/tick with a buffer of 100 and max output of 50/tick. Each tick I set the power in the buffer to 100.
First indicator shows 50 which seems reasonable, and second shows sth like 55.
That would mean that I 'added'/produced 55, right? sooo.. it was 45, I set it to 100.. producing 55.
But how it could be 45 if I can output MAX 50?! That would mean that in last tick network took 55 from the buffer..
[/edit]
Yes, this is a PART of a problem.. and NO, it's not the solution.
The problem is that generator has an internal buffer. Every 300 ticks it is filled. To be precise it's energy is being set to a specific number.
All would be cool but this number is too small to keep it running for whole 300 ticks.
If that was all then the fix would be rly easy.
For last 3 hours I was experimenting with this and it just blows my mind... Basically I changed it so that:
1) the buffer is of size X
2) each tick the buffer energy is set to X
3) buffer can be emptied at a max rate of X/tick
And that still causes some strange fluctuations.. WHY ?? because.. logic..
![Sad :(](./images/smilies/icon_e_sad.gif)
Anyway.. I changed it again and it mostly works. It's power output is as should be and it's constant. Only downside is that one of power production meters shows good value and the other shows bad one.
Example: my generator is lvl 19 so it, in theory, generates max of 507KW. The power meter in top left shows 507.. and the second one shows 580
![Shocked :shock:](./images/smilies/icon_eek.gif)
top one is right, and the other shows more because I made the buffer twice the size and set the buffer energy to 2*X instead of X. It rly shouldn't matter because max output was and still is = 507.. so rly no idea.. some strange logic.
Just replace files attached and all should work properly...
[edit]
It LOOKS like the top indicator shows how much energy was actually provided to the network while the second one shows how much was "added"/produced inside all generators... am I right ?
It just boggles my mind... some1 pls explain that to me:
So lets say I have a generator producing 50/tick with a buffer of 100 and max output of 50/tick. Each tick I set the power in the buffer to 100.
First indicator shows 50 which seems reasonable, and second shows sth like 55.
That would mean that I 'added'/produced 55, right? sooo.. it was 45, I set it to 100.. producing 55.
But how it could be 45 if I can output MAX 50?! That would mean that in last tick network took 55 from the buffer..
![Shocked :shock:](./images/smilies/icon_eek.gif)
[/edit]
Last edited by Qcor on Tue Jun 16, 2015 2:31 am, edited 1 time in total.
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
Issue solved, the code that needs to be modified is line 432 of the ontick.lua script file.
this works for the default values on the generator, but if you change the output to be higher it may cap back out (i think this will cap out at about 2.6 MW)
*Edit: Confirmed that setting it to 50 caps the generator out at 2.6 MW, which is above the generators default cap(2MW).
Code: Select all
gen[i].accumulator.energy = (64^3) * 50 --originally (64^3) * 5
*Edit: Confirmed that setting it to 50 caps the generator out at 2.6 MW, which is above the generators default cap(2MW).
Last edited by Tim2162286 on Tue Jun 16, 2015 2:44 am, edited 1 time in total.
Re: Cursed Questions
Yeaaa.. I was laughing hard when I saw it.. 64^3 *5... number good as any other I guess. probably left from some earlier version where he had different formula for generatorsTim2162286 wrote:Issue solved, the code that needs to be modified is line 432 of the ontick.lua script file.
this works for the default values on the generator, but if you change the output to be higher it may cap back out (i think this will cap out at about 2.6 MW)Code: Select all
gen[i].accumulator.energy = (64^3) * 50 --originally (64^3) * 5
![Smile :)](./images/smilies/icon_e_smile.gif)
Should be set to buffer_size * 5 in theory but it won't work. First of all 300tick is usually 5sec but not always, and secondly there is that issue which I described earlier.. which applies also here.
So generally ANY big number here will "MOSTLY" fix the problem but it will give wrong readings on one of the power generation meters.
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
no, that number only sets the maximum energy the generator will make, however it is limited to the output, so even putting it up to say (64^4) * 5000 wont affect how it reads in the power grid, it just lets you up the output more before you start getting down time while the buffer needs to charge. if you really want to limit it to exactly 2 MW, change the 50 to 38.5.Qcor wrote: So generally ANY big number here will "MOSTLY" fix the problem but it will give wrong readings on one of the power generation meters.
also i believe this number is watts, not kW, so you have an additional factor of 1000 you need to take into account.Qcor wrote: Yeaaa.. I was laughing hard when I saw it.. 64^3 *5... number good as any other I guess. probably left from some earlier version where he had different formula for generators
Should be set to buffer_size * 5 in theory but it won't work. First of all 300 tick is usually 5sec but not always, and secondly there is that issue which I described earlier.. which applies also here.
Last edited by Tim2162286 on Tue Jun 16, 2015 3:10 am, edited 1 time in total.
Re: Cursed Questions
I think you didn't read my previous post.. the one with files attached.
Try it.. detach all power generators but cursed one and look at stats.. you will see![Smile :)](./images/smilies/icon_e_smile.gif)
Try it.. detach all power generators but cursed one and look at stats.. you will see
![Smile :)](./images/smilies/icon_e_smile.gif)
-
- Burner Inserter
- Posts: 17
- Joined: Mon Jun 15, 2015 2:34 am
- Contact:
Re: Cursed Questions
so, i tried your code and it didn't work at all for some reason, but assuming know other modifications to the generators, replacing the ontick.lua with this version should fix any issues.
it is set to a max of 2 MW, but i added a variable to modify it easier
it is set to a max of 2 MW, but i added a variable to modify it easier
Re: Cursed Questions
hm.. I honestly don't see how it can not work.
Could you be more specific? I just tested it again and it works just fine. Are you sure you overwrote BOTH files?
Also, as a side note, 64^3 *38 might still not be good enough. I suspect it will start fluctuating when near max lvl (64) because of the problem I described earlier. I'll try to test it.. it just bothers me for some reason, not knowing why it does that strange thing.
[edit]
just tested your solution and it looks like the generator is working for ~4sec then idle for ~1sec. Are you sure you didn't modify anything else? hint: like the buffer size for example?
[/edit]
[edit2]
also confirmed that even at 64^3 *38 at lvl 65 is fluctuates again (even with buffer size fixed... which is to be expected as this number is totally pulled from the sky. It should be (in THEORY) = math.floor(0.25 * (generator_rank - 1)^2 + (generator_rank - 1) * 25 + 25) * 1000 * 300` but it practice even that won't be enough due to some strange reason I just can't pinpoint :/
And I just found another bug. As a result the generator at lvl 64 has more max_output than lvl 65. Minor thing, easy fix.Just add " + 1" to if statement in cursed-generator.lua line 31
[edit2]
Could you be more specific? I just tested it again and it works just fine. Are you sure you overwrote BOTH files?
Also, as a side note, 64^3 *38 might still not be good enough. I suspect it will start fluctuating when near max lvl (64) because of the problem I described earlier. I'll try to test it.. it just bothers me for some reason, not knowing why it does that strange thing.
[edit]
just tested your solution and it looks like the generator is working for ~4sec then idle for ~1sec. Are you sure you didn't modify anything else? hint: like the buffer size for example?
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
[/edit]
[edit2]
also confirmed that even at 64^3 *38 at lvl 65 is fluctuates again (even with buffer size fixed... which is to be expected as this number is totally pulled from the sky. It should be (in THEORY) = math.floor(0.25 * (generator_rank - 1)^2 + (generator_rank - 1) * 25 + 25) * 1000 * 300` but it practice even that won't be enough due to some strange reason I just can't pinpoint :/
And I just found another bug. As a result the generator at lvl 64 has more max_output than lvl 65. Minor thing, easy fix.Just add " + 1" to if statement in cursed-generator.lua line 31
Code: Select all
if i == datos.maxgenerator + 1 then
Re: Cursed Questions
OK.. so, final changes:
In ontick.lua:
1) formula changed from some random number (64^3 *5) to what it should actually be:
[edit3] this is still wrong, works but is wrong. I'm still trying to find how to properly set energy value [/edit3]
where
math.floor(0.1 * (gen.rank - 1)^2 + (gen.rank - 1) * 25 + 25) - is the max output of the generator of lvl i, according to cursed-generator.lua
* 1000 - is just conversion from [W] to [KW] because above is in [W]
* 300 - is here because we refill the generator every 300 ticks, so we need max_output* time it has to last
2) added another if statement to cover generator at max lvl (because it has different formula for max output)
This way we generate exactly the amount we should be generating (in both cases).. not just some random number.
In cursed-generator.lua:
1) after inheriting properties of a basic accumulator we also inherit its max input. In our case should be set to 0kW to prevent some strange behaviors in rare cases.
added
2) added " + 1" to if statement to correct the bug. Originally the lvl 64 generator takes this new output formula but lvl 65 should take it, not 64.
3) changed buffer size of generator to prevent strange fluctuations
Why is it 330 and not 300? EXCELLENT question.. god only knows. Should be 300 but then you have some strange behavior which looks like the generator isrunning out of power in the buffer. So basically when you have a buffer of size AA and give it energy amount=AA it goes crazy.. but it buffer size is AA*1.1 it is OK..
so.. no idea why but it works ![Razz :P](./images/smilies/icon_razz.gif)
goes to %appdata%\Factorio\mods\Cursed-Exp_0.4.1\prototypes\entities\ goes to %appdata%\Factorio\mods\Cursed-Exp_0.4.1\scripts\
P.S. Please bare in mind that this is NOT how it should work. It is just a functional workaround.
In ontick.lua:
1) formula changed from some random number (64^3 *5) to what it should actually be:
Code: Select all
gen[i].accumulator.energy = math.floor(0.1 * (gen[i].rank - 1)^2 + (gen[i].rank - 1) * 25 + 25) * 1000 * 300
where
math.floor(0.1 * (gen.rank - 1)^2 + (gen.rank - 1) * 25 + 25) - is the max output of the generator of lvl i, according to cursed-generator.lua
* 1000 - is just conversion from [W] to [KW] because above is in [W]
* 300 - is here because we refill the generator every 300 ticks, so we need max_output* time it has to last
2) added another if statement to cover generator at max lvl (because it has different formula for max output)
Code: Select all
if gen[i].rank == datos.maxGenerator then
gen[i].accumulator.energy = math.floor(0.25 * (gen[i].rank - 1)^2 + (gen[i].rank - 1) * 25 + 25) * 1000 * 300
end
In cursed-generator.lua:
1) after inheriting properties of a basic accumulator we also inherit its max input. In our case should be set to 0kW to prevent some strange behaviors in rare cases.
added
Code: Select all
generator.energy_source.input_flow_limit = "0kW"
Code: Select all
if i == datos.maxgenerator + 1 then
output_flow_limit = math.floor(0.25 * (i - 1)^2 + (i - 1) * 25 + 25)
Code: Select all
generator.energy_source.buffer_capacity = output_flow_limit * 330 .. "kW"
![Shocked :shock:](./images/smilies/icon_eek.gif)
![Razz :P](./images/smilies/icon_razz.gif)
goes to %appdata%\Factorio\mods\Cursed-Exp_0.4.1\prototypes\entities\ goes to %appdata%\Factorio\mods\Cursed-Exp_0.4.1\scripts\
P.S. Please bare in mind that this is NOT how it should work. It is just a functional workaround.
Re: Cursed Questions
haaaa a lot of english! i need a lot of time to read all this, but...
The problem is:
The "production" of generator is limited for output_flow_limit and buffer_capacity is the storage.
Ok, but first, production are watts and the storage are jules (watts/time), basically, you need fill [production * x] every x seconds... technically you must give [output_flow_limit] every second.
64^3 is only a number, you can put 70^5.
I need time to read now![Razz :P](./images/smilies/icon_razz.gif)
The problem is:
The "production" of generator is limited for output_flow_limit and buffer_capacity is the storage.
Ok, but first, production are watts and the storage are jules (watts/time), basically, you need fill [production * x] every x seconds... technically you must give [output_flow_limit] every second.
64^3 is only a number, you can put 70^5.
I need time to read now
![Razz :P](./images/smilies/icon_razz.gif)
Re: Cursed Questions
Sometimes my mines just start losing exp and turn back to lvl1, is this intended or its a bug?
Re: Cursed Questions
1) they loose XP when there is no pollution.
2) they absorb pollution
Click on oxygen button while standing near to mine to make sure there is pollution
2) they absorb pollution
Click on oxygen button while standing near to mine to make sure there is pollution