Search found 229 matches

by DedlySpyder
Thu May 28, 2020 11:30 pm
Forum: Not a bug
Topic: [0.18.27] [Modding] Inconsistent Global Table Across Saves
Replies: 3
Views: 140

Re: [0.18.27] [Modding] Inconsistent Global Table Across Saves

So, I was handling on_player_left_game. I was kicking the player out of controlling the avatar when that happens. But, that was never firing in this single player game, I'm only getting on_player_joined_game. Which I can handle repairing the reference there easily enough, just making sure that is as...
by DedlySpyder
Thu May 28, 2020 1:33 am
Forum: Not a bug
Topic: [0.18.27] [Modding] Inconsistent Global Table Across Saves
Replies: 3
Views: 140

Re: [0.18.27] [Modding] Inconsistent Global Table Across Saves

Oooooooh, ok that makes sense then. Thanks!
by DedlySpyder
Wed May 27, 2020 2:57 am
Forum: Not a bug
Topic: [0.18.27] [Modding] Inconsistent Global Table Across Saves
Replies: 3
Views: 140

[0.18.27] [Modding] Inconsistent Global Table Across Saves

So, to preface, I'm not even sure this is a bug, but I can't track down what is happening. I have 2 saves for my mod Avatars, one is a fresh save and one was a heavily modded save from a player who ran into some issues with a global table reference to an entity (a character copy entity called an ava...
by DedlySpyder
Wed Apr 01, 2020 5:36 pm
Forum: Not a bug
Topic: [0.18.17][Modding][Multiplayer] Runtime-per-user Settings Lagging Behind
Replies: 2
Views: 108

Re: [0.18.17][Modding][Multiplayer] Runtime-per-user Settings Lagging Behind

OK awesome, I assumed I would have to listen at both join and changed. Thanks
by DedlySpyder
Wed Apr 01, 2020 1:45 am
Forum: Not a bug
Topic: [0.18.17][Modding][Multiplayer] Runtime-per-user Settings Lagging Behind
Replies: 2
Views: 108

[0.18.17][Modding][Multiplayer] Runtime-per-user Settings Lagging Behind

I have a runtime-per-user setting that I want to read right when a player connects to a game. The scenario I'm at right now is when the host has the setting to false and the joining player has it set to true with the "Use different mod settings per save" turned off, so their setting will be preserve...
by DedlySpyder
Sun Mar 08, 2020 7:28 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.0] Unknown key: "gui-migrated-content.change-mod-setting"
Replies: 1
Views: 251

[0.18.0] Unknown key: "gui-migrated-content.change-mod-setting"

The changed mod setting migration header is missing from the English locale (a quick search looks like it is missing from all locales).
by DedlySpyder
Fri Mar 06, 2020 12:07 pm
Forum: Not a bug
Topic: [0.18.10][Modding] LuaSurface.find_non_colliding_position() Infinite Loop 0 Radius
Replies: 3
Views: 127

Re: [0.18.10][Modding] LuaSurface.find_non_colliding_position() Infinite Loop 0 Radius

OK, maybe a warning in the docs then? I spent a good chunk of time thinking my code had an infinite loop.
by DedlySpyder
Fri Mar 06, 2020 3:24 am
Forum: Not a bug
Topic: [0.18.10][Modding] LuaSurface.find_non_colliding_position() Infinite Loop 0 Radius
Replies: 3
Views: 127

Re: [0.18.10][Modding] LuaSurface.find_non_colliding_position() Infinite Loop 0 Radius

After some more poking around at this, it seems that the chunks aren't generated yet (this confused me, because teleporting the character still works, I assume because it forces the generate). By calling the below I was able to use infinite radius. surface.request_to_generate_chunks({0,0}, 1) surfac...
by DedlySpyder
Fri Mar 06, 2020 3:05 am
Forum: Not a bug
Topic: [0.18.10][Modding] LuaSurface.find_non_colliding_position() Infinite Loop 0 Radius
Replies: 3
Views: 127

[0.18.10][Modding] LuaSurface.find_non_colliding_position() Infinite Loop 0 Radius

LuaSurface.find_non_colliding_position() with a 0 radius (which says it just searches intimately large) actually just loops infinitely. I made a small 10x10 empty surface and any time I ran it with 0 radius the game just hung and rapidly increased in memory. function breakFactorio() local surface = ...
by DedlySpyder
Fri Apr 19, 2019 1:22 pm
Forum: Not a bug
Topic: [0.17.32][Modding] LuaEntity.destroy() Returns True on Invalid Entity
Replies: 2
Views: 169

Re: [0.17.32][Modding] LuaEntity.destroy() Returns True on Invalid Entity

Maybe the API docs need updated to reflect that then?

Because currently they say the following:
Return value
if the entity was actually destroyed.
by DedlySpyder
Fri Apr 19, 2019 4:11 am
Forum: Not a bug
Topic: [0.17.32][Modding] LuaEntity.destroy() Returns True on Invalid Entity
Replies: 2
Views: 169

[0.17.32][Modding] LuaEntity.destroy() Returns True on Invalid Entity

I discovered this when teleporting a character across surfaces. The old character references are invalid, but calling .destroy() on them returns true.

I would expect it to fail for calling something on an invalid LuaEntity, or at least returning false.
by DedlySpyder
Mon Mar 04, 2019 11:30 pm
Forum: Resolved Problems and Bugs
Topic: [Bilka][0.17.5][Lua Doc] LuaEquipmentGridPrototype Incorrect Description
Replies: 1
Views: 148

[Bilka][0.17.5][Lua Doc] LuaEquipmentGridPrototype Incorrect Description

The Lua doc for LuaEquipmentGridPrototype says "Prototype of a virtual signal."
by DedlySpyder
Mon Apr 23, 2018 10:47 am
Forum: Resolved Problems and Bugs
Topic: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Replies: 4
Views: 1723

Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

Ok, that's where I was confused I guess, LuaPlayer.opened returns defines.gui_type as well. Does that mean that there is overlap between these two, or is that possibly just outdated information in the lua-api?
by DedlySpyder
Mon Apr 23, 2018 12:14 am
Forum: Resolved Problems and Bugs
Topic: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Replies: 4
Views: 1723

[Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

LuaPlayer.opened is returning nil when the player has either the main inventory open or an armor's equipment grid open. The main inventory isn't that big of a deal, personally, since we have LuaPlayer.opened_self, but the equipment grid is a problem as there isn't another way to know if it's opened.
by DedlySpyder
Wed Jan 24, 2018 2:20 am
Forum: Mod portal Discussion
Topic: [Bug] Upload Failed - Version Conflict
Replies: 0
Views: 381

[Bug] Upload Failed - Version Conflict

I tried to upload the attached 0.4.9 version to my Avatars mod, and I got the below error from the mod portal. I'm not sure why I was getting this, but skipping 0.4.9 and going to 0.4.10 worked fine.
Release with that version already exists
by DedlySpyder
Mon Dec 18, 2017 12:31 am
Forum: Modding interface requests
Topic: Different Types of Artillery?
Replies: 0
Views: 218

Different Types of Artillery?

So, I had an idea, but I think it would require something in the background to become moddable. Basically, to have something like the artillery turrets, but not within the same pool used for firing (so it would have a different targeting that it would only fire on, and the base turrets wouldn't fire...
by DedlySpyder
Fri Oct 06, 2017 11:21 pm
Forum: Modding help
Topic: [0.15.35] [Modding] Crash to Desktop
Replies: 8
Views: 873

Re: [0.15.35] [Modding] Crash to Desktop

Ok, I've found the issue. You were close eradicator, it was an issue with saving functions but not those functions. The problem ended up being this: GUI.TabFunc = function(caption) return function(frame) frame.add{type="label", caption=caption} end end My problem was that I was trying to do somethin...
by DedlySpyder
Fri Oct 06, 2017 10:43 am
Forum: Modding help
Topic: [0.15.35] [Modding] Crash to Desktop
Replies: 8
Views: 873

Re: [0.15.35] [Modding] Crash to Desktop

GUI.TabData.player = game.players[event.player_index] So, that code is only found in the handler for the "1" and "2" buttons, which after a reload still work fine. I think the crash is happening somewhere around this block (or the function call from GuiEvents?): script.on_event(defines.events.on_gu...
by DedlySpyder
Fri Oct 06, 2017 1:49 am
Forum: Modding help
Topic: [0.15.35] [Modding] Crash to Desktop
Replies: 8
Views: 873

Re: [0.15.35] [Modding] Crash to Desktop

Thanks for the report. You've built your mod in a way that isn't supported: you have to store any game references you get in the global table or during the save process it's going to point at invalid locations and become corrupt on loading. I'm going to move this to the Mod Help section. Thanks for...
by DedlySpyder
Fri Oct 06, 2017 1:23 am
Forum: Modding help
Topic: [0.15.35] [Modding] Crash to Desktop
Replies: 8
Views: 873

[0.15.35] [Modding] Crash to Desktop

So, for a bit of background, I'm working on a generic library so I can create something like a tabbed UI, with buttons along the top and a pane that changes depending on the tab selected. This works fine on its own at the moment, but when I save the game and reload, trying to switch tabs causes an i...

Go to advanced search