Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

2.0 Station losing cargo space


RoseStarlight
 Share

Recommended Posts

My station are running out of cargo space despite having cargo space. For example, i'll build a station with a maximum of 30k cargo, and over time it will slowly decrease over a few hours despite it still saying 30k max cargo. Eventually the stations stop functioning because it thinks there isnt any cargo space left even if the station is completely empty.

If i replace the cargo holds, or reinstall cargo hold modules, it will temporarily fix the issue.

Does anyone know whats causing this issue and if i can fix it? I'd rather not reset *all* of my stations hold every 2 hours.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hey,

Have this bug too, wrote at the start of 2.0 beta branch a bug report detailed, how this bug can be reproduced and also with screenshot what is happening (also with code examples). I really do not know if they are still working on the issue or can not reproduce it.

At the moment of 2.0.7 i have still this bug (no mods, clean world, clean installation with clean %appdata%/avorion folder, and can not fix that myself. Easiest way is to restart the server. The captian command "supply factories" is causing the bug. If he delivered goods to the destinantion the origin station losing free cargo space somehow. Has to be something with the sector simulation i think.  So in short, no. you have to restart the server or not use the supply factories command. 

  • Like 1
Link to comment
Share on other sites

  • 8 months later...

Hey there,

have the same Bug and also did a bug report last year, but since then no news whatsoever on that topic.

I also found out restarting the local game or in my case the SERVER!!! works until it is magically full again.

It's really frustrating not to know if it will be fixed. Me and my friends totally stopped playing the game for that reason.

I also spent a lot of time trying to fix that issue, it was extremely annoying.

After spending a lot of time with factories, they feel super capped altogether, which is a shame, because I read it was different in the past.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

was looking here in the forum if this bug was resolved. Seems not, so i will not play the game further. Cause i really like the "build a empire stuff".  It is sad that there is no response to this bug, and if need i would dig into the code too help. But as i wrote last year. It seems to be a bug in the core game.

It seems also that focus is not on stations at this point and it could be that only a minority of players are getting problems with this behaviour.

 

Orillien seems to have the same bug.

 

Link to comment
Share on other sites

  • Boxelware Team

We cannot reproduce the issue and hence cannot fix it. Can you provide the exact station plan xml and what kind of factory it is? Is this limited to a specific factory? Does the issue occur if you stay in the same sector and idle or is it for a factory that's in another sector than you? 

Edit: what cargo is on the station, (before and after the issue occurs), can you provide a screenshot maybe? 

  • Like 1
Link to comment
Share on other sites

13 hours ago, koonschi said:

We cannot reproduce the issue and hence cannot fix it. Can you provide the exact station plan xml and what kind of factory it is? Is this limited to a specific factory? Does the issue occur if you stay in the same sector and idle or is it for a factory that's in another sector than you? 

Edit: what cargo is on the station, (before and after the issue occurs), can you provide a screenshot maybe? 

Thank you for your response. I will dig into it. I will send this afternoon the screenshots i made with some explanation how.

I only have time on tuesday to reproduce the error. I can if it help say you also then which variable (i mean it was just a getter which was from core) is doing this problem.

Link to comment
Share on other sites

So as  i said in earlier posts in only happens with the use of the "supply factories" command.

 

In this example i used the water collector and the ressource water.

for reproducing:

 

Build Station A in one Sector

Build Station B in another Sector

Create Supply Line between those booth. (with the command!)

After goods getting transfered. The goods getting substracted from the provider station and the reciever station getting theses added ( i getting this bug if i am in the sector, and if i am not in the sector).

But like you can see in the pictures below (i added som print debug code to see what is in the variables)

the free cargo space variable is not getting recalculated somehow. so if the station is loosing with the time and the command cargo. the free cargo variable is getting messed up. So that even he is loosing more cargo he thinks he has no cargo left anymore.

If you add cargo to it, it will work, but will stuck in some time again. 

To reproduce it is ideal to use a station with very less cargo, so the bug happens fast.

I think it was the sector simulation.lua where it happens. But for more i can only check tomorrow sorry. (for the exact variables and the file where it happens, and where the point he is messing with the calculation) But for sure i know that he is getting the Free Cargo space from the core game as a (was a getter) so i was not able to fix it for myself to make the caluclation.

i hope this is helping. Tomorrow more if needed.

 

 

20210817202851_1.thumb.jpg.65de9a64c80f2a78eb97f2e08fb384ca.jpg20210817202834_1.thumb.jpg.12d32a596873df5511e325aa8cccb660.jpg20210817202038_1.thumb.jpg.b35ab19e021ba5249deb26b12247a4d5.jpg20210814172957_1.thumb.jpg.8ca9bb9c3a37bb2049715f9844923e9b.jpg20210814112057_1.thumb.jpg.3011543784753698351c4642e6f4f3f1.jpg20210814111431_1.thumb.jpg.4037882afc9e2c377dc0db8facf07d26.jpg

Link to comment
Share on other sites

  • Boxelware Team

Thank you for your effort!

We still couldn't reproduce the bug. It would therefore be very helpful if you could share more information about the variables you mentioned and where you found them exactly.

  • Like 1
Link to comment
Share on other sites

  • Boxelware Team

Factories reserve a portion of their cargo hold for each ingredient/product they need/produce, to ensure that they can't block their own cargo space with, say, only products. Have you checked that your factories aren't running into that limit? You can see that maximum per good on the Sell/Buy tabs of your factory, when you interact as if you wanted to buy or sell stuff. It would be particularly helpful if you could provide us with a screenshot of those tabs of the factory. 

Also, where did you get your "station free cargo" output? I'd need the exact line of code and where you put it.

  • Like 1
Link to comment
Share on other sites

Thank you for your answer!

 

So as i promised with a little more info.

I cleaned my folders, reinstalled the game. (and for sure no mods)

Created a new sandbox game.

Set up a water collector in sector A and a FishFarm in Sector B. That set up a supply factory command with a captian.

I could reproduce the bug, because i let the watercollector run full to max storage and then after the first supply run i saw the bug again.

 

Down here the pictures with new prints:

In the first four pictures you see how the cargo space is running slowly full with water you can see what the max cargo count is how much the resulting amount is gonna be, the new amount an the free cargo space left in the cargo.

All numbers are change as expected.

In the fift picture you can see that the simulation of the command is finished. The Cargo bar is also changing as expected. But the numbers stay the same.

Of course the new amount is not so much anymore cause that he has not so many water in his cargo anymore. But the max stock stays the same. And also the free cargo space stays the same. So he thinks he is full. 

 

If a trader is buying water, it recalculates correctly. If I dump cargo or build new modules on it, i solve it for a time but he will never will completely up.

If i restart the game, an so the server (singleplayer) it recalculates everything correct until the next command is getting fullfilled.

 

I checking the variable in the factory.lua in the Factory.update Production(timeStep)

i filtered my station with a simple if condition on the name and printed following variables out.

Factory.getMaxStock({name = result.name, size = size})
newAmount)
 result.amount * size
canProduce
station.freeCargoSpace

 

3 hours ago, koonschi said:

Factories reserve a portion of their cargo hold for each ingredient/product they need/produce, to ensure that they can't block their own cargo space with, say, only products. Have you checked that your factories aren't running into that limit? You can see that maximum per good on the Sell/Buy tabs of your factory, when you interact as if you wanted to buy or sell stuff. It would be particularly helpful if you could provide us with a screenshot of those tabs of the factory. 

Also, where did you get your "station free cargo" output? I'd need the exact line of code and where you put it.

Sorry i really do not know what you mean with the Sell/Buy Tab of my factory. The last picture is from the tab which i think you mean.

I hope i can help you with this information

 

 

here the code of the function and on the end my simpe print commands. Thank you for your effort!

function Factory.updateProduction(timeStep)
    -- if the result isn't there yet, don't produce
    if not production then return end
 
    -- if not yet fully used, start producing
    local numProductions = tablelength(currentProductions)
    local canProduce = true
 
    if numProductions >= Factory.maxNumProductions then
        canProduce = false
        -- print("can't produce as there are no more slots free for production")
    end
 
    if MinimumPopulation and not MinimumPopulation.isFulfilled() then
        canProduce = false
        -- print("can't produce as min pop isn't fulfilled")
    end
 
    -- only start if there are actually enough ingredients for producing
    for i, ingredient in pairs(production.ingredients) do
        if ingredient.optional == 0 and Factory.getNumGoods(ingredient.name) < ingredient.amount then
            canProduce = false
            newProductionError = "Factory can't produce because ingredients are missing!"%_T
            -- print("can't produce due to missing ingredients: " .. ingredient.amount .. " " .. ingredient.name .. ", have: " .. Factory.getNumGoods(ingredient.name))
            break
        end
    end
 
    local station = Entity()
    for i, garbage in pairs(production.garbages) do
        local newAmount = Factory.getNumGoods(garbage.name) + garbage.amount
        local size = Factory.getGoodSize(garbage.name)
 
        if newAmount > Factory.getMaxStock({name = garbage.name, size = size}) or station.freeCargoSpace < garbage.amount * size then
            canProduce = false
            newProductionError = "Factory can't produce because there is not enough cargo space for products!"%_T
            -- print("can't produce due to missing room for garbage")
            break
        end
    end
 
    for _, result in pairs(production.results) do
        local newAmount = Factory.getNumGoods(result.name) + result.amount
        local size = Factory.getGoodSize(result.name)
 
        if newAmount > Factory.getMaxStock({name = result.name, size = size}) or station.freeCargoSpace < result.amount * size then
            canProduce = false
            newProductionError = "Factory can't produce because there is not enough cargo space for products!"%_T
            -- print("can't produce due to missing room for result")
            if station.name == "WaterStation 1" then
                print("Name: " .. station.name)
                print("FactoryMaxStock: " .. Factory.getMaxStock({name = result.name, size = size}))
                print("NewAmount: " .. newAmount)
                print("Resulting Amount:" .. result.amount * size)
                print("Can Produce?: " .. tostring(canProduce))
                print("freeCargoSpace: " .. station.freeCargoSpace)
            end
            break
        end
        if station.name == "WaterStation 1" then
            print("Name: " .. station.name)
            print("FactoryMaxStock: " .. Factory.getMaxStock({name = result.name, size = size}))
            print("NewAmount: " .. newAmount)
            print("Resulting Amount:" .. result.amount * size)
            print("Can Produce?: " .. tostring(canProduce))
            print("freeCargoSpace: " .. station.freeCargoSpace)
        end
    end

 

image.thumb.jpeg.87f84dd165184c5053005d749384c75d.jpeg

image.thumb.jpeg.01a753594a90c1147e379dec22ceca9a.jpeg

image.thumb.jpeg.603c252d123ec46d5c971daa4cdb3fef.jpeg

image.thumb.jpeg.b4a64180fec06067d0462b906feca132.jpeg

image.thumb.jpeg.2cfb6d714772a909f042d3f30933804a.jpeg

image.thumb.jpeg.80cdb20ba2fcdcda3f2d09a2428eb989.jpeg

Edited by Xenomorph-Alpha
Link to comment
Share on other sites

I didn't know there is something going on on this topic and made a video yesterday randomly to maybe illustrate it much better. maybe it helps in addition to your work here. excuse the bad English and the AC in the back, its 30 degrees at night right now.

Take a look at the production bars of the factory when the module is removed

I never had any mods installed and also had this happen in another singleplayer game

Edited by IcyFireDeluxe
no mods info
  • Like 1
Link to comment
Share on other sites

55 minutes ago, Xenomorph-Alpha said:

cool thanks for the video. You are also getting that problem only with the AI ships which use the supply factories command?

Yeah restarting and dump stuff helps. Was also thinking about doing a video.

yeah exactly, must have something to do with AI ships. In a steam discussion which got deleted I think I said I was trying to get it to work almost 14 hours ... thinking I did something wrong until I saw the discussions. Then some months later I found this post.

Sadly I stopped playing the game back then and only check in every other patch to see if it is fixed.

  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...
  • 11 months later...

Hello. 
I just founded my first station and have ran into the same exact issue as all the other people on this thread. Cargo for a station is 50% full but still is unable to produce goods due to no cargo space. First when I ran into this bug I tried to expand my cargo capacity to fix this which made it work for a short time but minutes later I still ran into the "no cargo space availalbe" message and production seized.

I do kind of recognize this issue from games like factorio when you are producing oil. In the game it's referred to heavy oil processing where your machines produce three different products in bulk at the same time and then one of the products reaching it's storage limit and ceasing the entier production line. And the way to fix this in factorio is to either flush out the product that has filled up storage by removing it or expanding storage all together or expanding a production that is using that one production that has filled up storage. 

I'm not a developer or coder and I don't know how the games code work or anything but from my experience I do assume it might be the same kind of issue? 
I founded a fish farm and just as in factorio it produces three products in bulk in this case it's Fish, Bio gas and Plankton. I know that the big white bar on the hub signifies the total storage for the entire ship/ station but if you go into the trade menu when interacting with a ship/station. On the buy/sell menu all the different products/items have their own limits for example Fish X/300. What I noticed was that one out of my three products had gone over it's storage limit. (in this case it was plankton) So I removed all of the plankton from the station and production started again. So my guess is that the game is coded that in stations and factories produce items in bulk and not individually. As I said before I'm not a developer I don't know how to code or anything. But my idea of a solution would be to produce products indivually and treat them as individual products in their own production line and not as multiple products in one single production line.

Because what happens now is that I'm producing crazy ammount of Plankton and non of it is being sold thus reaching it's limit compaired to my fish that is being sold like crazy, and that is how the issue kind of happends, atleast for me.

Anyways I hope this helped, you are free to correct me if I'm wrong.

Edited by Forumman
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...