BrandonWill / GrepolisBot

24 stars 12 forks source link

Future updates (suggestions/discussion only!) #6

Open BrandonWill opened 8 years ago

BrandonWill commented 8 years ago

Hey everyone! As some people may know, I'm not currently playing Grepolis. Therefore, I don't know whether everything is working or not. If something is broken, please create a new issue describing the issue and supply the error if there is one given. That being said, it usually doesn't take more than an hour to fix anything Grepolis will throw at the bot so I have no problem fixing any issues that arises.

This also limits the number of features that I'm willing to implement due to the way Grepolis updates. Automatic researching, no captain farming, etc. are all loaded through the first HTTP Request the game sends with map data, and they change with almost every single update to the game. Because of this, I'm not willing to sit through and read that data to update the bot every time the game updates.

This is mainly a place to address two concerns:

  1. Future Grepolis updates that can affect the bot
  2. Suggestions for future updates

The current concern that some people have told me about was the new battle point farming. I've looked at it on beta (zz.grepolis) and the data is only slightly different than now. The only thing that has to be changed from the bot's perspective is the mood; there's no more double resources. Outside of that, there isn't anything to be concerned about.

beaubeire commented 8 years ago

Maybe add a looting system beside a farming system? Hate when mood of villages drops

BrandonWill commented 8 years ago

What do you mean by a looting system?

If you don't want the mood of the villages to drop, you can set the mood to loot at to 100 in the settings.

Frank18000 commented 8 years ago

a system to have some standard cities will be great

Frank18000 commented 8 years ago

an option to program attacks and os

nj-costa commented 8 years ago

All Uthar's b0t features, like... automatic cultural festivals,only add units to the queue when the spells are active, etc. Thanks for your work!

beaubeire commented 8 years ago

@BrandonWill

setting mood to 100 doesn't work. You need a system that will demand resources from the villages and not steal resources. You get what i'm saying?

if you don't know what i mean: look here https://wiki.en.grepolis.com/wiki/Farming#Demanding_Resources

BrandonWill commented 8 years ago

@Frank18000

What do you mean by standard cities? I'll look into automatic attacking next week. It seems pretty straight forward. However, I can't think of a nice way to implement it into the bot. What I mean by that is, how would you like it to be shown in the bot? Where should I put something like that and how should the layout look like (a basic paint picture would suffice if anyone has ideas!)

@nj-costa

The bot has automatic city festivals right now. I believe both the gold festival and theater can both be automated, but the ones that require battle points are impossible to do without administrator; this has been impossible since they updated the agora awhile back. The majority of Uthar's features can't be implemented due to the reasons stated in the main post. I'd love to add a lot of features, but they'd break a lot. Given those circumstances and my amount of free time, I'd like to implement other features people would like that don't break almost every update.

@beaubeire

This was a program bug from the looks of it. It checked to see whether the mood was below the mood to loot at, which worked for every case unless it was 100. The newest version should have this fixed.

Frank18000 commented 8 years ago

What I mean is that there is an option to create several templates to their city in terms of troops and buildings. And this template can then load in construction rows

Attack Maybe an extra button where you get an pop up where you can set te attack time and the cities whom attack and with wat (flyers kolo vs etc). Then select the cities which send os and what. Give a time when the kolo should land. Then a button attack and the bot times the attack en the OS

beaubeire commented 8 years ago

@BrandonWill

Good work, keep it up! :+1:

BrandonWill commented 8 years ago

@Frank18000

Hmm, alright. I'll look into templates.

I'm actually moving away from most of the buttons soon, which is why it isn't really an option. It still has some ways to go (no login button and it has a theme that messes up the alignment), but it'll start looking a lot closer to what Uthar had.

preview screenshot

Frank18000 commented 8 years ago

a tab is also great for atacking. What would be even better is selecting the city ingame that you want to attack and then select the attack modus

Frank18000 commented 8 years ago

the new bot works great good job thx

Frank18000 commented 8 years ago

to split the farm clock and the construction clock is also a useful addition I think. It makes detection for grepo more diffecult

BrandonWill commented 8 years ago

They're separated, kind of. Farming time is set in the farming tab (if the farming time is less than time set, it won't even open the tab to farm), and everything updates with the time to update thing.

I guess it wouldn't hurt to actually separate them, add a place where you can change their time, and a spot to actually view the timers.

Frank18000 commented 8 years ago

great the advantage of splitting is that the build rows are not filled with singel units

beaubeire commented 8 years ago

bot doesn't find farmtowns knipsel

BrandonWill commented 8 years ago

Do you have captain enabled?

image

beaubeire commented 8 years ago

Lol, I forgot captain was necessary, never mind!

BrandonWill commented 8 years ago

No problem! I have about a month left of classes and then I'll have some time to work on the bot more ^.^.

I'm still not sure how I feel about rewriting the bot just so it can handle militia and sending attacks in a safe manner. I've always kinda wanted the bot to auto research stuff so that might the first addition, but we'll see

beaubeire commented 8 years ago

Suggestion: Choose which towns to farm.

BrandonWill commented 8 years ago

Took a bit longer than I thought it would, but it's in the latest version.

Note: You can only use the "All Towns" section or the "Current Town" section. I should probably disable the "Current Town" section if the "All Towns" section is enabled.The All Towns part has a higher priority than the current town section. However, if you accidentally click save on the All Towns section, it doesn't overwrite the data, it's just prioritized (meaning no data is actually lost and all you have to do is uncheck the box to have all your original enable/mood/intervals in the original list) I also added buttons to the right so you can safely update all your towns with ease

image

BrandonWill commented 8 years ago

Next on the list will definitely be a town template saver/loader that was suggested earlier

beaubeire commented 8 years ago

great work!!

Frank18000 commented 8 years ago

good work

beaubeire commented 8 years ago

Quick question though: In the building queu, do i need to add the amount of levels I want a building to go up or do I need to set the level I want a building to be?

thanks

beaubeire commented 8 years ago

Also the bot says a city has a conquer, but it actually hasn't

BrandonWill commented 8 years ago

You put it the level you want the building to be.

Conquering still needs to be fixed. It'll say that it has a conquerer if it's sending one out as well. I don't have the time to play a world right now, and then I'd have to wait for one of my cities to start being conquered to write code for it.

I'll probably remove the current code soon

Frank18000 commented 8 years ago

the bot is working again thx

only have 200+ city to setup lol

BrandonWill commented 8 years ago

If you have a suggestion to make it easier to setup multiple cities, I'll implement it :).

I couldn't imagine going through so many cities to set them all up. Even if I were to add templates, it would take awhile.

Frank18000 commented 8 years ago

great i can't wait one account is 200 + cities

icesand commented 8 years ago

Hi the bot works great, Nice job, My suggestion is that the bot could store silver to the cave,

MrDafisque commented 8 years ago

Hola,

it would be great if you could rearrange the Building-Queue Window - I using the bot on a netbook with a very low resolution and i can hardly see the dropdown menu to pick the cities, because it's almost off screen. Same goes with the ships (last thing i can see is the Trireme)

whyalwaysme11 commented 8 years ago

@BrandonWill How does the Bot start? If i open the Bat file doesn't open anything.

However you could add a system that modify the IP which makes the access to the game such as AnonymoX extension on Firefox.

BrandonWill commented 8 years ago

@MrDafisque

I'll look into adding a scrollbar for the windows.

@whyalwaysme11

You can just double click the .jar file now. The .bat file was for previous versions and still allows for more debugging.

As far as extensions go, they have to be purely written in Javascript for me to import them. I can add features to change to a personal proxy server, but I don't really see anyone using this. Why is a proxy needed to play grepolis?

The bot uses WebView which grabs the same proxy settings from Chrome/IE/Firefox already, so it doesn't seem like something I would implement in the bot.

BrandonWill commented 8 years ago

@MrDafisque

I pushed out 0.19. There should now be a scroll bar for the queue panel. Does it appear/does it help?

tepacz commented 8 years ago

Hi! I started using in on Mac, however i cannot see the icons of the the buildings as well as the units, any idea how to fix it?

MrDafisque commented 8 years ago

@BrandonWill Yes, perfect :-) it would also be great if you could add (or unlock) the chrome-feature to zoom out with [Control] + [-] and in with [Control] + [+]. But only if it's not much work, because it's very likly that i am the only one playing on such a low resolution.

Way more interesting would be template for building-queues - i am currently templating by manipulating the buildingsave.txt file :-)

Oh, and for some reason I got to reenter the update time every time i start the bot

whyalwaysme11 commented 8 years ago

@BrandonWill Okay now it works, but my problem now is that i don't see the images in the queue so i can't set buildings and the training units. I've updated Java but it doesn't fix it.

The proxy is useful to connect to the same server with different user accounts without using the same IP.

BrandonWill commented 8 years ago

@tepacz This issue should now be fixed! Please let me know if this isn't the case. This program was mostly written for Windows and I don't have any way to currently test other OSs. @whyalwaysme11 This issue should now be fixed! Please let me know if this isn't the case. This program was mostly written for Windows and I don't have any way to currently test other OSs.

@MrDafisque Looking into what I can do about zooming in/out. There isn't an enable option. The browser is rather undeveloped, so I'll have to create my own method to do this.

Templates are still in development. I probably won't finish these until my summer classes are done in 2 weeks though (they meet everyday so it kills my free time). I prefer to do a lot of testing and implement it correctly rather than doing a rush job that I'll have to rewrite later.

This may have also been fixed in the latest version. Make sure you're keeping it in the format with the colons like... 00:00:00 because they do matter when saving/loading. However it doesn't matter if it's like 0003:4015:285 as long as the colons are in place

BrandonWill commented 8 years ago

Some basic zooming in and out along with the ability to reset the zoom is now in the bot.

*Zoom in with control and +
*Zoom out with control and -
*Reset zoom with control and 0
BrandonWill commented 8 years ago

Long overdue for an update! Town templates have been added.

Simply go to the town you wish to save and click save! As always, the tab is always refreshed when you switch back to it. I've only done a little bit of testing, but it seems to work great. When you click load, it should load all the troops, farming, and buildings from the template you selected. I've also fixed some tiny loading bugs that you probably wouldn't have noticed.

Sorry it took so long. Let me know what you want the next feature to be!

Frank18000 commented 8 years ago

it works great the next thing i would like is the atack en def sending option

BrandonWill commented 8 years ago

The biggest problem for that will be that I don't play often. Right now to test things, I just start on a new world and I can fix everything. I'll buy captain if farming needs to be fixed.

In order to get the data to even begin, I'd have to get 2 towns which requires active gameplay or protection from someone on an already established server. I do have google hangouts for the bot; it's githubgrepolisbot@gmail.com if anyone wants to add it to help get attack/defense added. I would prefer a 3 or 4 speed world so I don't have to spend too much time waiting

Frank18000 commented 8 years ago

i don't understand you completely. Do you need an account to log on and test with mutiple cities. Or just information?

BrandonWill commented 8 years ago

I was planning on doing it on my own account so that you wouldn't be at risk of being banned. It's going to require a lot of testing and work to get it done correctly. I'd like to make it be as human-like as possible to reduce the chance of ban. When I played, alliances had certain times they'd coordinate attacks on other alliances. My idea would be so that you can set up the bot to participate in these without you being there.

I'd also like to have a toggle to make it not human-like. Maybe you really want to snipe an incoming CS because the city is just that valuable. Outside of creating the GUI, this will be the hardest thing to code because you still don't want the bot to send a bunch of requests to the server. It'll also be the hardest to test because colony ships are so slow

Frank18000 commented 8 years ago

that sounds great i hope you get it solved

BrandonWill commented 8 years ago

Alright, moving forward guys, I plan on only adding new content. By that, I mean if I were to add research, it'd be the new research window below rather than the old one. It'll probably still work when you're like trying to research colony ships, but it might get you banned if you try stuff that isn't in your version of the game.

image

beaubeire commented 8 years ago

is the bot working proper again? with battle point villages and stuff.

There is a new world tomorrow on the dutch server and i want a headstart

BrandonWill commented 8 years ago

It should be. Keep in mind that if you don't use captain, the risk to be banned is a lot higher (the more cities you get the more confused the bot gets). The bot adjusts itself correctly over time, but it isn't perfect and I'm not sure when I'll have the time to do so.

I've been botting nl46 for almost 2 weeks and it's been running almost all day. Feel free to create a new account and try it out on an older server that does have battlepoint villages though.

Daigz commented 8 years ago

Hi BW,

I would like to assist you with the project, but it will take a while until I've gone through the code. If there is any gruntwork you want done in the meantime please just tell me.