[MOD 0.17.x]Helmod: Assistant to plan its base.

Topics and discussion about specific mods
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2126
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by BlueTemplar »

BTW, % work great when you then want to copy-paste whole chains into others :
Attachments
copper_t2.5.png
copper_t2.5.png (1.28 MiB) Viewed 621 times

Helfima
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by Helfima »

@ RickJS: It was a bug, we couldn't edit this technology
Version: 0.9.18
Date: 30. 12. 2019
Features:
- Added module selection unit (selector or priority)
- Added remove button on preference priority
- Added summary for block (icon near icon for pin panel)
Changes:
- Changed caches use global data
- Changed some tooltip
Bugfixes:
- Fixed power of sub-block
- Fixed technology recipe

kenlon
Inserter
Inserter
Posts: 20
Joined: Mon Jul 25, 2016 6:57 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by kenlon »

BlueTemplar wrote:
Sat Dec 21, 2019 1:55 pm
BTW, % work great when you then want to copy-paste whole chains into others :
Okay, this has been bugging me since I first saw the option - what, exactly, is the point of being able to set a percentage on a recipe in helmod? It's obviously something that is used by people, but I can't for the life of me figure out *why*.
I must be missing something - can someone enlighten me?

Helfima
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by Helfima »

100% corresponds to 100% of production for the previous lines and some time you don't want produce all in a line
100%.png
100%.png (166.72 KiB) Viewed 572 times
for example, to produce petrolium gas you want produce with 2 lines, that's what it is for

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2126
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by BlueTemplar »

Hi, the first post seems outdated ?

nosports
Fast Inserter
Fast Inserter
Posts: 224
Joined: Fri Jan 19, 2018 5:44 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by nosports »

hello,

is it possible to have the amount of items listed in stacks ????

ie : 200 Iron-plates are 2 stacks ?

Helfima
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by Helfima »

@BlueTemplar: yes it's outdated, not enough time :D
@nosports: what are you want to do with stack information?

gogeo
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun May 28, 2017 5:24 pm
Contact:

Re: [MOD 0.15.x]Helmod: Assistant to plan its base.

Post by gogeo »

Helfima wrote:
Fri Nov 03, 2017 3:21 am
Salty Wagyu wrote:How do I calculate in Helmod the number of Science lab buildings required for my 100/sec science packs? I've had no luck doing it, everything I try makes it add the recipe for crafting a science lab, not quite what I want :roll:
You must select a technology, for sample "Worker robot speed" (infinite) (red)
Change production field by 100/2000 = 0.05 (yellow)
And see the number lab (green)
lab_number.PNG
Hello, I try to compute same things with Helmod 0.10.10 but with results - can you please shorty help on it?

I just want to know how much stuff I need to fully saturate 2-3 labs :)

Thanks

Helfima
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by Helfima »

select computing by factory and set the value at 2-3
the first recipe use 2-3 factory

gogeo
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun May 28, 2017 5:24 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by gogeo »

Helfima wrote:
Tue Mar 17, 2020 8:08 pm
select computing by factory and set the value at 2-3
the first recipe use 2-3 factory
Maybe a bug? I still have no values...

Thanks
Attachments
20200317221828_1.jpg
20200317221828_1.jpg (800.12 KiB) Viewed 181 times

Helfima
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by Helfima »

oh sure it's a bug

kinnom
Filter Inserter
Filter Inserter
Posts: 700
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by kinnom »

the boiler fuel usage shown is way off
no yes yes no yes no yes yes

GluAp
Inserter
Inserter
Posts: 23
Joined: Mon Jan 07, 2019 6:28 am
Contact:

Post by GluAp »

Hello Helfima.

First of all: Thank you very much for this mod. I have been using it essentially right after finishing my first playthrough. And it has been in every playthrough I ever did since then.
I have to say that in the beginning I had some difficulties understanding every feature, but I believe I figured out most of it on my own by now. And thanks to your continuous work on the mod it has been getting easier to use.

However I'd like to make a small suggestion for improvement.

Short version:

0. Please abandon the concept of "Sub-Blocks". Mainly in your head ^^
1. Stop calculating Blocks and dividing them into Sub-Blocks via "maximum assembling machines per Block"
2a. Include an option to choose and design a Block however the user likes and only link it to the production line by the quantity of Blocks and not directly by the quantity of items
2b. Include an option where the player can input a static number to set a quantity for a certain Production Block

Ok. "0" needs a bit more explaining. Especially because if you think about it, 1-2 more or less will result from applying "0" to this mod.


But let's start with the status quo:

status quo.png
status quo.png (319.33 KiB) Viewed 63 times

What do we see:
We see a production Block "Green Circuits" here. It shows us a lot of numbers. For every entry we see two numbers at least. We can see that this Block has the quantity of 5. Ok, I get it. I need 5 "Green Circuits" Blocks to make 150 Green Circuits. But wait? Now do I need 4*5=20 assemblers or do I need 20*5=100 assemblers?
And what is the meaning 4 or 17 Beacons?

Can you identify the problem I'm having? :o
There's something that doesn't make any sense with all these numbers.

But let's take a look in how I think, helmod works.
It's main idea is a split between Production Line and Production Block. They both interact. They form a (mathematical) relation.

The Production Block wil always take some inputs and convert them to outputs, according to the recipe the player choses. Furthermore you can choose additional, (in-)dependent recipes to interact with other recipes. Still, the Block, when you look at it from the outside, will have inputs and some outputs. When looking from the inside of the Block you will see that there usually are in fact more items, that will be produced and be used inside the Block. Items inside the Block that can't be seen from the outside of the Block will be in balance - some will be produced and used completly. Well - that's the whole idea of helmod. Have recipes chained together, have (perfect) ratios, get what you need.

The Production Block's internal view will be determined by the recipes, the amount of input or output items or the number of factories the player chooses. Usually the player can't set all the variables. For example the player can't choose to make 1000 iron plates from 1 iron ore, because there is no recipe with that balance.
The Block will calculate the missing and mathematically dependent numbers. It will show: input/output/internal items, needed machinery, needed energy and more.

But what is the difference between Production Line and Production Block?
To be honest, it is kind of hard to grasp in theory. As far as I understand, the Production Line essentially is a list of (un-/linked) Production Blocks that only recognizes the outside view of those Blocks.
It won't show the internal items of connected Production Blocks, nor will it show the machinery needed for each Production Block to do its job. I'd say its function is to allow the player to implement new recipes in a new abstraction layer, allowing for better overview for the whole base. For example, there is no recipe in the game to directly fabricate Green Circuits out of iron ore and copper ore. But the Production Line allows this view. Also it summarizes every input and output item and will give you an idea of the necessary logistics between Production Blocks.

I come to the conclusion: Production Line doesn't represent 'ingame reality'. It merges and compresses information to give players another view on what to do and possibly how to do it.
The Production Block is more 'real'. It calculates exact numbers for the game's recipes and respects the ratios for buildings, too.

Coming back to status quo. I was confused by the different numbers shown in the Production Block. Ok, it's fairly easy to understand. The upper line/number represents a so called "sub-Block", which results from restricting the current Production Block you're viewing to a maximum of assemblers in this Block. The bottom line/number will summarize the whole Block. But wait ..
So now the Block is doing the summation? Wasn't it supposed to be the job for the Production Line? But in this Block internal summation it doesn't merge information but bloats it.
Also .. A Block inside a Block? Inception anybody?

Well .. to be honest, I don't like it. I don't need to know what my total in inputs will be, when designing a Production Block. The Production Block should be: perfect, calculated ratios. Easy to understand and easy to read and build from. In our example from above. It's very easy to place 4+1 assembler with 4 beacons (I know, it's the wrong number, because i messed up), connect everything and copy-and-pace 5 times. I dare you to do 20+4 assembler+20 beacons. :twisted:

The summation of information should be done in the production line.
Alas! That's not all. With this knowledge you could just ignore the extra information. I mean, you know where to look (now) and what's important. 8-)
The (imo unnecessary) problem is the way, those "sub-Blocks" will come into existence. The only way to do so, is to limit the amount of assemblers for a recipe. What - you never used this feature and don't know where to find it?

recipe editor.png
recipe editor.png (162.18 KiB) Viewed 63 times

I knew that this option exits but still I had difficulties finding it. Nonetheless this limitation by amount of assemblers does not make sense. This way the player has only small and very indirect control over the whole "Sub-Block" process. Choosing a number of factories does usually not represent the natural way a player would construct parts of his base, which probably will be a desicion based on belt capacity and building area, less knowing exactly how many assemblers you want. And what's funny: If you have a Production Block with more than one recipe, you can actually restrict the amount of assembers for every single recipe. This get's really confusing. :?:
My intuition tells me that very few players using helmod will have actually used this feature.

But NOW, the good part :D

Forget about this sub-Block mess. Let there only be Production Blocks!!!
.
.
.
And production lines as well. Let's make the Best from this situation!

Right now the relation between production line and one Production Block will be one item. Or to be more precise, the amount of this item. In my example 30 Speed Module 1 which correlate to 150 Green Circuits. Let's say I have found a satifying setup for those 150 Circuits. If I now come to the conclusion that i need additional 10 Speed Module 1, helmod will automatically change the 150 Green Circuits to 200 Green Circuits. The ratios may be still technically be perfect but can it be build? Can it be build in a satisfactorio way?
By the way - changing an assembler or similar in the Production Block will lead to a changed Production Block as well.

Dear helfima, dead Ladies and Gentleman, dear Biters as well, I hereby present to you ... the solution.
Remove the relation between production line and Production Block via the amount of a key item. Let the Production Block always be defined by the player - he chooses how many items are made in a Production Block. It won't matter, how they are made, which assemblers or modules the player uses. This basically is the "unlinked" option. The link will only exist through the amount of Production Blocks.
If the player changes the production line it won't change the Production Block. It will only change the amount of Production Blocks needed to produce the necessary items.


improved version.png
improved version.png (132.34 KiB) Viewed 62 times

This is my idea of how an improved version could work like. It works like this:
  1. In my production line there is a need of 150 Green Circuits
  2. I choose to make them in a seperate Block. I will design this Block how I want it and it will be unlinked at first.
    I can make as many Green Circuits in this Block, as I like. I can use as many factories as I want. And beacons however I like. In this example I choose to produce 30 Circuits per Block.
  3. Next I set the slider "Calculate Block Quantity" to "ON". It will now change the Block to "linked" but leave everything else in the Block as is! It will fetch the total amount of items needed in the production line (150) and will divide this amount by the products provided by the production Block (30). E.g. 150/30 = 5. Now helmod knows that we want to build production Blocks that produce exactly 30 Green Circuits and will tell us, that we need 5 of them. The total of needed inputs will be seen in the production line view

Additionaly it would be a good idea to make the quantity field in the production line view editable by the user. There the user can input a static number which determines how many Blocks should be used. Everything inside those Blocks can then be calculated in the same way as helmod is now doing.
It really is the same thing, but in reverse direction.

I hope you like my idea and found enough time to read through all this text. I really hope that I didn't scare you with this and that if you decide to change something, it won't be too much work.
English is not my first language. If something is not understandable well, please tell me. I will try to explain.
If someone want's to add to my idea, please do so.

gogeo
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun May 28, 2017 5:24 pm
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by gogeo »

Great post! It is helping me to understand this mod even better :)


Another question - how can I compute how many bots are needed for my base? Or this computation is not possible with Helmod?

Cheers
gg

Helfima
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by Helfima »

@GluAp I am French so to reassure you, English is not my native language.

the concept of "sub-blocks" is basically a simple way to know how many times I will put my blueprint (sub-blocks) after it is true that all these figures are a bit confusing. I already had the idea to simplify that a little suggest it to you. do not try to make calculations the bottom value is always the total in your case 4*5=20 assemblers and 4?*5=17 beacons ( 4? is the rounded value)

Concerning the difference between production line and production block, this is the very principle of true production, at the factory entrance you have basic products when you leave finished products when you enter the factory you have production sectors then production stations. we could put everything in a single block but it becomes a mess to organize the workstations so it's better to divide with production line = all of the production blocks and the production block = a set of workstations. we could also make more steps but from my point of view it complicates.

I took your comments, already I wanted to move "max per block" as for "Computing by factory".
it will take time and thought

GluAp
Inserter
Inserter
Posts: 23
Joined: Mon Jan 07, 2019 6:28 am
Contact:

Re: [MOD 0.17.x]Helmod: Assistant to plan its base.

Post by GluAp »

Helfima wrote:
Sat Apr 04, 2020 2:24 pm
@GluAp I am French so to reassure you, English is not my native language.
France French? Canadian French? Or some other French? In one of those cases we'd be neighbours :mrgreen:
Helfima wrote:
Sat Apr 04, 2020 2:24 pm
the concept of "sub-blocks" is basically a simple way to know how many times I will put my blueprint (sub-blocks) after it is true that all these figures are a bit confusing. I already had the idea to simplify that a little suggest it to you. do not try to make calculations the bottom value is always the total in your case 4*5=20 assemblers and 4?*5=17 beacons ( 4? is the rounded value)
Ok? But why do you want to have a "sub Block" to represent a Blueprint? I'm sure, a Production Block can do the same.
Basically a Production Block should represent a finished element, so to say, a blueprint. This Blueprint/Block will output a specific amount of item X.
The Production Line is your Base Planner where you specify how many items of a sort you need. If you need more of item X, you should not have to rebuild your Blueprints (Production Blocks). You only should change the quantity of Blueprints you place in your game.

Right now helmod will work like this: Let's say in your Base you need Iron Plates and you put this in a Production Line representing your Base. You will make a Production Block for 30 Iron Plates and make a Blueprint for it. You progress further into game and realize, that you now want to have 120 Iron Plates. You change it in the Production Line. Most factorio players will instantly see that you just have to copy the existing Block/Blueprint for 30 Plates 3 more times, and you will get those 120 Plates. It's easy, no magic. But helmod at this moment does not "think" like this. Instead of just telling you that you need the 30 Plates Block 3 more time, it will adjust/change the 30 Plates Block to be a single 120 Plates Block.

Sure, you can split this single 120 Plates Block in 4 30 Plate Sub Blocks. But why? You already had a perfect 30 Plate Block. So - no Sub-Blocks needed.

The same principle but in math-speak:
Left Side == the Production Line == item_request
Right Side == the Production Block == item_provide
Default state for Production Block == linked. So an "A" item_request will result in "A" on item_provide

A = A

now we want to change "A" on the Production Line side to "C". But because left and right are linked, the Production Block side although has to change to "C".

C = C

The left side is what we wanted. It is a new player input. But we want the right side to have an "A" in it, because we already had a perfectly designed "A". So to get from "A" to "C", on the right side we do ..

C = A*B

.. where "B=C/A". This is true ;)
So for any changed user input on the Production Line (left) side, the "A" which represents our Blueprint we already built, stays always the same. No need to recalculate the whole Production Block. Just calculate "B=C/A" and show "B" to the player. so he now knows, how many Blueprints "A" he needs. Again - no Sub-Blocks needed. No need to redesign "A" to form new "C"

Concerning the difference between production line and production block, this is the very principle of true production, at the factory entrance you have basic products when you leave finished products when you enter the factory you have production sectors then production stations. we could put everything in a single block but it becomes a mess to organize the workstations so it's better to divide with production line = all of the production blocks and the production block = a set of workstations. we could also make more steps but from my point of view it complicates.
Exactly. I just used other words for the same description :)

By the way: I just took a look at your mod code to try to see if I can find something for me to change in the code so I could maybe show you directly what I'd like with a working mod. But holy cow .. I have basic understanding in C coding, algorithms and can usually read other code as well. But every time I have to read through "real" code to find and understand something I just get a headache. Just to many words and numbers mixed together. I found some parts in the Modul.lua and ModelCompute.lua but I still don't have any idea how it works together. I honestly doubt I'd be able to do this in any responsible amount of time as I have no experience with lua or the factorio data structures.

How long did it take you to write the mod?
gogeo wrote:
Sat Apr 04, 2020 9:03 am
Great post! It is helping me to understand this mod even better :)


Another question - how can I compute how many bots are needed for my base? Or this computation is not possible with Helmod?
Thank you.

But how would you even try to compute the bots for a base? To calculate such an idea you would have to model all the chests and positions / distances between provider and requester chests. This means, layout your whole base as it will be build, for whatever part uses logistic networks. But this again means, you can't plan your base, instead you just have to build it, doesn't it?
I guess the best idea when thinking about bots is to do it realtime. So for any given state of your base at a certain time, just read all your robo networks and see if you have unused robots. If yes, you base has roughly enough. If there aren't any bots left waiting, you have to build more until it is satisfied.
I definitly have seen this done. You can even put new bot into the network by inserting them into roboports by inserters.

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: T-A-R