Comments on Deciders, possibly other entities

Moderator: ickputzdirwech

AngledLuffa
Fast Inserter
Fast Inserter
Posts: 187
Joined: Fri Jan 05, 2018 5:18 pm
Contact:

Comments on Deciders, possibly other entities

Post by AngledLuffa »

By which I mean, literally comments. For example, I have a decider which only implements loading of a particular item if the right train comes to the base. Come back later to see that I have a decider set to check T = 673, which doesn't tell me which train it is. If I could leave a comment on the decider saying "Green bottle train" that would save me some time tracking down the train and figuring out which train it was I had chosen all those hours ago.

Koub
Global Moderator
Global Moderator
Posts: 7744
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Comments on Deciders, possibly other entities

Post by Koub »

Hi,

Today, comments are left the painful way, through signals you can read on Alt-view.
Hopefully this can help until what you have suggested is implemented (if the devs choose to) :).
Koub - Please consider English is not my native language.

AngledLuffa
Fast Inserter
Fast Inserter
Posts: 187
Joined: Fri Jan 05, 2018 5:18 pm
Contact:

Re: Comments on Deciders, possibly other entities

Post by AngledLuffa »

Would you mind clarifying a bit? Unless I misunderstand, the signals are just a channel and a number, so not really enough to say what it is.

Although in the specific case of the green bottle train I could leave a signal for green bottles, for example. So while that doesn't solve the general case, it does solve this particular use case quite nicely. Thanks!

Caine
Fast Inserter
Fast Inserter
Posts: 213
Joined: Sun Dec 17, 2017 1:46 pm
Contact:

Re: Comments on Deciders, possibly other entities

Post by Caine »

I agree with the proposal. I am writing a similar proposal myself (though I would also like colour selection like with trains).

While I was searching for related work, I found some examples of current practices. The signal labeling that Koub refers to can be seen here:
https://github.com/justarandomgeek/fact ... /Readme.md

Look for the constant combinators.

Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Comments on Deciders, possibly other entities

Post by Tekky »

I am against the possibility of leaving comments on individual combinators.

However, I am strongly in favor of the possibility of placing signposts with notes next to entire combinator setups. When you click that signpost, it will display a message left behind by the person who created the combinator setup. This is important for multiplayer, if you want to have several people working on combinator setups.

These signposts would also be useful for other purposes.
AngledLuffa wrote:Would you mind clarifying a bit? Unless I misunderstand, the signals are just a channel and a number, so not really enough to say what it is.
I guess he is referring to the possibility of placing several combinators next to each other and set each of these combinators to a different letter, so that a word is displayed when you press the ALT key.

However, this will only work if you have the interface setting "show combinator settings in "alt-mode"" active.

Constant Combinators are best for this purpose, because they only have a size of 1x1 (one tile), whereas all other combinators have a size of 2x1 (two tiles).

Caine
Fast Inserter
Fast Inserter
Posts: 213
Joined: Sun Dec 17, 2017 1:46 pm
Contact:

Re: Comments on Deciders, possibly other entities

Post by Caine »

Tekky wrote:I am against the possibility of leaving comments on individual combinators.

However, I am strongly in favor of the possibility of placing signposts with notes next to entire combinator setups. When you click that signpost, it will display a message left behind by the person who created the combinator setup. This is important for multiplayer, if you want to have several people working on combinator setups.

These signposts would also be useful for other purposes.
It is certainly a more general solution, that I agree with. However, sometimes you want to document specific parts of a combinator setup. I.e. name the individual components as well as the name the whole. For signs the scope of what they apply to is less clearly defined, for a named combinator this is instantly clear. We are however, nitpicking at this point. Some mechanism for attaching labels is needed.

The reason why I also would like to see colouring is that with some proper colour coding discipline you can see the functions from a distance at a glance. Though it is considerably more work to add.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1724
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Commenting combinators

Post by Pi-C »

I'm still on my first real game of Factorio (discounting two attempts I broke off after a while), and I'm having quite some fun with combinators. Though I have accomplished some things with them I never thought I'd ever be able to when I started out, I still consider myself rather an advanced beginner than an expert in circuit logic.

I suppose that I'm still not using combinators too effectively, using way too many of them where others would probably achieve the same result with just a few. Consequently, I often find myself in a position where the whole area is already covered with combinators, but then I have an idea and squeeze in yet another combinator here or there, have to place power poles to hook them up to a signal sent by a combinator far away, and have a lot of spaghetti wire. While I'm at it, I know what I want to do, why I made a certain connection or why I set up a particular combinator in a particular way. However, if I get back there some days later everything is just a big mess (following the flow of a signal can be quite tedious if you have lots of wire going this way or that -- especially if it's not easy to discern whether a wire connects to a power pole or any of the combinators in the vicinity). So I think it would be great if there was a basic way to comment combinator code.

I have seen text plates or signs being used for commenting stuff in tutorial videos. However, these seem to come from mods, not the vanilla game. Moreover, placing an additional sign right in the centre of a bunch of combinators may not be ideal (What combinator does the sign refer to, is the text readable or does it just enhance the chaos?). So my idea is to allow user comments directly in the combinators, accessible through left click, the same place where you define input and/or output. It would already be helpful if you could put down what a particular variable/virtual signal is supposed to mean: Does "C" stand for "Clock", for "Cargo", or for "Closed"? Is "O" a placeholder for "Open [rail signal]", "On" or "Off"? Have you used "T" for "Time", or is it the ID of a train? Personally, I've already used "C" and "O" with all these meanings, so I roughly know what they could mean. Perhaps I'll copy a blueprint from somebody who uses the same signals for a completely different meaning. It would be so much easier to understand the code if you knew what it was about.

My suggestion: If a virtual signal is used, pop up a field where the user can spell out what that signal should signify (like "Enable condition" for inserters or "Closed condition" for rail signals). Optionally, there could also be a text field for additional information like "Don't remove -- isolates networks!" or something similar (could work like naming blueprints). The comments would be shown only if you left-click a combinator, so I guess it would appear rather unobtrusive: You only get to see this information if you care about it; it would be there but you don't need to see it if you're just interested in putting down some blueprints somebody posted in a forum.

What do you think? Does my idea make any sense? Could it be implemented at all, or would it take up too much memory to store that additional information?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Koub
Global Moderator
Global Moderator
Posts: 7744
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Commenting combinators

Post by Koub »

[Koub] Moved to Ideas and Suggestions.
Koub - Please consider English is not my native language.

McDuff
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Jan 11, 2015 11:09 am
Contact:

Re: Commenting combinators

Post by McDuff »

Good idea!

ikarikeiji
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Sun Jul 12, 2015 6:28 pm
Contact:

Re: Commenting combinators

Post by ikarikeiji »

What about just allowing combinators to be named, like train stations?

That should give you space for the comment, as well as appearing when hovered over, and should be easy to accomplish as entity naming is already possible.

Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Commenting combinators

Post by Tekky »

Related threads:

viewtopic.php?f=6&t=56214 Comments on Deciders, possibly other entities
viewtopic.php?f=6&t=62279 Combinators information
viewtopic.php?f=6&t=58685 Signs

EDIT: Some of these links are no longer valid, as the threads have been merged.
Last edited by Tekky on Tue Aug 06, 2019 10:29 pm, edited 1 time in total.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1724
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Commenting combinators

Post by Pi-C »

ikarikeiji wrote:
Fri Oct 19, 2018 11:53 am
What about just allowing combinators to be named, like train stations?

That should give you space for the comment, as well as appearing when hovered over, and should be easy to accomplish as entity naming is already possible.
Sounds like a good idea -- until you think of the mess this would result in in map mode. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Pi-C
Smart Inserter
Smart Inserter
Posts: 1724
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Commenting combinators

Post by Pi-C »

Tekky wrote:
Fri Oct 19, 2018 2:03 pm
Related threads:

viewtopic.php?f=6&t=56214 Comments on Deciders, possibly other entities
viewtopic.php?f=6&t=62279 Combinators information
viewtopic.php?f=6&t=58685 Signs
Oh, geez -- I *have* looked for "comment" in the forum search, but I didn't find these threads. Well, with a search term like that, in an environment with modders who not only write but also out-comment code, it had to be expected that relevant finds would just drown in the endless sea of irrelevant search results. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Commenting combinators

Post by Tekky »

Pi-C wrote:
Fri Oct 19, 2018 2:37 pm
Oh, geez -- I *have* looked for "comment" in the forum search, but I didn't find these threads.
I am also unable to find the first thread in my list (the most important one) when searching for "comment", despite the thread containing exactly that word in its original post. Maybe it is a forum bug?

Google search may be a better alternative in that you can use it and limit your searches to the "forums.factorio.com" domain (by adding "site:forums.factorio.com" to the search query). Unfortunately, however, you cannot search individual sub-forums with Google search. For example, you cannot limit your search to the "Ideas and Suggestions" sub-forum. This is only possible with the forum's search feature.

ikarikeiji
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Sun Jul 12, 2015 6:28 pm
Contact:

Re: Commenting combinators

Post by ikarikeiji »

Pi-C wrote:
Fri Oct 19, 2018 2:30 pm
ikarikeiji wrote:
Fri Oct 19, 2018 11:53 am
What about just allowing combinators to be named, like train stations?

That should give you space for the comment, as well as appearing when hovered over, and should be easy to accomplish as entity naming is already possible.
Sounds like a good idea -- until you think of the mess this would result in in map mode. :-)
Well, of course, the names wouldn't be shown on the map. Just the ability to name them in the first place would be transferred.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1724
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Commenting combinators

Post by Pi-C »

Tekky wrote:
Fri Oct 19, 2018 2:03 pm
Related threads:

viewtopic.php?f=6&t=56214 Comments on Deciders, possibly other entities
viewtopic.php?f=6&t=62279 Combinators information
viewtopic.php?f=6&t=58685 Signs
Actually, what is your argument against comments on individual combinators? Quoting your post on the first thread you linked:
I am against the possibility of leaving comments on individual combinators.

However, I am strongly in favor of the possibility of placing signposts with notes next to entire combinator setups. When you click that signpost, it will display a message left behind by the person who created the combinator setup. This is important for multiplayer, if you want to have several people working on combinator setups.

These signposts would also be useful for other purposes.
So, you are against them, and you prefer signs. I don't want to sound rude, but I really don't get your point! Please note, so far I have never played Factorio in multiplayer mode. I could imagine that in MP you could only see the settings of your own combinators, assemblers etc., not that of other players -- however, for some reason you could read what others wrote on a signpost. If that really should be the case I can at least partly understand your reservations.

Nevertheless, I wouldn't condemn per-combinator-comments outright. Don't you think that they could exist together with signposts? Consider, please, the following analogy:

A typical, well-documented script (I'm not a programmer, really, but I have cobbled together a couple of shell scripts in the past) should state the purpose it should be used for right at the top, possibly together with a summary of allowed options, copyleft notes etc. Then you typically define a bunch of functions. If it is not already obvious from the function name, you add a comment above or at the start of a function explaining what it is used for. Finally, you add comments to singular blocks of code, or even to single lines, so you will remember why one loop starts at zero or to emphasize that you are using a global instead of a local variable.

In Factorio terms, you could use bricks, concrete, colored landfills, textplates etc. to describe what you want to do in a particular area. When planning your factory, you could use such markers (i.e. comments) for a rough layout (something like "Smelter", "Stacker", "Science production" etc.). If the letters are big enough you could even see them in map view, so you get a rough idea how everything is laid out. That would correspond to the boiler plate comments on top of a script.

Then you could use signposts inside such an area to describe what a certain group of combinators is used for. At a train stop, for example, I could have one group of combinators to determine when a green signal is sent to a train (e.g. if an empty train arrives at an unloading station, if the train doesn't have the required cargo, if there is no space left to unload anything, or if some time has passed). Another group of combinators could be used to request a train with a specific cargo, yet another for processing what other cargo a train is carrying in addition to the material needed at that station. It would totally make sense to use signposts to summarize what a certain set of combinators is supposed to do (given you still have the place to cram a sign in, which I unfortunately don't have in some stations). The signposts would correspond to comments for a complete function.

Finally, when you get down to the nitty-gritty details, there would be the per-combinator-comments that explain what a particular combinator does or what meaning you have assigned to a particular virtual signal. That would be your per-line-comments in a script.

I believe there are legitimate use cases for all three types of commenting -- i.e. using floor decorations, signposts, and comments on individual entities. So, without wanting to sound rude, what exactly is your argument against the latter aside from "I am against it"? If you really don't like comments on combinators, just don't use them, but your being even "against the possibility of leaving comments on individual combinators" is something I just don't understand. After all, having different options/possibilities to do things is just what Factorio is all about, I thought. So if there are any real reasons against using per-combinator-comments, please explain -- I would give way to good arguments, but it takes more than a simple "I don't like them" to convince me. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Pi-C
Smart Inserter
Smart Inserter
Posts: 1724
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Commenting combinators

Post by Pi-C »

ikarikeiji wrote:
Mon Oct 22, 2018 12:18 pm
Pi-C wrote:
Fri Oct 19, 2018 2:30 pm
ikarikeiji wrote:
Fri Oct 19, 2018 11:53 am
What about just allowing combinators to be named, like train stations?

That should give you space for the comment, as well as appearing when hovered over, and should be easy to accomplish as entity naming is already possible.
Sounds like a good idea -- until you think of the mess this would result in in map mode. :-)
Well, of course, the names wouldn't be shown on the map. Just the ability to name them in the first place would be transferred.
I'm sorry, but did you really have to use train stations of all things as an example? That has put me completely off track because I had map view on in my game at the time and I saw all the names beside the train stops. :-) Of course, you are right: locomotives, science labs and possibly a lot of other stuff have names assigned to them that do not appear on the map. So, yes, that really sounds like a good idea.

There is one point, though, that I don't know about: Are there any limitations to the amount of text you can use as a name string? I wouldn't want to write comments the length of a novel, mind you, but it would be too bad if there were no more than, say, 50 characters available for comments. If, however, there was no or just a really reasonable hard limit, using the name field for comments seems to be the way to go: efficient and -- that's what you said -- easy to accomplish.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

AngledLuffa
Fast Inserter
Fast Inserter
Posts: 187
Joined: Fri Jan 05, 2018 5:18 pm
Contact:

Re: Commenting combinators

Post by AngledLuffa »

While drawing on the ground with bricks is certainly possible, it also takes up a ton of space and is incredibly tedious. Whether the comments take the form of signposts or comments associated directly with the circuit elements, it would be nice to have a way to make short notes on any particular setup.

Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Commenting combinators

Post by Tekky »

Pi-C wrote:
Tue Oct 23, 2018 4:39 pm
I believe there are legitimate use cases for all three types of commenting -- i.e. using floor decorations, signposts, and comments on individual entities. So, without wanting to sound rude, what exactly is your argument against the latter aside from "I am against it"? If you really don't like comments on combinators, just don't use them, but your being even "against the possibility of leaving comments on individual combinators" is something I just don't understand. After all, having different options/possibilities to do things is just what Factorio is all about, I thought. So if there are any real reasons against using per-combinator-comments, please explain -- I would give way to good arguments, but it takes more than a simple "I don't like them" to convince me. :-)
I don't have anything against comments on individual combinators per se. I just have doubts that they are worth implementing (i.e. the developer's time is better spent on other things).

If a combinator setup is so complex that it requires comments, it will almost certainly consist of many combinators. Therefore, in my opionion, it makes more sense to place one signpost with a comment for the whole combinator setup, instead of individual comments for every single combinator. In the rare case where you need one comment per combinator, you could still do so, by placing one signpost per combinator.

For this reason, I think comments should be implemented as external signposts and not as comments on the combinators themselves. This would also allow signposts to be used as comments for other things, for example as a description on the purpose of conveyor belt setups.

Of course, it would be possible to implement both (comments as external signposts and comments on individual combinators). In principle, I don't have anything against this. I just consider it much more important for external signposts to first be implemented. If a sufficient number of Factorio players later find that this is not sufficient and they want to additionally be able to put comments directly on individual combinators, then I have nothing againt it. However, I doubt that players will find this necessary.

Pi-C wrote:
Tue Oct 23, 2018 4:39 pm
A typical, well-documented script (I'm not a programmer, really, but I have cobbled together a couple of shell scripts in the past) should state the purpose it should be used for right at the top, possibly together with a summary of allowed options, copyleft notes etc. Then you typically define a bunch of functions. If it is not already obvious from the function name, you add a comment above or at the start of a function explaining what it is used for. Finally, you add comments to singular blocks of code, or even to single lines, so you will remember why one loop starts at zero or to emphasize that you are using a global instead of a local variable.
Exactly. Comments are mainly used on entire functions of code or at least blocks of code, not so much on individual operations. This is equivalent to placing one signpost for a group of combinators, instead of attaching a comment to a single combinator.

As I stated above, in the rare cases when this is required, it would still be possible to have one comment per combinator, by placing one signpost next to each combinator.
Last edited by Tekky on Tue Oct 23, 2018 6:32 pm, edited 1 time in total.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1724
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Commenting combinators

Post by Pi-C »

AngledLuffa wrote:
Tue Oct 23, 2018 6:00 pm
While drawing on the ground with bricks is certainly possible, it also takes up a ton of space and is incredibly tedious.
Right, but it is a way to sparsely "comment" some area in the vanilla game. Mods like "Text Plates" make writing text easier but I guess you would still need a lot of space. Therefore, I suggested floor decorations to be used for commenting/marking on a very general level only, where just one word is required. Other means are necessary if you want to get into details. Signposts are good for that, but they also take up space. I have watched some tutorials where signposts have been put to very good use: a bunch of signposts set up like nested lists (1., 2., 2.1, 2.2, 3. …) on the left, the examples on the right. That made for quite a well-structured view and presentation --- but such designs really require space, while associating comments directly with combinators (or other entities) doesn't require any additional space at all.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Implemented in 2.0”