stefan2200 / TWB

Python based bot for Tribal Wars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

insufficient resources

jedmangubat opened this issue · comments

my bot does not build anything. it says not building anything because insufficient resources even though I have enough resources.

After my quick inspection it seems to me that this could be the cause of the problem

https://github.com/stefan2200/TWB/blob/046aa22cb2d862f6e921b950263bd1d9c56f6eb9/core/extractors.py#L25C18-L31

is not returning build links anymore, aren't even in the part where extractor try to finds them
I'm not sure if the bot works the way I think it does

so are there any fix?

I fixed it here #50 (comment)

there is another issue. it only builds 1 but for the 2nd queue, it also says not building anything because insufficient resources even though I have enough resources.

edit: but it works now thanks to your modifications.

Hey @suchencjusz ,

Thanks for looking into this!
I think this is caused by a UI change that blocks the building data from being loaded correctly.

I'll approve your merge request since it appears to work on all international versions!

Thanks again and kind regards,
Stefan

Hi
Thanks for merging,

I discovered that a similar problem occurs with premuim marketplace.
I'll look into it at my leisure

it's back to not building anything. fyi. thank you for dealing with this.

it's back to not building anything. fyi. thank you for dealing with this.

In my case, it works well.
image

@jedmangubat What world do you play on? Send me any diagnostic data

it only builds 1 then says insufficient on 2nd building.

image

i edited buildingmanager.py as per the edited file in here.

image

i don't know how to do this one.

image

please instruct me if i'm doing something wrong.

Ok I already know what the issue is, for some reason, the building upgrade is added to the list only once, I honestly have no idea what the reason is but anyway, the next time it cycles the building will add to the queue.

yes it does. but that's just because i haven't activated premium account yet. it will wait for cycles to add 5 building queues. well, i know i'll just wait for you to fix this as i know very little to none about coding especially python. thanks.

Fixed in latest version. The issue was that the game state changed and the link update function was not executed again after the first building action was completed. Re-running the function fixed adding more items to the queue.