Search found 1721 matches

by Pi-C
Sat Nov 16, 2024 11:19 am
Forum: Modding help
Topic: Change storage variable from game
Replies: 4
Views: 182

Re: Change storage variable from game

if someone will find it, i found only one solution: custom commands use this event to run function that will change variable you need https://lua-api.factorio.com/latest/classes/LuaGameScript.html#console_command_used LuaGameScript::console_command_used is a read-only flag (Boolean value) that is s...
by Pi-C
Thu Nov 14, 2024 6:55 am
Forum: Modding help
Topic: Error updating mod for Factorio 2.0
Replies: 21
Views: 769

Re: Error updating mod for Factorio 2.0

But a new error appeared: 262.848 Error AppManagerStates.cpp:2653: Мод The Ruins Mod (1.1.6) caused a fatal error. Please report this error to the mod author. Error while running event AbandonedRuins::on_init() __AbandonedRuins__/utilities.lua:112: attempt to index global 'global' (a nil value) sta...
by Pi-C
Wed Nov 13, 2024 1:55 pm
Forum: Not a bug
Topic: Unrequested ammo will be removed from vehicle ammo slots to trash
Replies: 2
Views: 106

Re: Unrequested ammo will be removed from vehicle ammo slots to trash

Thanks for the reply!
Rseding91 wrote: Wed Nov 13, 2024 1:48 pm That is intended. It works the same with characters.
Shit, that breaks my mod – at least the way it's working now. Back to the drawing board! :?
by Pi-C
Wed Nov 13, 2024 12:44 pm
Forum: Not a bug
Topic: Unrequested ammo will be removed from vehicle ammo slots to trash
Replies: 2
Views: 106

Unrequested ammo will be removed from vehicle ammo slots to trash

It seems that vehicle logistics are buggy: Put down a tank or spidertron, or any modded vehicle that supports vehicle logistics. Turn off "Trash unrequested" for this vehicle. Remove all requests. Put fuel into a fuel slot. Put ammo in an ammo slot. Make sure vehicle logistics are enabled....
by Pi-C
Wed Nov 13, 2024 4:46 am
Forum: Modding interface requests
Topic: Add APIs to manage logistic groups
Replies: 3
Views: 206

Re: Add APIs to manage logistic groups

We need APIs to: Get all existing logistic groups (with the count of how many things are using the group) Create logistic groups (maybe not necessary as an API as just setting the "group" property on a section will implicitly create it) Delete a logistic group I'm strongly in support of t...
by Pi-C
Sun Nov 10, 2024 9:14 am
Forum: Modding help
Topic: Selection tools in remote view
Replies: 0
Views: 90

Selection tools in remote view

I'm updating Autodrive for Factorio 2.0. The mod has a 'remote controller', which is a selection-tool that can be used to select vehicles in an area, or ordering vehicles to move to the selected position. EDIT: 'vehicles' are entities based on a "car" or "spider-vehicle" prototyp...
by Pi-C
Fri Nov 08, 2024 11:29 am
Forum: Minor issues
Topic: [2.0.10] All mods get enabled after loading mod with wrong version
Replies: 2
Views: 172

Re: [2.0.10] All mods get enabled after loading mod with wrong version

when testing my own mod, I found this problem. there is a time when my zip version doesn't match my version in info.json. […] after closing factorio. and lunch it again. factorio will enable all the mods in the mod folder. That's still an issue in 2.0.15. My mods folder contains a number of mods th...
by Pi-C
Mon Nov 04, 2024 10:28 pm
Forum: Modding discussion
Topic: How to set the "description" of "shortcut"?
Replies: 14
Views: 327

Re: How to set the "description" of "shortcut"?

sdgmlj wrote: Sat Nov 02, 2024 4:25 pm Firstly, thank you very much for helping me solve this problem. I would like to ask, is it never possible to achieve mouse hover display through scripts?
There is on_gui_hover, but I'm not sure it will work with vanilla GUIs.
by Pi-C
Mon Nov 04, 2024 1:50 pm
Forum: Modding help
Topic: May I ask how to prevent players from modifying shortcut keys?
Replies: 2
Views: 132

Re: May I ask how to prevent players from modifying shortcut keys?

I added a 'custom input' and I don't want players to modify it. Why would you want that? How can I set it up? Or hide it? If you hide it (I presume from Main menu --> Controls), how would the players know that your custom input exists, and what key sequence will trigger it? Personally, I use the op...
by Pi-C
Sat Nov 02, 2024 3:38 pm
Forum: Modding discussion
Topic: How to set the "description" of "shortcut"?
Replies: 14
Views: 327

Re: How to set the "description" of "shortcut"?

type = "shortcut", name = "abc", order = "abc", localised_description = "aaaaaa", You completely understand what I mean, but 'localised_description' is invalid in 'shortcut' No, it's not invalid! Enter this on the chat console: /c game.print(prototypes.shortc...
by Pi-C
Sat Nov 02, 2024 2:41 pm
Forum: Modding discussion
Topic: How to set the "description" of "shortcut"?
Replies: 14
Views: 327

Re: How to set the "description" of "shortcut"?

sdgmlj wrote: Sat Nov 02, 2024 2:20 pm what I want to know is, can only change 'name'?
Check out PrototypeBase, which is inherited by all other prototypes. What you need isn't localised_name, but localised_description!
by Pi-C
Fri Nov 01, 2024 9:26 am
Forum: Modding interface requests
Topic: Prototype flag to disable showing up in "Made in" tooltip (Factoriopedia)
Replies: 2
Views: 119

Re: Prototype flag to disable showing up in "Made in" tooltip

Can't you make those prototypes hidden? Pretty sure "made in" didn't show hidden prototypes, at least in 1.1. I didn't want to set the 'hidden' flag because that would remove the prototypes it is applied to from useful GUIs as well (e.g. somebody may want to place characters in editor mod...
by Pi-C
Fri Nov 01, 2024 7:41 am
Forum: Modding interface requests
Topic: Prototype flag to disable showing up in "Made in" tooltip (Factoriopedia)
Replies: 2
Views: 119

Prototype flag to disable showing up in "Made in" tooltip (Factoriopedia)

The problem The tooltip for recipes will show a section "Made in" if the recipe can not be hand-crafted or if the recipe prototype has the flag 'always_show_made_in' set. "Made in" will also be shown in Factoriopedia. This section can become quite crowded in modded games with ma...
by Pi-C
Thu Oct 31, 2024 9:43 am
Forum: Modding help
Topic: control.lua: attempt to index global
Replies: 3
Views: 182

Re: control.lua: attempt to index global

I tried a few things and it still doesn't work as intended. Real shame The update to Factorio 2.0 came with some drastic changes: 'global' was renamed, things like 'game.prototypes' have been moved to 'prototypes' etc. Here is the preview of the changes posted in preparation for 2.0. If you read th...
by Pi-C
Thu Oct 31, 2024 9:16 am
Forum: Resolved Problems and Bugs
Topic: [Genhis][2.0.13] Crash inspecting 'character' entities with gvv (ControllerManager::getRealController)
Replies: 2
Views: 535

[Genhis][2.0.13] Crash inspecting 'character' entities with gvv (ControllerManager::getRealController)

I'm using Lua API global Variable Viewer (gvv) for debugging my mods. That mod can show the environment of registered mods, but it can also be used to inspect Lua objects. I've got a hard crash (killing Factorio) when I tried to inspect an entity based on the 'character' prototype: 703.310 Error Cra...
by Pi-C
Fri Oct 25, 2024 10:12 am
Forum: Modding help
Topic: How to base a surface on a LuaSurfacePrototype?
Replies: 5
Views: 196

Re: How to base a surface on a LuaSurfacePrototype?

Thank you, I'll try that! I didn't even think of looking for hiding surfaces in LuaForce …
by Pi-C
Fri Oct 25, 2024 9:23 am
Forum: Modding help
Topic: How to base a surface on a LuaSurfacePrototype?
Replies: 5
Views: 196

How to base a surface on a LuaSurfacePrototype?

I've some surfaces that are strictly for mod-internal purposes, not intended to be visited by players. But the surfaces I've created are visible in the "Surfaces" GUI from Remote view. So, I want to hide my surfaces. Luckily we now have the LuaSurfacePrototype, where we can set the propert...
by Pi-C
Fri Oct 25, 2024 8:28 am
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Error when trying to open GUI by defines.gui_type
Replies: 2
Views: 616

[Rseding91] Error when trying to open GUI by defines.gui_type

According to LuaControl::opened , defines.gui_type is an allowed type for writing. In Factorio 1.1, we could use /c game.player.opened = defines.gui_type.controller to open the player/character GUI, or /c game.player.opened = defines.gui_type.blueprint_library to open – you've guessed it! – the blue...

Go to advanced search