Alternating Quickbar deprecated


Changes the behavior of quickbar swapping so that instead of rotating, it swaps in pairs, and then rotates the pairs.

Tweaks
6 years ago
0.15 - 0.16
5

g 5th Toolbelt

7 years ago

Can you please tell me how you have 5 toolbelts. 4 is the best that I've been able to obtain.
Regards,
~B

7 years ago
(updated 7 years ago)

There's several mods that add toolbelts. In the particular save that this screenshot came from, it used:

I chose this 5 toolbars, to show that it works with odd numbers of toolbars too, cheers!

7 years ago

Through LUA, I found that a total of 8 can be added:

/c game.player.quickbar_count_bonus=3
/c game.player.force.quickbar_count=5

Both gives 8 toolbelts

7 years ago

That's not entirely correct. To clarify:

/c game.player.force.quickbar_count = X
Would give each player on your force, X quickbars. So if you just wanted all players in your game to have 8 quickbars, you could just do:
/c game.player.force.quickbar_count = 8

/c game.player.quickbar_count_bonus = X
Will give an individual player, X bonus quickbars.

So the total number of quickbars for any player will be:
player.force.quickbar_count + player.quickbar_count_bonus

Note that setting either of these may conflict with a mod's behavior. This mod only uses the quickbar_count on force. You could create a crash using this method:

  1. Research both toolbelt upgrades from this mod.
  2. Run /c game.player.force.quickbar_count = 1
  3. Set the modifier setting for quickbars to 0.5.

The mod then figures out that it has to go from 2 quickbars to 1 (0.5 multiplier), it will then run force.quickbar_count = force.quickbar_count - 1, setting it from 1 to 0, which crashes the game. I could prevent it from crashing, but realistically seen, nobody will run into this scenario, and if you do, it's kind of your own fault.

My point is, be a bit careful when messing with these properties in conjunction with mods that modify these values.

New response