Development and Discussion

Infinite Ores, Refining, Ore Processing ...

Moderator: Arch666Angel

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Development and Discussion

Post by Arch666Angel »

Development Thread

Currently in Development:

Angels PetroChem (Alpha)

-Goal is to expand the chemical Processing chain, with an emphasis on the oil and gas industry
-Adds gas wells to the game, for some products both gas and oil have to be processed
-Different recipes for plastic, resin and rubber (and other synthetic products)
-New buildings:
-Gas Well Head, similar to the Pumpjack, works on gas wells
-Separator, separates gas, oil and other phases from each other, first step after digging it up
-Gas Refinery, basic building for refining gas
-Steam Cracker
-Advanced Chemical Plant, is bigger and has more in- and outputpipes as the chemical plant, allows for more complex recipes.
Last edited by Arch666Angel on Fri May 06, 2016 10:33 pm, edited 53 times in total.

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

Hello,

I think I misuderstood a bit what you expected from RSO integration for the mod.

If you want only the config files added then I can do a release soon.
I see some strange thing in them tho - you added infinite ores in config files as separate entries with spawns per region 0. Is your intent to reduce amount of ore spawns by taking up certain amount of allotment for ore that won't spawn ?
(And didn't RSO explode in funny ways with spawns per region equal to 0?? ;) )

PS.
Also Id' recommend checking for bob's by rutile ore - tin is more common and will trigger with Dy-Tech - I can fix that one easily on integration.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

Don't get me wrong, I think your idea for spawning the ores is brilliant and its in the way I originally imagined it, have the infinite ore inside regular ore patches.

I wrote the configs to have the infinite ores not spawn idependently, but only in conjunction with their regular counterpart. Therefore spawns per region for the infinite is set to 0 also to thin out the spawns a bit.

And I like to have options, so why not have both options?

As for the RSO exploding in funny ways: No not really, actually the generation looks pretty good from what is achievable by just adjusting the values I think, one can clearly spot the small infinite patches next to the bigger regular spawns. Its not always happening, for one or the other reason, but that's good enough for me.
Attachments
Test Generation with Base Game
Test Generation with Base Game
vanilla_test_example.jpg (114.99 KiB) Viewed 104554 times
Test Generation with BobsMods
Test Generation with BobsMods
bob_test_example.jpg (109.29 KiB) Viewed 104554 times

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

Ok I just double checked and multi resource is indeed guaranteed to appear somewhere near original patch.

There is a slight trick with having both choices - after some time with RSO I can see that to many possibilities is not that good actually.
Big config file is not so good - it gets hard to use and people won't get in there to check whats possible.

I've attached below my version of integration. Let me know what do you think about it.
At bottom of config file there is a ratio to configure how much of field should be infinite.

Edit: Removed RSO - official version is available.
Last edited by orzelek on Mon Feb 08, 2016 6:47 pm, edited 1 time in total.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

Awesome! Looks good from a first glimpse, will do a few test generations tomorrow and come back to you.

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

One more thing I forgot yesterday - you are missing few ores from bob's mods that are disabled by default.
It's Nickel, Cobalt, Gems and Sulfur.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

That is intended, because you get these ores from other sources or as by-products from processing.

I'm thinking about whether there should be infinite ores in the starting area or not.
And I need to change the infinite ore textures around a bit for better visibility.

Do you still need the multi_resource_chance for your spawn implementation?
Do you know a way to hide the autoplace_control for the infinite ores when generated with RSO?

And another feature idea in general for mods that have tiered ore progression: Have something like a min distance from starting location.

miturion
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Aug 03, 2015 5:46 pm
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by miturion »

nice mod

mastercheif1017
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Oct 26, 2015 7:12 pm
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by mastercheif1017 »

i love it

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

Arch666Angel wrote:That is intended, because you get these ores from other sources or as by-products from processing.

I'm thinking about whether there should be infinite ores in the starting area or not.
And I need to change the infinite ore textures around a bit for better visibility.

Do you still need the multi_resource_chance for your spawn implementation?
Do you know a way to hide the autoplace_control for the infinite ores when generated with RSO?

And another feature idea in general for mods that have tiered ore progression: Have something like a min distance from starting location.
You can also change a config option and get those ores as separate fields. It's a choice and can be more interesting to have them separate - more searching required sometimes :D

Starting area can be easily switched to have them or not - just need a decsion (or config parameter maybe.. eventually).
Version I posted doesn't require any configs - just use it with your mod. If you add configs strange stuff might happen. Autoplace is automatically disabled when RSO is active for all ores.

Min distance from start could be easily added.. and very annoying. It's enough that rng plays devils advocate with normal spawns.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

Hey don't beat me with my own arguments! :D

Ok ok, I'll add the remaining ores with the same naming scheme, but a switch for starting area would be nice ;) And then its nearly perfect. Thanks for the effort Orzelek!
I was thinking about another resource, but that would ruin this neat look and solution, but the solution I have to it is even better I think.

What I meant is the control buttons in the menu when you generate a map, is there a way somewhere to hide the infinite ores, because the buttons will not change anything about the ores?

@miturion @mastercheif1017
Thanks guys, don't forget this is still work in progress

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

I'm not sure how to remove the buttons really.
If ore has no auto place at all it's not displayed there I think.
But RSO disables ores in a bit different way and I'm not sure if it could make the button dissapear.

Attached version with starting area toggle and made infinite ore a bit larger part of patch.
You are also missing infinite silver ore variant.

Edit: Removed RSO - official version is available.
Last edited by orzelek on Mon Feb 08, 2016 6:46 pm, edited 1 time in total.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

Excellent looks good to me! Have added the other ores as well

And they work with the RSO.
Last edited by Arch666Angel on Wed May 04, 2016 7:37 pm, edited 1 time in total.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

Apperently RSO only needs the Entitys to work with, so i changed some things around that infinite ores wont Show up on the generation menu, since you cant influence them anyways if RSO is present.

Is there a way for me to detect RSO mod? I want my mod to load different Things dependent if RSO is used or not. At the moment this has to be done by ticking a thing in the config.

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

Arch666Angel wrote:Apperently RSO only needs the Entitys to work with, so i changed some things around that infinite ores wont Show up on the generation menu, since you cant influence them anyways if RSO is present.

Is there a way for me to detect RSO mod? I want my mod to load different Things dependent if RSO is used or not. At the moment this has to be done by ticking a thing in the config.
Yes, you can detect RSO - one drawback is that your mod will then load after RSO. Shouldn't cause any problems tho.
You need two things for that:
1. In json file you need to add optional dependency on dependencies line ("? rso-mod"). This will load your mod after RSO if it's present.
2. You can then check for presence of RSO interface with line like this (guessing a bit here):

Code: Select all

if remote.interfaces.RSO then
-- code here
end
I think there might be alternative with last script events update to this. I didn't check it so a bit more guessing here.
It's documented under this link:
https://forums.factorio.com/wiki/index.ph ... on_changed
I didn't play around with it but if I understood correctly you should get list of mods there on first call.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

@orzelek
That doesnt work, will dive into that on a later Point.

I think that everything looks good, from my side you can push the update :)

Lurkily
Inserter
Inserter
Posts: 47
Joined: Mon Jan 11, 2016 1:55 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Lurkily »

Just my two cents . . . . . The Ore generation is something I think a lot of people would like - but they might not want refinement with infinite ore around. Or . . . maybe they want to get more out of resource-poor regions in the base game, without disrupting their game with infinite ore.

These seem like things that work a lot better as two separate modules that you could disable or enable from the in-game menu, rather than a mashup that you have to edit code in order to customize.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

I understand what you mean, eventually I will set it up as seperate modules, but I need to learn how to do Interfaces first, because I Need certain checks in between the modules. And there is more to come, since I intend this to be an Extension to bobsmods, that you can use it as well for the base game is just forconvenience and because I thought that it is something that would work with the base game as well.

On the other side, I dont feel like it is that much of a hassle to unpack the zip and change a "true" to a "false" ;) And you almost certainly have to Play around with RSO Settings/config anyway to get the resource spawns you desire.

orzelek
Smart Inserter
Smart Inserter
Posts: 3912
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by orzelek »

Arch666Angel wrote:On the other side, I dont feel like it is that much of a hassle to unpack the zip and change a "true" to a "false" ;) And you almost certainly have to Play around with RSO Settings/config anyway to get the resource spawns you desire.
Thats my lesson learned from RSO - don't expect people to do this. Like really don't.
It needs to work out of the box - config options are for the few interested ones rest will use defaults (at least that was my impression).

As for the interface - I think that stuff might work only from control.lua forward - it won't work on data stage.
AFAIK all mods are loaded into same lua space so if variable is not local it will be visible for others. You can try to do the dependency trick and then check if one of config values exists (like sector size).

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD 0.12.x][Bobs][Base] Angels Ores and Processing

Post by Arch666Angel »

orzelek wrote:Thats my lesson learned from RSO - don't expect people to do this. Like really don't.
It needs to work out of the box - config options are for the few interested ones rest will use defaults (at least that was my impression).

As for the interface - I think that stuff might work only from control.lua forward - it won't work on data stage.
AFAIK all mods are loaded into same lua space so if variable is not local it will be visible for others. You can try to do the dependency trick and then check if one of config values exists (like sector size).
There are two Options then, Splitting the components off, or creating something like Switch mods, which have nothing in them except a handler you can check.

I wrote bobbing about a message, because he uses something like Interface handlers in data.lua to check Settings from his other mods in the data-...lua, but I dont really understad what he did there with my lacking knowledge of coding.And yes i think that this is the Problem, that i cannot check for RSO Interface in data.lua, because it is created in Control.lua, but like before I dont fully understand how that works yet.
Can I check on the config value? As far as I understand they Count as local and not global values?

edit:
I had another look at Bobs Code and figured out:
If you add a data.lua to rso with something like this: if not rsomod then rsomod = {} end (to my understanding an empty table?)
another mod can check on this at the data.lua level: If rsomod then...

I changed some of the mod structure and separated the parts as individual mods.

Post Reply

Return to “Angels Mods”