-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix unreachable milestones #207
base: master
Are you sure you want to change the base?
Conversation
And add more (disabled) debug logs
5068248
to
f97f711
Compare
f97f711
to
8eb150f
Compare
I think this PR gets the wrong answer in a few cases. With this change, YAFC decides the natural-gas-extractor-mk0#, oil-derrick-mk0#, and tar-extractor-mk0# entities are accessible. I've never gotten more than a couple hours into a Pyanodon playthrough, but sandbox mode makes me think those entities should be inaccessible. I've pushed an alternative solution, as #209. Would you check and see if that PR has any problems I've missed, please? |
Thanks for checking this out. I am also reasonable new (50-ish hours) to pyanodon (especially since I run into issues with YAFC that need fixing for me to continue 😛 ) But when I check the research tree (in-game) and search for 'derrick', it shows that the 'Small oid derrick' is unlocked with the 'Drilling fluid - Stage 1' technology. The others you mention are part of the same technology as well. In order to figure out this PR, I followed the dependencies of the unavailable science(s), and saw that 'numal' was not available ,because of its 'artificial reef' were unavailable. (also having those magic placers you mention in #209). I found that some of the optional dependencies (lists) were empty, causing not dependencies being available resulting in YAFC deciding the object is not available. Which is wrong IMO, as an empty dependency list would mean there are no dependencies to require the object..! Note that the objects you mention and the numal-reef-mk0# are all in the pypostprocessing mod (/pypostprocessing_0.2.4/prototypes/config.lua). So maybe due to some magic there, YAFC doesn't handle them properly? I could not really find the cause of the empty optional dependencies though. So this PR is more of a workaround. Then I found 'empty lists' were used for some 'magic', hence the updates of this PR and adding exceptions for those flags... I am on the fence when choosing between #209 or this PR:
|
DependenciesMy interpretation of "empty dependency list", in the context of the current numal-reef problems, is "You must have access to at least one of these zero items in order to build a Numal Reef." Technically, but also uselessly, this is correct. Searching for I decided that the placers were just behind the scenes magic based partly on [entity-description]
numal-reef-mk01-placer=Please if you're reading this you have to send help they're going to find me I'm not sure how long I have and partly based on the code in PyAE's control.lua, starting at line 68. But I didn't notice the placer items in pypostprocessing, and now I don't like my solution as much. I don't want to go back to the version that explicitly listed the eight placers, but I don't want to break trainfactory either. AccessibilityI had to turn on the show-debug-info-in-tooltips options to make sure I knew what I was seeing in-game, and to correctly compare things to YAFC. (And, spoiler alert, learned I was wrong and #209 is definitely incomplete.) I updated command-line example to load mods and print out the inaccessible items: File.WriteAllLines("inaccessible.207.txt", Database.objects.all.Where(o => !o.IsAccessible()).Select(o => o.typeDotName).OrderBy(a => a)); And I got this list of objects that are accessible in #207 but not in #209--- inaccessible.207.txt 2023-02-18 18:42:57.862503200 -0500
+++ inaccessible.209.txt 2023-02-18 18:42:19.661592700 -0500
+Entity.bitumen-seep-mk01-base
+Entity.bitumen-seep-mk02-base
+Entity.bitumen-seep-mk03-base
+Entity.bitumen-seep-mk04-base
+Entity.ee-infinity-accumulator-primary-input
+Entity.ee-infinity-accumulator-primary-output
+Entity.ee-infinity-accumulator-secondary-input
+Entity.ee-infinity-accumulator-secondary-output
+Entity.ee-infinity-accumulator-tertiary-buffer
+Entity.ee-infinity-accumulator-tertiary-input
+Entity.ee-infinity-accumulator-tertiary-output
+Entity.ee-infinity-loader-inserter
+Entity.hawt-turbine-mk01-blank
+Entity.hawt-turbine-mk02-blank
+Entity.hawt-turbine-mk03-blank
+Entity.hawt-turbine-mk04-blank
+Entity.hidden-electric-energy-interface
+Entity.multiblade-turbine-mk01-blank
+Entity.multiblade-turbine-mk03-blank
+Entity.natural-gas-extractor-mk01
+Entity.natural-gas-extractor-mk02
+Entity.natural-gas-extractor-mk03
+Entity.natural-gas-extractor-mk04
+Entity.natural-gas-seep-mk01-base
+Entity.neutron-absorber-mk01
+Entity.oil-derrick-mk01
+Entity.oil-derrick-mk02
+Entity.oil-derrick-mk03
+Entity.oil-derrick-mk04
+Entity.pydrive_skin
+Entity.solar-tower-building
+Entity.tar-extractor-mk01
+Entity.tar-extractor-mk02
+Entity.tar-extractor-mk03
+Entity.tar-extractor-mk04
+Entity.tar-seep-mk01-base
+Item.ee-infinity-accumulator
+Mechanics.boiler.solar-tower-building.hot-molten-salt
+Mechanics.mining.ore-nexelit.ore-nexelit
+Recipe.ee-infinity-accumulator-pyvoid Some are better in 209: The Editor Extensions infinity accumulator should not be accessible. (On the one hand, Pyanodon is why I have YAFC in the first place. But on the other hand, Augh!) |
I have been looking for issues with creating natural gas, but it all seems to be there:
Crude oil can be mined as well ( I cannot seem to find raw oil, but this is vanilla Factorio, so I guess it is removed by the mod suite?
Same here 😃 The mod-suite is very complex (both in using and code-wise), and YAFC seems to be the only one capable of handling it! But now we have the |
When I create a new project with the (full) Pyanodon mods, I get the error that "Py science pack 4", "Utility science pack" and "Space science pack" are not accessible.
As far as I can see, this is not the correct behavior for the mod-suite and the 3 milestones are reachable in-game doing research.
After adding debug info (see commit d2d8949) and some analysis, I found that quite a lot (group) dependency lists are empty:
The cause I do not know, as I do not fully understand the 'parser code', so my solution (work-around I guess) is to not add the empty groups in the dependency collector.
Now a new project is created fine, and the added (default) milestones are all reachable, and so are lots of elements that were not reachable before (in my actual, non-empty project)