Opened 8 years ago

Closed 8 years ago

Last modified 4 years 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 8 years ago.
GUI option can just be removed.

Download all attachments as: .zip

Change History (6)

comment:1 by Imarok, 8 years ago

Keywords: simple added
Milestone: Alpha 22Backlog

comment:2 by Sandarac, 8 years ago

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

by Sandarac, 8 years ago

Attachment: batchtrainingoption.patch added

GUI option can just be removed.

comment:3 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18421:

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

comment:4 by elexis, 8 years ago

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.

comment:5 by elexis, 4 years ago

In 23192:

Fix warning about attempted empty batch train occurring if g_BatchTrainingEntityAllowedCount % batchedSize == 0, refs #1432, #4059, rP12832, rP18421, rP19826, fixes #5602, reported by nani, reproduced by faction02.

Note: See TracTickets for help on using tickets.