User-Macros and -Shortcut to save and trigger any Command

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

User-Macros and -Shortcut to save and trigger any Command

Post by ssilk »

TL;DR
The user can save, edit, records and trigger any command (from sets of commands) by either accessing a macro-menu or a key-combination or hotbar.
What ?
This is a combination of some ideas and I wonder, why there are - as far as I can search - no really matching other suggestions. I remember that there was a way to define macros for the editor, but I search now for half-an-hour and found nothing useful. So links are welcome.

And please - before you criticize - the idea was to make macros kind of “really almighty” in the first iteration of development. Which means, you can trigger whole lua-scripts in your macro. That is, because it should work simply, like if you typed the command yourself on the command line. And so it will warn of course, if you loose achievements or not allowed to use that command and so on. Of course. But that warnings etc. can/might also be turned of by a macro or as first command of the macro.
For the first implementation this feature should be either on or off.
Time will tell, what else is needed to be implemented.

The macros-editor
A new GUI-element is needed to open the editor. Where? I let that open.

That triggers the editor. The editor is a new window more or less similar to the blueprint book. At the top is a search-field, below are tabs for the macro-sets. Macro-sets can be thought as blueprint-book-pages. The empty macros contain a “default”-tab and a “+”-tab to add a new set). When you open the window it stays in the same set as when you closed.

You can delete sets, the macros in that category fall back to the default category.

Below that is a table with columns:
- macro-name.
- first line of macro or parts of that line or comment (a bit more flesh what this does)
- an optional keyboard shortcut.
- very optional (auto generated) icon.
- a button to trigger the macro.

You can add/delete/edit any of the macros at any time.

You can drag macros into another set, pick macro and drag it onto the other tab.
Optional: macros might/can be in many sets at the same time. That is useful to see where else you have the copy; not sure, if that is really useful.

Edit macro
Add/upate opens another window with these three fields, but the macro itself is a more or less mighty text-editor, that imitates the really command-line as good as possible.

Optional: It has an inbuilt check, if this would be a valid command.

It has a button to test this script. And eventually a simulation mode: slow down execution, or better trigger command on key presses (debug) and after all it can undo all changes. Quite optional.

Load and save
This feature is optional for the first implementation.

As blueprints, hot bar and other things, macros should be able to save&load.

The bottom of the macros-edit-window allows operations:
- load new macro-set(s) (deletes everything after asking user)
- add macro-set(s) (if a set already exists ask user to add to that set or create new tab)
- add macro-set(s) to current selected tab
- save whole sets
- save currently selected set

Save and load anything
We can use some kind of special macros to save/load the hotbar or the personal logistics.
Because a macro can execute a lua-script, we can generate a macro, that puts items into the hotbar/personal roboport/etc. Anything, that should be saved/loaded in the game can use that mechanism.

Link into hot bar
Like blueprints, macros should be linkable to to the hotbar, therefore the above mentioned very optional icon is useful. Should work exactly as with blueprints.

I see no need to have a macro in your inventory... (?)

Trigger macro
- in the macro-editor click on the trigger button
- trigger the associated keyboard shortcut
- Clicking on it in the hotbar or use that shortcut for the slot

Record macro
This is a very optional feature! But it has really much useful possibilities.

This functionality should record, what a player does as some kind of code. Could be an extra macro-language or just translates everything to lua-code.

Can be started in the editor, add new macro and start record with a button. Windows disappear, a small button leaves on screen to stop/pause recording and a frame (green?) is around the screen while record.

I don’t know yet, what should belong to this record: only player-actions that are inside the game, or also actions like changing preferences (loudness for example, which was the base for this idea). What do you think?

Optional you can see somewhere the recorded macro while record (log?). You can change that whole macro after recording in the editor, of course.
Why ?
This idea came me, when I tried to search for “mute” to add more flesh to this thread
viewtopic.php?f=6&t=938 mute the game while alt-tabbed
I got several threads about muting the game for different purposes. Most of them make very much sense, many of them can just be solved by triggering a command, for example turning the alarms off
https://wiki.factorio.com/Alerts
And all are very special. Especially there are suggestions, which exclude others and vice versa.

What we can say is this: not every player needs or wants the sound to be turned off when the game is alt-tabbed. Some would like to turn the noise and Musik off, to hear only alarms, some the other way around. Some might want to make the music just louder/quieter at any time (and so need access to the current loudness). And so on; thinkable for many other aspects of this game. There are tons of suggestions, for such mini-tasks. And this feature could handle that all, enormous gameplay value!

Seeing from a broader perspective this has many, many use cases. And I’m not able yet to see all the possibilities and implications. But there are a lot.

From a simple “I want to place a turret, then grab ammunition and put 15 ammo in.” - could just be recorded by any player to help killing that single biter base that defends my oil.
To extremely mighty and mod-like features. (Hehe, For people who don’t want to use mods. ;) ).

More ideas:
- Testing things out.
- Repeat dull tasks.
- Build base layout in seconds.
- The logical next step to the goal of self-building factories.
- Great help to generate complex maps.
- Reducing the gap between players and modders.
- Record actions for a mod.
... nearly endless ...

As said above, because that all can be used like cheating, the functionality can shrink, when needed.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Post Reply

Return to “Ideas and Suggestions”