Search found 1243 matches
- Fri May 20, 2022 5:33 pm
- Forum: Ideas and Suggestions
- Topic: Mod portal "favorit" feature
- Replies: 6
- Views: 114
- Thu May 19, 2022 6:17 am
- Forum: Modding help
- Topic: How can I close a GUI without "name"?
- Replies: 2
- Views: 90
Re: How can I close a GUI without "name"?
I want to close the GUI of other mods in my mod and replace it with my GUI, but his GUI doesn't have "name", so how can I close it? He wrote: global.inserter_guis[player.index] = player.gui.relative.add{ type = "frame", caption = { "aaaaa" }, anchor = {...................
- Fri May 13, 2022 8:27 am
- Forum: Ideas and Suggestions
- Topic: [0.15.1] Improvements to the mod options
- Replies: 14
- Views: 1049
Re: [0.15.1] Improvements to the mod options
To me your choice of green and orange seems a bit strange as I don't associate orange with "Off". Red is the obvious signal color for "off" or "stop", so naturally I tried that. However, I found that very hard to read (at least in normal text, bold text may be differen...
- Fri May 13, 2022 7:37 am
- Forum: Ideas and Suggestions
- Topic: [0.15.1] Improvements to the mod options
- Replies: 14
- Views: 1049
Re: [0.15.1] Improvements to the mod options
Agreed that I don't think most mod setting names should be coloured. It is very useful for setting descriptions (tooltips) though. My reasoning for using colors in the setting names was that players can see at a glance what the setting's default value, without having to move the cursor to show the ...
- Thu May 12, 2022 7:43 pm
- Forum: Ideas and Suggestions
- Topic: [0.15.1] Improvements to the mod options
- Replies: 14
- Views: 1049
Re: [0.15.1] Improvements to the mod options
Oh, that's cool! What does that look like in the locale file? Specifically, what do you need to do to the line to get it to do that? [mod-setting-name] GCKI-flying_text=[color=orange]Display messages as flying text[/color] GCKI-show_hints=[color=green]Show all hints[/color] This description of rich...
- Thu May 12, 2022 5:58 pm
- Forum: Ideas and Suggestions
- Topic: [0.15.1] Improvements to the mod options
- Replies: 14
- Views: 1049
Re: [0.15.1] Improvements to the mod options
I've never tried adding colors to mod setting names & descriptions, and can't say I've seen it, so I don't know if this is possible already or not. If not, it would be nice to have. I don't know about descriptions, but it definitely works for the setting names! I use colors to mark the default ...
- Wed May 11, 2022 5:44 pm
- Forum: Technical Help
- Topic: Unexpected error occurred
- Replies: 6
- Views: 127
Re: Unexpected error occurred
please fix this problem because I'm really like this game and played here a lot If there hadn't been a response after a week I'd understand that you push your thread -- but you followed up your first post after just 23 minutes, complaining that there is no fix yet! You definitely should be more pat...
- Wed May 11, 2022 5:09 pm
- Forum: Modding help
- Topic: How to get the translation?
- Replies: 19
- Views: 496
Re: How to get the translation?
Is on_player_joined_game fired when loading a single player map? IIRC, the event fires only once in single player, after on_player_created. So the safe way to handle both single- and multiplayer games is to store player data in the global table when on_player_joined_game fires, and to reinitialize ...
- Wed May 11, 2022 10:33 am
- Forum: Modding help
- Topic: Arachnids, would you like to know more...? Data.raw function replacement help!
- Replies: 8
- Views: 287
Re: Arachnids, would you like to know more...? Data.raw function replacement help!
Now i need to do the same with the bloodtint particle local function arachnids_bloodtint() return {r = 50, g = 204, b = 50} end data.raw["particles"].bloodtint = arachnids_bloodtint but this return me a nill value You're making data.raw["particles"].bloodtint a reference to the ...
- Tue May 10, 2022 1:28 pm
- Forum: Modding help
- Topic: How to get the translation?
- Replies: 19
- Views: 496
Re: How to get the translation?
The event will be triggered only if the string could be translated, i.e. if the return value of LuaPlayer::request_translation(localised_string) is true. I don't understand you, because the function always returns true Here it says: request_translation(localised_string) → boolean Requests a transla...
- Mon May 09, 2022 3:15 am
- Forum: Modding help
- Topic: How to get the translation?
- Replies: 19
- Views: 496
Re: How to get the translation?
The event will be triggered only if the string could be translated, i.e. if the return value of LuaPlayer::request_translation(localised_string) is true.
- Sat May 07, 2022 10:05 am
- Forum: Mods
- Topic: on_player_died not working with other mods
- Replies: 2
- Views: 94
Re: on_player_died not working with other mods
I have a small mod that write some evens to a file so that I can use it to post it to Discord (https://mods.factorio.com/mod/FactoriGOChatBot-companion) One of the things is player death messages: script.on_event( defines.events.on_player_died, function(event) local player_index = event.player_inde...
- Thu May 05, 2022 5:23 am
- Forum: Modding help
- Topic: Change registered function for event handler
- Replies: 6
- Views: 118
Re: Change registered function for event handler
Is it ok to change which function is registered for a particular event based on a setting? Yes, you can assign another function (or nil to stop listening to an event). However, you must do this when the game is loading (this can be before on_load) or within an event. Also, something like this is po...
- Wed May 04, 2022 3:32 am
- Forum: Modding help
- Topic: Spreading a table out over several ticks
- Replies: 22
- Views: 696
Re: Spreading a table out over several ticks
Ok, idea 2 may not work. If anything happens to the sapling (it gets mined separate from its planter or somehow destroyed), I don't want to have to loop through the whole planters table to figure out which one it belonged to. Make 2 tables, one indexed by planter unit_number, with a lookup list of ...
- Mon May 02, 2022 10:00 am
- Forum: Modding help
- Topic: How does technology_to_unlock work for Prototype/Shortcut?
- Replies: 2
- Views: 130
Re: How does technology_to_unlock work for Prototype/Shortcut?
Rather unexpectedly technology_to_unlock means the shortcut will be available if you researched that technology already in any game. Oh, I see! That's really unexpected, it definitely should be documented. To achieve your goal you need enable the shortcut in control.lua on_research_finished with se...
- Mon May 02, 2022 12:16 am
- Forum: Modding help
- Topic: How to get the width of GUI element containers?
- Replies: 3
- Views: 199
Re: How to get the width of GUI element containers?
There is no way to read the height or width of an element. Yes, looks like it … :cry: Is there any way how I could determine the real width of character_frame, so that I can set the width of main_flow? If you want the container sizes, you must give the inner objects a fixed size. The idea was that ...
- Sun May 01, 2022 11:57 pm
- Forum: Modding help
- Topic: How does technology_to_unlock work for Prototype/Shortcut?
- Replies: 2
- Views: 130
How does technology_to_unlock work for Prototype/Shortcut?
I've defined this prototype: { type = "shortcut", name = "GCKI_car-key", action = "lua", icon = { filename = GCKI.modRoot.."/graphics/"..icon, size = 64, mipmap_count = 1, }, technology_to_unlock = "automobilism", }, I expected that the shortcut woul...
- Fri Apr 29, 2022 5:34 pm
- Forum: Modding help
- Topic: Which LuaGuiElement is in front?
- Replies: 1
- Views: 121
Which LuaGuiElement is in front?
My mod has 2 GUIs on player.gui.screen. When I turn them on, I will use LuaGuiElement.bring_to_front() to make sure they are visible. One of them ("Available characters") can become quite small, as you can see in this screenshot: overlay-guis.png In this case the small GUI is on top, so it...
- Fri Apr 29, 2022 3:27 pm
- Forum: Questions, reviews and ratings
- Topic: Thoughts about byproducts in SE and game design
- Replies: 10
- Views: 449
Re: Thoughts about byproducts in SE and game design
The discord separation helps contain the spoilers, but doesn't do much for spreading word of mouth. Discord channels aren't very stumble upon. Also, some people don't like to register at yet another place. The mod portal may not be optimal for bug reports because the Markdown is easily broken (code...
- Fri Apr 29, 2022 3:01 pm
- Forum: Modding help
- Topic: Ask for a Lua syntax
- Replies: 4
- Views: 222
Re: Ask for a Lua syntax
action = { { type = "direct", action_delivery = { { type = "projectile", projectile = "anti-material-rifle-ammo-3", starting_speed = 3, direction_deviation = 0.02, range_deviation = 0.02, max_range = 50, source_effects = { { type = "create-explosion", entity_...