Search found 289 matches
- Sun Jul 04, 2021 8:48 am
- Forum: Modding help
- Topic: How to make inserters take out used fuel
- Replies: 2
- Views: 866
- Fri Jul 02, 2021 8:25 am
- Forum: Modding discussion
- Topic: Question on Cannon Projectile collision
- Replies: 4
- Views: 1559
Re: Question on Cannon Projectile collision
Avoid hard-coding collision masks. You don't know what other mods might be using it.
Instead, use this:
Then you can assign collision_mask = {air_unit_layer} and add it to the projectile.
Instead, use this:
Code: Select all
air_unit_layer = require("collision-mask-util").get_first_unused_layer()
- Tue Jun 29, 2021 9:04 am
- Forum: Modding interface requests
- Topic: LuaPlayer.unlock_tips_and_tricks_item(name)
- Replies: 3
- Views: 882
ScriptTipTrigger
I could suggest a whole range of new TipTrigger types, like MineEntityTipTrigger, DamageTakenTipTrigger, and many more, as it seems like the existing set of triggers were specifically made for whatever the default tips and tricks need and don't yet offer much flexibility. But even with a wider range...
- Mon Jun 28, 2021 2:53 pm
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 83713
Re: Small documentation improvement requests
Would it be at all possible to do something like runtime-api.json but for the data stage? Defining what prototype classes exist, what properties they can/must have, what types, etc.? I feel like this could be a massive help for data-stage modding, just as runtime-api.json has been a massive help fo...
- Sun Jun 27, 2021 2:21 pm
- Forum: Modding help
- Topic: How to change force for entity in editor or script?
- Replies: 4
- Views: 1463
Re: How to change force for entity in editor or script?
/c for _,turret in pairs(game.player.surface.find_entities_filtered{type="turret"}) do if turret.name:find("worm") then turret.force = "enemy" end end Should search the current surface for all turrets, then narrow the search to turrets with "worm" in their na...
- Thu Jun 24, 2021 10:18 pm
- Forum: Modding interface requests
- Topic: "count" parameter for LuaSurface.get_closest
- Replies: 1
- Views: 718
"count" parameter for LuaSurface.get_closest
LuaSurface.get_closest() is very useful. I'm pretty sure it's orders of magnitude faster than sorting the list of entities on the Lua side, given it would need to constantly query the engine for entity positions and such. I would very much like to extend this function with an optional "count&q...
- Wed Jun 23, 2021 12:04 pm
- Forum: Modding interface requests
- Topic: on_player_used_wire
- Replies: 5
- Views: 1275
Re: on_player_used_wire
detecting the player messing with modded entities that require certain wires to function Note that you can also mess with wires using blueprints, so on_player_used_wire would not solve everything. Fair point. Just putting a power pole too close can also "mess with" stuff, but those two ca...
- Wed Jun 23, 2021 12:03 pm
- Forum: Ideas and Requests For Mods
- Topic: Empty Barrel Disassembling
- Replies: 3
- Views: 1116
Re: Empty Barrel Disassembling
data:extend{ { type = "recipe", name = "recycle-empty-barrel", category = "crafting", energy_required = 1, ingredients = {{"empty-barrel",1}}, result = "steel-plate", -- or results = {{type="item", name="steel-plate", amount=1, p...
- Wed Jun 23, 2021 9:36 am
- Forum: Modding interface requests
- Topic: on_player_used_wire
- Replies: 5
- Views: 1275
on_player_used_wire
Okay that might not be the best name, but I would like to have an event for when the player connects (or disconnects) two entities with wire. Event properties: - wire: "copper", "red", "green" - from, to: the entity/connection points that were joined or disconnected - d...
- Tue Jun 22, 2021 11:23 pm
- Forum: Modding help
- Topic: Wires
- Replies: 1
- Views: 500
Wires
How can I add another item that is able to connect power poles? (Connecting them with copper is fine, but how does the base game determine this?)
- Tue Jun 22, 2021 1:32 pm
- Forum: Modding interface requests
- Topic: New LuaGuiElement: window
- Replies: 3
- Views: 1165
Re: New LuaGuiElement: window
Point 1 is resolved by using a decent framework, or making your own - it's a fairly trivial matter to define a function, say "create_window", and let that handle creating the close button etc. Points 2 and 3 are resolved by setting "player.opened = window". The player can only ha...
- Mon Jun 21, 2021 5:30 am
- Forum: Implemented mod requests
- Topic: LuaGuiElement.bring_to_front()
- Replies: 7
- Views: 3865
Re: LuaGuiElement.bring_to_front()
thanks i didnt notice the subforum this was in. rseding was like "i dont give a fuck" when he broke the functionality so i didnt expect this to ever get fixed Many, many things have gone from "won't ever happen" to "Oh wait..." to "Okay done," sometimes even ...
- Sun Jun 20, 2021 6:46 am
- Forum: Implemented mod requests
- Topic: LuaGuiElement.bring_to_front()
- Replies: 7
- Views: 3865
Re: LuaGuiElement.bring_to_front()
its too late, the stubbornness of rseding made me quit modding and afaik they even still havent fixed this. sorry You claim to have quit but yet here you are coming back nine months later to bitch about something in the "implemented requests" forum saying they "still haven't fixed it...
- Fri Jun 18, 2021 5:56 pm
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 83713
Re: Small documentation improvement requests
Tool s have prototype properties to describe how the durability should appear in the tooltip, but the actual usage of this isn't documented. From looking at core.cfg it would appear that the locale entry gets given: __1__: remaining durability __2__: total durability __3__: durability as a percenta...
- Mon Jun 14, 2021 1:03 pm
- Forum: Modding help
- Topic: resource category
- Replies: 5
- Views: 1917
Re: resource category
Yes, if you have a reference to a resource entity you can check `entity.prototype.resource_category`.
- Mon Jun 14, 2021 7:24 am
- Forum: Modding interface requests
- Topic: Set ignored_by_interaction without setting it on children
- Replies: 4
- Views: 1233
Re: Set ignored_by_interaction without setting it on children
What happens if you set the flow's width to zero and then apply negative left margin to the frame itself?
- Mon Jun 14, 2021 7:19 am
- Forum: Modding help
- Topic: resource category
- Replies: 5
- Views: 1917
Re: resource category
Code: Select all
for name,resource in pairs(data.raw.resource) do
if resource.category ~= "basic-fluid" then
-- do stuff
end
end
- Sun Jun 13, 2021 9:48 pm
- Forum: Texture Packs
- Topic: [Request] Entity graphics for overhaul mod (Satisfactorio)
- Replies: 1
- Views: 3315
[Request] Entity graphics for overhaul mod (Satisfactorio)
Since September of last year I've been working on an overhaul mod: Satisfactorio . At this point is it pretty much feature-complete, and I'm in final testing before I look into releasing it. However, I am not a graphics person. All of my buildings are currently just big white placeholder rectangles ...
- Sun Jun 13, 2021 7:40 pm
- Forum: Modding interface requests
- Topic: Cooldown groups for weapons/capsules
- Replies: 0
- Views: 593
Cooldown groups for weapons/capsules
Currently, all weapons share a cooldown, and all capsules share a cooldown. I have a powerful healing item that fully heals your character but has a several second long cooldown. During this cooldown, it's impossible to throw grenades because they are also capsules. I would like to suggest a `cooldo...
- Sat Jun 12, 2021 8:40 am
- Forum: Modding help
- Topic: Last in mod load order
- Replies: 8
- Views: 2616
Re: Last in mod load order
Since mods are loaded in alphabetical order (when not referenced by dependency) then you can name your mod accordingly. This is what happened back when 0.18 changed how shortcut prototypes worked, which was a breaking change for many QoL mods. Rather than wait for all the mod makers to patch it, som...