using util.merge how does it works?

Place to get help with not working mods / modding interface.
User avatar
Palaber1984
Inserter
Inserter
Posts: 32
Joined: Sat Feb 16, 2019 10:09 am
Contact:

Re: using util.merge how does it works?

Post by Palaber1984 »

i thought, that i would get help in this modding section called „Modding Help“! If you don’t want or can’t help then please let the stage free those who wants and can help! Thx
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: using util.merge how does it works?

Post by eradicator »

Palaber1984 wrote: Tue Sep 17, 2019 4:51 pm i thought, that i would get help in this modding section called „Modding Help“! If you don’t want or can’t help then please let the stage free those who wants and can help! Thx
Except you're not asking for modding help. You're asking for free personal programming lessons. Well, at least now it's obvious that you're not willing to put any effort into learning the basics of lua by yourself. May anyone who's willing to "help" be warned.
(And ye know, if i could disable notifications fot this thread i would - alas the forum software doesn't support it :p.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Palaber1984
Inserter
Inserter
Posts: 32
Joined: Sat Feb 16, 2019 10:09 am
Contact:

Re: using util.merge how does it works?

Post by Palaber1984 »

eradicator wrote: Tue Sep 17, 2019 5:30 pm
Palaber1984 wrote: Tue Sep 17, 2019 4:51 pm i thought, that i would get help in this modding section called „Modding Help“! If you don’t want or can’t help then please let the stage free those who wants and can help! Thx
Except you're not asking for modding help. You're asking for free personal programming lessons. Well, at least now it's obvious that you're not willing to put any effort into learning the basics of lua by yourself. May anyone who's willing to "help" be warned.
(And ye know, if i could disable notifications fot this thread i would - alas the forum software doesn't support it :p.)
If I want free personal lessons, than I would go to the real lua. Forum. Maybe you still don’t understand that I am asking here because I want make a mod for factorio.
Like I said, if someone wants to help then Ian thankful. All others should stop crying!
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: using util.merge how does it works?

Post by darkfrei »

Palaber1984 wrote: Tue Sep 17, 2019 6:47 pm If I want free personal lessons, than I would go to the real lua. Forum. Maybe you still don’t understand that I am asking here because I want make a mod for factorio.
Like I said, if someone wants to help then Ian thankful. All others should stop crying!
Some of easy mods, copying ithe fast inserter, change pickup an insert position, make two new prototypes (changing color needs much more lines):

Code: Select all

local inserter = table.deepcopy(data.raw.inserter["fast-inserter"])
inserter.name = "linear-inserter-in"
inserter.pickup_position = {0, -1.8}
inserter.insert_position = {0, -1.2}

local inserter_out = table.deepcopy(inserter)
inserter_out.name = "linear-inserter-out"
inserter_out.pickup_position = {0, -1.2}
inserter_out.insert_position = {0, -1.8}

data:extend({inserter,inserter_out})
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: using util.merge how does it works?

Post by eradicator »

Palaber1984 wrote: Tue Sep 17, 2019 6:47 pm Maybe you still don’t understand that I am asking here because I want make a mod for factorio.
Maybe it is you who doesn't understand that you're asking the same question over and over again, each time with a different example: "Can someone please explain to me how tables work in lua?". And @Adamo actually explained that to you. Except it doesn't seem you understood his answer. So maybe read that again? And maybe some day you'll understand that i'm actually trying to help by telling you to look up how lua tables work instead of having us tell you how to fix each of your examples without you understanding the solution.

"Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
mat1k
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Re: using util.merge how does it works?

Post by mat1k »

Palaber1984 wrote: Tue Sep 17, 2019 6:47 pm If I want free personal lessons, than I would go to the real lua. Forum. Maybe you still don’t understand that I am asking here because I want make a mod for factorio.
Like I said, if someone wants to help then Ian thankful. All others should stop crying!
The problem your not understanding is while many of us can and will help you mod factorio. You need to learn lua first.

Modding any game requires prior knowledge of the language used to create the mods. The lua forums and tutorials are the best place to learn that for factorio.
Your questions show that at the very least you don't understand how tables work in lua. That is something you need to learn before modding this game
User avatar
Palaber1984
Inserter
Inserter
Posts: 32
Joined: Sat Feb 16, 2019 10:09 am
Contact:

Re: using util.merge how does it works?

Post by Palaber1984 »

What Adamo explained I did understand. I know how to copy and change attributes. But they were a bit easier. but my next question was a little bit harder, because there a lot more lines. And i try to figure out myself at home, but I got to the point where I look into long tunnel. And it would be nice if could get help instead of being bashed. Thx
Post Reply

Return to “Modding help”