Sau1707 / ModernBot

A Bot for Grepolis
MIT License
24 stars 21 forks source link

Limit Auto Train #36

Closed pnm1977 closed 10 months ago

pnm1977 commented 11 months ago

Suggestion Can Auto Train be limited to only train/purchase units in smaller numbers each time? Example - Only start training 5 Birs on each purchase. Therefore, if you have Administrator you can start training 7 x 5 Birs at any one time. Reason - Auto Train can use up all resources in one go. To maximise City Festivals it might be better to slow down spend in training and use some resouces to increase Cultural level as early as possible.

pnm1977 commented 11 months ago

Managed to find a temperary fix. No very eligant put serves the purpose of minimising spend on troops.

In the section of code below I changed amount: count, to amount: 1, This limited purchases to 1 unit at a time. / Make build request to the server / buildPost = (town_id, unit, count) => { let data = { unit_id: unit, amount: count, town_id: town_id, }; uw.gpAjax.ajaxPost('building_barracks', 'build', data); };

Sau1707 commented 11 months ago

Hello,

I'm a bit against this, since the goal of the game is to attack not doing parties ;)

So I haven't really coded with this idea in mind, however you could try to change the function that calculate how many troops need to be trained. I'll point to the code this evening.

Cheers!