[MOD 0.16.x] Whistle Stop Factories

Topics and discussion about specific mods
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by eradicator »

Avacado wrote:
massively reduces the energy cost per item,
I don't follow this.
I'm no expert on the topic, i just know it exists. I.e. if you go +100%speed, +100%energy, a recipe requires double the energy, but only for half the time. Thus the per-item cost remains the same. I recommend you google around a bit if you're interested (my first google hit)
Avacado wrote:Woops! I'm doing it twice then, though the thing I'm doing twice is unlocking a recipe, so no real problems there.
Yea, for recipes it's fine, that's why i added "do something twice that it shouldn't".
Avacado wrote:I assume then even if reset_technology_effects isn't ever called, that anytime a technology prototype is changed by a mod that at least that tech is reset?
Nope. That's what migrations are for.
Avacado wrote:My plan then is to add a beacon at the exact center of my factories (since factorio has no problem with entity collisions). Is there a logic to what's "on top"?
I don't know how your assemblers are powered, but until 0.17 beacons require power too, and as poweredness is determined by collision_box you probably want the beacon to have exactly the same box and position as the assembler. No clue what's "on top", probably building order. Not something i'd want to rely on. (I still haven't gotten around to writing a generic solution for the "spawn multiple entities" problem *sigh*)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Astree
Burner Inserter
Burner Inserter
Posts: 13
Joined: Tue Jul 24, 2018 2:32 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Astree »

Hello,
I love your mod, as far as I could test it, tks for your hard work :-)
I just encountered a little bug, nothing really bad, I could quickly correct it.
I rotated a belt that was right next to an assembler, it made the assembler become wired : the assembler also rotated, inputs and outputs disappeared, and some input items where ejected on the output belts.

Thierry88
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Aug 22, 2017 2:00 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Thierry88 »

Hello, i'm using your mod combined with a couple others, one of them is Rampant AI which makes protecting these machines the true goal of our base apperantly :P anyway keep going with this mod, i love it!
One question/suggestion:
Since i play with Rampant AI And the buildings only have 350 health they get destroyed in a blink of an eye, maybe an idea to increase the health of these machines to scale with the size?

Thierry88

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Avacado »

I don't know how your assemblers are powered, but until 0.17 beacons require power too, and as poweredness is determined by collision_box you probably want the beacon to have exactly the same box and position as the assembler. No clue what's "on top", probably building order. Not something i'd want to rely on. (I still haven't gotten around to writing a generic solution for the "spawn multiple entities" problem *sigh*)
@eradicator I was thinking on making them small, but I didn't consider the power issue. Not all of my buildings have identical collision_box, but as long as it at least covers the same tiles, I should be good right? Do you foresee a problem with the beacon being, say 0.1 smaller?

Looks like "on top" can in part be dictated by using entity.selection_prority.
Hello,
I love your mod, as far as I could test it, tks for your hard work :-)
I just encountered a little bug, nothing really bad, I could quickly correct it.
I rotated a belt that was right next to an assembler, it made the assembler become wired : the assembler also rotated, inputs and outputs disappeared, and some input items where ejected on the output belts.
@Astree Thanks! I'm glad you like it. That "bug" is actually a feature I recently added which lets you rotate the whole building and its loaders so you can choose which side has the output loaders. Please continue to rotate the building until it gets back to the original position you want it in.
Hello, i'm using your mod combined with a couple others, one of them is Rampant AI which makes protecting these machines the true goal of our base apperantly :P anyway keep going with this mod, i love it!
One question/suggestion:
Since i play with Rampant AI And the buildings only have 350 health they get destroyed in a blink of an eye, maybe an idea to increase the health of these machines to scale with the size?
@Thierry88, A lot of people (including myself) play my mod without biters and while I have given some thought and made some design decisions related to allowing it to be played with biters, I'm eager to get feedback like this from people like you. Yes, 350 is the original health and it probably makes sense to have more health.

First, I want to comment that I original thought about making the machines indestructible, but I still wanted to allow players to get rid of them if they happen to be in the way, hence them being destructible. I did also consider making them destructible with only cliff explosives, but didn't see an easy way to program that and also didn't see a good way to indicate to the player that they need to do that.

Also, in a previous version I tried taking away a property called "player-creation" which "Makes it possible for the biter AI to target the entity as a distraction.". I thought that was a good idea until someone informed me that it breaks all the loaders (!!) which can't load into buildings unless they have that flag. I really should've caught that issue in my testing before releasing that version.

One thing that I thought was protecting me was that as long as the building is unpowered and not polluting, I think biters would generally leave it alone, and would only attack it "as a distraction". I'm still assuming that is true and only not true for you because of the Rampant AI Mod. Is that correct?

Anyway, let's talk numbers. These entities are about 6 times wider and 6 times taller, so from one angle, I could give them 6x6x350=12,600 life. But that is too high both because it probably makes your job of defending them TOO easy and also would make it very difficult for players that want to intentionally destroy them to remove them (which was one of the reasons for having them be destructible in the first place). Currently 350 health is about 7 regular rounds or 5 piercing rounds. I could see going to say 1600?

I think a life increase is in order, but there are a few other things I've thought about that may be able to be done in conjunction with that. One is I could randomly spawn a few walls near the factory. I don't really want to surround it with walls automatically, but maybe a few scattered walls could help anyway? I'd probably have this turned off by default if I decided to do it. What are your thoughts on that?

Another idea that was suggestion that I thought was interesting, though I don't know how I'd implement it just yet, is for a "destroyed" factory to become a new "rubble" entity that could then potentially be repaired to restore it. Maybe I'd make the rubble mineable, so that it could be picked up (though wouldn't give you anything), but that would allow for easy clearing even if I decided to give the rubble some absurd amount of life, since the rubble would be mineable, but the fully repaired factory wouldn't. That would be a bit tricky, because among other issues, there is no easy way to detect when an entity has been repaired. Again this would have the issue of not conveying to the player how they can remove them (first fire at it until it turns into rubble then pick it up is not obvious). The scattered walls would probably be much easier to implement too.

Karlito15
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Dec 18, 2017 8:10 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Karlito15 »

First thing: I like your mod very much, it's a nice idea to force using rails early in the game!
I want to propose one thing that would it improve it imo.

What I have noticed: Yesterday I set up my first Whistlestop-only green circuit production chain. (5 smelters, 2 assemblers) I noticed the following: the machines are very equally spread over the map, so you get a nice grid of them. This means, that every machine is (more or less) always 180 tiles away from the nearest (in north, south, west and east). I know, this is kind of a feature of this mod, but it has one disadvantage: It doesn't matter where you put things. I had like 10-15 pairs of assembler, that were next to each other, to use them for coppercable-->green circuits. But all of them were these 180 tiles apart from each other. So I had no incentive to use one over the other.
Some furnaces spawn near to some ore patches and if you see that, you say "this furnace is clearly for iron". Just a few of the furnaces are "predetermined" like this, but I like it very much, because it gives some structure to the planning and building.
There are some productionchains in which you would normally use some form of direct insertion between machines (sometimes over short belts, but that still counts). Examples: green circuits, red circuits, solid fuel-->rocket fuel, steel, coppercable-->yellow science... Naturally it would be nice to build these chains in machines next to each other when using this mod. And I think it would be very interesting, if some machines would be nearer to each other than normal. And I don't mean loader on loader, but something like 50 or 100 tiles instead of the normal 180. This would give some incentives to use special pairs of machines instead of any.
Maybe you have two furnaces near each other, which would be very nice for steel, but there is no iron next to it, but a big copper field. Do you want to train in iron ore to do the nice steel, or do you just make a bigger copper outpost?
Maybe you have two assemblers near each other. Do you want to make the green circuits there, but your ressources are far away, or do you keep them for a later opportunity?

My idea of implementation:
I would say the goal would be to randomize 1 in 4 machines. I would set the rule "A machine can only be randomized, if the 8 machines surrounding it are not randomized." This would result in a grid like this:
s s s s s s s s s
s r s r s r s r s
s s s s s s s s s
s r s r s r s r s
s s s s s s s s s
s: standard machine, r: randomized machine

What happend to a randomized machine? First you have a 50/50 chance of it being shifted north/south or east/west. Then the amount is determined with a gaussian. So most of the machines get shifted only 10 or 20 tiles, but some are shifted 100 or more, so you could have two machines being 50 tiles apart. I would say the goal would be, when you have 50 machines scouted, to have like 3 pairs of machines, that are less than 100 tiles apart.

What do all of you think of this idea, and would it be possible to implement? I have no clue how the generation is coded...

Greetings from Berlin, Karlito

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by eradicator »

@Avacado
As long as the collision box shares the outside tiles with the machine they should be powered. I.e. you have a margin of 0.99 tiles :). And when 0.17 comes you just make them not require energy.

Selection_priority! Awesome, gonna use that right now, thanks for finding.

As for the health issue i'd consider resistances. Sadly they're not shown in-game anymore unless you re-enable that (which i forgot how to do, i think it's per prototype). But they'd allow you to make the machines highly resistant to biters (positive resistance), or highly vulnerable to player attacks (negative resistance) without fiddling with the health too much. That said... a huge building having 10000HP does sound nice. Due to the size a few cluster grenades probably do quite some damage too if all clusters hit. :)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Avacado »

@Karlito15, that is an interesting idea and would potentially make some individual factories make more sense for things, which could add more of a strategic element. But ultimately would allow people to avoid using trains for some intermediate materials, which I was actually going for a world in which all intermediate materials would be sent by train (including things like copper wire as can be seen featured in one of the mod's pictures).

The current logic is that any time a chunk is spawned (32x32 tile area) there is a ~1/20 chance (which adjusts over time based on number of failed spawns, such as trying to spawn on ores). If that succeeds it does a distance check. Each factory on the map has its own individual minimum distance which all things must be further away from it that ranges between your min_distance setting and 2*min_distance. About 1/3 of the time that an area is clear, it'll instead of spawning an actual factory, it'll spawn a buffer point, which you can think of as an intentional blank in the grid. The initial chance filter, the random variance of minimum distances, and the buffer points are all meant to make the map a bit less grid-like, and I've thought about ratchetting those up a bit too to make it even less grid-like, but didn't want to lower the overall prevalence rate too much from my initial versions.

@eradicator, Using resistances is a great idea! Looks like bullets and biters share the same damage category, so I can't do much there, but at least I can make them weak to some of the other player categories like explosives and maybe make them stronger to the bitter only category acid. Didn't know about negative resistances either.
The problem being that calling it raises on_research_finished for everything again
I did some testing on this, and it appears not to be the case. When I call game.player.force.reset_technology_effects(), my on_research_finished isn't called at all, even if I have some researches complete.

Fyredup
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jun 17, 2017 1:14 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Fyredup »

I have had so much fun playing with this mod, I decided to setup a spreadsheet with most every intermediate product I could think you'd be making in them to run your factory. Figured I'd share so others could benefit as well (some numbers are slightly off on the sciences) but here it is https://docs.google.com/spreadsheets/d/ ... sp=sharing. The one downside to these is that there are some machines that make an item and exceed the stack limit in the machine, and therefore pause before continuing to produce, plastic is one of these. So a 'full' belt will still have gaps no matter how fast the machine is going.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by eradicator »

Avacado wrote:I did some testing on this, and it appears not to be the case. When I call game.player.force.reset_technology_effects(), my on_research_finished isn't called at all, even if I have some researches complete.
Indeed it isn't. Just tried myself. So either it was changed or my memory is wrong, probably the latter :p. You might want to try those negative resistances before you trust me on that... (it's been a while since i've actually done anything with entities).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

mrvn
Smart Inserter
Smart Inserter
Posts: 5696
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by mrvn »

Fyredup wrote:I have had so much fun playing with this mod, I decided to setup a spreadsheet with most every intermediate product I could think you'd be making in them to run your factory. Figured I'd share so others could benefit as well (some numbers are slightly off on the sciences) but here it is https://docs.google.com/spreadsheets/d/ ... sp=sharing. The one downside to these is that there are some machines that make an item and exceed the stack limit in the machine, and therefore pause before continuing to produce, plastic is one of these. So a 'full' belt will still have gaps no matter how fast the machine is going.
Shouldn't the machine have multiple output slots in those cases? So 150 plastic becomes 100 plastic + 50 plastic (or 2x 75).

Fyredup
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jun 17, 2017 1:14 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Fyredup »

mrvn wrote: Shouldn't the machine have multiple output slots in those cases? So 150 plastic becomes 100 plastic + 50 plastic (or 2x 75).
They do, but the machines respond weird to overstacking in their output slot and wait too long to start up again I believe, which causes a gap in the output, so on 8 output belts, even though it should be able to compress 8 belts, it pauses due to being full and doesnt start until too late (I think?). Even if that's not the reason, there is still some oddities in their function, because speeding up my plastic build didn't change the output density, even though it should've been able to maintain 8 full blue belts no problem.

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Avacado »

@Fyredup, I am able to do 8 full blue-belts of plastic. Five speed-module-3s is not quite enough. You at least need to add 1 beacon on top of filling it with speed-module-3s and it will then fill 8 full blue-belts. I tested it to make sure there wasn't a bug and worked fine for me, no gaps in the belts.

Which makes sense because you having 5 speed-module-3s is a crafting-speed of 40*3.5=140. The recipe builds 100 per 50 seconds or 2 per second. At 140, that is 280 items per second. Which isn't quite enough to fill 40 items/second * 8 = 320 items per second.

Smethwick
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Mar 12, 2018 8:57 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Smethwick »

Can the factories be rotated in game?

Fyredup
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jun 17, 2017 1:14 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Fyredup »

@Avacado Mine is running with a crafting speed of 150 AND has 5 prod 3 modules in it, which should be 300 plastic/sec base and then 150 bonus from the productivity modules, putting it at 450 plastic per second, and its not saturating belts. I'm convinced the overfilling of output slots causes problems. If you wanna check it out I can send you the details to the server its on. Quite a bit of factory using whistle stop factories here, hopefully you'd be proud of us :D

Smethwick
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Mar 12, 2018 8:57 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Smethwick »

Smethwick wrote:Can the factories be rotated in game?
I must have been using an older version. Updated mod and they will rotate now

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Avacado »

@Avacado Mine is running with a crafting speed of 150 AND has 5 prod 3 modules in it, which should be 300 plastic/sec base and then 150 bonus from the productivity modules, putting it at 450 plastic per second, and its not saturating belts. I'm convinced the overfilling of output slots causes problems. If you wanna check it out I can send you the details to the server its on. Quite a bit of factory using whistle stop factories here, hopefully you'd be proud of us :D
I agree that 150 speed should be enough with 5 prod 3, but when I tested that out it saturated the belts for me. I would definitely enjoy coming to check out your server! I haven't had as much time to playtest my own mod as I'd like (I'm making red-science using only big factories and big furnaces in one continuous game), but most of my actual playing has been just loading up the game to test features and make sure everything is working correctly. But it was good for me to actually sit down with my mod because that is how I thought of the map-icons and fitting the big factories to the 2x2 grid since so I tend to run several blueprints of the train stops around the big factories.

Do you have the bottleneck mod? It gives a nice visual representation of if a machine is not working and why (green=working, orange=output full, red=input lacking), and if it really is an output problem it should never turn red (which implies an input problem).

Rodon26
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Jul 27, 2018 9:31 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Rodon26 »

An odd behaviour.
Whenever i place a deadlocks miniloader close (not adjacent) to a factory, the big building has a minifreakout. Some of the building's loaders vanish. (not all though, might be just "curently on screan")
Rotating the structure fixes (if messily, some items are spilled) the problem, so its not a majour issue, merely annoying.

Might be compatibility with 5 dims (since i have that too), though i doubt it.

Fyredup
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jun 17, 2017 1:14 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Fyredup »

@avocado I'd be happy to show you around any time we're both free :P Should I PM you the details or add you on steam/discord?

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Avacado »

Rotating the structure fixes
Well, that makes me glad I never figured out the more complicated method of teleporting the loaders. Currently the loaders get destroyed and recreated every time it moves, which sounds like it is advantageous for situations like this, though does mean they get the "placement" animation with a little puff of smoke, but I don't see much of a problem with that.

I wasn't able to replicate your issue. I tried installing all of 5 dims and all of deadlock. I know it is possible for other mods to delete my loaders or rotate my structure. I'm really curious to what kind of "freak out" you're seeing.

I did notice that when you place the loaders RIGHT next to my building it automatically detects the building and puts its extraction/insertion side right next to the building, which actually might not be the preferred behavior, but you specifically said close but not adjustment, and I haven't been able to see any issue there.

If this is something that happens consistently, would it be possible for you to narrow down exactly which mod is causing it by removing mods one at a time? And also provide the steps to replicate it? Or maybe providing a replay of the issue?

Rodon26
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Jul 27, 2018 9:31 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Rodon26 »

wel, when i said "freak out" its just the loaders vanishing. there are no spasms or other weired glitches. just the loaders.
as for mods
mod list
as for steps. ok, just did some testing.
apparently it has to do with the update. by default, the loader is set to "out", but when you place it adjacent to an inventory, it swaps to "in".
if you place it adjacent to a belt that the loader can output into, it doesn't update, and factory's loaders tond disappear. also, the vanish range apear to be nine squares away from the loader.
Pressing R on the dd's loader, also causes the event.

OH MY rotating ANYTHING causes them to disappear!!
5 dim's loader? thingfs vanish.
random belt? things vanish.
chemical plant? they vanish.
turret? vanish.

Edit: is it possible that you set the loaders to detect the factory being turned, but not specify the factory, so they triger of everything, and then aren't replaced, because that the factory's function?

Post Reply

Return to “Mods”