Jump to content

Xenomorph-Alpha

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Xenomorph-Alpha

  1. 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

  2. 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

  3. 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.

  4. 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.

     

  5. 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
  6. Funny idea, but that would require that there woul be more solar objects in space and not just asteroids ships and stations. I think that would be a huge amount of work. Megastructures are already possible, you can build your things so huge as you want. In gameplay terms ins not making any sense because a station will not produce more if it is larger. I would be thankful if you can build your own gates without a mod, perhaps someday who knows.

    • Like 1
×
×
  • Create New...