Archive for the ‘ three kingdom online ’ Category

RIP Three Kingdoms Online

Today is the day that Three kingdoms online is no more.

Three kingdom online was a little brother to me.I loved to play with you until he grows up a become a teen and started to get greedy.

corruption

Most people run away from him when this happen but I didn’t, I’ve just told him it’s not going to happen but we can still play together.

There a lot of good games that came after TKO, some even came after and closed before TKO (I’m looking at you Lord of Ultima)

If you have any games in the MMORTS genre that you want to suggest or anything related Romance of the Three kingdoms feel free to do so. I read every mail (jack at onlinesgamestips.com) and I might decide to write a piece on your game.

Check my initial reaction post to TKO closure or my 4 parts series on how I’ve build a bot to reduce my play time.

end

throne

We’ve talked about how to automate your game in part 1, how to build a bot with python with the sushi go tutorial in part 2 and the problem I’ve encountered in part 1 and 2 that I’ve fixed. Today, It’s a summary of what I’ve done (task and feature) to automate the game and make it more fun.

Side note, doing all this made the game much more fun to play since most of the boring stuff was automated or semi-automated.

The 12 automated tasks that made the game fun again… almost.

1-Upgrade all the tech (weapon, armor & valor)

I’ve already explained it in part 2. The reason I did this is because it was a pain to go in each city each 3 building and upgrading this should be automatic.

2- Upgrade resources fields

This is the main reason I’ve wanted to make a bot is to automate building new cities. I made a dumb cycle that check each resource field starting by the food field and going through all the resources.

This give funny situation where wood and iron are barely developed and farm and stone already have a lv 10. But the basic were enough to be useful.

3-Upgrade building

This one cover every building except warehouse and granary because these 2 are not accessible via the menu next to your ruler face.

4-Market place

I’ve already talked about this one in part 3. Go check my second problem.

5-Check if your in game

I’ve already talked about this one in part 3. Go check my first problem.

6- create a build list and use it to upgrade and send resources (Do point 1 to 4 all at once)

I’ve already talked about this one in part 3. Go check my third problem. Basically I’ve save the build in a file and when the bot is looking to upgrade building or resource, the build file tell him where to start. What is missing is a way to remember where he was the last time so he doesn’t always start at the same place, next game I guess.

7- City loop: loop all your cities with the point 6

Once you got a way to upgrade building, resources and tech for each city I’ve implemented a loop that do those 3 task for all your account city. Saving you precious time.

8-Attacking Captain with heroes

This is a great way to get experience so I made a loop that click on the captain until the captcha show up. When the captcha show up I usually enter it and the bot start again for the next ten heroes.

9-Amassing training point

Like previous point but with troop to get training point

10-Attacking a elite guard

This one is a bit harder, since it need to loop the map, everything else after is just checking if there an elite guard and attacking him like we do for the training point. The risk here is that we lose real troops when we do that, So its more semi-automated.

11-finding 15f

this one was on of the last I’ve done. I was tired of clicking on the map to find the 15f, so I made a task to click on the map and check the the type or terrain. It’s save the value in a shelve and add it to the map bookmark.

12-level up heroes

TKO is so  well design game UI wise (puke), it takes so many clicks to level up a hero that if you have many heroes it can take awhile. So the goal was to automate leveling the heroes on the heroes screen.

What I wanted to do next

I wanted to manage plundering, take care of the special event. From there I could probably run by it self. My ultimate goal would have been to manage war with it, that would require a way to read actual value on the screen. I could be done but by reading pixel by pixel or by having a proxy that gets the date from TKO when it send to it server and process information from it.

I hope you liked that series of post on how I’ve automated my playing experience. If you like it, drop me a email and I might do a bot for other games too.

We’ve talked about how to automate your game in part 1 and how to build a bot with python in part 2. Now we are going to implement specific task I’ve wanted the bot to do and the difficulty I’ve encountered implementing them.

The principle and idea we talk about here can be apply to other games or even website or apps but the code itself is specific to Three kingdom online (RIP).

Problem #1: the bot don’t know if the game have focus or not.

 

Lost

Solution #1: take a specific section of the game that never change and validate that it’s always present.

Other possible solution: check the window in focus, check if there an external input.

My problem was that sometime I left the bot running and another site would popup or I wanted to close it but it’s keep clicking everywhere even if the game is not there. My solution was to check the logo in the top left corner and validate if it’s there each time we make a big step.

TKO-main

Problem #2: We need to input value from the keyboard

Example: Sending resources from your city to another city, plundering or sending troop to a location.

Solution: Use the pyWin and make keyboard input.

One of the first problem I had is that I wanted all my sub to send resources to my main or a city in development. But to do that you need to type the amount of resources to send (note that, there a way to add them via click) and enter the destination (must have an input if it’s not one of your city)

Problem #3: need different configuration between account

617-Benders

Example: build order, market destination, city found

Solution: load the configuration from a file.

Alternative: save and load value in a db (mysql, sqllite)

There are other issues I’ve encountered, a ui change, popup that not where it should be and other stuffs like that. But these were the mains that were really painful. Hopefully it will give you some ideas if you get the same problem.

This problem is quite recurrent and was going to be an issue if I had the time to build a bot that manage multiple account. Having a different build between account, city or having different destination depending on the city is great example. How I solve it it’s by creating a class that have the initial value and save in a file. When the bot run, it will loads that file and can modify it if needed,  this allow to remember where it was, when the last time he did a certain task. I’ve didn’t go that far but that the principle. Next video show how it use different setting.

You can’t really see it but in the previous video I’ve use the shelve, the 3 10000 for each resources come from the shelve. I’ve haven’t used them to their full potential, they could be use it to save what we send and what to send next time.

There are other issues I’ve encountered but these were the mains that were really painful. Hopefully it will give you some ideas if you get the same problem. Next article will be about all I’ve managed to do with the bot and what was missing.

Yesterday, I’ve wrote a piece on how I’ve tried to automate my TKO account with various extension, tools and even code. Today, I’ll explain how I went from the basic foundation laid out by the sushi go round bot tutorial to build my TKO bot. Everything here can be use to build your own bot for your game.

Reasons I love futurama - Ascent of bot (with the spring being Bender's invention)

“Sushi go round” bot basic

From the tutorial I’ve referenced in my last post, I explained how the author used python to make is bot and what inspired me from his post to make mine.

Note what will follow requires a basic understanding of programming. If you want more info on that let me know or check out the free python beginner book: Dive Into Python

[Dive Into Python]

The basic principle of the bot in the tutorial is to get the image on the screen and analyze them, from there the bot react from what he analyzed.

This is the most important thing I’ve got from that tutorial. Using the python imaging library & numpy to get the image and use what he (the bot) captured on the screen to make a decisions.

Other point to get started is to use paint.net (or another image program with ruler) to get positioning in the image of the item that needed to be analysed. PyWin is another important librairy to take care of the reaction of the bot by providing him some way to interact with the screen with the mouse pointer and some keyboard input.

The first step to create your bot

Your first step to create your bot is getting a screen grab of the game to know what is the boundary of your game are. Once you got the screen grab with the game on it, you open the image in an editor like Paint.net and check the position of where the game start on the screen (in pixel from the upper left corner of the screen ) to where the section of the screen you game end (the lower right corner). With these coordinate, you will be able to concentrate only on the section of your game and if it move you just have to get them again it’s shouldn’t impact your coordinate in game since they will be relative.

Second step: entering the game and/or decide your starting state.

Once you got where your game is in the screen, you need to have a starting state for your bot. It can be the start screen of the game and have a little routine to get in it like sushi go round or start from a state you are often in like in the resource screen of your main city. You’ll probably need to have a routine to go back there so you can easily make your bot shift between task. That kind of backtracking is useful in complex game like Tko but unnecessary for game simple has sushi go round.

Third step: Creating the first task for your bot.

In sushi go round the tutorial show how to find what sushi are being ordered by the customer and prepare them from the ingredient. For Tko there is more option, there so much that can be done, you can make your bot build your city, maybe just collect your daily reward, perhaps upgrade armor or just find those damn 15 farm field on the map. I’ve started by making a task to upgrade weapon, armor and speed (valor camp). These three task have a similar layout and since the same image is used for each upgrade everything needed to be coded only once. The three building can be found at the same place too,  through the menu next to your ruler portraits even if you don’t put them in the same place in every city.

From here you should be able to do almost anything you want. If you’re having a hard time, go revisit the basic that can be found in the sushi go round example and check out some good python free course or book. The next part will be more in deep of the problem I’ve encountered. I’ll show you I went a little further in the bot, by including keyboard input, by using a configuration in a file depending on the user I’m running the bot with or how to save the value you found like where are the 15f.

If you want to files let me know in the comment, l’ll send them to you.

After the merge of 2014, my server has lost and my main was brutally destroyed, I basically dropped from the game with a RIP message 2009-2014.

dong zhuo city

When I saw the sea of attacking coming at my other cities I decided, ‘No’ I can’t give up without a fight. I save most of my cities and kill around 30 lobbyist, thousand of demo. I was offered to join a sub league or be annihilated. I thought about it and chose the league.

Evil Laugh

After a few months in, I’ve decided to put my account to good use and learn a bit. I’ve decided to see how I could make my account automated at least reduce the amount of work to do. I’ve thought about doing it for other game too, but I usually get bored before doing it.

Finding the tech

1-Grease monkey

I’ve talked about the three kingdom online grease monkey script in the past  but the script wasn’t working anymore and was not maintain. I’ve try to understand what going on and modify it but it’s end up not doing what I wanted.

2-Autofill extension for firefox

I’ve found that great extension in firefox called autofill where you can save a form and it’s value. You can recall the value when you want. I used it for the market place but could have been used for the deployment screen too.

Here a quick video how I’ve used it:

3-Selenium IDE Extension

Selenium record what you’re doing and then try to reproduce it exactly. I’ve played a bit with that one but the way TKO was set up sometime event or call where missing or not needed, making selenium not going to the next screen and then it’s tried to do what it was supposed to do in the next screen but in the current screen. What the mess, I’ve drop it after a few try, but could probably work with some tweaking.

4-Autohokey

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks.

This one seem to be use a lot for bot, basically you write a simple script and inside tell it where to click. It has some power, I’ve used it to do the governor work. See it in action for one loop, but the real script was running it 10 time in a loop to max the potential popularity each day.

You can download it here and if you want my autohotkey file let me know.

5-Python

After a bit of research I’ve found a tutorial of a guy using a python script to play sushi go round. Click on sushi to get the article.

This is when my bot was born, I’ve used the principles in the tutorial and applied it to TKO instead.

 

Disclaimer: there are other thing I could check, like using fiddler to get the request and try to spoof them, use a mix of a python proxy to do that with a combination of the bot I ended doing. It’s not the most efficient way but looking at what happening on the screen and reacting to it is the best way to avoid being flag has a bot, because in the end the bot is doing the same thing you’ll be doing.

I’ve you used a bot or some tool to help you play let me know I’ll love to hear what you’ve done.

end

The great journey come to an end guy, since 2009 armies swept the land, millions of soldier died, thousand of cities razed from the face of the earth. Now it will finish as a whimper instead of a bang.

empty city

It was to be expected, a year passed by since the last merge and nothing has happen. I think they were even no new server since 2014.

I was slowly drifting away from the game, I even heard the news when I’ve logged on the 28, 12 days after the announcement.

You can check the announcement in the forum here : http://forum.koramgame.com/thread-104558-2-1.html

Cao Cao - prime minister

Why it’s surprise me, is that this game seem to be to most popular in the forum, thousand of thread and message compare to the few hundred of the other game.

I’ve heard story of people spending thousand on the game to be an emperor or to have a high rank. But they failed to make the game worth it pass the initial stage. The merge were messy, the events were down right abysmal and theft. They added too much useless mini game and other stuff.

corruption

I’m a bit bum by it because I started this site because of Three Kingdom online and now my main game I talk here is gone.

The other thing it’s that I was working on a bot for the next merger, it’s seem it will never see the light of the day.  I could make a quick tutorial on how to build it. If you’re interested drop me a mail at jack at onlinesgamesTips.com or leave a comment.

By the way, there some hope TKO-RELAUNCHED in the forum is trying to bring back the game, maybe you should look at it.

Just drop him a mail so he can add you to the email list.

Here the thread if you want more info.

Why not to lobby your farms ?

under siege city

You shouldn’t lobby your farms. Not that you should lobby somebody elses farm, your league probably have rules against that. What I mean is that if a city produces enough to make it worthwhile for you to plunder (everything fully built with 2 oases), then lobbying it to make it your city will not give you any increase in your resource production. All you will be doing is trading in a farm for another sub-city that you have to manage. A better alternative that will increase your production is to find a city that is too small and undeveloped to farm but is an ideal location – a 9c/15c with 2 50% Grain in the 7×7. This way you get a new city without losing a productive farm.

How to find the growth rate of your farm ?

To find out the hourly resource production of a city, send an attack large enough to plunder all of the resources (battle efficiency 98% or less). After you deploy this attack immediately send out a small one from the same city. Click Scheduled Deployment; add 1 hour to the current time, then select OK. The amount of plundered between attacks will be equal to the hourly production of the city. This can be used to see how much a sub-city produces and if it is worth lobbying (a 15c sub-city making 10k+ food is not going to improve much when lobbied). You can also use this to estimate the resource field levels of a Main city. I have seen too many players take an oasis off of a Main city farm, resulting in lower total food production. A 6c Main only needs level 13 farmlands to produce the same amount of food as a 15c sub-city. Taking a 50% oasis off of a 6c with level 15 farmlands equals -3,600 food/h for that city. Make sure you get a production increase with every action.

New Cities

empty city

 

Each player can only have 26 cities so you need to choose you new cities location carefully. Cities with 6 farmlands might be useful at the beginning but you probably already realized that the quickly become obsolete since a 15c produces 150% more food than a 6c and there are plenty of farms to plunder for resources. 9c (9 farmland) are a good tradeoff between a 6c and 15c, they can hold a a medium sized army and have decent resources output, once they are built the way you want they can be use to feed resources to your 15c. 15 farmland cities (15c) are the best choice for supporting a large army.  Make sure that you pick a spot where you can get 2 oases for it. It may be tempting to build cities close to your existing cities and/or outside the cluster in the middle of the map, but without oases they will not be very productive. When selecting the spot for your new city make sure that both it and the oases you want are not being farmed by other players. Since you most likely will be unable to take 2 oases right after building your city, make sure that you plunder often the cities with the oases to show that they are your farms.

City Tutorial

Lobbyist vs. Pioneers

dong zhuo city

 

To build a new city, there is 2 options. Lobbyists will allow you to get a city with buildings already built but they are expensive and slow to use. Pioneers are cheap and easy to use, but you must build the city from scratch. Both methods require demolishers (unless you go with an unoccupied spot). For the Lobbyist  you need to demolish the annex and be sure you are not trying to lobby the main.

One of the advantage to use pioneers for your new cities, is that since you rebuild the city from scratch your city will have the layout you are use too. If you prefer a certain buildings placement in your cities pioneers might be the way to go. With the lobbyist you will end up with your opponent layout which is probably a layout that you are not used so it might be annoying. Use the View Cities menu to manage your cities and it uses the construction date of the city to determine its place in the list, with the newest being at the bottom. when you lobby it, it might have been built long before your other cities and be placed anywhere in the list. Once the location is picked out, send your demos/rams to take out everything in the sub-city, destroying it and creating an empty space for your pioneers. If you do not have demos, ask your league leader for help.

Check out my previous article about lobbyist and pioneers :

Using Lobbyist for attack

Tip and Tactic when using Lobbyist

Lobbyist Train

If you haven’t read it go check out the last post about Gold.

Sometime some league mate ask me what to do with the extra gold left gold or if they don’t have enough for the metal alchemy scroll there always other option. Here my top 4 and a bonus if you want more food.

1-Garrison

camp-army

This is probably the single most efficient use of gold now. For about $15 (400g), you will get 120k f/h of storage space. Even just 44g will get you 30k f/h of storage space. It is easier and cheaper to increase your food output through the use of Garrison versus the Capital Outpost. If you are ever thinking of using some gold, this is the first place I recommend you spend some of it on.

2-Capital Outpost

coalittion

This is another good way to increase your food output, since it gives you a second city that can have resource fields above level 10. Keep your eye out for events that reward you with Jade Globes for every gold that you spend since these are the best way to get Jade Globes. It doesn’t matter what you spend your gold on, you just need to spend it during the event. Using the gold to increase your Garrison capacity during one of these events is a good way to give you a double boost to your food output.

3-Emperor’s Order

throne

(50g/3 days, 99g/7 days, 399g/30 days) – This is a useful item for several reasons beyond the bonus to resource production. The Auto Transport functions allows you to set repeatable transport orders for your caravans as well as giving them a 100% movement speed increase. This is useful for getting resources to your other cities from those that do the plundering. The Auto Build function is nice if you have a lot of building that you need to get done. You can queue up to 20 buildings and as long as you have the resources, they will be built. All of the other features of an Emperor’s Order are nice, but it is these 2 that I find the most useful now.   

4-Recalling your fled Hero’s Summit epics

run wounded

This is something you shouldn’t use your gold on now since we get so many free Callback orders from the events. The 100g can be put to better use elsewhere. I’ve talk about it in the last post, some heroes you can live without it might be a good idea to recall them but if you are overflowing with food because you lost everything wait until you have no choice.

Other honorable mention for extra food production

Token of Rain (7 days) (26g)

Increase the Food output by 25% for 7 days, not available for State and County Capital.

Probably the cheapest non permanent way to increase your food output. 26 gold for 7 days is probably the best you can get, the Emperor order is 50 for 3 days (double the price for half the time…) and the Treasure Bowl is about the same price (29 gold) but only last 3 days.

Treasure Bowl (3 Days) 29g

increase all output by 25%

Another way to increase your food, it’s increase other resources output has well. Way shorter than the Token of Rain so if you just want the food bonus go with the token of rain.

I don’t think the token of rain and the Treasure Bowl bonus stack, if you know if they do let me know. The same go for the Emperor order with those two.

Rotation Order, Level 1 (3 days) (199g)

Reduce food consumption of your army by 5%, last for 3 days.   

The Rotation Order is way over price but it has a nice thing to it, it stack with other bonus since it’s not a food bonus but a reduction of your food consumption. But keep it mind you are paying 8 times the Token of rain price for 5 times less result.

Gold

This is going to be the least important thing that I will be talking about so might as well get it out of the way since many players think that gold is an important factor. You don’t need gold to be a good player, but there are some small things that gold can do that will make things easier for you. alchemy scroll

Ancient Alchemy Scroll

This is the one thing that I recommend everyone to buy. It gives all your cities a 3% increase in food production and all the gold spent on it will be refunded after 3 months. Plus you will also get 80 gift vouchers.

caocaoliubeisunquan

Recalling your fled Hero’s Summit epics – If your epics have been killed, especially Cao Cao/Liu Bei/Sun Quan, I recommend spending the gold to call them back if you don’t have any callback order. It may seem like a lot but these heroes will help you with their +25% food production. Also the epics will allow you to duel more often in the faction camps so you can get items for Court Quests instead of spending gold to rank up. Double check if you can buy a callback order instead sometime they are cheaper than spending the gold directly.

 

search

Epic searches

This last thing is the most useful if you have never done it before. Getting epics from the career center will help you, but your main goal will be to get normal heroes that already got a “Bolus” to replace your existing heroes. What heroes with a “Bolus” mean,it mean it have a unlock skill book icon, will appear at the top of the list, and also cost double or quadruple resources to recruit. If they have a single skill book their first skill bar is open and if they have a double skill book they have 2 skill bars open. Once you equip them with Farm skill books these normal heroes can increase your production better than most epics, all without having to spend gold on Treasured/Purple Bolus. Any epics found while searching are nice, especially 2 and 3 star epics. I prefer to use the 10g search and find that if I have recruited my max number of normal heroes I have better luck finding Bolused normal heroes.