[MOD 0.16.x] Whistle Stop Factories

Topics and discussion about specific mods
Kryzeth
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jul 25, 2015 9:07 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Kryzeth »

Avacado wrote: I think we might be fine for the moment in terms of neither one of our mods needing to set up a dependency as my mod's new logic now should hopefully avoid all recycling recipes by just only affecting recipes that can be built in a chemical plant, assembly machine, or furnace. How about we agree I don't touch your recipes and you don't touch mine :-). Right now by excluding your recipes it should be fine. Is your mode going to try to make big 50x recycling versions though?
Actually, Reverse Factory doesn't actually do anything about the recipe list; it specifically pulls the item names from the items themselves, then checks if a recipe exists with the same name as the item. Your big recipes probably use a different internal name (just like the reverse recipes my mod creates have "rf-" at the beginning), so Reverse Factory will never see it.

I'm relieved to hear that our mods will accept each other's existence for now lol.

As for the normal/expensive recipe split, I've actually had issues with other mods and Reverse Factory; they can actually define a normal recipe, and no expensive recipe, and the game will load up just fine. But when you try to do anything based on the assumption that every recipe that has a normal, has an expensive, it will cause a crash from your mod, not the other mod. It's a problem that the other mod author should fix, and I think in my Reverse Factory mod, I have an error handler specifically to catch things like this, pointing to the item that has been made incorrectly.

Although that was at the beginning of the normal/expensive split version, so maybe it's changed by now? Dunno.

Just as a side note, the mod that was causing the issue was Production Scrap 2, which I forgot I was testing for Reverse Factory compatibility, and hadn't noticed I still had it enabled. There's probably just an error in the logic of their mod, that results in a normal recipe being made without an expensive counterpart.

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 »

I don't even know your mod, but...
Kryzeth wrote: it specifically pulls the item names from the items themselves, then checks if a recipe exists with the same name as the item.
That is not a correct approach. There are no rules for recipe names, and infact quite a lot of items in more complex mods don't have a recipe that makes only that item. I've seen a fair amount of bugs in other mods rooted in the misguided assumption that item name == recipe name. Maybe you know this, but other people reading this might not, so i'm complaining anyway :p.
Kryzeth wrote: I have an error handler specifically to catch things like this, pointing to the item that has been made incorrectly.
Anything the engine doesn't complain about is per definition correct. Just because you don't like recipes that have .normal without .expensive doesn't make them wrong. Personally i'd be very happy if .normal became default, and the direct specification was removed, leaving only two places to check.

Kryzeth
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jul 25, 2015 9:07 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Kryzeth »

eradicator wrote:
Kryzeth wrote: it specifically pulls the item names from the items themselves, then checks if a recipe exists with the same name as the item.
That is not a correct approach.
I disagree. The problem with using the recipe list, is that you get every single recipe in the game, including multiple ones for the same item, especially when you add mods. For any given item, if there is not one "specific" method of making it, then it shouldn't be able to be recycled, imo. Like the official method of making an electronic circuit item is through the electronic circuit recipe: 1 iron plate + 3 copper cable; so the recycling recipe should be the reverse of this. Your mod may add another recipe that allows for electronic circuits to be made in batches at once, but it's not the specific method of creation.

If an item has multiple ways to make it, that are all equally valid (as in angels processing, or even bobs mods), meaning there is no recipe name that matches the item name, then this item should simply be ignored, which is correct imo. Like, there are multiple ways to produce heavy oil, even in vanilla, and these recipes are all "something-oil-processing"; so there's no specific method of creation for the heavy-oil item. It makes sense that there be no reverse recipe.

This is especially important because in my mod, the recycler is a furnace, and thus can only accept one valid reverse recipe per item. This is important, because it prevents your issue of being unable to hide recipes from the crafting menu. Furnace recipes can be hidden; assembler recipes cannot.
eradicator wrote:
Kryzeth wrote: I have an error handler specifically to catch things like this, pointing to the item that has been made incorrectly.
Just because you don't like recipes that have .normal without .expensive doesn't make them wrong.
I'm going to have to disagree again here. Just because something doesn't make the game crash, doesn't mean it's not wrong. It's called a logic error, in programming: an error that does not cause a crash, but produces unintended behavior. In this case, a recipe not having an expensive variant defined simply means that it will not show up in-game, when playing on a map with expensive recipes. Unless an item is specifically not supposed to exist in expensive mode (which is not usually the case), this is an error on the mod author's part, and should be noted as such. I've actually had at least two other mods cause this error both be unintentional, and having them patched in their next versions.

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 »

Unless an item is specifically not supposed to exist in expensive mode (which is not usually the case),
While I haven't tested it myself, that isn't the behavior mentioned in the wiki, they give an example of only specifying the expensive recipe and setting the normal recipe to false, and said the expensive recipe will show up in both normal and expensive games.

Kryzeth
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jul 25, 2015 9:07 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by Kryzeth »

Avacado wrote:
Unless an item is specifically not supposed to exist in expensive mode (which is not usually the case),
While I haven't tested it myself, that isn't the behavior mentioned in the wiki, they give an example of only specifying the expensive recipe and setting the normal recipe to false, and said the expensive recipe will show up in both normal and expensive games.
That's actually a pretty interesting note. Just tested it myself, and it's right. However, what is the point of defining just a normal recipe, or just an expensive recipe, when that will simply cause the recipe to be the same in both types of maps? If anything, that only confirms my belief that anyone who has defined only a normal or expensive recipe, without the other, has made an error. Because otherwise, they would just code it as a normal recipe, without the distinction. Thus making it worthy of an error handler that points the finger at the original mod author who has made a mistake.

EDIT: Anyways, about this mod. The latest update fixed all the previous issues I had, very nice. Gonna see how it works in a real game.

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 »

Kryzeth wrote:For any given item, if there is not one "specific" method of making it, then it shouldn't be able to be recycled, imo.
Sure for recycling. As said i disagree speficially because i don't want new modders to get the wrong idea. You are never guaranteed a match between recipe name and item name. Even if there is only one recipe that makes exactly that item. It's simply a lucky assumption that is often true because people tend to do it like that. As an example some of my multi-entity constructs use a placement proxy, so the item is called xyz-proxy, but the recipe is still xyz. But an item with named xyz does not exist.
Kryzeth wrote: what is the point of defining just a normal recipe, or just an expensive recipe, when that will simply cause the recipe to be the same in both types of maps?
The point is that it is a more explicit definition than shoving a bunch of attributes that may or may not exist directly into the recipe. It looks nicer in code (and easy to read code is of utmost importance). And it leaves room for easy future addition of the other variant when a mod is still WIP.

(And now hopefully you accept all that and we can stop derailing :p)

armyguy33428
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Jul 06, 2018 1:38 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by armyguy33428 »

Love the idea of this mod, but I can not get the furnace to accept items. I have 8 belts of ore going into the left side but it is not letting the furnace take them into it. I can put ore into the inventory and it will work, but does not import or export the items out of it. Yes it has power lol.

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 »

Love the idea of this mod, but I can not get the furnace to accept items. I have 8 belts of ore going into the left side but it is not letting the furnace take them into it. I can put ore into the inventory and it will work, but does not import or export the items out of it. Yes it has power lol.
Hi armyguy33428, that was a problem with loaders in 0.0.7 that I fixed in 0.0.8. Please upgrade to 0.0.8. Thanks!

seludovici
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Jan 06, 2018 6:09 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by seludovici »

Hi. I was wondering whether RSO affected the distribution of the big furnaces and factories.

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 »

Hi. I was wondering whether RSO affected the distribution of the big furnaces and factories.
Hi seludovici,

No, not really. My mod does check if there are ores/cliffs/water in the way and may avoid spawning (since I don't like them spawning over ores making it a situation where you either need to ignore the ores forever or destroy the factory permanently), but this doesn't always work (some mods put down ores AFTER my mod puts down the factory) and my code has logic to try to increase the spawning rate slightly if a map has a lot of failed spawns due to obstacles. So ultimately RSO will have pretty little impact.

MyNameIsTrez
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Apr 12, 2018 7:42 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by MyNameIsTrez »

Hello there,

I downloaded your mod around 4 hours ago, and boy is it fun!
My world consists of Vanilla+ mods with the addition of your mod and I've made a rule for myself to only use belt and not to make any assembling machines.
This means that I've placed down 23k belt by hand so far and to make this more bearable, I've allowed myself to play at 10x the default game speed.

I've been able to fully automate red and green science, and all the components necessary for the blue science, except for the advanced circuits.
I've come to the realisation that you can use the assemblers as chemical plants, which is great.
My one problem, though, is the fact that you aren't able to use the assemblers as refineries.
I feel this is the only thing currently missing in your mod, because it's weird having to use a load of refineries while you only need a single assembler for all the other crafting with your mod.

Would it be possible for you to include the ability to use the assemblers as refineries? I don't know if there's a technical limitation because of the fact that you would need to have room for three outputs. It would be really appreciated, even though it may be a bit of a niche request. Thanks. :D

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 downloaded your mod around 4 hours ago, and boy is it fun!
My world consists of Vanilla+ mods with the addition of your mod and I've made a rule for myself to only use belt and not to make any assembling machines.
I'm glad you like it! I would love to see pictures. Do you mean you're using belts instead of trains? My original intent with the default 180 tiles min-distance was I felt that was sufficiently long to dissuade people from trying to use belts instead of trains, but if you're having a good time I surely can't complain!
Would it be possible for you to include the ability to use the assemblers as refineries? I don't know if there's a technical limitation because of the fact that you would need to have room for three outputs. It would be really appreciated, even though it may be a bit of a niche request. Thanks. :D
It's been requested a few times and I think most people agree it feels like something that is just "missing" from my mod, so it is definitely something I've considered. I may even work on that next.

MyNameIsTrez
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Apr 12, 2018 7:42 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by MyNameIsTrez »

Here's a basic showcase of my base.

The reason I didn't go with trains was because I realised I would need to have unlocked trains before I would be able to use them, and with my no-vanilla-assemblers rule, I'd need to belt some big assemblers initially to craft the necessary components for the trains and the research, or I'd have to craft everything by hand.
I'll probably not switch over to trains, even though I could mass produce rails now, because it's quicker to hook up more belt than to redo my entire map and make sure my train system works with it's stations and such.
Maybe I'll do a second run only using trains if I feel like it. :)

I feel like it's pretty crystal clear what feature I'm requesting, right? ;)

YT-Link: https://www.youtube.com/watch?v=3EPZhlb ... e=youtu.be

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 »

Thanks for the youtube video, it was really fun to see what you've done with your base. I love it!

I haven't decided if I want to add a huge refinery or enable the assembler to do it. I'd have to add a 5th pipe (currently it only has 2 inputs and 2 outputs, which isn't enough). I'd probably disable rotation to do it, which unfortunately might break some people's games if they already rotated it to get the right fluids on the right sides. Though I could always add rotation for the loaders too so they wouldn't get in the way of the pipes as it rotates. It'd be tricky to do that since I'd have to indicate where each loader goes for each rotation, but doable.

MyNameIsTrez
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Apr 12, 2018 7:42 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by MyNameIsTrez »

[quote="Avacado"]I haven't decided if I want to add a huge refinery or enable the assembler to do it.

It seems more intuitive to me that the refinery would be a separate building from the big assembler or big furnace. The other oil recipes like cracking and such could possibly keep it's place as a big assembler recipe or be moved to a refinery recipe. The big refinery should be easy to make, just make it be an enlarged vanilla refinery with a stretched version of the high-res texture of the vanilla refinery, like you've done with your big assembler and big furnace.
Making the big refinery spawn very rarely would be good, as you probably would only need 1 or a few of them to reach 1kSPM.

Have you also noticed how the ratio of big furnaces to assemblers seems a bit off? If you look at my video, you can see that there are many unused big furnaces which I've discovered on the map, while there are only a few assemblers left to use. Maybe this is because you would need a lot of furnaces in the late-game for all the plates, just thought I should at least note it.

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 previously used a 1kspm calculation to determine that the ideal ratio is 50 furnaces to 30 (assemblers + chem plants) to 1 refinery. I could make the big refineries half as powerful, for example, to give it a more reasonable ideal ratio of 50:30:2. Currently I'm using a ratio of 50 furnaces to 60 assemblers, because, as you pointed out, early game it is better to find more assemblers, since you're not even looking at the overall ratio, you just need them to cover all of the needed recipes. So I'm already putting in about twice as many assemblers as I should for the final ratio and it is still too few for early game. I'm actually working on changing the random chance formula to have an initial ratio that slowly migrates into a final ratio depending on what has actually spawned.

MyNameIsTrez
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Apr 12, 2018 7:42 pm
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by MyNameIsTrez »

A solution to your problem would be to include the distance from spawn in your calculation. Make the formula used for spawning the big assemblers a hyperbola with a horizontal asymptote at 30 assemblers. You want to have a lot of assemblers at spawn, and have less assemblers the further you go from spawn when you build your megabase, with the amount of assemblers spawning far out reaching the desired 30 assembers ratio. Here's a mockup of what I mean: https://imgur.com/a/3nx2HgX

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 »

My current plan (and the one that I'm working on coding) is to make the random chance of spawning each structures change over time as more buildings are spawned. Initially it'll target a certain distribution and slowly change as more buildings are spawned.

The advantages of this approach is I don't have to try to account for how many there are going to be with various min-distance settings and various ore settings (having lots of ore everywhere prevents spawning and can mess with how many machines are within a certain radius). The way I've coded it also accounts for buffer points and refineries and forces them all into a good balance (versus before buffer points have an easier time spawning and could then force out all the other points if others failed to spawn due to ore).

Though your approach has some advantages too, because it first means you can have more control over what you get (straight line away from your based will get you more furnaces), it also means that you'll have more furnaces on the outskirts of your base, which might be advantageous too.

deemacgee
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Jun 17, 2017 9:12 am
Contact:

Re: [MOD 0.16.x] Whistle Stop Factories

Post by deemacgee »

This mod is great, one of my favourites. Thank you!

I was wondering if you had any plans to allow players to build their own large factories, much like DellAquila's The Big Furnace or Circuit Factory? I think it would make for a very interesting alternative path for mass production, particularly if big factories are tiered around the complexity of the output product - a Big Factory 1, for example, researched with a lot of red science, could create only basic items in bulk (iron gear wheels, iron sticks, copper cable, landfill, pipe, etc), whereas a Big Factory 3 might need a lot of blue science and can assemble electric engines, refined concrete, more blue science, electric furnaces... you see where I'm going here. It would shift the focus from designing a factory to actually supplying the factory (with resources and power), providing a different sort of challenge.

EDIT: and then there's the Big Refinery and Big Chemical Plant...

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

Re: [MOD 0.16.x] Whistle Stop Factories

Post by mrvn »

Do you support deadlocks compact loaders?

I find they look much nicer than the vanilla loaders and they support all of Bobs different belt speeds.
Note: A factory taking 2 iron plates and one copper plate as input could have yellow loaders for iron and black loaders for copper.

Post Reply

Return to “Mods”