Page 1 of 2

[MOD 0.15.x] Ore Chaos

Posted: Tue Apr 11, 2017 9:56 pm
by blueblue
Details
Name: Ore Chaos
Description: Replace a small fraction of the tiles in an ore patch by tiles of a different type.
Current Version: 0.3.8
Latest Release: 2018-03-03
First Release: 2017-04-11
Tested-With-Factorio-Version: 0.16.27
Dependencies: None
Author: blueblue
Tags: Resource, Ore, Sorting, Mixed, Entropy

Pictures
Pictures
Description
Features:
  • Replaces some ores in your ore patches, highly configurable
  • Add machine that can void resources
  • Make circuit network available earlier
Details
Mod Compatibility
Mod Compatibility
Known Issues

Changelog
0.3.8 (3 March 2018)
Hotfix. Fix crash related to mod settings. Mod setting descriptions are slightly incongruous now, but the settings still seem to work.
0.3.7 (20 January 2018)
Bugfix.
0.3.6 (18 January 2018)
Fix a leftover bug from transition to 0.16.
0.3.5 (15 December 2017)
Compatible with 0.16
0.3.4 (27 August 17)
Bugfix for rso compat that was introduced in the last version.
Older Versions
Mod Portal


My first mod and first mod post, so yell at me if I did anything wrong.

Re: [MOD 0.14.x] Ore Chaos

Posted: Thu Apr 20, 2017 3:21 pm
by Kryzeth
Hello, Kryzeth from the mod portal page, the one who gave the suggestion for adding config options! Yes, hello~

Anyways, the new config options look AMAZING, howeverr... *points to page*
I'll put the image here too, but yeah, this happens when using RSO and the starting area only option (all others commented out). I set the chance to 0.9 instead of 1/6 to make the muddled ores more visible, but every ore patch outside the starting area looks like this, or is untouched entirely. It works perfectly when not using RSO though.
Image

Re: [MOD 0.14.x] Ore Chaos

Posted: Sun Apr 23, 2017 4:34 pm
by blueblue
Right, rso should hopefully be fixed now. Thanks again for the report. Wasn't trivial to make it rso compatible, so for now I delay processing chunks until some more chunks in the area are generated, because rso puts resources on more than just the currently generated chunk sometimes. On the minimap it may look like a chunk hasnt been processed yet but if you get close and give it time to generate more chunks it should be ok. I only do that if rso is active.

I made some more changes and added some more default modes and now 0.2.1 is ready. Lets hope the big 0.15 release doesnt break too much. I hear 0.15 introduces mod settings, which I will definitely be using in this mod.

Re: [MOD 0.14.x] Ore Chaos

Posted: Sun May 14, 2017 12:36 pm
by m3henry
This is a great idea, and is a clean and simple way of implementing the "dirty mining" that the devs talked about a while ago. :)
I would suggest that the chaoticness of an ore patch is dependant on its size/richness or distance from the home base.
This would make the difficulty progressively harder as the game moves from early to late game and remove the need to have early access to circuit network.

Re: [MOD 0.14.x] Ore Chaos

Posted: Fri May 19, 2017 11:05 pm
by Evorionos
Hello blueblue
I have recently started playing with your mod, and have to say that I really like the challenge it adds! However, I think I have found a few incompatibilities, namely with Bob's ores and Angel's Infinite Ores (maybe RSO plays a part in it too, it is not entirely consistend behaviour)

First of all, as I started the game, the mod worked fine. But once I explored a bit of the world and hit some patches of infinite ores, the game crashed with an error (not the same everytime), saying such an entity does not exist (I can investigate further if you'd like) . I worked around this by disabling the conflicting ores as replacement options. This worked just fine, but even then, some patches would not be randomized at all. As of right now I don't exactly know what is causing this but it does not seem to follow any particular pattern. Copper patches were mostly fine, coal on the other hand was affected too sometimes.

If you want to look into this further, I'd be happy to supply you with further information about what I was/am experiencing.

Once again, great mod all in all but I would be happy to contribute to making it better!

Re: [MOD 0.14.x] Ore Chaos

Posted: Wed May 24, 2017 5:27 pm
by blueblue
Thanks for the report. I'm currently rewriting a lot of my code to add modsettings, so it might take a bit until I get around to fixing this, sorry, but I definitely will. Just to sum up, you are using bobs ores, angels infinite ores and rso, no angels smelting, on 0.15.*, is that correct? Do you recall which entity gives the error? I'm quite sure this will happen if any of the infinite ores is disabled in the settings of infinite ores, I will fix that eventually.

It's annoying that sometimes the ores still aren't affected. This is probably related to rso. I tested this quite a bit and I thought I had fixed it already, but it is not something I can easily test except by looking at a large number of chunks. If you can check it easily, on the patches that arent affected, is it usually the whole patch or just a square inside it? Also are the patches that arent affected larger than average?

EDIT: I think I've figured out how all of these happened. Will be fixed in the next version.

Re: [MOD 0.15.x] Ore Chaos

Posted: Sat Jun 24, 2017 2:15 pm
by DarkyPupu
I like the mod idea, but i cannot make it work in multiplayer --> immediate desync.
For some reasons on ~1 out of 4 server restarts it doesn't cause a desync.
Tried newly generated worlds.

I have no clue on how to identify which other mod conflicts, as there is quite a list. When i disable Ore Chaos all goes well.
If you have any clue or way to identify the problem...
List of mods

Re: [MOD 0.15.x] Ore Chaos

Posted: Mon Jun 26, 2017 10:50 am
by blueblue
Thank you for the report, I hope version 0.3.2 fixes this issue.

Re: [MOD 0.15.x] Ore Chaos

Posted: Mon Jun 26, 2017 6:43 pm
by DarkyPupu
Awesome, this seems to have done the trick (at least, it's ok so far)
I keep you informed if anything goes wrong.

Re: [MOD 0.15.x] Ore Chaos

Posted: Mon Aug 14, 2017 5:42 am
by ZombieMooose
Found a potential conflict with angels refining and picker extended.

Error in assignID, item with name "filled-borehole" does not exist

Source: remove-filled-borehole (recipe).

Re: [MOD 0.15.x] Ore Chaos

Posted: Sat Aug 19, 2017 12:01 pm
by blueblue
I cant quite reproduce this, because I dont know which mod creates that borehole resource. But I suspect I know what causes this so I hope what I am doing now will fix this.

Re: [MOD 0.15.x] Ore Chaos

Posted: Sat Aug 19, 2017 7:20 pm
by ZombieMooose
blueblue wrote:I cant quite reproduce this, because I dont know which mod creates that borehole resource. But I suspect I know what causes this so I hope what I am doing now will fix this.
I think it's probably one of Bob's.

I'm on mobile so I can't show a screen shot of my mods.

Re: [MOD 0.15.x] Ore Chaos

Posted: Sat Aug 19, 2017 8:02 pm
by darkfrei
Is it possible to make resources just with probability?

Code: Select all

  data.raw.resource["copper-ore"].minable = 
	{
		hardness = 0.9,
		mining_particle = "copper-ore-particle",
		mining_time = 2,
		results = 
			{
				{
					type = "resource",
					name = "copper-ore",
					amount_min = 1,
					amount_max = 1,
					probability = 1
				},
				{
					type = "resource",
					name = "iron-ore",
					amount_min = 1,
					amount_max = 1,
					probability = 0.1
				},
				... -- another recources
			}
	}
vanilla code

Re: [MOD 0.15.x] Ore Chaos

Posted: Sun Aug 20, 2017 1:54 pm
by blueblue
@darkfrei: Thanks for the suggestion. The modding API allows it, but I dont like it from the game designer perspective. Currently it's very obvious to the player what's happening. Just from the graphics of the ore tiles, the player knows which resources he will get from a patch. Since I allow the player to customize the distribution of ores, it's important that the player can see what he's getting. Plus your suggestion doesnt change the gameplay at all.

But the main issue is that the mod settings for this mod are already more complex than I'd like them to be, so I'd rather not add another complicated layer.

Re: [MOD 0.15.x] Ore Chaos

Posted: Sat Sep 02, 2017 1:42 am
by Air
I like this mod a lot. I made a few edits for my game, I thought I'd share them along with some feedback.

I created a custom mode for my B&A+Y game. I edited the lua files, it's mush more convenient than filling the boxes in the mod settings.
I went with pure starting area with a very small (0.01) chance of coal. This way there is a chance (but small) of a coal patch right in the ore patch and I can smelt first few plates without running around too much.

I removed uranium completely, even from the Angel's refining. But 1/8 of coal patches were converted to uranium. I quickly realised that this wasn't a very good idea, because mines got randomly stuck on uranium, requiring Sulfuric Acid to continue. To help with that I modified Bob's MK2 and MK3 mining drills to have smaller mining area, so that I could avoid uranium tiles until later.

I also added more variety to how the ores were changed. When a block is generated, I randomly assign an "entropy" value to it
(I use 'table.num(entities) % 7')
Based on the entropy, the replacement chance for this block is multiplied by 0.2x - 3x. So there are more chaotic and less chaotic patches out there. There is an incentive keep searching for a cleaner patch if you don't like the nearest one.

To reinforce this idea further, I added an additional parameter to the replacement strategy - "avoidsSpecialBlocks". I randomly assign some of the blocks to be special. In this case the replacement strategy will not change anything inside this block. So there is a chance to find entirely clean patches of some of the ores.

Re: [MOD 0.15.x] Ore Chaos

Posted: Fri Dec 15, 2017 12:26 am
by ZombieMooose
Thanks for updating to 0.16.

Re: [MOD 0.15.x] Ore Chaos

Posted: Tue Dec 26, 2017 7:51 am
by abordoli
Getting:

https://cdn.discordapp.com/attachments/ ... nknown.png

Error at load.

Tried running just this mod and getting same error so no inter-mod conflict.

Re: [MOD 0.15.x] Ore Chaos

Posted: Mon Feb 19, 2018 6:00 pm
by dex42
Factorio crashed after checksum: factorio 16.22-16.24 + only orechaos 3.7

0.666 Checksum for core: 1699148251
0.666 Checksum of base: 3270565495
0.666 Checksum of orechaos: 971895151
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-y530qn\libraries\stackwalker\stackwalker.cpp (923): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-y530qn\src\util\logger.cpp (372): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-y530qn\src\util\logger.cpp (471): Logger::logStacktrace
c:\cygwin64\tmp\factorio-y530qn\src\util\logging.cpp (78): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-y530qn\src\util\logging.cpp (73): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-y530qn\src\data\modsettings\globalmodsettings.cpp (139): GlobalModSettingsHelper::save
c:\cygwin64\tmp\factorio-y530qn\src\data\modmanager.cpp (365): ModManager::loadData
c:\cygwin64\tmp\factorio-y530qn\src\globalcontext.cpp (487): GlobalContext::init
c:\cygwin64\tmp\factorio-y530qn\src\mainloop.cpp (252): MainLoop::run
c:\cygwin64\tmp\factorio-y530qn\src\main.cpp (1035): wmain
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (283): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFAE50F1FE4)
00007FFAE50F1FE4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFAE70CEF91)
00007FFAE70CEF91 (ntdll): (filename not available): RtlUserThreadStart
3.270 Error GlobalModSettings.cpp:139: Saving and loading through JSON changed data.
Logger::writeStacktrace skipped.

Re: [MOD 0.15.x] Ore Chaos

Posted: Thu Feb 22, 2018 7:03 am
by MisterFister
I can report that when running Factorio v0.16.25 with OreChaos v0.3.7 and no other mods, my game crashes on load. Relevant screen snip images to verify, along with the logfile referenced in the error popup, can be found at: https://www.dropbox.com/sh/lje84yr874e7 ... Gabwa?dl=0

Thanks, I really like this mod.

Re: [MOD 0.15.x] Ore Chaos

Posted: Tue Feb 27, 2018 11:22 am
by abordoli
yeah, I'm getting the same error that prevents the game from booting up.