Search found 58 matches

by ss_Baum
Wed Jan 27, 2021 5:44 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

You will need to call get_max_transport_line_index() on the entity, then for each line call get_transport_line(index) to get the transport lines. From there you can get the #length of the line, which tells you how many items are on it, then loop through that to get the item stack. It's a relatively...
by ss_Baum
Wed Jan 27, 2021 5:05 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

PFQNiet wrote: ↑
Wed Jan 27, 2021 4:36 pm
Belt speeds are indeed fixed, so you need a different entity for each belt speed you want.
Ok, then I will create them. by the way, can you get the Items on a belt or the ground tile or do I have to get them with the position?
by ss_Baum
Wed Jan 27, 2021 4:09 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

One question a day is no question a day.

Does anyone have an Idea, if it is possible to change the speed of a belt entity?
I mean probably not, but than I have to create about 30 prototypes for the different speeds.
by ss_Baum
Wed Jan 27, 2021 3:15 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

I just figured it out myself, it was electric_input_flow_limit. But getting more data from print's would still be nice.
by ss_Baum
Wed Jan 27, 2021 3:01 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

Well, new day, new question. How do I get the max energy usage of an entity. I can't figure it out with serpent.block print. I know, how to get the current energy usage, but I also need the max possible. It also would later be possible, to get it from the gui, but there I also need to set the max en...
by ss_Baum
Wed Jan 27, 2021 11:50 am
Forum: Modding help
Topic: Detect un-research in editor
Replies: 6
Views: 1422

Re: Detect un-research in editor

I actually never realized an un-research button, but I never really used the map editor.
But I think a button belongs to a GUI, so maybe this on_gui_click could work https://lua-api.factorio.com/latest/eve ... _gui_click
by ss_Baum
Wed Jan 27, 2021 10:07 am
Forum: Modding help
Topic: Detect un-research in editor
Replies: 6
Views: 1422

Re: Detect un-research in editor

If you do this with the console you could mayby use on_console_command
https://lua-api.factorio.com/latest/eve ... le_command
but I think that just works in a running game, but I am not sure
by ss_Baum
Tue Jan 26, 2021 6:16 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

I can't figure out the ID of an object created with create_object. https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number probably? You may want to look at the stop-events.lua in the LTN mod sources. Their station is compound entity consisting of the train stop and two lamps. Very...
by ss_Baum
Tue Jan 26, 2021 5:42 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

Re: ss_Baum's questions

I tried it with windows powershell, but I didn't get any prints. Do you use steam version? Steam version relaunches itself through steam, so it may lose connection to the terminal. Try DRM-free version from the Factorio site, as mentioned in that forum thread. Anyway, there is a log() function that...
by ss_Baum
Tue Jan 26, 2021 5:05 pm
Forum: Modding help
Topic: ss_Baum's questions, now:Add circuit network condition
Replies: 33
Views: 6223

ss_Baum's questions, now:Add circuit network condition

Hi everyone, because I asked two questions in two days and because I won't flood this forum I have decided to create a topic, that contains all of my future, simple ore more advanced questions. Today's question: Add circuit network condition Is there a way to add a circuit network condition ore do I...
by ss_Baum
Tue Jan 26, 2021 11:41 am
Forum: Modding help
Topic: Limit to entity size?
Replies: 8
Views: 1822

Re: Limit to entity size?

Of course, but you maybe have to think about the animations. I am not sure because I never created one. I am still in the learning phase. But If I understood it right, the animation pictures are all in one spreadsheet. So this could mean less animations eq more resolution. So if you want to have 32 ...
by ss_Baum
Tue Jan 26, 2021 11:28 am
Forum: Modding help
Topic: Add prototype definition?
Replies: 6
Views: 1375

Re: Add prototype definition?

Actually one more question, because I can't place to entities at the same time (I think) I probably have to use create_entity in my control.lua. Is there a special thing I have to consider? Like should I use the target definition for the create entity? API I used: https://lua-api.factorio.com/latest...
by ss_Baum
Tue Jan 26, 2021 9:33 am
Forum: Modding help
Topic: Add prototype definition?
Replies: 6
Views: 1375

Re: Add prototype definition?

Thank you for your fast reply.
by ss_Baum
Tue Jan 26, 2021 9:29 am
Forum: Modding help
Topic: Limit to entity size?
Replies: 8
Views: 1822

Re: Limit to entity size?

I read something about a limit for the sprite picture size. So at some point there could be the problem, that the entity looks bad. But I think it was about 8192 px ore something like this.

https://wiki.factorio.com/Types/Sprite#size the point size.
by ss_Baum
Tue Jan 26, 2021 9:24 am
Forum: Modding help
Topic: Add prototype definition?
Replies: 6
Views: 1375

Add prototype definition?

Just a short question.

Is it possible to add a prototype definition to a prototype like energy-usage to a belt?
Or do I have to create a ElectricEnergyInterface that is placed on the same position of the original entity, so that there are two entities placed.
by ss_Baum
Mon Jan 25, 2021 5:24 am
Forum: Modding help
Topic: Bus Mod
Replies: 3
Views: 830

Re: Bus Mod

Ok, I have decided to discard this Idea, at least in the way I planned it. It would probably be possible with loaders and chests, but it doesn't add that much possibilities to the game, so it isn't worth that much time. I will probably modify normal belts, so that you can change the Speed and need e...
by ss_Baum
Sun Jan 24, 2021 11:07 am
Forum: Modding help
Topic: Bus Mod
Replies: 3
Views: 830

Re: Bus Mod

You cannot create new prototypes, you have to work with the ones we have. Fortunately, the linked-belt prototype can do what you want. Make a linked-belt connecting the multiple input to the multiple output, and everything works. An advanced solution is to run the linked-belt along a separate surfa...
by ss_Baum
Sat Jan 23, 2021 10:26 pm
Forum: Modding help
Topic: Bus Mod
Replies: 3
Views: 830

Bus Mod

Hi everyone, I would like to create a Mod, that creates a Bus with multiple belt inputs and one output and of course the same reverse. I don't have any experience with modding factorio, so I would like to start with this. I already figured out, that I need to use an already existing prototype, that ...

Go to advanced search