ClaustOrephobic

by Braxbro

A purely data-stage implementation of dangOreous-esque gameplay that supports map preview and (most) mods.

Scenarios
3 months ago
1.1
1.11K
Environment

g conflict with BZlead (Lead by brevven)

1 year, 1 month ago

im not sure if this is a "how they do it" issue, or something elts, but this is the error im getting

error is --zzz-claustorephobic--/data-final-fixes.lua181: attempt to perform arithmetic on field 'additional_richness' (a string value)
--zzz-claustorephobic--/data-final-fixes.lua181: in main chunk

link to conflicting mod as that might help with finding it for the conflict list or testing: https://mods.factorio.com/mod/bzlead

1 year, 1 month ago
(updated 1 year, 1 month ago)

i forgot to add im on latest stable, and have latest of both mods involved.

edit: this should have been under bugs, but this is my first post and i dont think i can move it

1 year, 1 month ago
(updated 1 year, 1 month ago)

i forgot to add im on latest stable, and have latest of both mods involved.

edit: this should have been under bugs, but this is my first post and i dont think i can move it

Do you have a log file? If so, send me the snippet starting with "ClaustOrephobic scraping ore autoplaces." and ending with "Autoplace dump complete.".

My guess is that BZ is tampering with things and my parser can't find stuff. You should see "Could not find source..." or something to that effect in the log if that's the case.

1 year, 1 month ago

where do i find logs?

1 year, 1 month ago
(updated 1 year, 1 month ago)

Depends on your OS. On windows, it should be %appdata%/Factorio/factorio-current.log after loading the game.

https://wiki.factorio.com/Application_directory

The wiki has guides for other OSes. Should still be a text file called factorio-current.log. factorio-previous.log is the log from the previous time you loaded the game, and logs after that are purged.

1 year, 1 month ago

Did some testing. This is indeed on BZLead’s end. They tamper with the richness expression of their resources and my mod doesn’t like that. I’ll make my error handling more robust and look into possibly being able to parse expressions that have been modified after being generated by core/lualib/resource-autoplace.lua, but no promises on a fix for these types of incompatibilities.

1 year, 1 month ago
(updated 1 year, 1 month ago)

Alright. While looking through what BZLead is doing, it's actually possible for my mod to parse this. They're wrapping a recognizable expression in their own stuff, which I can actually detect and handle. I've got the actual noise expression stuff working right now in 1.1.1, but I'd like to support replacing the resource-autoplace.lua result in-place, rather than completely overwriting the expression, if possible.

1 year, 1 month ago
(updated 1 year, 1 month ago)

log for this issue:
0.001 2023-09-27 22:20:05; Factorio 1.1.91 (build 61680, win64, steam)
0.001 Operating system: Windows 11 (build 22621)
0.000 Initializing Steam API.
0.002 Program arguments: "D:\SteamLibrary\steamapps\common\Factorio\bin\x64\Factorio.exe" "--wait-to-close" "18696"
0.002 Config path: C:/Users/username/AppData/Roaming/Factorio/config/config.ini
0.002 Read data path: D:/SteamLibrary/steamapps/common/Factorio/data
0.002 Write data path: C:/Users/username/AppData/Roaming/Factorio [81130/243048MB]
0.002 Binaries path: D:/SteamLibrary/steamapps/common/Factorio/bin
0.015 System info: [CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 12 cores, RAM: 11602/16221 MB, page: 16505/27997 MB, virtual: 4347/134217727 MB, extended virtual: 0 MB]
0.044 Memory info:
0.044 [0]: Kingston ACR26D4S9S8HJ-8 8192 MB 2667 MHz 1.2 v
0.044 [1]: Kingston ACR26D4S9S8HJ-8 8192 MB 2667 MHz 1.2 v
0.045 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
0.186 Video driver: windows
0.187 Available displays: 1
0.187 [0]: \.\DISPLAY1 - Intel(R) UHD Graphics 630 {0x05, [0,0], 1920x1080, 32bit, 144Hz}
0.423 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
0.915 Initialised Direct3D[0]: NVIDIA GeForce RTX 2060; id: 10de-1f15; driver: nvldumdx.dll 31.0.15.3713
0.915 D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
0.915 [Local Video Memory] Budget: 5200MB, CurrentUsage: 22MB, Reservation: 0/2728MB
0.915 [Non-Local Vid.Mem.] Budget: 7448MB, CurrentUsage: 13MB, Reservation: 0/3852MB
0.915 Tiled resources: Tier 2
0.915 Unified Memory Architecture: No
0.915 BGR 565 Supported: Yes
0.915 MaximumFrameLatency: 3, GPUThreadPriority: 0
0.915 Graphics settings preset: very-high
0.915 Dedicated video memory size 5968 MB
0.975 Desktop composition is active.
0.975 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality] [Color: 32bit]
0.975 [Max threads (load/render): 32/12] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: STDCWT] [B:40,C:0,S:100]
1.011 [Audio] Backend:SDL(default); Driver:wasapi, Device:Default device, Depth:16, Channels:2, Frequency:44100
1.296 Loading mod settings zzz-claustorephobic 1.1.0 (settings.lua)
1.297 Loading mod settings bzlead 1.2.18 (settings.lua)
1.300 Loading mod core 0.0.0 (data.lua)
1.378 Loading mod base 1.1.91 (data.lua)
1.778 Loading mod zzz-claustorephobic 1.1.0 (data.lua)
1.795 Loading mod bzlead 1.2.18 (data.lua)
1.825 Loading mod base 1.1.91 (data-updates.lua)
1.842 Loading mod bzlead 1.2.18 (data-updates.lua)
1.872 Loading mod zzz-claustorephobic 1.1.0 (data-final-fixes.lua)
1.877 Script @zzz-claustorephobic/data-final-fixes.lua:5: ClaustOrephobic scraping ore autoplaces.
2.214 Script @zzz-claustorephobic/utils/parse-autoplace.lua:492: Could not find source richness_expression in {"probability_expression"}
2.222 Script @zzz-claustorephobic/utils/parse-autoplace.lua:492: Could not find source richness_expression in {"probability_expression"}
2.223 Script @zzz-claustorephobic/utils/parse-autoplace.lua:492: Could not find source richness_expression in {"probability_expression"}
2.223 Script @zzz-claustorephobic/utils/parse-autoplace.lua:492: Could not find source richness_expression in {"probability_expression"}
2.229 Script @zzz-claustorephobic/data-final-fixes.lua:33: Autoplace dump complete.
2.229 Script @zzz-claustorephobic/data-final-fixes.lua:67: ClaustOrephobic starting autoplace modifications.
2.229 Script @zzz-claustorephobic/data-final-fixes.lua:69: ClaustOrephobic modifying autoplace expressions of iron-ore...
2.230 Script @zzz-claustorephobic/data-final-fixes.lua:69: ClaustOrephobic modifying autoplace expressions of copper-ore...
2.231 Script @zzz-claustorephobic/data-final-fixes.lua:69: ClaustOrephobic modifying autoplace expressions of coal...
2.232 Script @zzz-claustorephobic/data-final-fixes.lua:69: ClaustOrephobic modifying autoplace expressions of stone...
2.233 Script @zzz-claustorephobic/data-final-fixes.lua:69: ClaustOrephobic modifying autoplace expressions of uranium-ore...
2.233 Script @zzz-claustorephobic/data-final-fixes.lua:69: ClaustOrephobic modifying autoplace expressions of lead-ore...
2.357 Error ModManager.cpp:1625: Failed to load mod "zzz-claustorephobic": zzz-claustorephobic/data-final-fixes.lua:181: attempt to perform arithmetic on field 'additional_richness' (a string value)
stack traceback:
zzz-claustorephobic/data-final-fixes.lua:181: in main chunk
2.358 Loading mod core 0.0.0 (data.lua)
2.482 Checksum for core: 466641612
2.586 Error ModManager.cpp:1625: Error in assignID: recipe-category with name 'crafting' does not exist.

Source: default (utility-sprites).
2.826 Initial atlas bitmap size is 16384
2.828 Created atlas bitmap 2048x784 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
2.842 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
2.907 Parallel Sprite Loader initialized (threads: 11)
3.160 Sprites loaded
3.179 Generated mipmaps (5) for atlas [0] of size 2048x784
3.179 Custom mipmaps uploaded (99)
3.187 Factorio initialised
8.765 Quitting: user-quit.
8.921 Steam API shutdown.
8.927 Goodbye

1 year, 1 month ago
(updated 1 year, 1 month ago)

Yep. As expected. BZ Lead's richness wasn't getting modified because they modified the richness function to downscale with distance in lead-ore.lua:

data.raw.resource["lead-ore"].autoplace.richness_expression =
richness * noise.if_else_chain(
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(200)), 1,
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(700)),
100 / (noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")) - 100),
0.17)

1.1.1 will support this kind of modification.

1 year, 1 month ago

1.1.1 is released.

This thread has been locked.