= Resource Placement =
Looks like the autoplace uses perlin noise with all the maps affecting each other. It looks pretty hard to calibrate things and the map settings can affect it (for example, with everything on Very High for all settings, DyTech materials were not in the starting area (this might be deliberate, or it might be regular resources being prevalent and negatively affecting other spawns).
Instead I would like to spawn resources using the following method: for each chunk, I want to check each resource and according to its probability setting (per chunk), if a random roll from 0 to 1 is < the setting, create one tile of that resource in the chunk (at a random x/y in the chunk that is place-able and doesn't have a resource already in it; re-try if water or resource is present and give up after X tries in case of all-water chunk).
I also want to make the resource tiles infinite and specify other things. DyTech lava it looks like this:
Code: Select all
infinite = true,
minimum = 10000, (min yield = 10%?)
normal = 250000, (not sure about this)
Code: Select all
infinite = true,
minimum = 750, (10%?)
normal = 7500,
My concern is that if not using autoplace then will anything spawn in new chunks, or can this custom resource spawn function be called on new chunk spawn to do so (with a hook or event or something)? I would also like to ensure at least one of each resource type within some distance of spawn (I think this means just spawning one of each inside an X/Y range in addition to the above random chance at map gen?).
= Variable Inserters =
I was able to find some information looking at the DyTech inserters, for example:
insert_distance = 2.3,
pickup_distance = 1,
pickup_position = {0, -1},
insert_position = {0, 1.8},
For belts I think its add 0.2 for long side, and subtract 0.2 for close side. What I am curious is if there is a way to script an inserter that can be configured on the positions instead of having many variants. Meaning, if there is a UI you can make for it where you can change its setting like maybe click on grid positions or buttons (a 5x5 area would work centered on the inserter) and then it will modify the entity properties above for that inserter?
= Power Sources =
When inheriting from existing prototypes Generator or SolarPanel, you are limited to the dynamics of those things. How to create a new kind of generator? For example, to consume a solid item or X amount of a liquid to generate some power? So you can create say "energy cells" and then a machine consumes them like a recipe and makes some KW or MW of power. Or, you could have instead of regular boiler mechanic, some kind of engine takes in water + coal or other source, and makes "steam" - instead of the temperature mechanic generating power a machine would consume a certain amount of the produced "liquid steam" and generate some KW or MW of power (it could handle multiple power sources with different recipes since I think the regular fuel mechanic doesn't work except in a regular boiler? Although, a burner inserter/miner does work on fuel directly - so it would be like a burner assembly machine that produces only the specific product(s) like steam?). This means the machine that consumes fuel replaces the boiler, and then the other machine that consumes the product of that replaces the generator. I tried making the energy consumption negative for an assembling machine... it didn't work as expected even though it shows up as a producer in power grid; it also operates normally but shows as unpowered and doesn't actually make any power.
= Lazer Robots =
I don't know if it's possible yet, but can you make a robot that can fire lasers? Flies like logistics robots, but comes out to shoot enemies from its base (base being like the roboport) ?
= Module Affecting Custom Properties =
Beyond the basic module properties I've seen (consumption, effectivity, pollution, speed), is it possible to make a module which affects a custom property used only in a mod? Example: The custom power source above, the steam generating entity: Accepts a module which increases its steam production. Say that is all the module does, and the machine won't take a regular productivity module. It could be used more creatively as a way to affect custom LUA scripts or any behavior really? Or are the existing attributes all that a module can work on?
= Fluid I/O on Machines (fluid_boxes) =
The DyTech blast furnace sets 4 outputs and 4 inputs. In all the recipes applicable to that, there is a symmetry to the input and output. Recipe like this:
Code: Select all
ingredients =
{
{type="item", name="clean-iron-ore", amount=1},
{type="fluid", name="lava-1600", amount=0.2}
},
results =
{
{type="fluid", name="molten-iron", amount=1}
}
and, fluid box in oil refinery for example, fluid box like this:
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {-1, 3} }}
= Leaky Tank =
I heard there were Void Pipes created, but I wonder can a Tank be made via script to "leak" some units of fluid when it reaches 100%? Or I guess even with pipes can it be made conditional when full or near full some %?