localised description for shortcuts

User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

localised description for shortcuts

Post by Quezler »

Currently shortcuts either have the spawned item's description or nothing at all, it would be nice if you could add a description for lua shortcuts and such.
User avatar
picklock
Filter Inserter
Filter Inserter
Posts: 250
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: localised description for shortcuts

Post by picklock »

You can give your shortcut a description by assigning the description to your shortcut via "localised_name".
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: localised description for shortcuts

Post by Quezler »

Isn't that just the name? i am referring to what comes after the horizontal line under it.
User avatar
picklock
Filter Inserter
Filter Inserter
Posts: 250
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: localised description for shortcuts

Post by picklock »

No, this is the text that is displayed as a tooltip when you hover over the shortcut icon in the shortcut bar. Do you mean something else?
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: localised description for shortcuts

Post by Quezler »

You can currently only set the name, the description is only there when the shortcut spawns an item, otherwise it is always blank:
Attachments
01-28-2025, 12-10-24.png
01-28-2025, 12-10-24.png (21.68 KiB) Viewed 1807 times
User avatar
picklock
Filter Inserter
Filter Inserter
Posts: 250
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: localised description for shortcuts

Post by picklock »

OK. Then I misunderstood you.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Xorimuth
Filter Inserter
Filter Inserter
Posts: 730
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: localised description for shortcuts

Post by Xorimuth »

+1

Specifically I'd like to be able to alter the description of the Spidertron Remote shortcut. Currently it is hardcoded, and I can sort of override it by re-defining the locale key of one of the bullet points but
a) that looks a bit weird as I can only alter text of existing bullet points, not add more
b) I can't do that dynamically depending on mod settings, existence of other mods, etc, which I would like to be able to do (so I need `localised_description`)
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 490
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: localised description for shortcuts

Post by protocol_1903 »

+1
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903

Buy me a coffee
User avatar
Shemp
Inserter
Inserter
Posts: 32
Joined: Mon Jan 19, 2026 6:51 pm
Contact:

Re: localised description for shortcuts

Post by Shemp »

+1

Just to clarify, if you define a "spawn-item" shortcut, and both that item and the shortcut have a localised_description, what should happen?
Rseding91
Factorio Staff
Factorio Staff
Posts: 16761
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: localised description for shortcuts

Post by Rseding91 »

Shortcuts already support localised_description. The only issue I found is the spawn-item type would always force-take the description from the spawned item if it existed and was valid. I've fixed that for 2.1 so it will take the description if no other description was set yet (if the shortcut didn't have a valid one).

Code: Select all

  {
    type = "shortcut",
    name = "lua-shortcut",
    order = "b[blueprints]-g[blueprint]",
    action = "lua",
    localised_name = {"shortcut.make-blueprint"},
    localised_description = {"", "This is my custom description on a lua shortcut."};
    style = "blue",
    icon = "__base__/graphics/icons/shortcut-toolbar/mip/new-blueprint-x56.png",
    icon_size = 56,
    small_icon = "__base__/graphics/icons/shortcut-toolbar/mip/new-blueprint-x24.png",
    small_icon_size = 24
  }
04-22-2026, 09-33-53.png
04-22-2026, 09-33-53.png (37.64 KiB) Viewed 302 times
If you want to get ahold of me I'm almost always on Discord.
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: localised description for shortcuts

Post by Quezler »

> Shortcuts already support localised_description.

looks like that is new in 2.1 then, in 2.0 the localised_description on shortcuts is completely ignored.

glad to hear that in addition to that fix the localised_description will override the description of whatever item the shortcut might spawn.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16761
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: localised description for shortcuts

Post by Rseding91 »

Ah, my mistake - I only tested in 2.1 under the assumption nobody was changing this logic (since I didn't remember anything around it). It looks like it was fixed as a side effect of the fix for this report 131555

So, both issues are fixed in 2.1.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”