While this mod in itself is rather simple, so are making custom hotkeys and macros, if you know the commands for in-game. Many of the custom hotkeys in this mod run simple commands that can be manually typed in-game, just via a button press instead. This helps with certain things that may otherwise be a tedious process to do, I.E. clicking three different buttons to get into workshop mode, or toggling your spacesuit in settlements. There's also the macro functionality, which provides a way to write commands OR code like if elseif scripts into a macro that can be ran by calling that macros name. This means that many macros can be made to run an entire script in one single button press.

Basically, to start, let's take a look at a function that's already included in this mod:
[Macros]
addSpeed=if player.getav speedmult < 110; player.modav speedmult 5; elseif player.getav speedmult >= 110; player.forcev speedmult 110; endif
remSpeed=if player.getav speedmult > 20; player.modav speedmult -5; elseif player.getav speedmult <= 20; playerforceav speedmult 20; endif
Taking a look at this, we're understanding that this is a speed controller off the bat by the greater than and less than signs with the number ranges. In the first part, we're grabbing the current speed multiplier of the player, checking to see if it's less or greater than the specified value, and then if so, continuing onto the second part of the script which would be after the ; semicolon. Since we passed that check, now we're adjusting the speed multiplier by either 5 or -5 to increase or decrease our speed. In the third part, if the first part of the macro didn't pass, we check if the speed multiplier defined is greater than or less than our range, to limit on how fast or slow we can make our character go to avoid cheating behavior. If it is true, then we adjust the value of the speed multiplier and force it to either the highest value or lowest.

To make this into a usable hotkey, we need to specify it under a new section, as such:
[Hotkeys]
; Control speed based on macro limiters above
CTRL-MouseWheelDown=remSpeed
CTRL-MouseWheelUp=addSpeed
The way we call this is by the defined name in the macro section, addSpeed or remSpeed. These can be whatever you want them to be, but they're essentially named buckets that hold your macro contents for easier calling. Wihle a macro isn't required for a hotkey, you could simply throw the macro function into a hotkey, but this way helps clean up any unnecessary clutter.

Additionally, you can easily specify specific commands in just hotkeys for a simple function to run, such as:
; Toggle the wait menu without having to sit/sleep
t=showmenu sleepwaitmenu
This hotkey simply runs this exact command in the console, executing whatever function there is behind that command. For a list of basic commands, I recommend checking out Console Commands Master Cheat List.

Create Your Own Function
Let's try and create our own new function, something that uses a simple if statement. This is relatively straight forward and goes off of conditions based on the values of variables specified.

To start, we'll need a hotkey, which we can make like so:
[Hotkeys]
F6=
After you've entered your key bind, let's start by creating an if else statement that will check for the current actor value of ourselves, to see whether our health is below a certain value or not. This can be done as follows:
F6=if player.getav health < 1000; player.modav health 1000; endif
To elaborate, the player.getav is a console command which can be typed in-game manually, and after that we would enter the FormID of the actor value, providing a way to detect it. Within the first part of this function, we are checking if our health is less than 1000, which if this is true, then we modify the actor value to add 1000 health via running player.modav health 1000. Each action in a function is separated by a semi-colon, basically think of it as a new line. Keep in mind, there's no way of checking the actors max health via actor values unfortunately, so there is essentially no way to limit how much health you get. This command can stack your health by magnitudes.

Article information

Added on

Edited on

Written by

Rage4556

3 comments

  1. Grifflester
    Grifflester
    • member
    • 4 kudos
    Leaving this here for the List of Possible Keys.
  2. Ryderflo
    Ryderflo
    • supporter
    • 27 kudos
    Thanks for the tips, do you know if XBOX controller is supported in macros/hotkeys ? like "LB+RB+A" would work ? 
    1. Rage4556
      Rage4556
      • premium
      • 83 kudos
      No, I do not think so unfortunately. I have tried to add hotkeys for controller keybinds myself and it does not seem to work.