Open Shadowss opened 6 years ago
@Shadowss update new files on a test server to start testing
All files has been updated today. All query are already executed in database. So is up to date.
I removed "The forum alliance is completely hackable" because I forgot to tick it in the previous post. Also I removed every bugs you posted here from the previous post (to not have duplicates).
Great ! I think first task is the hardest... I look forward for complete this 👍
Me too, it'll be the first one I'll complete, I already prepared the Automation class for the separation process.
Still there is one problem related to the alliance. When a player automatically drops out of the alliance (perhaps this is due to some rights of access to the management of the alliance), upon re-acceptance, it automatically receives the previously assigned access rights to the management. In the admin panel in the Alliance: Alliance Positions section, it is listed as a member of the alliance, although it is not.
Perhaps when exit the alliance, also lose the rights to manage the alliance? This is due to the innovation in the alliance, when the embassy is destroyed, the player automatically withdraws from the alliance.
You're right, if an alliance member is kicked or leave the alliance, his permissions (related to that alliance) should also be removed.
In the latest commit (f41666cabc07315372b0d6c8d0ee00cd257f4cee) I've separated Automation.php from the UI and users classes (Village.php, Building.php, etc.), it's only a test, I wanna know if everything works fine.
Try it by playing normally, every one second the Automation.php file will be called through a recursive JS function.
Let me know the results of your test and tell me if you'll notice a faster pages reload time.
Server updated !
Oh my GOD !
Calculated in 93 ms Calculated in 49 ms Calculated in 66 ms Calculated in 102 ms - Main building Calculated in 28 ms - training troops
@iopietro but every player online will now call the same page every 1 second. the automation should be handled by a cron. wich restart every minute. and runs for only 60 seconds.
@TerraSkye : on original Travian , automation is not run by cronjobs ! @iopietro : i receive this message on the game
@shadowss, was it before or after the new automation? What did they mean with "catapults" are glitching the whole game?
@TerraSkye, I said many times that's only a test, I've better solutions to handle the whole automation.
Also, you can't refresh the whole automation every 60 seconds. Every attack/construction finished will have a delay of about 60 seconds.
At me in general time of an attack after the expiration has gone to a minus.
@iopietro : that`s the whole message. Let me ask him.
I receive a screen. And an answer : of course, just a sec, and my troops are not returning back anymore somehow.
I update the server in this morning at 7:51:41 o'clock Romanian HOUR
He attack at 08:20:03 today, so yes , it`s on new automation
Do you have some recent errors in your error log file?
If the time goes to a minus value, is because there's an error somewhere because the method "sendUnitsComplete" doesn't get executed.
It could happens even because you've JS disabled on your browser and you're the only one online.
The server is 1 hour above my actual time zone. Is the server time equal to the Romanian time zone?
@iopietro im really impressed by the speed of reloading... very amazing :+1:
Yep, the loading speed of pages is really good now, but I've to resolve some bug that caused by the new automation system.
EDITED. POST TOO LONG
Ok, I'll fix it as soon as I can.
Fixed in: fca22ac98b86cbe4610575e60303399fe9c8bd18. Troops are still doubling (attacks will be performed 2 times in a row sometimes) and this is good, it's a good opportunity to finally fix the doubling troops bug.
@Shadowss, you can update your server.
@iopietro : Server updated.
Double troops bug dissapear when i change database to InnoDB and from NULL to NOT NULL
There are back again ??
Yep, it never disappeared, it's because 2 (or more) users can execute the method "sendUnitsComplete" at the same time. To fix this bug, we need a bettere "lock" system.
I changed all in database from unsigned to signed. But you know better than me 💃
IonCube explain me this :
As you can see, unsigned has minimum value of ZERO (NULL, 0) and if it goes below 0 it will go to max value 4294967295 - OVERFLOWED_VALUE , this is why you have many troops. Looking at PHP doc's (PHP: Integers - Manual), Unsigned integer is NOT supported but can be parsed.
function parse_unsigned_int($string) { $x = (float)$string; if ($x > (float)2147483647) $x -= (float)"4294967296"; return (int)$x; }
So best option would be just checking for values that go below 0 => make them to NULL and change unsigned to signed data type. This is the main reason why no one is developing Travian, only few private developers understand this. Someone will make a patch for the SQL that could fix everything.
Yes, but that was another bug, generated by overflowing an unsigned integer (by trying to bring it to -1, but it's not possible for an unsigned integer, so it will be assigned to the maximum integer 32 value = 4294967295).
The doubling troops bug is a different bug, caused by calling the method "sendUnitsComplete" at the same time by two or more users. This shouldn't be possible with our actual lock system, but it presents some fallacy, so we need to use a better lock system.
The "lock" term is used in multithreading applications, you have to use a lock when you don't want that two or more threads access to the same instructions at the same time. In our case, we have to prevent two or more different users to access to the same method, at the same time.
I removed the timer, because with this code, it caused too much load to the server. Automation.php will be now called only once for page refresh.
Fixed in 8605996533f5aa7b7e0c7ecf4fc6633859f7ffad. @Shadowss update your server :).
With the rework of the "lock" system I should have resolved a lot of problem related to "two or more users trying to access to the same method".
Update done.
Someone on game send me bugs :))))
@iopietro : time bug remain active in building
@iopietro @Shadowss
units searched desapered and cant search again in academy...
looking for more ;) btw : amazing job @iopietro and all of us helping :+1: this was gona stay the best version at this rate :1st_place_medal:
EDIT. POST TOO LONG
I mention i already try to remove /* from index.php line 29 ...
Try to do a clean installation: delete all files (or overwrite them with the new ones), delete all tables on the database and then install the server.
The reported bugs were caused by the doubling troops bug, the new lock system wasn't present yesterday and it should have fixed them.
I delete all files and database. And recreate all. Same error = blank page
Should this item not be an additional option that can be turned on or off?
Issue #304 must to be fixed. Points must go on troops owner not on what player defend
Yep, it is, that feature is available in Travian: Fire and Sand/Legend and Travian Kingdom.
So we have a travian T3.6 and as far as I can remember the points were distributed exactly to one player who was attacked.
Yes, only the defender gained points, the other players gained nothing.
@Shadowss, I reinstalled my local server and everything works fine (after deleting all database tables, config.php file and var/installed file), so I don't know.
@Shadowss
1- verify your software versions httpd / database server / PHP (specially if you have all modules necessary to it) !!!!!!!! (@iopietro little description wich modules are required!? )
2- via command drop all database and user create new database and assign a new user to it with all permissions. after that flush all previlieges
3- make sure you do not have any files on html folder including files start with .file1 .file2 etc... rm -R /allfileandfolder/*
4- copy new content
5- apply new permissions! chmod -R 777 /filesandfolder/
6- owner!! chown -R www-data:www-data /travianfilesroot/
Fixed
I advice you to make it x500, so people can rebuild their villages faster (to test things).
Done.
@iopietro : cannot Assign a possition is blank where must appear my name (on alliance)
@iopietro : enter on my account (same pass) and try to attack oasis (0|2) to see what`s happend.
But it's 50x, I said x500 :).
Yes I know. You can modify yourself. You are admin. I'm not at home
Ok, thanks :), I didn't see it.
There is one idea. How do you look at showing in the game instruction the information about the fact that new innovations have been added to the server? For example, if we have an ordinary T3.6 on the server without the additional functions included, then it will look like usual:
But if we include at least one of the new functions, then we see already the following content:
By clicking on this link we will see only those functions that are currently enabled on the server:
Going by any of the links, we see the description of the function itself:
Yeah, that's a good idea :)!
Just so will be the opportunity to introduce players to the new that is implemented on a particular server. And the player reading this information will not ask a question about why in the original Travian it works quite differently than on your server? Also, we can add some information to the newsbox that the server includes new features.
Yes, that's why it's a good idea. Yeah we can do it, maybe we should write every new feature enabled/disabled.
Hello guys,
That tasks remain to fix from version after release 8.3.4
[ ] Automation (start of the refactoring process)
[ ] Rally Point
[ ] Profile bugs
[ ] Admin panel
System / Automatic Enforced Game Rules
The following things are automatically enforced by the system. Therefore it is no longer possible that you get banned for sending too many resources or friendly conquering / attacking another village: the system will simply not allow you to do this. Automatic Pushing Protection
To get rid of the complete pushing (= excessive resource transfers) section in the rules we developed the below described automatic pushing protection system.
The limitations to the amount of resources a player may send to another one are now hard coded. Therefore it is no longer possible that you get banned for sending too many resources: the system will simply not allow you to do this.
The limitations are complicated and connected to the relationship between the accounts in question.
The different connection types are:
Additionally 6 transfer categories exist:
Hourly production
All limitations are based in the hourly production. The resources produced in an hour are calculated by summing up the production of lumber, clay, iron and crop (all crop produced minus the inhabitants of your account) for the complete account. Furthermore one hour of the last week's average net raiding (raiding income - resources lost by being raided) is added to give the hourly production for the account.
Possible combinations of resources:
If the resource transfers are limited to crop (e.g. feeding of reinforcements or supplying artefact villages) resource transfers which include other resources than crop may not be possible. Therefore you have to take care about the combination of resources you try to send away.
Sending resources in advance:
In some cases it is allowed to send resources for some days in advance. For example if you are allowed to send 7 days in advance, you could send the sum of the hourly production from Monday till Sunday all at once.
Rules for connection type 1
Rules for connection type 2
Rules for connection type 3
Exceptions
Automatic Conquering Protection
The conquering limitations are also hard coded.
These limitations are not that complicated but also connected to the relationship between the accounts in question.
The different connection types are:
Rules for connection type 1
Rules for connection type 2
Rules for connection type 3
Exceptions
[ ] General bugs
[x] Alliance bugs
[ ] Forum bugs
[ ] Gold Club bugs
[ ] Raid List bugs
[ ] Oasis
[x] Troops
[ ] Natars
[x] WW village
[ ] Artefact