Search found 16 matches
- Mon Nov 04, 2024 2:25 pm
- Forum: Modding help
- Topic: How do I only count items with a certain quality?
- Replies: 2
- Views: 477
Re: How do I only count items with a certain quality?
I did it directly on LuaPlayer. When I changed it so I get the inventory before calling get_item_count then it works like it should. Thank you so much
- Mon Nov 04, 2024 6:55 am
- Forum: Modding help
- Topic: How do I only count items with a certain quality?
- Replies: 2
- Views: 477
How do I only count items with a certain quality?
Pretty much what the title says. I noticed that when I use get_item_count It does not factor in quality, so when I want to try and count all uncommon pipe, I get all pipes in the inventory, not just the uncommon one.
- Tue Apr 30, 2019 12:01 pm
- Forum: Modding help
- Topic: [Solved] How do I make a structure do something at regular intervals?
- Replies: 9
- Views: 2861
Re: How do I make a structure do something at regular intervals?
The best way is to find a vanilla entity that can be modified to do what you need. If that is not possible, you will have to write a script and run it in on_tick or on_nth_tick. In that case, make sure to keep what you are doing to a minimum. Calling find_entities_filtered on every tick will ...
- Tue Apr 30, 2019 11:23 am
- Forum: Modding help
- Topic: [Solved] How do I make a structure do something at regular intervals?
- Replies: 9
- Views: 2861
Re: How do I make a structure do something at regular intervals?
The best way is to find a vanilla entity that can be modified to do what you need. If that is not possible, you will have to write a script and run it in on_tick or on_nth_tick. In that case, make sure to keep what you are doing to a minimum. Calling find_entities_filtered on every tick will ...
- Tue Apr 30, 2019 9:24 am
- Forum: Modding help
- Topic: [Solved] How do I make a structure do something at regular intervals?
- Replies: 9
- Views: 2861
Re: How do I make a structure do something at regular intervals?
How do I look at vanilla entities? "data/core" and "data/base" doesn't have a radar script.
- Tue Apr 30, 2019 7:41 am
- Forum: Modding help
- Topic: [Solved] How do I make a structure do something at regular intervals?
- Replies: 9
- Views: 2861
Re: How do I make a structure do something at regular intervals?
I just looked at Bob's warfare and Big Brother, and both mods seem to just use/modify the vanilla functionality of the radar, which I can't use since my structure I'm making is not going to the same thing as a radar.
- Mon Apr 29, 2019 11:08 pm
- Forum: Modding help
- Topic: [Solved] How do I make a structure do something at regular intervals?
- Replies: 9
- Views: 2861
[Solved] How do I make a structure do something at regular intervals?
So I have a structure which is supposed to do something every X amount of time/ticks, similar to how radars works (but faster). since this is the first time I worked with anything like this, I have no idea how to do it.
Edit: I figured out how to use on_tick and find_entities_filtered to do what I ...
Edit: I figured out how to use on_tick and find_entities_filtered to do what I ...
- Sun Jun 10, 2018 5:05 am
- Forum: Modding help
- Topic: Detect if player view the map
- Replies: 3
- Views: 1787
Detect if player view the map
Is there an event, or some other way to see if the player is looking at the map?
- Tue Feb 20, 2018 10:50 am
- Forum: Modding help
- Topic: settings.global is nil
- Replies: 4
- Views: 2326
Re: settings.global is nil
Runtime settings (note the name) are available runtime. The data stage is not runtime: http://lua-api.factorio.com/latest/Data-Lifecycle.html
I suggest taking a look at this tutorial instead of relying on other mods that might be doing it wrong: https://wiki.factorio.com/Tutorial:Mod_settings ...
I suggest taking a look at this tutorial instead of relying on other mods that might be doing it wrong: https://wiki.factorio.com/Tutorial:Mod_settings ...
- Tue Feb 20, 2018 1:09 am
- Forum: Modding help
- Topic: settings.global is nil
- Replies: 4
- Views: 2326
Re: settings.global is nil
Runtime settings (note the name) are available runtime. The data stage is not runtime: http://lua-api.factorio.com/latest/Data-Lifecycle.html
I suggest taking a look at this tutorial instead of relying on other mods that might be doing it wrong: https://wiki.factorio.com/Tutorial:Mod_settings ...
I suggest taking a look at this tutorial instead of relying on other mods that might be doing it wrong: https://wiki.factorio.com/Tutorial:Mod_settings ...
- Tue Feb 20, 2018 12:19 am
- Forum: Modding help
- Topic: settings.global is nil
- Replies: 4
- Views: 2326
settings.global is nil
For about two hours I been attempting to create my second mod, and I'm currently struggling with getting the settings to work. I keep getting an error when it says settings.global is nil, and I have no idea why. I been digging around in other mods I use, and they don't have the same issue.
data.lua ...
data.lua ...
- Mon Feb 05, 2018 5:12 pm
- Forum: News
- Topic: Friday Facts #228 - High resolution turrets
- Replies: 135
- Views: 90635
Re: Friday Facts #228 - High resolution turrets
I love that the laser turrets gets beams, that have been bothering me a while. But I'm not really a fan of the new base for them, I feel like it's a half finished base, or it's for something else. But they decided to just slap a laser on top of it last minute.
- Sun Sep 04, 2016 9:50 am
- Forum: Mods
- Topic: [MOD 0.12.x] Electricity by XyLe
- Replies: 23
- Views: 16615
Re: [MOD 0.12.x] Electricity by XyLe
I love this mod, and since it hasn't been updated to 0.13 yet, I decided to take a look at it, and I managed to get it to work. I haven't tested everything, so I'm not sure if there is any issues. But the solar panels and accumulators does generate and store power.
Since I'm not sure if I'm allowed ...
Since I'm not sure if I'm allowed ...
- Sun Aug 28, 2016 10:33 pm
- Forum: Mods
- Topic: [MOD 0.15|0.14] Rail Tanker - Liquid transport 1.4.1
- Replies: 374
- Views: 379239
Re: [MOD 0.12.x|0.13] Rail Tanker - Liquid transport 1.3.33
With a constant combinator set to fake item -20k or so and my inventory sensor you can easily set up inverted filters where they will unload all except those fake items.
I can? I never used the logic network, outside the very basics... probably need to look into it
Is an updated version ...
I can? I never used the logic network, outside the very basics... probably need to look into it
Is an updated version ...
- Sun Aug 28, 2016 2:54 pm
- Forum: Mods
- Topic: [MOD 0.15|0.14] Rail Tanker - Liquid transport 1.4.1
- Replies: 374
- Views: 379239
Re: [MOD 0.12.x|0.13] Rail Tanker - Liquid transport 1.3.33
Note: Inserters can remove the used fake items from the railtanker, so be sure to not have inserters at a station where a railtanker might stop! Currently there is no way around it
So that's why it's happening, then sadly this kills the mod for me, since I have relied on the fact that inserters ...
So that's why it's happening, then sadly this kills the mod for me, since I have relied on the fact that inserters ...
- Sun Aug 28, 2016 1:59 pm
- Forum: Mods
- Topic: [MOD 0.15|0.14] Rail Tanker - Liquid transport 1.4.1
- Replies: 374
- Views: 379239
Re: [MOD 0.12.x|0.13] Rail Tanker - Liquid transport 1.3.33
Note: Inserters can remove the used fake items from the railtanker, so be sure to not have inserters at a station where a railtanker might stop! Currently there is no way around it
So that's why it's happening, then sadly this kills the mod for me, since I have relied on the fact that inserters ...
So that's why it's happening, then sadly this kills the mod for me, since I have relied on the fact that inserters ...