Pymods compatibility Mod

pyanodon's mods are here

Moderator: pyanodon

User avatar
pyanodon
Smart Inserter
Smart Inserter
Posts: 1909
Joined: Wed Apr 20, 2016 4:42 pm
Contact:

Re: Pymods compatibility Mod

Post by pyanodon »

Sticked it because itΒ΄s important.
pY Coal processing mod
Discord: Pyanodon #5791

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

new update today. finally re-enabled the pymods difficultly adjuster setting and fixed all issues with that code. tested with plain py, and abpy. no errors. you can now adjust values as high as 50x normal values.

Chatastroph
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Oct 24, 2016 9:10 pm
Contact:

Re: Pymods compatibility Mod

Post by Chatastroph »

Your last update seems to broke something with SpaceX integration. I get an error at following line: "updates/SpaceX.lua:343: attempt to index field 'results' (a nil value)
damn those nullpointer exceptions :(

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

Chatastroph wrote: ↑
Sat Oct 27, 2018 2:12 pm
Your last update seems to broke something with SpaceX integration. I get an error at following line: "updates/SpaceX.lua:343: attempt to index field 'results' (a nil value)
damn those nullpointer exceptions :(
Can I get a list of mods your using.

Chatastroph
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Oct 24, 2016 9:10 pm
Contact:

Re: Pymods compatibility Mod

Post by Chatastroph »

kingarthur wrote: ↑
Sat Oct 27, 2018 10:04 pm
Can I get a list of mods your using.
here my list (Output from ls command and removed deactivated mods)

Code: Select all

Bio_Industries_2.6.12.zip
EvoGUI_0.4.302.zip
Laser_Beam_Turrets_0.2.0.zip
LightedPolesPlus_1.2.0.zip
LoaderRedux_1.3.1.zip
LogisticTrainNetwork_1.9.3.zip
Nuclear Fuel_0.1.3.zip
PyCoalTBaA_0.0.27.zip
ShinyAngelGFX_0.16.8.zip
ShinyBobGFX_0.16.21.zip
ShinyIcons_0.16.20.zip
SpaceMod_0.3.12.zip
Squeak Through_1.2.2.zip
StoneWaterWell_1.0.8.zip
TheFatController_3.0.4.zip
YARM_0.7.308.zip
angelsaddons-oresilos_0.4.0.zip
angelsaddons-petrotrain_0.3.3.zip
angelsaddons-pressuretanks_0.3.0.zip
angelsaddons-warehouses_0.3.0.zip
angelsbioprocessing_0.5.9.zip
angelsindustries_0.1.0.zip
angelsinfiniteores_0.7.3.zip
angelspetrochem_0.7.12.zip
angelsrefining_0.9.14.zip
angelssmelting_0.4.6.zip
auto-research_4.3.0.zip
bobassembly_0.16.1.zip
bobclasses_0.16.2.zip
bobelectronics_0.16.0.zip
bobenemies_0.16.0.zip
bobgreenhouse_0.16.0.zip
boblibrary_0.16.6.zip
boblogistics_0.16.23.zip
bobmining_0.16.0.zip
bobmodules_0.16.0.zip
bobores_0.16.2.zip
bobplates_0.16.5.zip
bobpower_0.16.8.zip
bobrevamp_0.16.3.zip
bobtech_0.16.6.zip
bobvehicleequipment_0.16.2.zip
bobwarfare_0.16.7.zip
botReplacer_0.16.0.zip
helmod_0.7.11.zip
long-reach_0.0.12.zip
omnilib_2.0.44.zip
omnimatter_2.0.26.zip
omnimatter_crystal_2.0.7.zip
omnimatter_move_0.1.0.zip
op_train_speed_1.0.9.zip
pycoalprocessing_1.0.10.zip
pyfusionenergy_1.0.7.zip
pyhightech_1.0.9.zip
pyindustry_1.0.10.zip
rso-mod_3.8.1.zip
upgrade-planner_1.5.3.zip
what-is-it-really-used-for_1.3.4.zip

Chatastroph
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Oct 24, 2016 9:10 pm
Contact:

Re: Pymods compatibility Mod

Post by Chatastroph »

Assuming "if data.raw.recipe[recipe_name].results then" is the same like "if data.raw.recipe[recipe_name].results != nil then", then it's pretty obvious that this line crashes. The same with line 280. Also the var k in these both blocks seems to be from the loop in the first branch. I assume you make an copy past error. Also line 288 - 294 will never be called because it's the same condition from the first block.
I hope this helps.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

Chatastroph wrote: ↑
Sat Oct 27, 2018 10:49 pm
Assuming "if data.raw.recipe[recipe_name].results then" is the same like "if data.raw.recipe[recipe_name].results != nil then", then it's pretty obvious that this line crashes. The same with line 280.
recipes should have some type of result is not so much checking if it exist but what type is it. given that the error is at the very last group it some how doesn't have any of those types or is empty

Also the var k in these both blocks seems to be from the loop in the first branch. I assume you make an copy past error.
the var k is from the first for loop and is intentionally used as a short cut to typing out result into each bracket pair and was slightly easier to remember where it was from. k is = to the name of a given result as it loops thru each recipes results and change the data i need to lookup the original information and look it up. given that each recipe can have between 1 and many items looking them up by name was the easiest way for me to get each one.

for example the recipe for electric engines in vanilla only gives out an electric engine, while the oil processing recipe gives three different items.
Also line 288 - 294 will never be called because it's the same condition from the first block.
I hope this helps.
actually lines 288-294 do get called. there is a difference. the first block is looking for results as a table. that second set looks for result and its just a txt string for the item name and gets result count for the amount.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

kingarthur wrote: ↑
Sun Oct 28, 2018 12:41 am
Chatastroph wrote: ↑
Sat Oct 27, 2018 10:49 pm
Also the var k in these both blocks seems to be from the loop in the first branch. I assume you make an copy past error.
the var k is from the first for loop and is intentionally used as a short cut to typing out result into each bracket pair and was slightly easier to remember where it was from. k is = to the name of a given result as it loops thru each recipes results and change the data i need to lookup the original information and look it up. given that each recipe can have between 1 and many items looking them up by name was the easiest way for me to get each one.

for example the recipe for electric engines in vanilla only gives out an electric engine, while the oil processing recipe gives three different items.
actually looking at it now your correct that first for loop is inside the if statement and the var k shouldn't be carried father. and yet it seems to be working anyway. i need to look to that some more

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

Chatastroph wrote: ↑
Sat Oct 27, 2018 2:12 pm
Your last update seems to broke something with SpaceX integration. I get an error at following line: "updates/SpaceX.lua:343: attempt to index field 'results' (a nil value)
damn those nullpointer exceptions :(
try this version. i made a tweak that might fix it and added some error logging. if it doesnt fix it please send me your factorio log and i can see what is breaking it
Attachments
PyCoalTBaA_0.0.28.zip
spacex error "fix"
(69.29 KiB) Downloaded 169 times

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

Chatastroph wrote: ↑
Sat Oct 27, 2018 2:12 pm
Your last update seems to broke something with SpaceX integration. I get an error at following line: "updates/SpaceX.lua:343: attempt to index field 'results' (a nil value)
damn those nullpointer exceptions :(
should be fixed now. pushed an update onto the mod portal

Chatastroph
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Oct 24, 2016 9:10 pm
Contact:

Re: Pymods compatibility Mod

Post by Chatastroph »

kingarthur wrote: ↑
Sun Oct 28, 2018 6:29 am
should be fixed now. pushed an update onto the mod portal
Yep it's working now.
But I'm still not convinced that it works like it should. It just doesn't crash anymore.
According to the Lua documentation the loop variables are only local variables, so the "k" variable outside is undefined or something. And even if it would keep the value, it would be a value from a previous recipe and not the current.
But i don't want to botch any deeper in your code from a language i have maybe accumulated 2 hours experience. Unless you want me to botch deeper in. I just hope, you still know in a month what you wrote there. That is allways my problem if i leave code in a hacky way.

I see now my error with the result and the results. So yeah that third branch can be called. These two are destined for fleeting mistakes...

Thanks for your work and enjoy

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

Chatastroph wrote: ↑
Sun Oct 28, 2018 7:47 am
kingarthur wrote: ↑
Sun Oct 28, 2018 6:29 am
should be fixed now. pushed an update onto the mod portal
Yep it's working now.
But I'm still not convinced that it works like it should. It just doesn't crash anymore.
According to the Lua documentation the loop variables are only local variables, so the "k" variable outside is undefined or something. And even if it would keep the value, it would be a value from a previous recipe and not the current.
But i don't want to botch any deeper in your code from a language i have maybe accumulated 2 hours experience. I just hope, you still know in a month what you wrote there. That is allways my problem if i leave code in a hacky way.

I see now my error with the result and the results. So yeah that third branch can be called. These two are destined for fleeting mistakes...

Thanks for your work and enjoy
ya there is results, result, main_product, expensive results, and normal results. is kind of a pain.

so i did some digging and with just the pymods and pycoaltbaa. the script is called 850 times. 849 are the for loop and 1 time to result statement. i added in the base game tank recipe that has normal and expensive results and it breaks. so its not correct i just somehow got lucky and between pycoal, pyfusion, pyhightech, and pyindustries a single recipe used a different choice from the for loop

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

just wanted to let everybody know im working on bobs compatibility for pymods. after speaking with pyanodon ive decided that instead of re-adding bobs compatibility to pymods ill be transferring it to pycoaltbaa. ill get a the first of probably several updates out ether Friday or Saturday.

the first update will be a quick patch mostly reusing the previous work for the full bobs suit. after that im going to rebuild everything to properly allow usage of the different mods from the bobs set without needing the full suit.

i apologize for the delay this will cause in getting py+bobs working again.

after i get that done ill be reworking py+angel to take advantage of all the new stuff added pyro + the rest of the updates

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

0.0.33 out that adds bob compatibility support. please report any issues you find

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

new update out. i removed the duplicated electronic circuit recipe. fixed an error with aaii-sp0 trying to use angels subgroup without it loaded. removed the sci 1 pack from the electric-miner 1 tech so tin can be mined. fixed the issue with the vacuum tube being called a valve with bob mods installed. also removed invar from the advanced foundry as invar is in sci 2 techs and you need the foundry to make sci 2. also merged the pyro and angels smelting molten metals.

please let me know if you find any issues as i accidentally overwrote the newest fixes with some stuff i had done on my laptop. im pretty sure i redid it all but its easy to miss a thing here or there.

Ultimoos
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri May 02, 2014 8:48 am
Contact:

Re: Pymods compatibility Mod

Post by Ultimoos »

Newest build will not work with AngelPetrochem.
There is no "compressor" object in liquid nitrogen recipe.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Pymods compatibility Mod

Post by kingarthur »

Ultimoos wrote: ↑
Tue Jan 01, 2019 5:05 pm
Newest build will not work with AngelPetrochem.
There is no "compressor" object in liquid nitrogen recipe.
i just check and for me the liquid nitrogen recipe shows up under advanced electronics and the compressor building is unlocked at the same time.

can i get a mod list or save file to check it

Ultimoos
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri May 02, 2014 8:48 am
Contact:

Re: Pymods compatibility Mod

Post by Ultimoos »

All latest versions. Plus of course your compatibility mod.
For some reason PYcoalprocessing is not on mod list json.

"name": "base",
"name": "FARL",
"name": "PickerExtended",
"name": "StickyNotes",
"name": "what-is-it-really-used-for",
"name": "what_is_it_used_for_15",
"name": "AutoDeconstruct",
"name": "AutoTrash",
"name": "bobenemies",
"name": "bobinserters",
"name": "boblibrary",
"name": "Bottleneck",
"name": "bullet-trails",
"name": "BurnerLeech",
"name": "crafting_combinator",
"name": "Crafting_Speed_Research",
"name": "data-raw-prototypes",
"name": "Expanded_Robot_Tech",
"name": "Loader-Rotation-Fix",
"name": "Nanobots",
"name": "SmarterBotRecharge",
"name": "Squeak Through",
"name": "textplates",
"name": "upgrade-planner",
"name": "VehicleSnap",
"name": "Warehousing",
"name": "water-fix",
"name": "alien-biomes",
"name": "bobores",
"name": "bobtech",
"name": "bobvehicleequipment",
"name": "BottleneckLogistics",
"name": "bobplates",
"name": "rso-mod",
"name": "angelsrefining",
"name": "bobassembly",
"name": "bobelectronics",
"name": "bobgreenhouse",
"name": "boblogistics",
"name": "bobmining",
"name": "bobpower",
"name": "bobrevamp",
"name": "angelspetrochem",
"name": "bobmodules",
"name": "bobwarfare",
"name": "LoaderRedux",
"name": "longer-belts-redux",
"name": "angelsinfiniteores",
"name": "angelssmelting",
"name": "bobmods_gfxtweak",
"name": "Laser_Beam_Turrets",
"name": "omnimatter",
"name": "GDIW",
"name": "GDIWHotkey",

Ultimoos
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri May 02, 2014 8:48 am
Contact:

Re: Pymods compatibility Mod

Post by Ultimoos »

https://www.dropbox.com/s/wsock5k739tym ... 8.png?dl=0
I turned off all mods except for Bob's and Angel's modules.

ShadowGlass
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Sat Aug 27, 2016 1:50 pm
Contact:

Re: Pymods compatibility Mod

Post by ShadowGlass »

Found a bug:
2019-01-12_1832.png
2019-01-12_1832.png (19.97 KiB) Viewed 7130 times

I don't have Bob-ores enabled. I think the error is in overrides-Fusion.lua:

Near the top, you have this:

Code: Select all

if mods["bobores"] then

		--replace result
		remove_result("cobalt-solvent", "ash")
		add_result("cobalt-solvent", {type = "item", name = "cobalt-ore", amount = 5})
...
end
But further down around line 87 you have it repeated without the condition:

Code: Select all

remove_result("cobalt-solvent", "ash")
add_result("cobalt-solvent", {type = "item", name = "cobalt-ore", amount = 5})
The other stuff in that first condition block ("calcinate-separation" changes) is also repeated further down without condition.

Post Reply

Return to β€œPyMods”