I'm not sure if this is a bug or working as intended, but while calling find_non_colliding_position() for a player entity it just returned the given position over water as though it wasn't colliding with it.
EDIT: Ignore me, not waiting for chunk gen.
Search found 253 matches
- Sat Mar 18, 2017 4:17 am
- Forum: Not a bug
- Topic: Surface.find_non_colliding_position() and Water
- Replies: 0
- Views: 545
- Thu Mar 16, 2017 10:03 pm
- Forum: Ideas and Requests For Mods
- Topic: "The first one is free", A simple fix for 'trash' items
- Replies: 11
- Views: 4838
Re: "The first one is free", A simple fix for 'trash' items
Here ya go.
Should work in multiplayer and work fine with other mods that mess with the main inventory (from my end of things at least).
There's just a main inventory change event, so just hooking into that made it easy. Kept it at just #types.
Should work in multiplayer and work fine with other mods that mess with the main inventory (from my end of things at least).
There's just a main inventory change event, so just hooking into that made it easy. Kept it at just #types.
- Wed Mar 15, 2017 7:43 pm
- Forum: Ideas and Requests For Mods
- Topic: "The first one is free", A simple fix for 'trash' items
- Replies: 11
- Views: 4838
Re: "The first one is free", A simple fix for 'trash' items
You may be looking for types +1, btw, not sure if you can even pick an item up if your inventory is full.
- Wed Mar 08, 2017 8:47 pm
- Forum: Ideas and Requests For Mods
- Topic: Grief detection: tile placement/damage/removal logging?
- Replies: 2
- Views: 1526
Re: Grief detection: tile placement/damage/removal logging?
The only action that factorio let's modders do is create a file in a set directory. As for logging the information, we can't access who killed an entity until 0.15.
- Mon Mar 06, 2017 10:16 pm
- Forum: Modding help
- Topic: Is it a way to show all items IDs in game instead of names?
- Replies: 5
- Views: 14545
Re: Is it a way to show all items IDs in game instead of names?
I think OP wants the names before being localized. If so, run the following in the ingame console and look for "item_names.txt" in [factorio install]/script-output /c for name, _ in pairs(game.item_prototypes) do; game.write_file("item_names.txt", name.."\n", true); end
- Wed Feb 22, 2017 5:38 pm
- Forum: Ideas and Requests For Mods
- Topic: New Mod to make life... ...different
- Replies: 10
- Views: 3832
Re: New Mod to make life... ...different
Just wondering, but why? Sounds like it would just make mining ore much more tedious because you could only mine around the edges
- Wed Nov 23, 2016 5:40 pm
- Forum: Modding help
- Topic: Manual: balance load in on_tick
- Replies: 17
- Views: 3889
Re: Manual: balance load in on_tick
It seems factorio performance behaves similar, but the effects are neglectably small. For Inventory Sensor 1.1.3 i changed every possible for pairs to for i, #table and table.insert to table[#table+1] performance only went up by 0.06 UPS at best on my test map and oddly enough stayed exactly the sa...
- Mon Oct 24, 2016 2:52 pm
- Forum: Modding discussion
- Topic: [Solved] Which event should be used for LuaEntity.destroy()?
- Replies: 72
- Views: 22261
Re: Which event should be used for LuaEntity.destroy()? When?
@Mooncat, couldn't you just use LuaEntity.die() and clean up any Loot at the position within a small time frame? If the entity gives loot then add it's position (+/- a small amount) to a table for deletion.
Or even no big deal for the loot, as this mod isn't really for normal play, correct?
Or even no big deal for the loot, as this mod isn't really for normal play, correct?
- Wed Oct 19, 2016 4:42 pm
- Forum: Modding interface requests
- Topic: on_gate_changed_state
- Replies: 10
- Views: 3541
Re: on_gate_changed_state
I wonder, could something like custom-input be used here? You register the event prototype with the entity that keeps an eye out for [array of entities] that come within range. The logic behind the gate could be abstracted out. Is binding specific events to an entity prototype possible? If so, there...
- Wed Oct 19, 2016 2:38 pm
- Forum: Modding help
- Topic: How to make a simple GUI
- Replies: 3
- Views: 1506
Re: How to make a simple GUI
There still isn't any proper way to handle players clicking on an entity to fire an event (unless they changed recently). I think your best bet is to make a custom keyboard shortcut that checks the player's selected entity for your entity and handle the GUI from there. (although I believe some peopl...
- Mon Sep 26, 2016 4:46 pm
- Forum: Modding help
- Topic: Change footstep sound for player?
- Replies: 4
- Views: 1380
Re: Change footstep sound for player?
You can swap a players character with a new one with different sounds. Depends on how often you need to do this.aubergine18 wrote:Thanks for the infos. Looks like I won't be able to create character specific footstep sound.
- Thu Sep 22, 2016 5:43 pm
- Forum: Modding help
- Topic: Need help turning a biter-spawner into an assembler
- Replies: 12
- Views: 4245
Re: Need help turning a biter-spawner into an assembler
I think you need to find "assembler3pipepictures()" and "pipecoverspictures()" and make your own replacements. It's been a while since I touched fluid boxes though. If you check my Avatars mod (in my signature, though check the github because I haven't touched the thread in a whi...
- Thu Sep 22, 2016 4:46 pm
- Forum: Modding discussion
- Topic: [0.15] Mod setting/config interface - give your input
- Replies: 203
- Views: 62970
Re: [0.15] Mod setting/config interface - give your input
I don't think it's been brought up yet, but support for optional settings would be good too. Plenty of mods have optional dependencies and may have different settings in different situations. Oh, and can we somehow have an array as a setting? Like a multiple selection box (I guess it could be done w...
- Wed Sep 21, 2016 7:09 pm
- Forum: Modding help
- Topic: Need help turning a biter-spawner into an assembler
- Replies: 12
- Views: 4245
Re: Need help turning a biter-spawner into an assembler
Or make an extra entity under the assembler that is a spawner (I have to imagine that the spawning logic is better than what a mod can do easily)Adil wrote:Actually it seems easier to make assembler to look like spawner and create units around it with lua.
- Mon Sep 19, 2016 6:55 pm
- Forum: Modding help
- Topic: How do I have a recipe have a "made in" field?
- Replies: 7
- Views: 2415
Re: How do I have a recipe have a "made in" field?
Do you want to just post the whole mod so someone can flip through it then (or at least the prototypes)? That's probably better than just posting snippets
- Wed Sep 14, 2016 4:36 pm
- Forum: Modding help
- Topic: Substring /remove kW
- Replies: 6
- Views: 1680
Re: Substring /remove kW
You can get a substring btw, it's string.sub() Only if you know the length of the numeric portion of the string... which could be different if some other mod already changed the value to bigger/smaller number. string.sub(string, 1, (#string - 2)) You had the right idea originally, just wrong syntax
- Wed Sep 14, 2016 2:59 pm
- Forum: Modding help
- Topic: Substring /remove kW
- Replies: 6
- Views: 1680
Re: Substring /remove kW
You can get a substring btw, it's string.sub()
- Mon Sep 12, 2016 2:43 pm
- Forum: Ideas and Requests For Mods
- Topic: Connect adjacent belts to entity
- Replies: 9
- Views: 2827
Re: Connect adjacent belts to entity
The base game is getting "loader" belts that do this sort of thing. There's a mod that enables the hidden entities: https://mods.factorio.com/mods/kij336/add-loader Pretty sure that loaders were scrapped from the game (replaced by stack inserters), but they included what they had on them ...
- Thu Sep 08, 2016 3:51 pm
- Forum: Modding help
- Topic: defines.lua - where is it?
- Replies: 6
- Views: 2673
Re: defines.lua - where is it?
I'm pretty sure that the Lua documentation is also included in the game files, so you wouldn't have to go put to the site to parse the info
- Tue Sep 06, 2016 2:44 pm
- Forum: Ideas and Requests For Mods
- Topic: Please make Boots that are 'immune' to Conveyor Belts
- Replies: 3
- Views: 1071
Re: Please make Boots that are 'immune' to Conveyor Belts
It's been suggested before, but it's not really viable. I believe the only ways to handle it are to either teleport the player constantly (would be ugly and laggy), or to turn off the belt