Search found 28 matches
- Tue Sep 28, 2021 2:24 pm
- Forum: Won't implement
- Topic: Reading dimensions of sprites during control stage.
- Replies: 2
- Views: 1518
Reading dimensions of sprites during control stage.
Why ? For Dana , I need precise control of the size/position/x-y ratio of sprites in rendering.draw_sprite(). For some kind of sprites (ex: technology, entities) which don't have standard dimensions like item sprites, this doesn't seem possible with the current API. Proposition 1) New read-only cla...
- Sun Oct 18, 2020 4:25 pm
- Forum: Modding help
- Topic: Is it possible to call functions in cpp from lua?
- Replies: 11
- Views: 4248
Re: Is it possible to call functions in cpp from lua?
Is it possible to build some dll and call the functions from __my_mod__? As mentioned by others, you can't have the Factorio process load any DLL you provide and start calling its functions from your Lua code (And from a security point of view, I hope it never happens). That being said, if I take y...
- Sun Oct 18, 2020 10:22 am
- Forum: Duplicates
- Topic: [1.0.0] Recursive LocalisedString causes hard crash
- Replies: 5
- Views: 1847
Re: [1.0.0] Recursive LocalisedString causes hard crash
If a recursive localized string does not make sense, why do you try to create one? Because I wondered what the game would do in this situation. Since your question has a strong implicit smell of "Then this bug report is useless. Nothing to fix, just stop doing that", I'll add a little som...
- Sat Oct 17, 2020 9:55 pm
- Forum: Duplicates
- Topic: [1.0.0] Recursive LocalisedString causes hard crash
- Replies: 5
- Views: 1847
[1.0.0] Recursive LocalisedString causes hard crash
What happened Attempting to print a recursive LocalisedString via command line causes a hard crash (stack overflow). Steps to reproduce Start a new game Type the following command: /c local str = {""} str[2] = str game.print(str) Logfile attached. Expected behaviour A recursive LocalisedS...
- Thu Oct 08, 2020 2:30 pm
- Forum: Modding discussion
- Topic: Factorio and visual programming
- Replies: 9
- Views: 4320
Re: Factorio and visual programming
Just for context, I initially dropped in this thread because from my initial understanding, what you were trying to achieve could have required some graph rendering/interaction in a Factorio mod, and I happen to be working on that (for a complelety different usage though). But since you've decided t...
- Sun Sep 27, 2020 10:22 am
- Forum: Modding discussion
- Topic: Factorio and visual programming
- Replies: 9
- Views: 4320
Re: Factorio and visual programming
I might have missed something, but I don't understand what you're trying to achieve or how it's related to Factorio (and the 1st answer to this thread seems to indicate I'm not the only one). What are you trying to deliver ? A standalone mod working out of the box (just download from the game portal...
- Fri Aug 28, 2020 1:59 pm
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
From my point of view you're refusing to talk about solutions for clear() because they don't also fix modify. You can rest assured, my next major release will have no problem handling gui.center.clear(). I also plan to handle on_gui_closed. I know that clear() happens (*cough*), but as far as i can...
- Fri Aug 28, 2020 8:17 am
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
Oh, and i can make it crash with rendering.clear(), suprise! I stand unsurprised. I was caught off-guard by the possibility of cross-mod GUI modification, but was fully aware of the potential rendering issues. I can think of dozens of way to make my mod bug/crash through commands or other mods, and...
- Thu Aug 27, 2020 7:40 pm
- Forum: Won't fix.
- Topic: [Rseding91] LuaFluidBoxPrototype issues
- Replies: 4
- Views: 2406
Re: [Rseding91] LuaFluidBoxPrototype issues
Thanks for the answer. Personally I don't mind the issue to not be really fixed. I just want to generate a pseudo-recipe: boiler X takes fluid A as input, outputs fluids B, and uses fluid C as fuel (with possibly "any fluid" if there are no filters on the fluidbox). If you have any suggest...
- Thu Aug 27, 2020 7:35 pm
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
But @OPs Dana doesn't react to on_gui_closed. Which btw is documented as "This is only called if the player explicitly closed the GUI." Soo... still arguing against windmills. And that's something I'm willing to change if there is any need (if I get to understand what it does, because the...
- Thu Aug 27, 2020 2:28 pm
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
No. A shared resource can be arbitarily altered without my knowledge or consent. I am forced to share it with people i don't even know. That's exactly what GUI is I agree Factorio indeed expose mod GUIs as a shared resource. I think we'll also agree that in practice, no mod really support arbitrary...
- Thu Aug 27, 2020 11:26 am
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
Manipulating the *inside* of other mods guis is ofc broken. TL;DR: The easiest method to deal with it is to properly check existance and .valid before you try to use a shared resource (gui, rendering, inventory, etc). If you trully consider the GUIs as a shared resource, then it heavily contradicts...
- Fri Aug 21, 2020 8:46 am
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
- Fri Aug 21, 2020 7:59 am
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
I doubt any mod author would do such things on purpose. Well, the mod author I contacted has a different point of view: If any mods are broken by a player.gui.center.clear() call then those mods should be updated to handle that situation. When a mod uses the center GUI is it usually to take the mai...
- Thu Aug 20, 2020 9:31 pm
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
Excellent, I've found another mod doing the same thing. The joy is real. For example, running clear() on one of the root GUIs is obviously a no-go. If a mod is doing that, then people can simply not use that mod until it's fixed. The issue is about finding "that mod". If it takes multiple ...
- Thu Aug 20, 2020 4:39 pm
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Re: Detect/prevent GUI modification/deletion from other mods.
No need to shame anybody, the other mod got an update today addressing the issue. Though after looking at the code the "gui.center.clear()" just moved into a if-then statement, so I'm not sure I'll be sleeping very well in the near future. My original question still stands: how to detect/p...
- Wed Aug 19, 2020 7:26 pm
- Forum: Modding help
- Topic: Detect/prevent GUI modification/deletion from other mods.
- Replies: 35
- Views: 6747
Detect/prevent GUI modification/deletion from other mods.
Hi, after hours of investigating a bug report of my mod, I discovered something unexpected: other mods can destroy LuaGuiElement(s) of my mod. While I could understand that in some situations, it might be convenient for mod A to modify the GUI of mod B, in my situation this is totally unwanted &...
- Mon Aug 17, 2020 8:45 am
- Forum: Modding help
- Topic: Making a mod list command but not working...
- Replies: 2
- Views: 923
Re: Making a mod list command but not working...
LuaGameScript.write_file() has a 3rd argument named append:
Setting it to true should solve your problem.
Code: Select all
append :: boolean (optional): When true, this will append to the end of the file. Defaults to false, which will overwrite any pre-existing file with the new data.
- Sun Aug 16, 2020 12:28 pm
- Forum: Won't fix.
- Topic: [Rseding91] LuaFluidBoxPrototype issues
- Replies: 4
- Views: 2406
[1.0.0] API Bug: LuaEntityPrototype.fluid_energy_source_prototype.fluid_box has incorrect index.
Description I am using the API to get the index of the LuaFluidBoxPrototype used as fuel input in a LuaEntityPrototype (more precisely a boiler prototype). I do it like this: local index = entity_prototype.fluid_energy_source_prototype.fluid_box.index However it does not match the right fluidbox in...
- Sat Aug 15, 2020 12:50 pm
- Forum: Won't implement
- Topic: Type-specific load order definitions and dependencies
- Replies: 9
- Views: 2492
Re: Type-specific load order definitions and dependencies
Hi, I'm just dropping here out of curiosity as someone who started modding quite recently (I don't currently have any need of changes in the data stage, but I can understand that others have). Given that modders don't even use the 3 data stages properly, I don't see how a more complex system could w...