Search found 105 matches

by ixu
Mon Dec 07, 2020 1:45 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

It is a question to devs: The following code prevents the game from being saved. The above error message appears. local LocalVariable script.on_init(function() LocalVariable = game.entity_prototypes end) I know this code is scary, but it is the simplified version of a real situation. The question ar...
by ixu
Mon Dec 07, 2020 1:10 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

eradicator wrote: ↑
Mon Dec 07, 2020 1:01 am
No, only the content of _ENV.global is serialized into the save.zip file. When you store local data between two ticks you gotta be wary of desyncs though.
That is what I understood. But why is there an error message about a variable outside of ENV.global that it can't be saved?
by ixu
Mon Dec 07, 2020 12:48 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

What I now had to realize with pain is that it is not only about "local" as a declaration. You can not store these objects at all between two ticks. I should have known that before. But it is ok. But now I have the following question: Does this mean that everything I store anywhere between...
by ixu
Sun Dec 06, 2020 11:42 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

Klonan wrote: ↑
Sun Dec 06, 2020 11:36 am
It isn't just about 'global', if they are stored anywhere except in locals, the error will occur
So then everything is clear. Thank you very much.
by ixu
Sun Dec 06, 2020 11:27 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

I use global variables (beyond the global-table) for performance reasons - with lots of LuaCustomTable. They are stateless. When a save file is loaded, they are always redefined. You're storing a LuaCustomTable somewhere outside of global between ticks. Either you did it explicitly or you forgot to ...
by ixu
Sat Dec 05, 2020 12:29 pm
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

Excuse me for giving this impression. It was really a misunderstanding. I really only wanted help to help myself.
ixu wrote: ↑
Sat Dec 05, 2020 11:45 am
If you want you can go into it
That saying was meant ironically.
But you helped me anyway. Because now I know that there is no howto. Please don't be mad at me.
by ixu
Sat Dec 05, 2020 12:13 pm
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

I hoped there is some howto or some hints more than "something went wrong - please fix and reboot".
I am so sorry for asking. Lets close this post.
by ixu
Sat Dec 05, 2020 11:45 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Re: Howto fix "LuaCustomTable cannot be serialized."

I added my global structure. There is nothing.
Other global variables are not important, right?
My mod has some lines. It is called ingteb.
https://mods.factorio.com/mod/ingteb
If you want you can go into it
by ixu
Sat Dec 05, 2020 11:37 am
Forum: Modding help
Topic: Howto fix "LuaCustomTable cannot be serialized."
Replies: 19
Views: 3072

Howto fix "LuaCustomTable cannot be serialized."

When trying to save my mod crashes by saying "LuaCustomTable cannot be serialized." My global structure seems to be harmless: serpent.block(global) "{\ Current = {\ Gui = {},\ Links = {},\ Location = {},\ PendingTranslation = {}\ }\ }" ⏱️ 0.193600β€―ms Logfile say this only: databa...
by ixu
Thu Dec 03, 2020 2:11 pm
Forum: Modding help
Topic: Use of build-in tooltips
Replies: 10
Views: 1759

Re: Use of build-in tooltips

I was just kidding
by ixu
Thu Dec 03, 2020 1:54 pm
Forum: Modding help
Topic: Use of build-in tooltips
Replies: 10
Views: 1759

Re: Use of build-in tooltips

That is quite cool. I missed it when I read the docu. But actually this is not enough for my purpose. 1. This tooltip belongs to prototype. I need the one that belongs to the player (as in crafting-panel view) 2. Consequently, I would also like to have the number of objects that can be crafted displ...
by ixu
Thu Dec 03, 2020 10:51 am
Forum: Modding help
Topic: Use of build-in tooltips
Replies: 10
Views: 1759

Re: Use of build-in tooltips

The Gui is like this: inteb2.PNG There are sprites and sprite-buttons of items, recipes and technologies. I can set guiElement.tooltip to some self-created localised string, but in case of recipes it would be very nice to present the tooltip factorio would present. the code is as follows (although t...
by ixu
Tue Dec 01, 2020 3:44 pm
Forum: Modding help
Topic: Use of build-in tooltips
Replies: 10
Views: 1759

Re: Use of build-in tooltips

Currently choose-elem-button is your only chance.
Can you please explain how choose-elem-button displays the detailed tooltips I get when I hover over a recipe in the crafting menu?
tooltip.PNG
tooltip.PNG (187.75 KiB) Viewed 1636 times
by ixu
Tue Dec 01, 2020 12:13 pm
Forum: Modding help
Topic: Use of build-in tooltips
Replies: 10
Views: 1759

Re: Use of build-in tooltips

Not yet but I suggested it.
Cannot see how this will help me with my issue. Could you explain?
by ixu
Tue Dec 01, 2020 2:24 am
Forum: Modding help
Topic: Howto enlarge tabs
Replies: 2
Views: 789

Re: Howto enlarge tabs

in data.lua: data:extend{{ type = "font", name = "ingteb-bigger-font", from = "default", size = 32 }} data.raw["gui-style"].default["ingteb-bigtab"] = { type = "tab_style", font = "ingteb-bigger-font" } in control.lua: local tab =...
by ixu
Tue Dec 01, 2020 1:10 am
Forum: Modding help
Topic: Howto enlarge tabs
Replies: 2
Views: 789

Howto enlarge tabs

In my mod I have to present a selection for item-prototypes - grouped by item-group. The code looks like this: local groupHeader = group[next(group)][1].group -- will contain a LuaGroup object -- groupPanel is LuaGuiElement of type "tabbed-pane" local tab = groupPanel.add { type = "ta...
by ixu
Mon Nov 30, 2020 1:41 am
Forum: Modding help
Topic: burner productivity
Replies: 6
Views: 1120

Re: burner productivity

Thank you. That sounds like challenge.
by ixu
Mon Nov 30, 2020 12:54 am
Forum: Modding help
Topic: mod-defined utility-sprite not recognized
Replies: 5
Views: 1032

Re: mod-defined utility-sprite not recognized

Sure, I will do this tomorrow. But the Factorio-docu needs update too:

https://lua-api.factorio.com/latest/Con ... SpritePath
by ixu
Mon Nov 30, 2020 12:48 am
Forum: Modding help
Topic: burner productivity
Replies: 6
Views: 1120

Re: burner productivity

The screenshot shows what I want to display. The line with the steam is marked. The values here are currently hardwired and the producers do not show a factor yet. Probably a mod that defines boiler is displayed wrong, because I did not get the values from any prototypes. Steam.PNG It is this mod bt...
by ixu
Mon Nov 30, 2020 12:36 am
Forum: Modding help
Topic: mod-defined utility-sprite not recognized
Replies: 5
Views: 1032

Re: mod-defined utility-sprite not recognized

Thanks.
But I did not found this fact in the documentation or the wiki. Should be updated there.

Go to advanced search