Krastorio 2 - Remove wood from item requirements?
Krastorio 2 - Remove wood from item requirements?
Is there a way I can modify Krastorio 2 files to remove wood from item requirements?
It's absolutely asinine that a circuit board requires wood. I hate the fact that wood creation is 3 steps up on the tech tree when you start with nothing researched.
It's absolutely asinine that a circuit board requires wood. I hate the fact that wood creation is 3 steps up on the tech tree when you start with nothing researched.
Re: Krastorio 2 - Remove wood from item requirements?
Nevermind. I used Cygwin to grep for the relevant definitions, I found most of them in \Krastorio2_0.9.4\prototypes\recipes.
Here is my modified version in case anyone wants it. I commented out the Wood requirement for:
- Basic Tech cards (now requires iron instead)
- Circuits
- Coke
https://drive.google.com/open?id=1AeoAd ... lJMpNtz9u6
Here is my modified version in case anyone wants it. I commented out the Wood requirement for:
- Basic Tech cards (now requires iron instead)
- Circuits
- Coke
https://drive.google.com/open?id=1AeoAd ... lJMpNtz9u6
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Krastorio 2 - Remove wood from item requirements?
What a rude, ungrateful, license-breaking person.
Re: Krastorio 2 - Remove wood from item requirements?
I thought krastorio license allows this? Though I'll have to second you on the rudeness.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Krastorio 2 - Remove wood from item requirements?
My understanding of the GNU GPL licenses is that you're free to distribute modified versions, but you're expected to include a link to the original source and credit the original authors on top of clarifying exactly what was modified.
Not just call them "asinine" and dump a hastily hacked copy onto a forum without even a name or version number change so that anyone who tries to use it will have those changes immediately overwritten when the real mod next updates, screwing up their saved games.
Not just call them "asinine" and dump a hastily hacked copy onto a forum without even a name or version number change so that anyone who tries to use it will have those changes immediately overwritten when the real mod next updates, screwing up their saved games.
Re: Krastorio 2 - Remove wood from item requirements?
Sorry for trying to help other people that share my opinion, I suppose.
Saying a design choice (like adding wood to the cost of a circuit) is asinine is not the same as saying a person is asinine.
I'm sorry you disagree with my opinion, feel free not to post about it!
Saying a design choice (like adding wood to the cost of a circuit) is asinine is not the same as saying a person is asinine.
I'm sorry you disagree with my opinion, feel free not to post about it!
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Krastorio 2 - Remove wood from item requirements?
Well, if you're going to be rude and rip off other people's stuff, you could at least do it competently.Locane wrote: Sat Mar 21, 2020 1:20 am Sorry for trying to help other people that share my opinion, I suppose.
Re: Krastorio 2 - Remove wood from item requirements?
You are need new mod with dependency and with the file data-final-fixes.lua:Locane wrote: Thu Mar 19, 2020 4:38 am Is there a way I can modify Krastorio 2 files to remove wood from item requirements?
It's absolutely asinine that a circuit board requires wood. I hate the fact that wood creation is 3 steps up on the tech tree when you start with nothing researched.
Code: Select all
local bad_ingredient = "electronic-circuit" -- put here your ingredient name
local removed_from = {}
for recipe_name, recipe in pairs (data.raw.recipe) do
local handlers = recipe.normal and {recipe.normal, recipe.expensive} or {recipe}
local fl = false
for i, handler in pairs (handlers) do
for j, ingredient in pairs (handler.ingredients) do
local ingredient_name = ingredient.name or ingredient[1]
if ingredient_name == bad_ingredient then
handler.ingredients[j] = nil
if not fl then
table.insert (removed_from, recipe_name)
fl = true
end
end
end
end
end
log ('removed ' .. bad_ingredient .. ' from [' .. #removed_from .. '] recipes: ' .. serpent.line(removed_from))
Re: Krastorio 2 - Remove wood from item requirements?
While I agree that it's rude and not changing the name or version number is a practical issue for players, the only license issue here I can see is that you're required to state that you modified the work and give the date (section 5a, generally done by adding an additional copyright statement to the existing ones).Deadlock989 wrote: Thu Mar 19, 2020 1:09 pm My understanding of the GNU GPL licenses is that you're free to distribute modified versions, but you're expected to include a link to the original source and credit the original authors on top of clarifying exactly what was modified.
Distributions of binaries must include source code (but Factorio mods generally would be considered to be in source code form anyway), the license and copyright statements from the original work must be preserved, and your changes must also be covered by a compatible license, but there is no requirement to add any credit to original authors anywhere, or link to the original version, or describe the modifications in any way.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Krastorio 2 - Remove wood from item requirements?
I understood "preserving the copyright statements from the original work" as "giving credit to the original authors", but I suppose technically that's the case here since the original CREDITS.txt and GENERAL-LICENSE.txt are included.
At least we can agree that this was a dick move. (Apparently that's not the same thing as saying that the person is a dick.)
At least we can agree that this was a dick move. (Apparently that's not the same thing as saying that the person is a dick.)
Re: Krastorio 2 - Remove wood from item requirements?
Yeah, the license/copyright info has to be preserved because that's what enables the license to be meaningfully applied (someone is declaring they hold the copyright for the work, and that as the copyright holder they grant these license terms) - so while it looks functionally like "giving credit" that's not really the legal purpose. The GPL is concerned with the rights of the person who receives the code to exercise the freedoms the FSF designed it to preserve, and is *not* really concerned with the rights of the author except inasmuch as the original author can simply "receive" the modified version as well under the same license as everyone else can.
But regardless, from a practical POV here the best thing to do is make a separate mod that updates it in data-final-fixes.lua as darkfrei explains, because forking the mod isn't ideal regardless of the license - if you don't change the name/version it will get overwritten by updates, and if you do change the name or version then dependencies on it from other mods won't work as expected and you might have issues with mods that are supposed to be compatible...
But regardless, from a practical POV here the best thing to do is make a separate mod that updates it in data-final-fixes.lua as darkfrei explains, because forking the mod isn't ideal regardless of the license - if you don't change the name/version it will get overwritten by updates, and if you do change the name or version then dependencies on it from other mods won't work as expected and you might have issues with mods that are supposed to be compatible...
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Krastorio 2 - Remove wood from item requirements?
If we're aiming for absolutely clinical precision in this conversation then I'd point out that it doesn't have to be overwritten in data-final-fixes and ideally shouldn't be. The patching mod needs to depend on K2 and then update the recipe as early as it possibly can, i.e. in the same data stage K2 creates the original recipe in, because any other mods which depend on modifying it would probably prefer to not be screwed up as well.
Or one could just not be a crybaby and chop a few trees down for once in one's life.
darkfrei's code snippet above would turn small power poles into piles of wire and hand out wooden chests for free because it would strip every single recipe in the game that has wood in it. That's also a really undesirable way to remove elements from an integer-indexed array. But I digress.
Or one could just not be a crybaby and chop a few trees down for once in one's life.
darkfrei's code snippet above would turn small power poles into piles of wire and hand out wooden chests for free because it would strip every single recipe in the game that has wood in it. That's also a really undesirable way to remove elements from an integer-indexed array. But I digress.
Re: Krastorio 2 - Remove wood from item requirements?
you are wrong, again. what a rude person.Deadlock989 wrote: Thu Mar 19, 2020 1:09 pm My understanding of the GNU GPL licenses is that you're free to distribute modified versions, but you're expected to include a link to the original source and credit the original authors on top of clarifying exactly what was modified.
https://tldrlegal.com/license/gnu-gener ... v3-(gpl-3)
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Krastorio 2 - Remove wood from item requirements?
I don't read ptx0's posts, I expect this is some kind of personal attack from our resident mod thief, who was caught impersonating other modders, and serves up slightly broken versions of other people's work with his own name plastered over it.
Last edited by Deadlock989 on Mon Mar 23, 2020 7:00 pm, edited 4 times in total.
Re: Krastorio 2 - Remove wood from item requirements?
in Space Exploration you can use stone tablet to build the circuits, fwiw.Locane wrote: Sat Mar 21, 2020 1:20 am Sorry for trying to help other people that share my opinion, I suppose.
Saying a design choice (like adding wood to the cost of a circuit) is asinine is not the same as saying a person is asinine.
I'm sorry you disagree with my opinion, feel free not to post about it!