Page 1 of 190

Development and Discussion

Posted: Sun Jan 31, 2016 10:32 pm
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.

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

Posted: Mon Feb 01, 2016 8:10 pm
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.

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

Posted: Mon Feb 01, 2016 8:42 pm
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.

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

Posted: Mon Feb 01, 2016 9:50 pm
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.

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

Posted: Tue Feb 02, 2016 12:50 am
by Arch666Angel
Awesome! Looks good from a first glimpse, will do a few test generations tomorrow and come back to you.

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

Posted: Tue Feb 02, 2016 6:19 pm
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.

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

Posted: Tue Feb 02, 2016 6:36 pm
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.

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

Posted: Tue Feb 02, 2016 8:18 pm
by miturion
nice mod

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

Posted: Tue Feb 02, 2016 9:34 pm
by mastercheif1017
i love it

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

Posted: Tue Feb 02, 2016 10:02 pm
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.

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

Posted: Tue Feb 02, 2016 10:41 pm
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

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

Posted: Tue Feb 02, 2016 11:17 pm
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.

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

Posted: Wed Feb 03, 2016 1:36 am
by Arch666Angel
Excellent looks good to me! Have added the other ores as well

And they work with the RSO.

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

Posted: Wed Feb 03, 2016 3:24 pm
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.

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

Posted: Wed Feb 03, 2016 6:49 pm
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.

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

Posted: Wed Feb 03, 2016 11:02 pm
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 :)

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

Posted: Thu Feb 04, 2016 2:13 pm
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.

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

Posted: Thu Feb 04, 2016 3:09 pm
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.

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

Posted: Thu Feb 04, 2016 6:25 pm
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).

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

Posted: Fri Feb 05, 2016 5:32 am
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.