Search found 344 matches

by eduran
Wed May 29, 2019 3:46 pm
Forum: Modding discussion
Topic: Remove elements [1] vs remove elements [#elements]
Replies: 8
Views: 2272

Re: Remove elements [1] vs remove elements [#elements]

The case darkfrei is asking about is a prime example of when NOT to use table.remove(): it is not needed, it is slower than setting the element to nil (significantly so on large tables, which triggered him to post here) and it is used in on_tick. There is no shared data at all during the control sta...
by eduran
Wed May 29, 2019 7:55 am
Forum: Logistic Train Network
Topic: LTN Filter Setting for Inserters
Replies: 3
Views: 1802

Re: LTN Filter Setting for Inserters

In that case you have to provide a screenshot or blueprint or save file for anyone to be able to figure out what is wrong. Setting inserter filters works perfectly fine for me.
by eduran
Wed May 29, 2019 6:34 am
Forum: Modding discussion
Topic: Remove elements [1] vs remove elements [#elements]
Replies: 8
Views: 2272

Re: Remove elements [1] vs remove elements [#elements]

I'm using only one element per game tick and the order is not important. But on the next tick I need the next element and it must be some function get_first_element (elements) for i, element in pairs (elements) do local holder = table.deepcopy (element) elements[i] = nil return holder end end You d...
by eduran
Tue May 28, 2019 7:11 pm
Forum: Railway Setups
Topic: Share your train gifs / videos
Replies: 2
Views: 2995

Share your train gifs / videos

I really enjoy watching trains zip around in map view. Anyone willing to share gifs/videos of that? Below are 3:30 minutes of my trains doing some heavy-lifting (at 7x speed, so the gif is only 30s long).
hypnotic_trains.gif
hypnotic_trains.gif (3.81 MiB) Viewed 2995 times
by eduran
Tue May 28, 2019 6:21 pm
Forum: Logistic Train Network
Topic: LTN Filter Setting for Inserters
Replies: 3
Views: 1802

Re: LTN Filter Setting for Inserters

The LTN-Station output combinator shows the cargo the stopped train should have when it leaves the station. For a provider, that is the shipment. For a requester it is usually nothing. That is why you need to use both the output combinator, the station itself and an arithmetic combinator. Have a loo...
by eduran
Tue May 28, 2019 3:58 pm
Forum: Modding help
Topic: [solved] [0.17.43] basegame item edit - change armor grid module slot size
Replies: 10
Views: 3121

Re: [solved] [0.17.43] basegame item edit - change armor grid module slot size

It's the same as data.raw["movement-bonus-equipment"]["exoskeleton-equipment"].shape={width = 2, height = 4} Yes, in this case. But your version will set all other properties stored in 'shape' to nil, while mine leaves them intact. It is safer to just overwrite the properties yo...
by eduran
Tue May 28, 2019 2:39 pm
Forum: Modding help
Topic: [solved] [0.17.43] basegame item edit - change armor grid module slot size
Replies: 10
Views: 3121

Re: [solved] [0.17.43] basegame item edit - change armor grid module slot size

Only data.lua / data-updates.lua / data-final-fixes.lua run automatically during the data stage. To run any other file (like your equipment.lua), you need to tell Factorio's Lua engine to run it. That is done with -- in data.lua -- assuming you have equipment.lua in /my_mod_x.y.z/prototypes/ require...
by eduran
Tue May 28, 2019 12:15 pm
Forum: Modding help
Topic: [solved] [0.17.43] coding - find all surfaces with players on it
Replies: 27
Views: 4977

Re: [0.17.43] Question - coding - find all surfaces with players on it

Those that need help and ask for it owe an explanation of what the mod does to those that have the knowledge and skill to help you. Trying to make us work for you without revealing the purpose is a cruel joke you play on us, the community. Some have fallen in your trap because they are very good pe...
by eduran
Tue May 28, 2019 8:02 am
Forum: Resolved Problems and Bugs
Topic: [kovarex] [0.17.43] Train without schedule is in path_lost/no_path state
Replies: 1
Views: 1658

[kovarex] [0.17.43] Train without schedule is in path_lost/no_path state

Trains without schedule in automatic mode have a state of no_path instead of no_schedule. Additionally, they switch to path_lost and back to no_schedule every 128 ticks (identical to #69772 ). You can use the same save and procedure as in my report #69772 . Just remove the only entry from the train'...
by eduran
Tue May 28, 2019 7:14 am
Forum: Modding help
Topic: [solved] [0.17.43] basegame item edit - change armor grid module slot size
Replies: 10
Views: 3121

Re: [0.17.43] basegame item edit - change armor grid module slot size

Setting the shape for the item does not do anything. Only the equipment prototype has a shape property: data.raw["movement-bonus-equipment"]["exoskeleton-equipment"].shape.width = 6 data.raw["movement-bonus-equipment"]["exoskeleton-equipment"].shape.height = 6...
by eduran
Mon May 27, 2019 3:41 pm
Forum: Modding help
Topic: [solved] [0.17.43] coding - find all surfaces with players on it
Replies: 27
Views: 4977

Re: [0.17.43] Question - coding - find all surfaces with players on it

AlFara wrote:
Mon May 27, 2019 2:56 pm
is there any more effective way to check it other than the following code?
Select the target player in whichever way you like and check the vehicle property of the player.
by eduran
Mon May 27, 2019 10:36 am
Forum: Modding discussion
Topic: Remove elements [1] vs remove elements [#elements]
Replies: 8
Views: 2272

Re: Remove elements [1] vs remove elements [#elements]

table.remove is used to remove an entry from an array-like table without leaving a gap. t = {'a', 'b', 'c', 'd'} -- same as {[1] = 'a', [2] = 'b', ...} table.remove(t, 1) -- removes 'a' and moves every following entry down by one for k, v in pairs(t) do game.print(k .. '=' .. v) end -- prints 1=b, 2...
by eduran
Sat May 25, 2019 6:09 pm
Forum: Modding help
Topic: [solved] [0.17.43] coding - find all surfaces with players on it
Replies: 27
Views: 4977

Re: [0.17.43] Question - coding - find all surfaces with players on it

Use pairs() unstead if ipairs(). Why? See https://lua-api.factorio.com/latest/LuaCustomTable.html and https://lua-api.factorio.com/latest/Libraries.html for _, surface in pairs(game.surfaces) do if surface.find_entities_filtered{force = "player", type="character"} then game.playe...
by eduran
Fri May 24, 2019 4:06 pm
Forum: Logistic Train Network
Topic: [0.16 / 0.17] LTN Tracker - a GUI for LTN
Replies: 270
Views: 99249

Re: [0.16 / 0.17] LTN Tracker - a GUI for LTN

Will be fixed in 0.1.10. I thought I had uploaded it yesterday, but apparently messed up. I will try again when I am home :oops:
by eduran
Fri May 24, 2019 1:33 pm
Forum: Modding help
Topic: Request: Upgrade of Smart Display Mod to 0.17
Replies: 18
Views: 2608

Re: Request: Upgrade of Smart Display Mod to 0.17

This version loads, but I can't promise it will work properly.
by eduran
Thu May 23, 2019 7:51 pm
Forum: Modding help
Topic: Request: Upgrade of Smart Display Mod to 0.17
Replies: 18
Views: 2608

Re: Request: Upgrade of Smart Display Mod to 0.17

You must have missed one "width = 0".
by eduran
Thu May 23, 2019 6:58 pm
Forum: Modding help
Topic: Request: Upgrade of Smart Display Mod to 0.17
Replies: 18
Views: 2608

Re: Request: Upgrade of Smart Display Mod to 0.17

A bit more complicated. In prototypes/display.lua find if invisible then -- invisible.additional_pastable_entities = {"smart-display"} invisible.minable.result = "smart-display-visible" invisible.picture_off.filename = "__SmartDisplayRedux_Fixed__/graphics/empty.png" in...
by eduran
Thu May 23, 2019 5:36 pm
Forum: Modding help
Topic: Request: Upgrade of Smart Display Mod to 0.17
Replies: 18
Views: 2608

Re: Request: Upgrade of Smart Display Mod to 0.17

That's a 0.17 classic :D Delete every line that says

Code: Select all

flags = {"goes-to-quickbar"}
by eduran
Thu May 23, 2019 4:21 pm
Forum: Modding help
Topic: Request: Upgrade of Smart Display Mod to 0.17
Replies: 18
Views: 2608

Re: Request: Upgrade of Smart Display Mod to 0.17

Sprite width and height can no longer be zero in 0.17. You need to replace all instances of "height = 0" and "width = 0" with "height = 1" and "width = 1".
by eduran
Thu May 23, 2019 2:37 pm
Forum: Modding help
Topic: Request: Upgrade of Smart Display Mod to 0.17
Replies: 18
Views: 2608

Re: Request: Upgrade of Smart Display Mod to 0.17

You are need to find and replace "textfield_style" to "textfield" That is not correct, you need to replace every instance of "textfield_style" with "textbox_style": type = "textbox_style" -- good type = "textfield_style" --bad There were a...

Go to advanced search