User Name: Password: Register
Undecima Forum Bugs & Modifications Modifications Military and Troops Changes
Military and Troops Changes
Topic:
Page 6 out of 6 Page(s)
GO
First « ... 4 5 6
30-May 2018 22:07 #51
ForumAdmin
Vindicator



Administrator
Active
Join Date: 24-May-2015
Posts: 659
Re: Military and Troops Changes
"Originally Posted by Fysh"

I wondered if that might be an issue, because the mercenary page probably doesn't know anything about the commanders speed bonuses.

However, the server only needs to send the client browser one extra integer per mercenary camp to enable the client page to update on-the-fly and without page reloads.

For example, for camp 2, if c2.t is the original time, and c2.x is the percentage commander speed for that camp, then the new time would be calculated as:

New time = c2.t * 100 / (100 + c2.x)

For example, if c.x = 60 (60%), and c2.t = 3960 seconds (66 minutes), the adjusted time would be

3960 * 100 / 160 = 2475 seconds = 41.25 minutes.

Currently there is a bug in the way that the time is calculated. I had some barbarians whose normal return time was 66 minutes, but when I recalled them with the commander (60% speed), the travel time was only 33 minutes, instead of the expected 41.25 as per the formula above.
 


Could you possibly have a Traveller (Guest) who was improving the speed? I made it the same way as returning troops from anywhere, so it should work fine.

As for implementing - there are a few other things. If I was dong it, I'd it all on the server (always faster) and pass two variables to with and with out Commander to the browser, then just switch it, depending on the checkbox.

I'll do it, but a bit later Happy
If you have any questions or problems related to Undecima, do not hesitate to ask them on the forum, send me a private message, or email to support@undecima.com
liked this
disliked this
30-May 2018 22:59 #52
Fysh
Wyvern Master



User
Active
Join Date: 17-Nov-2015
Posts: 314
Re: Military and Troops Changes
No, I haven't got any travellers at all. Really weird.
liked this
disliked this
30-May 2018 23:09 #53
Fysh
Wyvern Master



User
Active
Join Date: 17-Nov-2015
Posts: 314
Re: Military and Troops Changes
I tested some horsemen travelling one square away.

Horsemen speed = 22

1 square = 163.6 seconds = 2:43 which is exactly what the game says.

Add in a +60% commander, and it should read 102.3 seconds = 1:42. Again, the game is spot on...

Last Edited: 23:09 30-May-18 by Fysh
liked this
disliked this
30-May 2018 23:11 #54
Fysh
Wyvern Master



User
Active
Join Date: 17-Nov-2015
Posts: 314
Re: Military and Troops Changes
"Originally Posted by ForumAdmin"

As for implementing - there are a few other things. If I was dong it, I'd it all on the server (always faster) and pass two variables to with and with out Commander to the browser, then just switch it, depending on the checkbox.

I'll do it, but a bit later Happy
 


That means still no page reloads Cool Well Done
liked this
disliked this
30-May 2018 23:32 #55
Fysh
Wyvern Master



User
Active
Join Date: 17-Nov-2015
Posts: 314
Re: Military and Troops Changes
Mercenary camp 4 squares away containing slingers. Slingers speed 8 squares per hour. Game says 30 minute return time. Spot on.

Hired 1 slinger, and sent home with +60% commander.

Expected time was 18m 45s - possibly a few seconds less because of page reload.

Return time on Troop Order page says 7:26 ! Go Crazy
liked this
disliked this
30-May 2018 23:37 #56
Fysh
Wyvern Master



User
Active
Join Date: 17-Nov-2015
Posts: 314
Re: Military and Troops Changes
Could it be that you are calculating the return time of the commander, but forgetting that he is also coming home with troops? LOL
ForumAdmin liked this
disliked this
01-Jun 2018 00:44 #57
ForumAdmin
Vindicator



Administrator
Active
Join Date: 24-May-2015
Posts: 659
Re: Military and Troops Changes
"Originally Posted by Fysh"
Could it be that you are calculating the return time of the commander, but forgetting that he is also coming home with troops? LOL
 


Yes, that was it - just missed to update one of the scripts Wink should be fine now and sending you Reward (a fat one) for reporting a bug Wink

Well Done
If you have any questions or problems related to Undecima, do not hesitate to ask them on the forum, send me a private message, or email to support@undecima.com
liked this
disliked this
01-Jun 2018 20:20 #58
Fysh
Wyvern Master



User
Active
Join Date: 17-Nov-2015
Posts: 314
Re: Military and Troops Changes
Well Done Thank You
liked this
disliked this
22-Jun 2018 01:22 #59
ForumAdmin
Vindicator



Administrator
Active
Join Date: 24-May-2015
Posts: 659
Re: Military and Troops Changes
I can't fit too much in there, hope it will help to realize it

image
If you have any questions or problems related to Undecima, do not hesitate to ask them on the forum, send me a private message, or email to support@undecima.com
liked this
disliked this
Page 6 out of 6 Page(s)
GO
First « ... 4 5 6 ^
ticket image
Insert Image
Enter URL of the Image you want to insert:

Or browse to a file on your local computer:
(allowed file types: bmp, gif, jpeg, and png; maximum size: 500Kb)
Copyright © 2015 Undecima . All rights reserved.