Travian ModKit 2.0
Travian ModKit 2.0 is a Travian plugin based on FireFox's GreaseMonkey extension. It gathers resources and buildings info from all villages and shows them in every page, so that we don't need to browse from village to village to see what's happening on each of them.
This compiled info helps us to have a whole idea of resources and upgrades inside our empire, saving us unnecessary clicks and greatly optimizing our time.
Travian ModKit 2.0 supports and works together with Travian Beyond. It limits on reading HTML that is received from the server and improving this HTML, it sends no data and makes no requests to the server, and also does no automatic actions.
You are in full control of your game, Travian ModKit 2.0 just does automatically what you would do manually with a calculator or a spreadsheet.
- Introduction
- History
- Features
- Screenshots
- Download
- Requirements & Install
- Support & Requests
- Thanks
- Related Posts
- Comments (22)
History
During the old days of Travian, before version 3.5 was launch, we had a plugin named Travian ModKit. It basically gathered resources info from all villages, summed them and showed the result on a table, so that we could see our total production, stock and capacity. It also used to register resource fields and buildings upgrades from all villages and show them inside main villages list, with time counters that expired when each upgrade was finished.
With Travian 3.5, most old plugins stopped working, incluiding Travian ModKit. Its original author (IRoll11!~s I believe, but not totally sure) had already stopped playing Travian and didn't bother to update it. Luckly a guy named underke took its code, studied it, found where it was broken and fixed it.
From my side, still before Travian 3.5, I've done a few tweaks in Travian ModKit. I wasn't able to find out how it gathered those data, but I found the variables that stored them and was able to tweak HTML generation codes to show improved info calculated based on those data.
When Travian 3.5 was launch, my modded ModKit stopped working too, and I was unable to fix it. But months later I found underke's ModKit version, and with his help I made it work on my server.
But I wasn't satisfied yet. ModKit's original author was very skilled with JavaScript and HTML, but he wasn't good on team work and building easy-to-understand code. His code was a mess and I would basically need to redo everything I did before to add my tweaks back on it.
Because of that, and knowing that sooner or later it would break once more and all the work would have to be done again (if not even harder), and also due to my interest on learning JavaScript and having an app to work on, I decided to totally remake Travian ModKit, using Object Oriented Programming (OOP) and MVC Design Pattern, to make it easier to understand and maintenance.
I'm proud of what I've done, I've learned a lot during its development! I know my work isn't perfect yet, but I'm also sure ModKit is even better now. This release is the result of it, and I hope it to be useful to you too
Features
- Travian ModKit gathers and stores each village's resources capacity, current stock and production
- these data are summed and it shows your whole empire's total capacity, total stock and total production
- it also shows a window with each village's stock (value and percentage), free space, and those resources that are almost overflowing
- resources stock is predicted based on last update and passed time since so, this way we don't need to go back to each village to update stock (as long as its marcket is not used)
- Production Factor: resources with higher value should get priority to increase their production
- some villages events are captured and shown, so that we don't need to browse villages to remember about them:
- resources and buildings upgrades
- buildings demolition
- Blacksmith and Armoury upgrades
- Town Hall celebrations
- Barrack, Stable and Workshop troops training
- troops and mercants movements
- every event is listed with its cooldown time
- once expired, events remain listed so that we can remember what was done
- events can be added and refreshed
- unwanted events can be removed to clean up the list
- "next events to expire" list, listing each village's event with shortest cooldown
- villages with no events are listed too, to make it easy to find which villages we can improve
- 4 dots are used to help us quickly see events status:
- red: village was never browser and is still unknown
- blue: no events ATM
- green: event up and running
- yellow: expired event, remove current one from the list and go there start next!
- Culture Points efficiency suggestions: most efficient buildings are suggested to be upgraded first, to give most CP with least cost
- suggestions list can be sorted by village or by rank, showing most efficient buildings among all villages
Screenshots
(http://img10 NULL.imageshack NULL.us/img10/213/travian01 NULL.png)
Main buildings page (dorf2), with resources info, some events running and 2 expired events, CP suggestions sorted by rank, and each village stock resources
(http://img171 NULL.imageshack NULL.us/img171/8860/travian02 NULL.png)
Same as above, now on main resources page (dorf1) with CP suggestions sorted by village and each village's resources free space available
(http://img3 NULL.imageshack NULL.us/img3/4331/travian03 NULL.png)
Barrack page, with 'how much time since each village was last visited' info and CP suggestions window minimized
' rel="external nofollow"> (http://img233 NULL.imageshack NULL.us/img233/8651/travian04 NULL.png)
Here we have Travian Beyond enabled, and also showing resources that are overflowing (Warehouse near to get full)
License
Travian ModKit 2.0 is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0
To view a copy of this license, please visit Creative Commons (http://creativecommons NULL.org/licenses/by-nc-sa/3 NULL.0/)
© Copyright Hikari (http://Hikari.ws), 2009
If you want to redistribute this script, please leave a link to this post
Parts of this code are provided or based on ideas and/or code written by others
Translations to different languages are provided by users of this script
Important contributors to this script (listed in alphabetical order):
IRoll11!~s, underke
Download
Travian ModKit 2.0 can be download at userscripts.org (http://userscripts NULL.org/scripts/show/57667) (direct link (http://userscripts NULL.org/scripts/source/57667 NULL.user NULL.js))
Donate
There are also several ways you can show your appreciation:
- blogging about it
- linking it from your site (without using rel=nofollow)
- browsing the site sidebars
- suggesting it to your friends
- visiting other posts thru the site and adding valuable comments
- saying thanks on comments
- offering codes that add new features
- etc, use your imagination
Requirements
Travian ModKit 2.0 is used to enhance Travian experience. To use it, you must have FireFox (http://www NULL.mozilla NULL.com/en-US/firefox/) and GreaseMonkey addon (https://addons NULL.mozilla NULL.org/en-US/firefox/addon/748).
It was tested and works fine with Travian Beyond, not requiring it to work.
It was tested under following versions:
- FireFox 3.0.13
- GreaseMonkey 0.8.20090123.1
- Travian3 Beyond - ML&CN (optional) v3.8.8.8.6.3 (latest version tested)
Yeah, these are some old versions. I don't update very often but if you have at least these versions you should be fine.
Internet Explorer IS NOT supported.
Install
- Make sure you have at least FireFox 3.0 installed and opened.
- Go to GreaseMonkey download page (https://addons NULL.mozilla NULL.org/en-US/firefox/addon/748) and install it.
- Restart FireFox.
- Go to userscripts.org page and click Install link, or just open direct install link (available on download section).
- As FireFox with GreaseMonkey opens Travian ModKit install link, GreaseMonkey should notice it is one of its applications and show a message asking if it should be installed, click Install on it.
- You should NOT need to download Travian ModKit to your HD, just opening the page should be enough to trigger GreaseMonkey and it take care of everything.
- Go to your Travian server page, login and see if new windows are being shown.
This is GreaseMonkey installation window. It shows up just after you enter installation link, instead of normal download window. If it doesn't appear, probably you don't have GreaseMonkey installed yet!
If something goes wrong after installing, make sure to set Travian ModKit on top of all plugins list, just below Travian Beyond.
Support & Requests
If you want to request any new feature, leave a comment on this post explaining it with as many details as possible. I can't assure it will be added, but if it is viable, I like it AND have the time, I'll do my best.
If something seems to not be working and you need help, first read the FAQ (will be posted soon) and then leave a comment explaining what's happening. If you need to post a picture, please link it instead of using a img tag.
Travian ModKit 2.0 currently doesn't support translations (I prefered to do it simpler and have it ready sooner instead of worrying about localization support and taking more time, sorry), and most events text is copied directly from Travian anyway.
Culture Point suggestions, on the other hand, depends on comparing buildings names to identify each building, and these internal names must be translated. It will still work on servers that it wasn't translated, it will just not automatically identify each building, and you will have to do it manually by removing buildings that were already upgraded.
Currently, there are translations for the following languages/servers:
- .br (main development server)
- .pt (should be the same as br, not tested)
- .nl (translated by underke)
- .com (names taken from Travian help page, not tested)
- .us (should be the same as .com)
If you know any other server that uses the same language of those above, please leave a comment and I'll add it.
If you want to translate it to your language, please use the following code, translating the right side text (not the xLang one) and leaving a comment with the translation:
case 'com': xLang['Main']='Main Building'; xLang['Market']='Marketplace'; xLang['Academy']='Academy'; xLang['Embassy']='Embassy'; xLang['Granary']='Granary'; xLang['Stable']='Stable'; xLang['Wall']='City Wall'; // roman wall xLang['Gaul Wall']='Palisade'; xLang['Teuton Wall']='Earth Wall'; xLang['Warehouse']='Warehouse'; xLang['Rally']='Rally Point'; xLang['Blacksmith']='Blacksmith'; xLang['Armoury']='Armoury'; xLang['Palace']='Palace'; xLang['Residence']='Residence'; xLang['Workshop']='Workshop'; xLang['Barracks']='Barracks'; xLang['Town Hall']='Town Hall'; xLang['Trade']='Trade Office'; xLang['Wood Field']='Woodcutter'; xLang['Clay Field']='Clay Pit'; xLang['Iron Field']='Iron Mine'; xLang['Crop Field']='Cropland';
Thanks
Thanks to everybody that made Travian ModKit possible, to IRoll11!~s for the original idea and implementations. Thanks A LOT to underke for all the help and explanations that made me able to understand original code. If it wasn't for you guys, this wouldn't be possible.
And of course, thanks to you that came to this post and uses my little creation!
Popularity: 44%
It has accumulated a total of 156,359 views. You can follow any comments to this article through the Comments RSS 2.0 Feed. You can leave a comment, or trackback from your own site.
Related Posts:
- formulário pra sitter em Travian
- Hikari Internal Links
- Hikari Krumo
- Finding theme folders for parent and child
- Hikari Hooks Troubleshooter
- Wordpress comments: new built-in feature X Wordpress…
- Hikari Unicornified Gravatars
- Hikari Featured Comments
- Hikari Email & URL Obfuscator - JavaScript markup
- Hikari Internal Links - Exemples
homepageNice to see you mentioned me in your history. :)
I don’t have now the time to see if all bugg’s in the dutch .nl servers got fixed (like the negative timer that didn’t expire the job).
But when i get back from my trip to the US for sure i will try to test :p
people that don’t have a 24 inch screen,.. you found today a reason to buy one :p
Love you all!!
greetz from 4fun/underke/Leppy/… :pfeedback
hey dude!!
Really tnx for helping me in the beginning. I knew pratically nothing about JavaScript, I used to just compare it with my programming experience with other languages.
JavaScript is very different from any other language. I even believed it was based on Java, but I found out its name was just a marcketing trick If it wasn’t for you helping me understand all those HTML gathering codes and XPath expressions I’d just get lost and give up.
Your tons of alert debugs also helped a lot :P
I didn’t understand what you mean with negative timer not expiring, you never told me about it. If you’re talking about events expiring and remaining on the list, that’s what I wanted. When I have the time I’ll add some configs, 1 of them is automatically remove expired events. But my time is short and if I started adding custom configs (and translation support too) it would never be finished.
Now I’m working on building manual and code explanation, when that’s done I’ll go back developing it.
Here I have a Dell 2007WFP monitor, of course windows were dimensioned to fit 1680 pixel width
But they are draggable and nothing stops us from moving them down below main area (I used to do that a lot with Travian Task Queue), or just leave them minimized one below the other and maximize them when needed. Culture Point suggestions window for exemple is only needed when we are going to upgrade something.
Anyway, with a few Travian plugins we can end up with a ton of windows opened. Travian Beyond also has a lot of them, Trask Queue has at lest 2 more, etc. That’s why I wanted to use draggable windows and not only print static tables as it was in old ModKit version, remember that I moved that original table to a DW too
Tnx again dude, I hope to have u back!!
homepage
Travian ModKit 2.0
Hi HIkari, I’m the original author and just saw your comment, read your website and poked through your script code. I’m thrilled that you have resurrected this. Let me start by apologizing profusely for not documenting my code. Ugh. I’ve learned since then, all my newer code has comments out the wazzu.
From your site:
That’s an accurate and fair assumption, although I would drop ‘very skilled with’ and replace ‘moderately decent with’. Looking back at my modkit code now makes me laugh at some of the coding choices I made. And the nested timer functions, oooh boy. I had a hard time keeping track of what that timer code was doing while I was writing it…
At one point MK was the 2nd most installed script on userscripts behind Travian Beyond. Beyond was fractured into about 10 different versions and authors, so if I had kept going I’m fairly certain it would have reached #1. (That was before people learned how to game the install count system.) A new version of Travian and the fact that I missed the opening of the next speed server by a week and a half conspired to make me lose interest in development.
Even though it hasn’t been updated in 2 years and doesn’t work, my script still gets downloaded about 40 times a day. I wonder who these people are, and I wish I could point them all over here.
I’ll post a link to this on the original script’s about page. Wish you the best with this, I hope you get a thousand loyal fans who all bug you with update requests =]
participate
IRoll11!~s
Hey dude tnx A LOT for the comment! :D
I’m glad you liked my work, and yes you are very skilled! You’ve done the hardest work, find out where raw data was and readapt it, creatively knowing how it would be useful.
I’m happy you didn’t get mad on my opinion that you code was a mess :P If it wasn’t underk helping me I’d never be able to make it work again. And without a working version to test it was impossible to do anything.
Anyway, just after v1.0 of my ModKit was ready I got busy with other stuff. Up until today I didn’t make a good description on userscript, and also didn’t make a manual and code explanation text. But it is not abandoned thou, when I have the time I will complete my work!
Currently I’m not playing Travian. I donated my brx account to some friends and soon its round will be gone. I don’t plan to seriously play Travian anymore, but I wanna keep acess to any friend account to test and maintain ModKit.
Also, I’m happy with the amount of downloads and visits I’m receiving, but feedback had been none up until now. I don’t know if anything changed in Travian that broke the code, or anything like that. No translation contributions or but complains also. I don’t know if that’s due to lack of interest or if everything is working accordingly.
I’d like to keep contact with you! If possible, gimme an email or msn so that we can talk. I don’t need help in ModKit anymore and I don’t verify you original code, but it’d be nice to have you as a friend!!
information
does not work
script does not work
You can fix it please?research
v1.00.03
researchTnx for reporting it stopped worked, and for providing me an account so I could test and and fix it :)
Thank you very much.
Now it works even betterinformation
:)
marketingI’m glad it worked :) I loved the software when I used it and if someday I go back to Travian I need it working, Travian sucks without the ModKit ;)information
sorry
marketingsorry to disturb you , script don’t work on .com , tried in s6 and s2. he didnt take nothing, not even city name (in have only 1 … maybe thats the problem.) If i move-it above of beyond script v3.8.8.9.7.3.2 I have windows, but no data filled. If i move it below that script, no windows … no nothing.
v1.00.03
Hello
First of all, make sure you are using v1.00.03, ho1d helped me debug it and I uploaded the new version a few days ago. Travian devs added a new
<div>
around villages links in main table and it was breaking my plugin.Another thing to take care is that ModKit really relies that villages table, and the table is not present when we have only 1 village. If you are using Travian Beyond, and it is being loaded before ModKit, Beyond creates the table and it can be used by ModKit. But playing with only 1 village is very rare and this situation had very vew tests (ModKit is not very useful with 1 village after all, so my intention was just assure it wouldn’t break anything else), I didn’t test new Beyond versions and IDK how they are dealing with 1-village now.
Based on your description, my best bet is that you are using v1.00.01 yet, or that v1.00.03 doesn’t support 1-village with newest Beyond version.
If you want, you can contact me by ICQ or msn (leave a message with yours and I won’t publish it) and give me more instructions so I can identify your bug and try to fix it. Or just wait until you create your 2nd village and see if with Travian’s table it works.
If you have any other concern just leave another comment and we’ll see what can be done
feedbackversion of modkit is v1.00.03 , beyond is last version. I thinck the problem is because I have only first village. but dont worry, if will not work on second village i will give you any data you need .
thx for your attentionparticipate
yet bugged
marketing
Well, the normal behavior when having only 1 village is to not be visible when Beyond is not loaded and work normally when Beyond is available.
ModKit uses the villages table to gather villages info (name, ID, link, etc) and identify current village. I could have searched an alternative way to find current village info when having a unique village, but since ModKit’s intention is to merge together infos about all villages, it’s not much useful in the begining of the game and I didn’t bother with it.
There’s still the possibility that Beyond’s table is now using a different markup that ModKit doesn’t recognize, but anyway I don’t have the time now to fix it. Just disable the software and enable it back when you create your 2nd village. If the bug persists, call me and we’ll try to make it work in your version of Travian.
It’s damn boring when they change the version during a round and all tweaks stop working in the morning when we wake up :P
this is what i wanted
researchThis script includes the features that i wanted and more! Very nice, i recommend to those who are using Beyond also. I have to switch to a higher resolution of my screen. Ubelievable.feedback
resolution
participatelol tnx :D
yeah, they are many windows with a lot of info! But when u have many villages it’s impossible to keep all windows on screen, u can just move them below and scroll down when needed ;)homepage
its work
now, one many villages work like a char. thx for your script man
tnx
hehe tnx for reporting it still works and for liking it :)
how many villages do you manage with ModKit?
6
i have 6 vilages on one acount and 5 on another.
homepage
30
feedback
hmm I used to have 30 villages I think :p
homepage
It looks good, i like the cp table you have. I will try it out and give my 2 cents.
participate
WOW! Talkbout a cluttered mess with travian3 byond, I love it!
Good to know it's still working even today :)
I wanted to go back playing the game, but I have no time at all to spend on it. It would only be worth it if I was part of a good team sharing an account, and could only make the expantion strategy having my partners implementing it as I say. Then another of them handling battles, another on weapons evolution, etc.
Well, tnx for the comment, it's rare to see any talk about this software and even more to have a news about it working :)
information
It was working for me on a 5x even but i cant find any problems with it.
research