We have seen all those rants by people wanting bigger barracks increments, a button to unload generals or a box to type troop number in along with the slider.
Well I have come up with an idea that may be the solution to all these fun breaking issues. Simply a query box!
We all know that shortcut letters are used for units, among players in chat or in adventure guides [,m,s,c,b,l/lb,a/xb,k]
So how about having a query box in the barracks and general interface?
The player simply types the query for the army they want created/loaded e.g 50r 20m 30c 150e and the game reads this query and translates it.
Up to this point my suggestion is well illustrated.
------------------------------------------------------------------------------------------------
This is a pseudo code for the process, It's nothing but I know the developers are busy with the event and hope they accept it as a modest gift
Code:
string[] shortcuts //Contains shortcut letters
UnitType[] types //Unit types in same order as shortcuts
// Shortcuts and types can be added to a dictionary.
OnOkPress()
{
string input //To be read from query
string[] inputBits = Regex.Match(input, "[0-9]{1,4}[a-zA-Z]+")
if(inputBits.count == 0)
ShowMessage("Invalid input: " + input) and break
DataClass[] data
foreach string s in inputBits
{
data.add(new DataClass(s))
}
QueryToServer(data) // For barracks
LoadToGUI(data) // General loading
}
DataClass
{
UnitType uType
int uCount
DataClass(string id)
{
Try{
string t = Regex.Match(id, "[a-zA-Z]+").ToLower()
uType = types[shortcuts.IndexOf(t)] //Will cause error when t is not in types
uCount = ParseToInt(Regex.Match(id, "[0-9]{1,4}"))
}
Catch{ShowMessage("Invalid input segment: " + id) and break}
// Checking against resources/general limits can be done here based on other data as well
}
}
Have a nice day everyone