Opened 18 months ago

Closed 17 months ago

Last modified 17 months ago

#4059 closed enhancement (fixed)

[PATCH] Batch size should be a user-configurable option

Reported by: user1 Owned by: elexis
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

I think it makes the most sense to expose this simply as a .cfg variable. That way we won't need to change anything in the gui.

Currently batchIncrementSize is a const in gui/session/input.js

Attachments (1)

batchtrainingoption.patch (2.2 KB) - added by Sandarac 17 months ago.
GUI option can just be removed.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 17 months ago by Imarok

Keywords: simple added
Milestone: Alpha 22Backlog

comment:2 Changed 17 months ago by Sandarac

Keywords: review patch added
Milestone: BacklogAlpha 21
Summary: Batch size should be a user-configurable option[PATCH] Batch size should be a user-configurable option

Changed 17 months ago by Sandarac

Attachment: batchtrainingoption.patch added

GUI option can just be removed.

comment:3 Changed 17 months ago by elexis

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18421:

Configurable batch size when training units. Patch by Sandarac, fixes #4059.

comment:4 Changed 17 months ago by elexis

Keywords: simple review removed
Priority: Should HaveNice to Have
  • Added the session prefix to the config entry since the value only applies to the session.
  • Set the minimum to 1, so one can train any natural number of units.
  • Set the maximum to 20. Maybe someone will use it in some cheat or deathmatch resources game.
  • Added a comment to default.cfg and changed the tooltip a bit

Potential improvements if people like this:

  • Setting it to 1 means that one unit will be trained both when not having the hotkey pressed and when having it pressed (while not having pressed the button before). Thought about changing the code so it would immediately start with 2 then, but it actually seems fine.
  • Mabye we could also introduce a new hotkey, so that pressing it will add a batch of 1 while pressing shift will add a batch of 5. However going down that road will lead conflicts as nearly every key is already used for something. It could become optional.
Note: See TracTickets for help on using tickets.