Ideas on how to ignore Artillery wagon's "cargo"?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

redeemed2011
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 29, 2016 7:36 pm
Contact:

Ideas on how to ignore Artillery wagon's "cargo"?

Post by redeemed2011 »

Howdy.

I have very much enjoyed Logistic Train Network for quite some time now. Amazing the ideas y'all have implemented which I am still grasping to understand.

The main question I have spent some time trying to solve: How does one tell LTN or Factorio base to ignore certain wagons when taking inventory (checking wait conditions)? Or rather, how does one configure LTN to not add the "Empty cargo inventory" wait condition ever?

In a map I am playing, I started adding a single artillery wagon to the fluid trains and eventually plan to add them to all trains... cause it is fun! However I have noticed that my trains will wait until they've been at their unloading station (requester) until the full 2 minutes pass then leave. Why? Because the train station thinks that the artillery wagon is providing cargo and will never leave due to the train's wait conditions list including "Empty cargo inventory".

After reading the control logic in LTN's source, I am pondering if I am supposed to do some combinator work at my fluid (steam) provider station to somehow filter the train contents provided to LTN so LTN's item inventory list will never contain anything but steam, thus keeping it from adding the "Empty cargo inventory" wait condition.

If LTN or Factorio base always consider the Artillery Wagon's ammo to be cargo, then surely there's a way to filter the wagon's "cargo" from the wait condition.

What are your thoughts, fellow automation lovers?

Using LTN 1.7.3. If I comment out lines 907-910 in control.lua, "Empty cargo inventory" is no longer added to trains with just fluid wagons and an artillery wagon.

EDIT: Clarified a statement and added LTN version.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

Empty and Full conditions are hard coded. Mods can't change how those behave.
The behavior you describe is why I avoided using those when possible. However the fluid rounding bug makes it necessary to use empty for fluid deliveries or trains can leave with 0.1-0.4 residue as even train conditions will round to int, reading 0.1-0.4 as 0. :roll:

redeemed2011
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 29, 2016 7:36 pm
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by redeemed2011 »

Thank you.

That wait condition makes perfect sense whenever the user would be transporting different types of fluid--steam on one run, oil on the next, etc. I only transport steam and barrel the rest, so I never noticed this before.

Would you, Optera, be interested in a pull request to add a LTN map-level setting for toggling that wait condition? For bypassing the if statement on line 908, "if condComp == "=" and countOverride == 0 then".

Just realized you even commented why that logic block was in there. I read it but I clearly didn't think on it. :)

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

Sorry, I won't add this as option.
A while ago I added a similar option "finish loading" and to this day I am annoyed by players turning it off and then complain LTN wouldn't work properly.
Now that I think about it, the time may have come where finish loading is no longer optional.

redeemed2011
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 29, 2016 7:36 pm
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by redeemed2011 »

Understandable. :) Thank you!

redeemed2011
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 29, 2016 7:36 pm
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by redeemed2011 »

I've forked the repo so as to be able to quickly rebase with the official mod. Only sharing this just in case anyone else only ever transports one fluid type and likes to use an artillary wagon (really a regular cargo wagon as well) on the same train as a fluid wagon.


It will do as Optera says and not fully empty your fluid out when it gets to less than 1 unit of fluid.
Last edited by Optera on Sun Feb 18, 2018 5:40 am, edited 1 time in total.
Reason: removed link to redistribution

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by steinio »

redeemed2011 wrote:I've forked the repo so as to be able to quickly rebase with the official mod. Only sharing this just in case anyone else only ever transports one fluid type and likes to use an artillary wagon (really a regular cargo wagon as well) on the same train as a fluid wagon.


It will do as Optera says and not fully empty your fluid out when it gets to less than 1 unit of fluid.
You are violating the license.
Last edited by Optera on Sun Feb 18, 2018 5:40 am, edited 1 time in total.
Reason: removed link to redistribution
Image

Transport Belt Repair Man

View unread Posts

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

I have to ask you to remove your fork.

Any rebranding or redistribution is prohibited by LTN's license.
https://github.com/Yousei9/Logistic-Tra ... LICENSE.md

SpiffyTriffid
Inserter
Inserter
Posts: 26
Joined: Tue May 15, 2018 8:40 pm

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by SpiffyTriffid »

Optera wrote:I have to ask you to remove your fork.

Any rebranding or redistribution is prohibited by LTN's license.
https://github.com/Yousei9/Logistic-Tra ... LICENSE.md
Steinio, please repost the fork, as I am interested in it.
An interpretation of this situation that assumes no malice is that Optera seems to have failed to read the licensing and ToS for the Github hosting they are using when they indicated their acceptance - specifically:
[quote]

5. License Grant to Other Users Any User-Generated Content you post publicly, including issues, comments, and contributions to other Users' repositories, may be viewed by others. By setting your repositories to be viewed publicly, you agree to allow others to view and "fork" your repositories (this means that others may make their own copies of Content from your repositories in repositories they control).

If you set your pages and repositories to be viewed publicly, you grant each User of GitHub a nonexclusive, worldwide license to use, display, and perform Your Content through the GitHub Service and to reproduce Your Content solely on GitHub as permitted through GitHub's functionality (for example, through forking). You may grant further rights if you adopt a license. If you are uploading Content you did not create or own, you are responsible for ensuring that the Content you upload is licensed under terms that grant these permissions to other GitHub Users.
[/quote]
Either Optera does not have permission to upload the mod in the first place to GitHub, or they did not read the ToS when they clicked "I accept", or they are willfully misrepresenting their legal abilities to demand you take down the fork. Rebranding or redistribution is prohibited by the LTN license, yes, but Optera has given you permission to fork when they uploaded LTN to a public Github repo.

Edit: This was overly hostile and I apologize for it. I was irritated at the situation but that does not justify or excuse my hostility toward you, Optera.
Last edited by SpiffyTriffid on Wed May 16, 2018 5:34 am, edited 2 times in total.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

Being allowed to fork LTN, for private use or collaboration, does not mean you are allowed to redistribute your fork.

SpiffyTriffid
Inserter
Inserter
Posts: 26
Joined: Tue May 15, 2018 8:40 pm

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by SpiffyTriffid »

I am certainly not requesting you remove the master copy of LTN. I am simply requesting that you acknowledge that GitHub users have the right to fork any public repo, as steinio's fork of LTN seems like the perfect solution to my problem I have been having with LTN. If you are not the original author of LTN or are somehow incapable of granting rights, then yes, you would be legally required to take down the repo as it should never have gone up in the first place, comparable to me uploading a copy of Windows 10 source code to GitHub. However, I do not believe that is the situation.
I apologize - it seems your post has been edited.
per the GitHub ToS, all users are granted the right to "reproduce [the uploader's] Content solely on GitHub as permitted through GitHub's functionality". This includes having public forks and permitting download through GitHub. The user is not distributing the content, GitHub is, in accordance with their ToS.
On a broader note, permitting people to create public forks and allowing users to create "minor fixes" (which on a side note, fail to be legally defined in a concerning manner - what constitutes a "minor fix" and what constitutes a "major fix", for example) and then telling them in a custom license that they may make changes only if the fork is kept private, seems like a very silly way to handle source licensing.
I apologize for my earlier conduct - looking back on it, my first post comes off as needlessly aggressive. I was very irritated at the situation, but that is no excuse for me to have been uncivil.

SpiffyTriffid
Inserter
Inserter
Posts: 26
Joined: Tue May 15, 2018 8:40 pm

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by SpiffyTriffid »

I am curious as to what you are trying to accomplish with your custom license. Reading through it was confusing as to what is and is not allowed - it would be much easier if an existing license was chosen to distribute the mod under. If you are concerned about not receiving credit for your work, the LGPLv3 license ensures that all derivative copies must cite you as the author. Similarly, if you are concerned with liability, you can use the MIT license to disclaim all liability. There are many open source licenses that would make contributing to the project a lot easier, and I would be happy to help you pick one out if you wanted. https://choosealicense.com

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

SpiffyTriffid wrote:I am curious as to what you are trying to accomplish with your custom license.
As stated in the license it prevents rebranding, rehosting, reusing my code in other projects and making money out of my work. I realize the last part could also be interpreted as to prevent youtubers from showcasing LTN. So far no one has asked for an excemption of this though.

None of the licenses I found allowed for these restrictions.

Also I think it's a lot clearer than all the legalese in other licenses.

SpiffyTriffid
Inserter
Inserter
Posts: 26
Joined: Tue May 15, 2018 8:40 pm

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by SpiffyTriffid »

Hmm. I see why you decided to make your own - the current copyleft licenses are actually designed to prevent those restrictions, save for-profit distribution. I'm trying to come up with something that would be easier to contribute to and use, but also meet the needs that drive you to prohibit rebranding, rehosting, and reusing. Have you considered giving permission to make personal copies of the mod and allowing rehosting and sharing, as long as it is nonprofit, links back to you as the author of the code, and gives you the rights to the modifications while granting the person a perpetual right to their modifications, or something similar? My main concern with the current license is that A) per the license I am not allowed to make a PR on the main branch, as that would be making the modified code available to the public, and that B) I am not allowed to make changes and share it with others (my friends who want to play on my server) even if I were to cite you as the author. For example, the https://mods.factorio.com/mods/Schorty/ ... n-detector mod was cited as an inspiration and example for one of your mods, but if it were released under your license you would have been prohibited from using it to develop the scanner mod that many use and enjoy. The way I see it, and I understand you likely have a different opinion, is that allowing someone to change a mod to better suit their own playstyle or to add features and then share those changes with others is something that should always be considered. Furthermore, with a nonprofit GPL license or similar, you would be able to incorporate any improvements to the mod that you wanted, and any "improvements" that you do not want to incorporate can remain separate in a different mod, allowing you to curate your official version of LTN while providing others the ability to find a mod that matches what they want, similar to how software can be forked to provide domain-specific utility. I don't want to get into an argument over copyleft, and I understand that it's your code and you're rightfully very protective of it, but I think that perhaps letting others develop with a slightly more lenient license could do a world of good in terms of others creating new features or bugfixes for your code.

User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by thereaverofdarkness »

I just don't use the wait until full or empty conditions because it's too easy to break. I prefer at loading stations to pick one important resource and tell it to either get A amount of that or leave after B time has passed. Or you can keep it simple and just figure out how long it takes to fill or empty, then tell it to wait that long.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Aeternus »

Can't speak for LTN, but for vanilla there's some options:
- If you know the cargo type that's going to be loaded, something like "Iron Ore >7999" could work for a 4 wagon ore train.
- A station hooked to the circuit network could be used to send a circuit signal to the train to tell it to move on (based on no inserter activity for a period or somesuch).
- "Inactivity > xx" is always an option.

Optera wrote:
SpiffyTriffid wrote:I am curious as to what you are trying to accomplish with your custom license.
As stated in the license it prevents rebranding, rehosting, reusing my code in other projects and making money out of my work. I realize the last part could also be interpreted as to prevent youtubers from showcasing LTN. So far no one has asked for an excemption of this though.
None of the licenses I found allowed for these restrictions.
Also I think it's a lot clearer than all the legalese in other licenses.
Problem is you're going to come up on issues where existing legalese conflicts with your own to-the-point legalese. Showcasing Factorio with LTN in LetsPlay's for instance would fall under "fair use", so challenging folks on that would likely not hold up and likely end up invalidating your entire license. I understand the intent behind your terms but try to loosen it up a little. Modding communities generally don't try to steal work from eachother. We all use the same API determined by the base app we mod for. Personally, I'd be happy enough with just being credited as the original author since it is a hobby project.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

IS and LTN Where under LGPL until someone started rehosting a rebranded version of LTN.
Since then I'm using basically the same license as bobingabout. I'm not going to change it.

That's the end of the license discussion or i'll have to lock this thread.

SpiffyTriffid
Inserter
Inserter
Posts: 26
Joined: Tue May 15, 2018 8:40 pm

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by SpiffyTriffid »

This is the last I'll say about the licensing, but I just wanted to make you aware of this as it seems you may not have known this - if you have ever accepted any changes from others to the code while a mod was still licensed under LGPL, the mod must remain LGPL forever, as the changes were contributed under LGPL. Furthermore, any versions that were ever released under the LGPL are available forever under the LGPL, as the LGPL does not allow for revoking the LGPL license. The reason I originally opened this can of worms yesterday was because I was interested in writing a toggle for the mentioned modification that allows ignoring the wagon cargo and placing it under an "advanced user" subsection, which I was planning on contributing back to you in a PR to be potentially included back into the main mod. I understand that you may have been soured on the LGPL due to the rude actions of a single user, but this closed source license you are releasing your code under is making it very hard for me to provide my contributions. I too would like credit for my work, but under your license I am not allowed to share any modifications to your mod with others if you decide not to accept the PR, nor can I allow the code that I was planning on submitting to become public (by submitting the PR) without violating the license, nor ensure that I receive credit for my modifications if I were to send the modifications to you privately and assign all rights to you, nor ensure that my modifications are not monetized or locked away in the future. Again, I understand that having your work "stolen" was a very frustrating experience, as I have experienced the same thing with GPLv3 where a person forks the code and distributes it without doing much to credit me, but if the person who "stole" your mod did not credit you at all such as keeping your copyright notices and potentially linking back to you then they were in violation of the LGPL to begin with and had no legal right to distribute it - the LGPL requires keeping the copyright indicators to prevent exactly that from occurring. In the end, it's your mod and you have control over where you take it, but for the sake of the community I ask you to please reconsider licensing it under something such as CC-BY-NC-SA, which would allow derivative versions but would legally require all derivative works to identify you as the original author and would prevent commercial exploitation. It would ensure that you are credited in any mod that derives from LTN, as well as allowing me to receive credit for my own modifications to the code and ensuring that my code would never be locked away if the owner decides to explosively exit the modding scene (I'm not in any way implying that you would, but it happens every once in a while, and is frequent enough to be a real concern when assigning all rights to another person) or risk having my work commercially exploited without my permission (again, not implying that you would, but it is a concern of mine regardless of the moral integrity of the author). Thank you for having this discussion with me, and I am grateful that you have provided me with this mod that makes managing trains so much easier. I'll drop the subject now, but I do hope that you reconsider relicensing the mods to allow others to both safely improve them as well as build great things upon them.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by Optera »

An almost impossible to read wall of text.

Here's the short version on how code ownership and licensing works.
1) You own your own code unless you signed a contract transferring ownership to someone else.
2) Owners may change change licensing between every release without warning or reason. As you said a license is bound to a certain version, not a project as a whole.

When changing from LGPL to a customized restrictive license the one person who had been contributing code to LTN had given me a written transfer of his ip (otherwise i would've just removed it).

Older versions are still under LGPL, but neither will I support them nor would those do you any good. LTN has seen several mayor rewrites, changing internal logic so much those versions share only some console message related code with the current head.

I understand you want some form of recognition for contributions, which I usually give inside the change log.
However I also want to keep my a project I've poured an unhealthy amount of time into under my control. Therefore the custom license will not change and any contribution to LTN automatically transfers full ownership of said contribution to me.
Virtually any contribution you make to an other bigger project even those released under GPL do the same. If you ever contribute to Firefox, or LibreOffice becoming a footnote in the change log is reserved to those doing some major improvements.

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

Re: Ideas on how to ignore Artillery wagon's "cargo"?

Post by mrvn »

Except virtually any contribution you make to an other bigger project especially those released under GPL will not transfer ownership. Those that are an exception require paperwork. Transferring ownership is quite complicated. For example to contribute to the GNU project you actually get hired by them for the sum of 1$ in the form of stickers because world wide ownership generally goes to the employer. So please don't claim that virtually any other project takes ownership of contribution. That's rather the exception.

As for credits it is understandable that large projects can't explicitly list every contributer down to people that only changed 1 character in the source. The list would simply become too long and become meaningless. Contributions are normally tracked line by line in the version control system though. You can see that with for example "git blame". And before a license can be changed all those contributors have to agree or the respective code has to be removed. I've seen both of those happen.

Please note what your license prohibits:

1) playing a locally modified version in multiplayer, even if it just fixes a bug. Someone would have to distribute the fix to all players.
2) making and sharing a tar.xz of the mods folder so everybody in a multiplayer game can just unpack that and have the same mods
3) reporting a bug in factorio with a savegame and used modules included. The player would redistribute your mod to the factorio team.
4) posting a fix for a minor problem in the forum since the diff would contain (modified) lines of your code and therefore redistribute it

I'm sure your license has been violated many many times by now.

Locked

Return to “Logistic Train Network”