8000 bug: towns can get stuck in their expansion without telling the player · Issue #186 · bahrmichael/factorio-tycoon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bug: towns can get stuck in their expansion without telling the player #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bahrmichael opened this issue Oct 20, 2023 · 3 comments · May be fixed by #311
Open

bug: towns can get stuck in their expansion without telling the player #186

bahrmichael opened this issue Oct 20, 2023 · 3 comments · May be fixed by #311
Labels
bug Something isn't working

Comments

@bahrmichael
Copy link
Owner

I built quite a constricted town around the base resources I was given, however there seems to be space to build and that isn’t being used for some reason.
Currency is still spawning so I know that it hasn’t fully stopped working

Screenshot 2023-10-20 at 15 33 47

Can also happen for other reasons, like being locked in between water, cliffs, resources and entities.

@bahrmichael bahrmichael added the bug Something isn't working label Oct 20, 2023
@winex
Copy link
Contributor
winex commented Mar 8, 2024

hmm, i've ran into this issue with one auto-generated town by rbgen right now.

  • it couldn't build treasury itself for some reason (missed that), but i did the save just before the first supply-expansion.
  • few other towns has built treasuries just fine (not tried to supply them, yet)

it has only trees around it - doesn't build steps try to remove them?
scrot 20240308_194709 town_is_stuck half

after checking some code...

bugged town just returns by this:

factorio-tycoon/city.lua

Lines 799 to 803 in 743d716

coordinates = Queue.popleft(city[queueIndex])
if coordinates == nil then
-- If there are no more entries left in the queue, then abort
return false
end

that Queue for that city is empty for some reason? i don't understand that, yet

61091.527 Script @__tycoon__/city.lua:794: attempts: 10                    
61091.527 Script @__tycoon__/city.lua:796: debug A: allowedCoordinates: nil
--- repeats, no point B ---

roadEnds for this town is { first = 6, last = 5 } - might it be because it can't build roads when they're looped like that? it seems that updatepossibleBuildingLocations() is not called from:

local coordinates = City.growAtRandomRoadEnd(city)
if coordinates ~= nil then
City.updatepossibleBuildingLocations(city, coordinates)
end

while...

another town with treasury already-built on the map passes this check and:

61108.551 Script @__tycoon__/city.lua:794: attempts: 10
61108.551 Script @__tycoon__/city.lua:796: debug A: allowedCoordinates: nil
61108.551 Script @__tycoon__/city.lua:808: debug B: coordinates: {x = 2, y = 4}
61180.733 Script @__tycoon__/city.lua:794: attempts: 10
61180.733 Script @__tycoon__/city.lua:796: debug A: allowedCoordinates: nil
61180.733 Script @__tycoon__/city.lua:808: debug B: coordinates: {x = 3, y = 7}
61252.800 Script @__tycoon__/city.lua:794: attempts: 10
61252.800 Script @__tycoon__/city.lua:796: debug A: allowedCoordinates: nil
61252.800 Script @__tycoon__/city.lua:808: debug B: coordinates: {x = 7, y = 6}

...BUT!

the last town doesn't seem to decrease construction materials from HW-store! it's still 100 plates, 100 bricks after 3 houses built -- another little issue -> #273...

@winex
Copy link
Contributor
winex commented Mar 10, 2024

here some debug logs added of big town (5K citizens, started as v0.3.x save!):

2105.633 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 57, y = 22}
2105.633 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 57, y = 10}
2105.633 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 59, y = 49}
2105.633 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 58, y = 33}
2105.634 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 58, y = 46}
2105.634 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 66, y = 34}
2105.634 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 41, y = 13}
2105.634 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 71, y = 56}
2105.634 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 24, y = 27}
2105.634 Script @__tycoon__/city.lua:829: debug B: coordinates: {x = 72, y = 57}
2105.635 Script @__tycoon__/city.lua:895: unable to construct: simple

it just tries 10 times and nothing happens...
hmm, we should revise that code some time later...

winex added a commit to winex/factorio-tycoon that referenced this issue Apr 11, 2024
winex added a commit to winex/factorio-tycoon that referenced this issue Apr 11, 2024
@winex
Copy link
Contributor
winex commented Apr 11, 2024

this part of issue #186 (comment) is probably because city.roadEnds was fully emptied when chunk is not charted. that's when rbgen placed towns in dark areas of map. trying to fix in new PR - one more migration, lol

winex added a commit to winex/factorio-tycoon that referenced this issue Apr 11, 2024
winex added a commit to winex/factorio-tycoon that referenced this issue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3A85
Development

Successfully merging a pull request may close this issue.

2 participants
0