Search found 58 matches

by ss_Baum
Sat Jan 30, 2021 3:41 pm
Forum: Modding interface requests
Topic: Get Belts of belt Line
Replies: 4
Views: 1160

Get Belts of belt Line

Hello everyone, hello dear dev's I am trying to create a mod which allows you, to built speed editable belt's. There I have to get the Belt-Line to change the speed, do the electricity calculation and more. It would be nice, if there would be a way to get all Belt's of one line. I know there is the ...
by ss_Baum
Sat Jan 30, 2021 3:26 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: Video of a PoC showing powered belts that slow down when underpowered

So it sounds nice on paper, but you might be replacing a constant overhead with frequently occuring large lagspikes (network updates) and heaps of annoying and bug-prone detection code. Well, I did realize this now too. I also realized, that I have to check if at least one Belt has power. So I will...
by ss_Baum
Fri Jan 29, 2021 9:18 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions, now:string.find doesn't work

- is a special character in Lua search patterns, you need to escape it with % (see https://www.lua.org/pil/20.2.html). Alternatively, you can use the "plain" option of string.find to turn off the pattern matching: https://www.lua.org/manual/5.2/manual.html#pdf-string.find. I actually foun...
by ss_Baum
Fri Jan 29, 2021 8:22 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions, now:string.find doesn't work

- is a special character in Lua search patterns, you need to escape it with % (see https://www.lua.org/pil/20.2.html). Alternatively, you can use the "plain" option of string.find to turn off the pattern matching: https://www.lua.org/manual/5.2/manual.html#pdf-string.find. I will take a l...
by ss_Baum
Fri Jan 29, 2021 8:05 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions, now:string.find doesn't work

Today's question: String.find doesn't work So there is my code: function cleanname(name) --cleans the name from the numbers with returning the right one local name = name if string.find(name, "custom-belt") then return "custom-belt" end if string.find(name, "custom-undergrou...
by ss_Baum
Fri Jan 29, 2021 12:44 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions, now: how to code efficient with the factorio api

"UPS efficiency" is... a bit of a cult obsession around here :p But realistically, many of the more "quirky" mods like your transport belt idea are just that: quirky. Nobody is going to build a megabase with your mod, and that's okay. In fact, beyond early-game, people aren't li...
by ss_Baum
Fri Jan 29, 2021 11:32 am
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions, now: how to code efficient with the factorio api

Today's question: How do I generally write efficient code? I think, my control.lua will become very long and run very often, so the question is, how to write it in a way, that it run's as fast as possible. Should I define function's for regularly used things and call the functions with the specified...
by ss_Baum
Fri Jan 29, 2021 9:40 am
Forum: Balancing
Topic: Nerf the Portable Fusion Reactor?
Replies: 82
Views: 23343

Re: Nerf the Portable Fusion Reactor?

I'd actually like to try a version of Factorio where belts needed power. And offshore pumps, maybe allow a tiny flow handwaved as surface tension, just enough to slowly start a steam engine that can then power the pump. Or give it a hand crank :D I actually working on realistic powered belt's which...
by ss_Baum
Fri Jan 29, 2021 8:16 am
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: Video of a PoC showing powered belts that slow down when underpowered

Ok, I have decided now, how I will do it. I create an electric-energy-interface for every network, totally seperat from the belts. The belts have no buffer so every change in the network will effect every belt in the same way, of course in percentage, because all electric entities of the same priori...
by ss_Baum
Thu Jan 28, 2021 9:50 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: Video of a PoC showing powered belts that slow down when underpowered

Well I think you have to start somewhere, Oh sure. And if you do it for your own fun who's to stop you. But knowing the general factorio community's craving for high performance i hope you've adjusted your expectations accordingly. there is no way a mod won't effect anything. But for lag spike prev...
by ss_Baum
Thu Jan 28, 2021 9:17 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: Video of a PoC showing powered belts that slow down when underpowered

I can hear the screaming of the entities being murdered. I don't even want to know how large the lag spike would be in an actual base with just a single electic network and 50k+ belts. (Unless your goal is to prevent brownouts by fear-of-death-by-lag.) It's a nice PoC, but it's never gonna scale. (...
by ss_Baum
Thu Jan 28, 2021 9:09 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: Video of a PoC showing powered belts that slow down when underpowered

I know, it doesn't belong here, but I want to show it everyone, who helped me on this hard way. In the attachments you can find the first version of the speed changing belts. Excuse the quality, it's because the server didn't recognize it first. I want to thank you all for the help, you gave me. Yo...
by ss_Baum
Thu Jan 28, 2021 8:46 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: Video of a PoC showing powered belts that slow down when underpowered

Koub wrote: ↑
Thu Jan 28, 2021 8:44 pm
[Koub] I changed the title of the thread because clickbait titles are cancer.
Well, because it wasn't intended for this forum, the people who helped me, would have probably known what I mean, but thank you anyways.
by ss_Baum
Thu Jan 28, 2021 8:01 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Re: I DID IT!!!

oh and the belt's from ultimate belts are of course just place holders.
by ss_Baum
Thu Jan 28, 2021 7:58 pm
Forum: Modding discussion
Topic: Video of a PoC showing speed changing belts new video (2021.02.01)
Replies: 19
Views: 4540

Video of a PoC showing speed changing belts new video (2021.02.01)

In the attachments you can find the first version of the speed changing belts. Excuse the quality, it's because the server didn't recognize it first. I want to thank you all for the help, you gave me. You are a great community, that I love <3 more every day. (of course love to work with :oops:) edit...
by ss_Baum
Thu Jan 28, 2021 3:15 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions, today: modify electric energy-consumption

Oh yeah, you can do any code you want in the data stage, the key point is to "data:extend{}" or change "data.raw" entries as needed. The only entity whose energy consumption can be changed in control is the electric-energy-interface. You can change its various energy properties ...
by ss_Baum
Thu Jan 28, 2021 2:48 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions

Well, new day, new question. How do I change the electric energy consumption of an unit? I am not allowed to change the prototype in control and I can't find the modifyer. By the way, I changed the prototype problem, you are actually allowed to loop in the data stage, so I just create the automatica...
by ss_Baum
Thu Jan 28, 2021 11:36 am
Forum: Modding help
Topic: API and electricity ?
Replies: 9
Views: 3794

Re: API and electricity ?

I am actually very late with 5 years and I don't know when they did implement this. But for all future visitors, now it works with entity.energy. This returns the stored energy in joule. https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.energy you can use this, if you just implement the s...
by ss_Baum
Thu Jan 28, 2021 7:20 am
Forum: Modding help
Topic: More flexible Prototypes
Replies: 6
Views: 1374

Re: More flexible Prototypes

I am creating a custom belt mod at the moment and my solution was to create an energy-interface for the placed blts and "connect" them with control. If the energy isn't high enough ore the player changes the Speed, the belt is replaces with a new, faster ore slower prototype. So there are ...
by ss_Baum
Wed Jan 27, 2021 6:13 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 5992

Re: ss_Baum's questions

PFQNiet wrote: ↑
Wed Jan 27, 2021 6:04 pm
Replace the belt with fast_replace = true and spill = false. This will preserve items on the belt.
Thank you so much, I didn't saw this.
You saved me so much time

Go to advanced search